Allow to get, set, declare or list parameters. More...
#include <Client.hh>
Public Member Functions | |
ParametersClient (const ParametersClient &)=delete | |
No copy constructor. More... | |
ParametersClient (const std::string &_serverNamespace="", unsigned int _timeoutMs=kDefaultTimeoutMs) | |
Constructor. More... | |
ParametersClient (ParametersClient &&) | |
Default move constructor. More... | |
~ParametersClient () | |
Destructor. More... | |
ParameterResult | DeclareParameter (const std::string &_parameterName, const google::protobuf::Message &_msg) final |
Declare a new parameter. See ParametersInterface::DeclareParameter(). More... | |
ignition::msgs::ParameterDeclarations | ListParameters () const final |
List all parameters. More... | |
ParametersClient & | operator= (const ParametersClient &)=delete |
No copy assignment. More... | |
ParametersClient & | operator= (ParametersClient &&) |
Default move assignment. More... | |
ParameterResult | Parameter (const std::string &_parameterName, google::protobuf::Message &_parameter) const final |
Request the value of a parameter. See ParametersInterface::Parameter(). More... | |
ParameterResult | Parameter (const std::string &_parameterName, std::unique_ptr< google::protobuf::Message > &_parameter) const final |
Request the value of a parameter. Similar to the other overload, but it allocates a message of the right type. More... | |
ParameterResult | SetParameter (const std::string &_parameterName, const google::protobuf::Message &_msg) final |
Set the value of a parameter. See ParametersInterface::SetParameter(). More... | |
Public Member Functions inherited from ParametersInterface | |
virtual | ~ParametersInterface ()=default |
Default virtual destructor. More... | |
Detailed Description
Allow to get, set, declare or list parameters.
in a remote registry.
Constructor & Destructor Documentation
◆ ParametersClient() [1/3]
ParametersClient | ( | const std::string & | _serverNamespace = "" , |
unsigned int | _timeoutMs = kDefaultTimeoutMs |
||
) |
Constructor.
- Parameters
-
[in] _serverNamespace Namespace of the parameters registry services. The client will send requests to: - /${_serverNamespace}/get_parameter
- /${_serverNamespace}/list_parameters
- /${_serverNamespace}/set_parameter
- /${_serverNamespace}/declare_parameter
[in] _timeoutMs Time to wait for the server to respond.
◆ ~ParametersClient()
~ParametersClient | ( | ) |
Destructor.
◆ ParametersClient() [2/3]
|
delete |
No copy constructor.
◆ ParametersClient() [3/3]
ParametersClient | ( | ParametersClient && | ) |
Default move constructor.
Member Function Documentation
◆ DeclareParameter()
|
finalvirtual |
Declare a new parameter. See ParametersInterface::DeclareParameter().
Implements ParametersInterface.
◆ ListParameters()
|
finalvirtual |
List all parameters.
- Returns
- Protobuf message with a list of all declared parameter names and their types.
Implements ParametersInterface.
◆ operator=() [1/2]
|
delete |
No copy assignment.
◆ operator=() [2/2]
ParametersClient& operator= | ( | ParametersClient && | ) |
Default move assignment.
◆ Parameter() [1/2]
|
finalvirtual |
Request the value of a parameter. See ParametersInterface::Parameter().
Implements ParametersInterface.
◆ Parameter() [2/2]
|
finalvirtual |
Request the value of a parameter. Similar to the other overload, but it allocates a message of the right type.
- Parameters
-
[in] _parameterName Name of the parameter to be requested. [out] _parameter Output were the parameter value will be set.
- Returns
- A ParameterResult return code, can return error types:
- ParameterResultType::NotDeclared if the parameter was not declared.
- ParameterResultType::Unexpected, if an unexpected error happened.
Implements ParametersInterface.
◆ SetParameter()
|
finalvirtual |
Set the value of a parameter. See ParametersInterface::SetParameter().
Implements ParametersInterface.
The documentation for this class was generated from the following file: