client Operation expose PV name

Desirable to include in error messages if nothing else
This commit is contained in:
Michael Davidsaver
2020-07-27 08:33:02 -07:00
parent c8f72f5319
commit 3b9dd9c405
3 changed files with 10 additions and 0 deletions
+5
View File
@@ -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)
+1
View File
@@ -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;
};
+4
View File
@@ -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;