client Operation expose PV name
Desirable to include in error messages if nothing else
This commit is contained in:
@@ -165,6 +165,11 @@ OperationBase::OperationBase(operation_t op, const std::shared_ptr<Channel>& cha
|
||||
|
||||
OperationBase::~OperationBase() {}
|
||||
|
||||
const std::string& OperationBase::name()
|
||||
{
|
||||
return chan->name;
|
||||
}
|
||||
|
||||
Value OperationBase::wait(double timeout)
|
||||
{
|
||||
if(!waiter)
|
||||
|
||||
@@ -54,6 +54,7 @@ struct OperationBase : public Operation
|
||||
virtual void createOp() =0;
|
||||
virtual void disconnected(const std::shared_ptr<OperationBase>& self) =0;
|
||||
|
||||
virtual const std::string& name() override final;
|
||||
virtual Value wait(double timeout=-1.0) override final;
|
||||
virtual void interrupt() override final;
|
||||
};
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
|
||||
//! Handle for in-progress operation
|
||||
struct PVXS_API Operation {
|
||||
//! Operation type
|
||||
const enum operation_t {
|
||||
Info = 17, // CMD_GET_FIELD
|
||||
Get = 10, // CMD_GET
|
||||
@@ -111,6 +112,9 @@ struct PVXS_API Operation {
|
||||
Operation& operator=(const Operation&) = delete;
|
||||
virtual ~Operation() =0;
|
||||
|
||||
//! PV name
|
||||
virtual const std::string& name() =0;
|
||||
|
||||
//! Explicitly cancel a pending operation.
|
||||
//! Blocks until an in-progress callback has completed.
|
||||
virtual void cancel() =0;
|
||||
|
||||
Reference in New Issue
Block a user