|
RTC Toolkit
2.0.0
|
A request object to pass information about datapoints to subscribe to. More...
#include <repositorySubscriberIf.hpp>
Classes | |
| class | Parameters |
| A structure to hold the arguments passed to the Add method. More... | |
Public Member Functions | |
| template<typename F > | |
| void | AddRemovedHandler (const DataPointPath &path, F handler) |
| Adds a request to subscribe to removal notifications for a particular datapoint. More... | |
| template<typename T , typename F > | |
| void | AddNewValueHandler (const DataPointPath &path, T &buffer, F handler) |
| Adds a request to subscribe to new data values for a particular datapoint. More... | |
| const std::vector< Parameters > & | GetParams () const |
A request object to pass information about datapoints to subscribe to.
| void rtctk::componentFramework::RepositorySubscriberIf::SubscribeRequest::AddNewValueHandler | ( | const DataPointPath & | path, |
| T & | buffer, | ||
| F | handler | ||
| ) |
Adds a request to subscribe to new data values for a particular datapoint.
This will associate a particular callback function to receive new datapoint values. Once the request has been sent with the SendSubscribeRequest method, notifications for new data values for the given datapoint will be received as soon as the registration completes. This may occur before the Response::Wait returns, i.e. the response object returned by SendSubscribeRequest. Whenever a new data value notification is received the callback handler function is invoked. It takes two arguments, the path of the datapoint that was updated and a reference to the registered buffer that contains the updated value.
| [in] | path | The path of the datapoint to subscribe to. |
| [in] | buffer | The buffer that will be filled with new data values. |
| [in] | handler | A handler function, lambda or functional to invoke. It must have a signature compatible with void(const DataPointPath& path, T& buffer)
|
| void rtctk::componentFramework::RepositorySubscriberIf::SubscribeRequest::AddRemovedHandler | ( | const DataPointPath & | path, |
| F | handler | ||
| ) |
Adds a request to subscribe to removal notifications for a particular datapoint.
This will associate a particular notification callback function with a datapoint. Once the request has been sent with the SendSubscribeRequest method, notifications for removed datapoints will be received as soon as registration completes and the datapoint has actually been removed. This may occur before the Responce::Wait returns, i.e. the response object returned by SendSubscribeRequest. Whenever a notification is received the given handler callback function is invoked. Its argument will contain the path of the datapoint that was removed.
| [in] | path | The path of the datapoint to subscribe to. |
| [in] | handler | A handler function, lambda or functional to invoke. It must have a signature compatible with void(const DataPointPath& path)
|
|
inline |