SharedPV::Handler better defaults
This commit is contained in:
@ -94,14 +94,14 @@ public:
|
||||
*/
|
||||
struct epicsShareClass Handler {
|
||||
POINTER_DEFINITIONS(Handler);
|
||||
virtual ~Handler() {}
|
||||
virtual ~Handler();
|
||||
virtual void onFirstConnect(const SharedPV::shared_pointer& pv) {}
|
||||
//! Called when the last client disconnects. May close()
|
||||
virtual void onLastDisconnect(const SharedPV::shared_pointer& pv) {}
|
||||
//! Client requests Put
|
||||
virtual void onPut(const SharedPV::shared_pointer& pv, Operation& op) {}
|
||||
virtual void onPut(const SharedPV::shared_pointer& pv, Operation& op);
|
||||
//! Client requests RPC
|
||||
virtual void onRPC(const SharedPV::shared_pointer& pv, Operation& op) {}
|
||||
virtual void onRPC(const SharedPV::shared_pointer& pv, Operation& op);
|
||||
};
|
||||
|
||||
/** Allocate a new PV in the closed state.
|
||||
|
@ -29,7 +29,6 @@ struct MailboxHandler : public pvas::SharedPV::Handler {
|
||||
virtual void onPut(const pvas::SharedPV::shared_pointer& self, pvas::Operation& op) OVERRIDE FINAL
|
||||
{
|
||||
self->post(op.value(), op.changed());
|
||||
op.info("Set!");
|
||||
op.complete();
|
||||
}
|
||||
static std::tr1::shared_ptr<pvas::SharedPV::Handler> build() {
|
||||
@ -41,6 +40,18 @@ struct MailboxHandler : public pvas::SharedPV::Handler {
|
||||
|
||||
namespace pvas {
|
||||
|
||||
SharedPV::Handler::~Handler() {}
|
||||
|
||||
void SharedPV::Handler::onPut(const SharedPV::shared_pointer& pv, Operation& op)
|
||||
{
|
||||
op.complete(pvd::Status::error("Put not supported"));
|
||||
}
|
||||
|
||||
void SharedPV::Handler::onRPC(const SharedPV::shared_pointer& pv, Operation& op)
|
||||
{
|
||||
op.complete(pvd::Status::error("RPC not supported"));
|
||||
}
|
||||
|
||||
SharedPV::Config::Config()
|
||||
:dropEmptyUpdates(true)
|
||||
,mapperMode(pvd::PVRequestMapper::Mask)
|
||||
|
Reference in New Issue
Block a user