Extendable class that allows to send commands to components using MAL.
More...
#include <rtctk/componentFramework/commandRequestor.hpp>
Extendable class that allows to send commands to components using MAL.
◆ CommandRequestor()
| rtctk::metadataCollector::CommandRequestor::CommandRequestor |
( |
const elt::mal::Uri & | uri, |
|
|
std::optional< std::chrono::milliseconds > | timeout = std::nullopt ) |
|
explicit |
Create a new CommandRequestor object.
- Parameters
-
| uri | ip and port of the component |
| timeout | timeout for requests in milliseconds |
◆ ~CommandRequestor()
| virtual rtctk::componentFramework::CommandRequestor::~CommandRequestor |
( |
| ) |
|
|
virtualdefault |
◆ MakeInterface()
| std::unique_ptr< T > rtctk::componentFramework::CommandRequestor::MakeInterface |
( |
const std::string & | name | ) |
|
|
inlineprotected |
Make a new MAL interface.
- Template Parameters
-
| T | type of the MAL interface |
- Parameters
-
| name | identifyer of the MAL interface |
◆ RegisterCommand()
| void rtctk::componentFramework::CommandRequestor::RegisterCommand |
( |
const std::string & | id, |
|
|
std::function< elt::mal::future< std::string >(const std::string &)> | fun ) |
|
protected |
Register a new command.
- Parameters
-
| id | identifyer of the command |
| fun | function that executes the command using the async MAL interface |
◆ SendCommandAsync()
| elt::mal::future< std::string > rtctk::componentFramework::CommandRequestor::SendCommandAsync |
( |
const std::string & | id, |
|
|
const std::string & | args ) |
Send asynchronous command to a component.
- Parameters
-
| id | identifyer of the command |
| args | command arguments a serialised string |
◆ SendCommandSync()
| std::string rtctk::componentFramework::CommandRequestor::SendCommandSync |
( |
const std::string & | id, |
|
|
const std::string & | args ) |
Send synchronous command to a component.
- Parameters
-
| id | identifyer of the command |
| args | command arguments a serialised string |
The documentation for this class was generated from the following files: