ISendTrigger Class
(ServerIO::ISendTrigger)Interface class used for trig sending, e.g. when a routed property has an edge (change from true to false or from false to true). ISendOnPropertyChange is a typedef for ISendTrigger. More...
Header: | #include <IO/ServerIO/ISendTrigger.h> |
Public Functions
virtual | ~ISendTrigger() |
virtual void | FlagForSend(const std::string &arguments) |
virtual void | FlagForSend() = 0 |
Detailed Description
Interface class used for trig sending, e.g. when a routed property has an edge (change from true to false or from false to true). ISendOnPropertyChange is a typedef for ISendTrigger.
See also IOServer, ServerIO, ServerIO::ISendOnPropertyChange, and ServerIO::IWakeFunctor.
Member Function Documentation
[virtual]
ISendTrigger::~ISendTrigger()
Destroys the instance of ISendTrigger. The destructor is virtual.
[virtual]
void ISendTrigger::FlagForSend(const std::string &arguments)
The FlagForSend(const std::string &arguments) function should be called when some data/property has changed or some other event has occured and change/message based triggering of packet should occur and there are values in packet that need to be overrided.
The arguments format is semicolon separated key value pairs: "Channel3=10;Channel6=20". The parsing of arguments string can be done with
The IOServer implementation should store the arguments string in thread safe manner until the packet is being sent and use the content of arguments to override any packet named fields defined by the argument string before clearing the stored string.
The default implementation forwards call to FlagForSend().
See also CDPUtils::SplitParameters.
[pure virtual]
void ISendTrigger::FlagForSend()
The FlagForSend() function should be called when some data/property has changed or some other event has occured and change/message based triggering of packet should occur.
The Implementation should set up a flag in the IOServer packet in a thread safe manner that is checked during send code. In addition this is the callback to use for kicking CDPEvent if one is used to wait. on IOServer tx/rx loop. See IOServer::RegisterSendOnChange() and IOServer::DeregisterSendOnChange().
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.