A request object to pass information about datapoints that should be read from the repository.
More...
#include <rtctk/componentFramework/repositoryIf.hpp>
|
| class | Parameters |
| | A structure to hold the arguments passed with one of the Add methods. More...
|
| |
A request object to pass information about datapoints that should be read from the repository.
- Thread Safety
- thread-compatible
- Deprecated
- Use BatchRequest instead.
◆ Add() [1/2]
Adds a datapoint to the request for reading.
- Template Parameters
-
| T | The type of the output buffer, which must match the type of the datapoint. |
- Parameters
-
| [in] | path | The datapoint path from which to read from the repository. |
| [out] | buffer | The local output buffer where the read datapoint should be stored in memory. |
- Thread Safety
- ❗thread-hostile❗ – Intended to be used in one thread only.
- Exception Safety
- basic
◆ Add() [2/2]
| void rtctk::componentFramework::RepositoryIf::ReadRequest::Add |
( |
const DataPointPath & | path, |
|
|
T & | buffer, |
|
|
F | handler ) |
Adds a datapoint to the request for reading with a callback handler.
This method allows to add a request to read a datapoint and register a callback function that will be invoked as soon as the data arrives from the repository. The signature for the callback function must be as follows:
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
where T should be the same type as the type used for the buffer argument.
The callback function will typically execute in a different thread than the one that registered the handler in the first place.
- Note
- The callback function must not access any other datapoint buffers other than the buffer that it receives as an argument. This is the only buffer that is guaranteed to be delivered and ready at the time the callback is invoked.
- Template Parameters
-
| T | The type of the output buffer, which must match the type of the datapoint. |
| F | The type of the handler callback function. It can be any callable that has a function signature compatible with: |
- Parameters
-
| [in] | path | The datapoint path from which to read from the repository. |
| [out] | buffer | The local output buffer where the read datapoint should be stored in memory. |
| [in] | handler | The callback handler function to execute as soon as the data is received. |
- Thread Safety
- ❗thread-hostile❗ – Intended to be used in one thread only.
- Exception Safety
- basic
◆ GetParams() [1/2]
| std::vector< Parameters > & rtctk::componentFramework::RepositoryIf::ReadRequest::GetParams |
( |
| ) |
|
|
inline |
◆ GetParams() [2/2]
| const std::vector< Parameters > & rtctk::componentFramework::RepositoryIf::ReadRequest::GetParams |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- componentFramework/services/common/src/include/rtctk/componentFramework/repositoryIf.hpp
- componentFramework/services/common/src/include/rtctk/componentFramework/repositoryIf.ipp