AceSmartSoft API Documentation
|
Server part of the Push pattern to provide a push timed service. More...
#include <smartPush.hh>
Public Member Functions | |
PushServer (SmartComponent *component, const std::string &svc, const SmartTimeValue &minCycleTime=SmartTimeValue::zero) | |
Constructor. More... | |
virtual | ~PushServer () |
Destructor. More... | |
Smart::StatusCode | put (const DataType &d) |
Provide new data which is sent to all subscribed clients taking into account their individual update cycles. More... | |
Server part of the Push pattern to provide a push timed service.
A user provided handler method is regularly triggered to initiate data acquisition. Newly acquired data is provided to the server by the put-method. It immediately distributes the new data to subscribed clients taking into account their individual update cycles.
Template parameters
Demonstrated in eigth example
SmartACE::PushServer< DataType >::PushServer | ( | SmartComponent * | component, |
const std::string & | svc, | ||
const SmartTimeValue & | minCycleTime = SmartTimeValue::zero |
||
) |
Constructor.
component | management class of the component |
svc | name of the service |
minCycleTime | cycle time of the service in [seconds] |
(Currently exception not thrown)
|
virtual |
Destructor.
Properly disconnects all service requestors in case of destruction such that all connected and subscribed clients are unsubscribed and disconnected properly.
Smart::StatusCode SmartACE::PushServer< DataType >::put | ( | const DataType & | d | ) |
Provide new data which is sent to all subscribed clients taking into account their individual update cycles.
Update cycles are always whole-numbered multiples of the server update cycle.
(Individual update interval counters are incremented each time this member function is called irrespectively of the elapsed time. One should use the time triggered handler to call the put() member function with the appropriate timing.)
PushHandler::handlePushRequest() directly or indirectly use this method to provide new data.
d | contains the newly acquired data to be sent as update. |