This class is the parameters parser for class FakeBattery. More...
#include <fake/fakeBattery/FakeBattery_ParamsParser.h>
Classes | |
struct | parser_version_type |
Public Member Functions | |
FakeBattery_ParamsParser () | |
~FakeBattery_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
![]() | |
virtual | ~IDeviceDriverParams () |
Public Attributes | |
const std::string | m_device_classname = {"FakeBattery"} |
const std::string | m_device_name = {"fakeBattery"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_period_defaultValue = {"0.02"} |
const std::string | m_charge_defaultValue = {"50.0"} |
const std::string | m_voltage_defaultValue = {"30.0"} |
const std::string | m_current_defaultValue = {"3.0"} |
const std::string | m_temperature_defaultValue = {"20.0"} |
const std::string | m_info_defaultValue = {"Fake battery system v2.0"} |
const std::string | m_rpc_port_name_defaultValue = {"/fakeBattery/rpc"} |
double | m_period = {0.02} |
double | m_charge = {50.0} |
double | m_voltage = {30.0} |
double | m_current = {3.0} |
double | m_temperature = {20.0} |
std::string | m_info = {"Fake battery system v2.0"} |
std::string | m_rpc_port_name = {"/fakeBattery/rpc"} |
This class is the parameters parser for class FakeBattery.
These are the used parameters:
Group name | Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
- | period | double | s | 0.02 | 0 | thread period | - |
- | charge | double | - | 50.0 | 0 | Initial charge | - |
- | voltage | double | V | 30.0 | 0 | Initial voltage | - |
- | current | double | A | 3.0 | 0 | Initial current | - |
- | temperature | double | C | 20.0 | 0 | Initial temperature | - |
- | info | string | - | Fake battery system v2.0 | 0 | Initial battery information | - |
- | rpc_port_name | string | - | /fakeBattery/rpc | 0 | Full rpc port name | - |
The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):
Definition at line 47 of file FakeBattery_ParamsParser.h.
FakeBattery_ParamsParser::FakeBattery_ParamsParser | ( | ) |
Definition at line 23 of file FakeBattery_ParamsParser.cpp.
|
overridedefault |
|
inlineoverridevirtual |
Get the name of the DeviceDriver class.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 81 of file FakeBattery_ParamsParser.h.
|
inlineoverridevirtual |
Get the name of the device (i.e.
the plugin name).
Implements yarp::dev::IDeviceDriverParams.
Definition at line 82 of file FakeBattery_ParamsParser.h.
|
overridevirtual |
Get the documentation of the DeviceDriver's parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 179 of file FakeBattery_ParamsParser.cpp.
|
overridevirtual |
Return a list of all params used by the device.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 28 of file FakeBattery_ParamsParser.cpp.
|
overridevirtual |
Parse the DeviceDriver parameters.
Implements yarp::dev::IDeviceDriverParams.
Definition at line 42 of file FakeBattery_ParamsParser.cpp.
double FakeBattery_ParamsParser::m_charge = {50.0} |
Definition at line 73 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_charge_defaultValue = {"50.0"} |
Definition at line 65 of file FakeBattery_ParamsParser.h.
double FakeBattery_ParamsParser::m_current = {3.0} |
Definition at line 75 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_current_defaultValue = {"3.0"} |
Definition at line 67 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_device_classname = {"FakeBattery"} |
Definition at line 54 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_device_name = {"fakeBattery"} |
Definition at line 55 of file FakeBattery_ParamsParser.h.
std::string FakeBattery_ParamsParser::m_info = {"Fake battery system v2.0"} |
Definition at line 77 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_info_defaultValue = {"Fake battery system v2.0"} |
Definition at line 69 of file FakeBattery_ParamsParser.h.
bool FakeBattery_ParamsParser::m_parser_is_strict = false |
Definition at line 56 of file FakeBattery_ParamsParser.h.
const parser_version_type FakeBattery_ParamsParser::m_parser_version = {} |
Definition at line 62 of file FakeBattery_ParamsParser.h.
double FakeBattery_ParamsParser::m_period = {0.02} |
Definition at line 72 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_period_defaultValue = {"0.02"} |
Definition at line 64 of file FakeBattery_ParamsParser.h.
std::string FakeBattery_ParamsParser::m_rpc_port_name = {"/fakeBattery/rpc"} |
Definition at line 78 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_rpc_port_name_defaultValue = {"/fakeBattery/rpc"} |
Definition at line 70 of file FakeBattery_ParamsParser.h.
double FakeBattery_ParamsParser::m_temperature = {20.0} |
Definition at line 76 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_temperature_defaultValue = {"20.0"} |
Definition at line 68 of file FakeBattery_ParamsParser.h.
double FakeBattery_ParamsParser::m_voltage = {30.0} |
Definition at line 74 of file FakeBattery_ParamsParser.h.
const std::string FakeBattery_ParamsParser::m_voltage_defaultValue = {"30.0"} |
Definition at line 66 of file FakeBattery_ParamsParser.h.