The parameter service is used for initialization purposes across all participants. Several parameters can be set in the LCC and are distributed on startup / requested when other applications in the network are started.
CPM Parameter Interface
This interface allows the user to request a parameter from the LCC. The parameters that can be requested are listed below.
All requests are blocking, meaning that parameter requests are sent to the LCC periodically until an answer has been received, which is then returned. A parameter storage is implemented as well - thus, data that has been received and stored before is not requested again but returned immediately. Parameters may change during runtime, if so then these changes are handled by an internal callback function that updates the parameter storage.
Multiple parameter types are supported.
ParameterReceiver in the cpm library includes a reader and a writer to request and receive parameters from the LCC. It also contains a storage that saves already received parameters and their values, using mutexes for thread-safe access, so that requests do not need to be sent multiple times. Its implementation includes the implementation of the functions for Parameter.hpp.
Parameters are set in the LCC. The class
ParameterStorage is responsible for loading, storing and changing parameters, and
ParameterServer listens for requests of other participants of parameter values and sends these values on request or whenever they have been changed in the LCC.
The usage of YAML files and the handling of parameters within the LCC's UI allows the users to conveniently set parameters for multiple participants without the need to change start-up scripts or multiple configuration files. An example of a parameter distributed using the parameter server are the lateral gain values of the vehicles.