3 #ifndef __serviceParser_h__
4 #define __serviceParser_h__
12 #include <yarp/os/Searchable.h>
15 #include "EoManagement.h"
16 #include "EoAnalogSensors.h"
17 #include "EoMotionControl.h"
22 #define SERVICE_PARSER_USE_MC
65 std::vector<std::string>
id;
87 #if defined(SERVICE_PARSER_USE_MC)
122 eoas_pos_TYPE_t
type {eoas_pos_TYPE_none};
134 eObrd_portpos_t
port {eobrd_portpos_none};
146 eOas_sensor_t
type {eoas_none};
154 id.clear();
type = eoas_none;
location.any.place = eobrd_place_none;
203 #if defined(SERVICE_PARSER_USE_MC)
217 eOmc_actuator_descriptor_t
desc;
225 eOmc_encoder_descriptor_t
desc;
297 #if defined(SERVICE_PARSER_USE_MC)
302 bool convert(std::string
const &fromstring, eOmc_actuator_t &toactuatortype,
bool &formaterror);
303 bool convert(std::string
const &fromstring, eOmc_position_t &toposition,
bool &formaterror);
304 bool convert(std::string
const &fromstring, eOmc_encoder_t &toencodertype,
bool &formaterror);
306 bool parse_connector(
const std::string &fromstring, eObrd_connector_t &toconnector,
bool &formaterror);
307 bool parse_mais(std::string
const &fromstring, eObrd_portmais_t &pmais,
bool &formaterror);
309 bool parse_port_conn(std::string
const &fromstring, eObrd_type_t
const board, uint8_t &toport,
bool &formaterror);
310 bool parse_port_mais(std::string
const &fromstring, uint8_t &toport,
bool &formaterror);
312 bool parse_actuator_port(std::string
const &fromstring, eObrd_ethtype_t
const ethboard, eOmc_actuator_t
const type, eOmc_actuator_descriptor_t &todes,
bool &formaterror);
313 bool parse_encoder_port(std::string
const &fromstring, eObrd_ethtype_t
const ethboard, eOmc_encoder_t type, uint8_t &toport,
bool &formaterror);
315 bool parse_psc(std::string
const &fromstring, eObrd_portpsc_t &ppsc,
bool &formaterror);
316 bool parse_port_psc(std::string
const &fromstring, uint8_t &toport,
bool &formaterror);
318 bool parse_POS_port(std::string
const &fromstring, eObrd_portpos_t &ppos,
bool &formaterror);
319 bool parse_port_pos(std::string
const &fromstring, uint8_t &toport,
bool &formaterror);
321 bool parse_POS_connector(std::string
const &fromstring,
const eObrd_type_t brd, eObrd_connector_t &conn,
bool &formaterror);
327 bool convert(std::string
const &fromstring, eOmn_serv_type_t &toservicetype,
bool &formaterror);
328 bool convert(std::string
const &fromstring, eOmn_serv_diagn_mode_t &todiagnmode,
bool &formaterror);
329 bool convert(std::string
const &fromstring, eObrd_type_t& tobrdtype,
bool& formaterror);
330 bool convert(std::string
const &fromstring, eObrd_cantype_t &tobrdcantype,
bool &formaterror);
331 bool convert(std::string
const &fromstring, eObrd_ethtype_t& tobrdethtype,
bool& formaterror);
332 bool convert(std::string
const &fromstring,
bool &tobool,
bool &formaterror);
333 bool convert(
const int number, uint8_t &tou8,
bool &formaterror);
334 bool convert(
const int number, uint16_t &tou16,
bool &formaterror);
335 bool convert(std::string
const &fromstring, eOas_sensor_t &tosensortype,
bool &formaterror);
336 bool convert(std::string
const &fromstring, std::string &str,
bool &formaterror);
337 bool convert(std::string
const &fromstring,
const uint8_t strsize,
char *str,
bool &formaterror);
338 bool convert(std::string
const &fromstring, eObrd_location_t &location,
bool &formaterror);
339 bool convert(std::string
const &fromstring, eOlocation_t &location,
bool &formaterror);
342 bool convert(eObrd_location_t
const &loc,
char *str,
int len);
343 bool convert(eOlocation_t
const &loc,
char *str,
int len);
344 bool convert(eObrd_canlocation_t
const &canloc,
char *str,
int len);
346 bool convert(eObrd_protocolversion_t
const &prot,
char *str,
int len);
347 bool convert(eObrd_firmwareversion_t
const &firm,
char *str,
int len);
349 bool convert(std::string
const &fromstring, eOmc_pidoutputtype_t& pidoutputtype,
bool& formaterror);
350 bool convert(std::string
const &fromstring, eOmc_jsetconstraint_t &jsetconstraint,
bool& formaterror);
360 eOmn_serv_config_data_sk_skin_t
tmp;
362 #if defined(SERVICE_PARSER_USE_MC)
368 bool check_analog(yarp::os::Searchable &config, eOmn_serv_type_t type);
370 bool check_skin(yarp::os::Searchable &config);
372 bool check_motion(yarp::os::Searchable &config);
374 int getnumofjointsets(
void);
376 bool copyjomocouplingInfo(eOmc_4jomo_coupling_t *jc_dest);
bool parseService2(yarp::os::Searchable &config, servConfigMC_t &mcconfig)
bool parse_encoder_port(std::string const &fromstring, eObrd_ethtype_t const ethboard, eOmc_encoder_t type, uint8_t &toport, bool &formaterror)
bool parse_port_conn(std::string const &fromstring, eObrd_type_t const board, uint8_t &toport, bool &formaterror)
servASstrainSettings_t as_strain_settings
bool parseService(yarp::os::Searchable &config, servConfigFTsensor_t &ftconfig)
bool parse_actuator_port(std::string const &fromstring, eObrd_ethtype_t const ethboard, eOmc_actuator_t const type, eOmc_actuator_descriptor_t &todes, bool &formaterror)
bool parse_POS_CALIB_rotation(std::string const &fromstring, eoas_pos_ROT_t &rot, bool &formaterror)
bool convert(std::string const &fromstring, eOmc_actuator_t &toactuatortype, bool &formaterror)
bool convert(std::string const &fromstring, eOmc_encoder_t &toencodertype, bool &formaterror)
bool parseService(yarp::os::Searchable &config, servConfigPOS_t &pscconfig)
bool convert(std::string const &fromstring, eOmc_position_t &toposition, bool &formaterror)
bool parse_mais(std::string const &fromstring, eObrd_portmais_t &pmais, bool &formaterror)
servMCcollector_t mc_service
eOmn_serv_config_data_sk_skin_t tmp
servSKcollector_t sk_service
bool parse_port_psc(std::string const &fromstring, uint8_t &toport, bool &formaterror)
bool parse_POS_CALIB_type(std::string const &fromstring, eoas_pos_TYPE_t &type, bool &formaterror)
bool parseService(yarp::os::Searchable &config, servConfigMais_t &maisconfig)
bool parse_port_pos(std::string const &fromstring, uint8_t &toport, bool &formaterror)
bool parseService(yarp::os::Searchable &config, servConfigPSC_t &pscconfig)
bool parse_debugEmbBoardsNotConnected(yarp::os::Searchable &config, bool &embBoardsConnected)
bool parse_POS_connector(std::string const &fromstring, const eObrd_type_t brd, eObrd_connector_t &conn, bool &formaterror)
bool parse_POS_port(std::string const &fromstring, eObrd_portpos_t &ppos, bool &formaterror)
bool parseService(yarp::os::Searchable &config, servConfigSkin_t &skinconfig)
servMC_encoder_t * getEncoderAtMotor(int index)
bool parse_connector(const std::string &fromstring, eObrd_connector_t &toconnector, bool &formaterror)
bool parseService(yarp::os::Searchable &config, servConfigMC_t &mcconfig)
bool parseService(yarp::os::Searchable &config, servConfigImu_t &imuconfig)
servMC_encoder_t * getEncoderAtJoint(int index)
bool parse_psc(std::string const &fromstring, eObrd_portpsc_t &ppsc, bool &formaterror)
servAScollector_t as_service
bool parseService(yarp::os::Searchable &config, servConfigStrain_t &strainconfig)
bool parse_port_mais(std::string const &fromstring, uint8_t &toport, bool &formaterror)
servASsettings_t settings
servASproperties_t properties
std::vector< servAnalogSensor_t > sensors
std::vector< servCanBoard_t > canboards
std::vector< servAnalogSensor_t > enabledsensors
servAnalogPOScalibration_t calibration
eObrd_connector_t connector
servAnalogPOSspecific_t pos
eObrd_location_t location
eObrd_firmwareversion_t firmware
eObrd_protocolversion_t protocol
eObrd_protocolversion_t protocol
eObrd_firmwareversion_t firmware
int temperatureAcquisitionrate
eObrd_cantype_t boardType
eOmn_serv_parameter_t ethservice
eOmn_serv_parameter_t ethservice
std::vector< eOas_inertial3_descriptor_t > inertials
imuConvFactors_t convFactors
std::vector< std::string > id
std::vector< std::string > sensorName
eOmn_serv_parameter_t ethservice
eOmn_serv_parameter_t ethservice
std::vector< std::string > idList
eOmn_serv_parameter_t ethservice
std::vector< std::string > idList
eOmn_serv_parameter_t ethservice
eOmn_serv_parameter_t ethservice
eObrd_cantype_t boardType
eOmc_adv_actuator_descriptor_t advdescr
eOmc_actuator_descriptor_t desc
eOmc_encoder_descriptor_t desc
servMCproperties_t properties
eOmn_serv_diagn_cfg_t diagconfig
servMCsettings_t settings
std::vector< eOmc_mc4broadcast_t > mc4broadcasts
eOmc_mc4shifts_t mc4shifts
std::vector< eObrd_canlocation_t > poslocations
eObrd_canlocation_t maislocation
std::vector< servMC_actuator_t > actuators
std::vector< servMC_encoder_t > encoder2s
eObrd_ethtype_t ethboardtype
std::vector< eObrd_canlocation_t > mc4joints
std::vector< servMC_encoder_t > encoder1s
std::vector< eObrd_canlocation_t > psclocations
std::vector< servCanBoard_t > canboards
servSKproperties_t properties