Common interface, implemented by ParametersRegistry (local updates) and by ParametersClients (remote requests). More...
#include <Interface.hh>
Public Member Functions | |
virtual | ~ParametersInterface ()=default |
Default virtual destructor. More... | |
virtual ParameterResult | DeclareParameter (const std::string &_parameterName, const google::protobuf::Message &_msg)=0 |
Declare a new parameter. More... | |
virtual ignition::msgs::ParameterDeclarations | ListParameters () const =0 |
List all existing parameters. More... | |
virtual ParameterResult | Parameter (const std::string &_parameterName, google::protobuf::Message &_parameter) const =0 |
Request the value of a parameter. More... | |
virtual ParameterResult | Parameter (const std::string &_parameterName, std::unique_ptr< google::protobuf::Message > &_parameter) const =0 |
Request the value of a parameter. Similar to the other overload, but it allocates a message of the right type. More... | |
virtual ParameterResult | SetParameter (const std::string &_parameterName, const google::protobuf::Message &_msg)=0 |
Set the value of a parameter. More... | |
Detailed Description
Common interface, implemented by ParametersRegistry (local updates) and by ParametersClients (remote requests).
Constructor & Destructor Documentation
◆ ~ParametersInterface()
|
virtualdefault |
Default virtual destructor.
Member Function Documentation
◆ DeclareParameter()
|
pure virtual |
Declare a new parameter.
- Parameters
-
[in] _parameterName Name of the parameter to be declared. [in] _msg Protobuf message to be used as the initial parameter value.
- Returns
- A ParameterResult return code, can return error types:
- ParameterResultType::AlreadyDeclared if the parameter was already declared.
- ParameterResultType::InvalidType if the parameter type is not valid.
Implemented in ParametersRegistry, and ParametersClient.
◆ ListParameters()
|
pure virtual |
List all existing parameters.
- Returns
- The name and types of existing parameters.
Implemented in ParametersRegistry, and ParametersClient.
◆ Parameter() [1/2]
|
pure virtual |
Request the value of a parameter.
- 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::InvalidType if the parameter type was invalid.
- ParameterResultType::Unexpected, if an unexpected error happened.
Implemented in ParametersRegistry, and ParametersClient.
◆ Parameter() [2/2]
|
pure virtual |
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.
Implemented in ParametersRegistry, and ParametersClient.
◆ SetParameter()
|
pure virtual |
Set the value of a parameter.
- Parameters
-
[in] _parameterName Name of the parameter to be set. [in] _msg Protobuf message to be used as the parameter value.
- Returns
- A ParameterResult return code, can return error types:
- ParameterResultType::NotDeclared if the parameter was not declared.
- ParameterResultType::InvalidType if the parameter type was invalid.
Implemented in ParametersRegistry, and ParametersClient.
The documentation for this class was generated from the following file: