Apollo  6.0
Open source self driving car software
Public Types | Public Member Functions | List of all members
apollo::cyber::ParameterClient Class Reference

Parameter Client is used to set/get/list parameter(s) by sending a request to ParameterServer. More...

#include <parameter_client.h>

Collaboration diagram for apollo::cyber::ParameterClient:
Collaboration graph

Public Types

using Param = apollo::cyber::proto::Param
 
using NodeName = apollo::cyber::proto::NodeName
 
using ParamName = apollo::cyber::proto::ParamName
 
using BoolResult = apollo::cyber::proto::BoolResult
 
using Params = apollo::cyber::proto::Params
 
using GetParameterClient = Client< ParamName, Param >
 
using SetParameterClient = Client< Param, BoolResult >
 
using ListParametersClient = Client< NodeName, Params >
 

Public Member Functions

 ParameterClient (const std::shared_ptr< Node > &node, const std::string &service_node_name)
 Construct a new ParameterClient object. More...
 
bool GetParameter (const std::string &param_name, Parameter *parameter)
 Get the Parameter object. More...
 
bool SetParameter (const Parameter &parameter)
 Set the Parameter object. More...
 
bool ListParameters (std::vector< Parameter > *parameters)
 Get all the Parameter objects. More...
 

Detailed Description

Parameter Client is used to set/get/list parameter(s) by sending a request to ParameterServer.

Member Typedef Documentation

◆ BoolResult

using apollo::cyber::ParameterClient::BoolResult = apollo::cyber::proto::BoolResult

◆ GetParameterClient

◆ ListParametersClient

◆ NodeName

using apollo::cyber::ParameterClient::NodeName = apollo::cyber::proto::NodeName

◆ Param

using apollo::cyber::ParameterClient::Param = apollo::cyber::proto::Param

◆ ParamName

using apollo::cyber::ParameterClient::ParamName = apollo::cyber::proto::ParamName

◆ Params

using apollo::cyber::ParameterClient::Params = apollo::cyber::proto::Params

◆ SetParameterClient

Constructor & Destructor Documentation

◆ ParameterClient()

apollo::cyber::ParameterClient::ParameterClient ( const std::shared_ptr< Node > &  node,
const std::string &  service_node_name 
)

Construct a new ParameterClient object.

Parameters
nodeshared_ptr of the node handler
service_node_namenode name which provide a param services

Member Function Documentation

◆ GetParameter()

bool apollo::cyber::ParameterClient::GetParameter ( const std::string &  param_name,
Parameter parameter 
)

Get the Parameter object.

Parameters
param_name
parameterthe pointer to store
Returns
true
false call service fail or timeout

◆ ListParameters()

bool apollo::cyber::ParameterClient::ListParameters ( std::vector< Parameter > *  parameters)

Get all the Parameter objects.

Parameters
parameterspointer of vector to store all the parameters
Returns
true
false call service fail or timeout

◆ SetParameter()

bool apollo::cyber::ParameterClient::SetParameter ( const Parameter parameter)

Set the Parameter object.

Parameters
parameterparameter to be set
Returns
true set parameter succues
false 1. call service timeout
  1. parameter not exists The corresponding log will be recorded at the same time

The documentation for this class was generated from the following file: