mcuApi.h
Go to the documentation of this file.
228 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::PowerInformationConfig &)> power_mng_handler_function;
234 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::LedsConfig &)> leds_handler_function;
240 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::PowerStateConfig &)> power_states_handler_function;
246 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::TimersConfig &)> timers_handler_function;
252 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::UpdateConfig &)> update_firmware_handler_function;
258 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GUIDConfigList &)> guid_handler_function;
265 typedef boost::function<void(boost::system::error_code error_code, char &, char &)> eqvar_handler_function;
271 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::WorkingTimeConfig &)> working_time_handler_function;
277 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::MCUStatus &)> mcu_status_handler_function;
283 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::BatteryProtectionConfig &)> battery_protection_handler_function;
289 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::DateConfig &)> rtc_date_handler_function;
295 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GpioConfig &)> gpio_handler_function;
301 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GpiosAvailable &)> gpios_events_handler_function;
307 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::I2CValue &)> i2c_handler_function;
313 typedef boost::function<void(boost::system::error_code error_code, const dpyFirmware::FirmwareVersionInfo& fw_version)> version_handler_function;
319 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::CanStatusEvent &)> can_status_handler_function;
331 typedef boost::function<void(boost::system::error_code error_code)> set_power_button_state_handler_function;
338 typedef boost::function<void(boost::system::error_code error_code, bool enabled)> get_power_button_state_handler_function;
396 void asyncSetLedsConfig(dpyMcu::leds_handler_function handler, dpyMcu::LedsColor color, std::uint32_t period, std::uint32_t duty_cycle);
409 void asyncSetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler, float idle_voltage, float voltage_percentage_threshold,
508 void asyncSetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number, bool gpio_value);
524 void asyncGetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int lenght);
535 void asyncSetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, std::list<unsigned char> values);
560 boost::system::error_code setI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, std::list<unsigned char> values,dpyMcu::I2CValue& result);
572 boost::system::error_code getI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int length,dpyMcu::I2CValue& result);
584 virtual void asyncSetLedsConfig(dpyMcu::leds_handler_function handler, dpyMcu::LedsColor color, std::uint32_t period, std::uint32_t duty_cycle);
585 virtual void asyncSetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler, float idle_voltage, float voltage_percentage_threshold, float hysteresis_percentage, std::uint32_t grace_period_minutes);
586 virtual void asyncGetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler);
599 virtual void asyncGetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number);
600 virtual void asyncSetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number, bool gpio_value);
604 virtual boost::system::error_code setI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, std::list<unsigned char> values,dpyMcu::I2CValue& value);
605 virtual boost::system::error_code getI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int lenght,dpyMcu::I2CValue& value);
std::string cidl_number
CIDL Number of the equipment.
Definition: mcuApi.h:168
void asyncGetPowerInformation(dpyMcu::power_mng_handler_function handler)
Method which requests one message with Power information coming from the service periodically.
boost::function< void(boost::system::error_code error_code, dpyMcu::BatteryProtectionConfig &)> battery_protection_handler_function
Prototype of the handler function for obtaining the Battery Protection Configuration.
Definition: mcuApi.h:283
Working Time struct which contains the response received from the service.
Definition: mcuApi.h:178
void getPowerInformation_U()
Method to stop receiving Power information coming from the service periodically.
std::uint32_t period
Period in seconds (range: 0 - 10)
Definition: mcuApi.h:104
MCU Status struct which contains the response received from the service.
Definition: mcuApi.h:187
boost::function< void(boost::system::error_code error_code, const dpyFirmware::FirmwareVersionInfo &fw_version)> version_handler_function
Prototype of the handler function for obtaining the fw version.
Definition: mcuApi.h:313
void asyncSetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number, bool gpio_value)
Method which requests to set a GPIO pin with a value.
boost::system::error_code getRtcDateConfig(dpyMcu::DateConfig &config)
Method which requests to get RTC date configuration values.
boost::function< void(boost::system::error_code error_code, dpyMcu::GpiosAvailable &)> gpios_events_handler_function
Prototype of the handler function for obtaining the GPIO Events.
Definition: mcuApi.h:301
void asyncSetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list< unsigned char > address, std::list< unsigned char > values)
Method which requests to set a I2C address pin with a value.
DateConfig struct which contains the response received from the service.
Definition: mcuApi.h:205
float voltage_percentage_over_idle_voltage_threshold
voltage percentage threshold calculated over idle voltage
Definition: mcuApi.h:199
void asyncGetRtcDateConfig(dpyMcu::rtc_date_handler_function handler)
Method which requests to get RTC date configuration values.
PowerInformation struct which contains the response received from the service.
Definition: mcuApi.h:146
float idle_voltage
idle voltage identified by ignition position off, engine off and stationary vehicle
Definition: mcuApi.h:198
boost::function< void(boost::system::error_code error_code, dpyMcu::UpdateConfig &)> update_firmware_handler_function
Prototype of the handler function for obtaining the updated configuration.
Definition: mcuApi.h:252
GPIO Struct which contains the response received from the service.
Definition: mcuApi.h:109
boost::function< void(boost::system::error_code error_code, dpyMcu::PowerStateConfig &)> power_states_handler_function
Prototype of the handler function for obtaining the Power State Configuration.
Definition: mcuApi.h:240
boost::function< void(boost::system::error_code error_code, dpyMcu::WorkingTimeConfig &)> working_time_handler_function
Prototype of the handler function for obtaining the Working Time Values.
Definition: mcuApi.h:271
std::uint32_t halt_hours_working
Halt hours working.
Definition: mcuApi.h:183
std::uint32_t timer_halt_minutes
Halt Timer.
Definition: mcuApi.h:159
std::uint32_t timer_standby_minutes
Standby Timer.
Definition: mcuApi.h:158
boost::shared_ptr< McuClient > mClient
Reference to an Client Object.
Definition: mcuApi.h:359
GUID struct which contains the response received from the service.
Definition: mcuApi.h:163
std::string serial_number
Serial Number of the equipment.
Definition: mcuApi.h:167
boost::function< void(boost::system::error_code error_code, char &, char &)> eqvar_handler_function
Prototype of the handler function for obtaining the GUIDs.
Definition: mcuApi.h:265
Timers struct which contains the response received from the service.
Definition: mcuApi.h:155
std::uint32_t power_on_hours_working
Power-On hours working.
Definition: mcuApi.h:181
void getPowerInformation_S(dpyMcu::power_mng_handler_function handler)
Method which receives one message with Power information coming from the service periodically.
float hysteresis_percentage_over_idle_voltage
hysteresis percentage calculated over idle voltage
Definition: mcuApi.h:200
void asyncUpdateMCU(dpyMcu::update_firmware_handler_function handler)
Method which updates the firmware of the MCU (the new image must be in the right PATH of the system)
virtual boost::system::error_code getGUIDValues(dpyMcu::GUIDConfigList &guid_list)
Method which requests to get GUID values.
void asyncSetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler, float idle_voltage, float voltage_percentage_threshold, float hysteresis_percentage, std::uint32_t grace_period_minutes)
Method which requests to set battery protection configuration values.
boost::function< void(boost::system::error_code error_code)> test_misc_handler_function
Prototype of the handler function for obtaining the current MISC status.
Definition: mcuApi.h:325
boost::function< void(boost::system::error_code error_code, dpyMcu::TimersConfig &)> timers_handler_function
Prototype of the handler function for obtaining the Timers Configuration.
Definition: mcuApi.h:246
void asyncGetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number)
Method which requests one message with GPIO information.
boost::function< void(boost::system::error_code error_code, dpyMcu::PowerInformationConfig &)> power_mng_handler_function
Prototype of the handler function for obtaining the Power Information.
Definition: mcuApi.h:228
boost::function< void(boost::system::error_code error_code, dpyMcu::DateConfig &)> rtc_date_handler_function
Prototype of the handler function for obtaining the RTC Date Configuration.
Definition: mcuApi.h:289
void asyncGetWorkingTimeValues(dpyMcu::working_time_handler_function handler)
Method which requests one message with the Power-On, Standby and Halt States working hours.
void asyncGetLedsConfig(dpyMcu::leds_handler_function handler)
Method which requests the LED color state.
std::uint32_t event_flags
set flags to enter in power state
Definition: mcuApi.h:150
boost::function< void(boost::system::error_code error_code)> set_power_button_state_handler_function
Prototype of the handler function for obtaining the result of power button.
Definition: mcuApi.h:331
It contains the current CAN Bus status defined in its timestamp.
Definition: mcuTypes.h:33
void asyncGetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler)
Method which requests to get battery protection configuration values.
void asyncGetEQVar(dpyMcu::eqvar_handler_function handler)
Method which requests to get EQ/Var values.
std::string partition_written
partition_written
Definition: mcuApi.h:129
PowerInformation struct which contains the response received from the service.
Definition: mcuApi.h:133
boost::function< void(boost::system::error_code error_code)> result_handler_function
Prototype of the handler function for obtaining the result of the operations status.
Definition: mcuApi.h:344
void asyncGetGpiosEvents(dpyMcu::gpios_events_handler_function handler)
Method which receives one message with Gpios events coming from the service.
Battery Protection Config struct which contains the response received from the service.
Definition: mcuApi.h:195
void asyncGetCanStatus(dpyMcu::can_status_handler_function handler)
Method to get the current CAN Bus status.
Deepsy Mcu namespace that includes the different enums, structs or method signatures that should be u...
Definition: mcuApi.h:16
void asyncGetMCUStatus(dpyMcu::mcu_status_handler_function handler)
Method which gets one message indicating hardware and software exceptions coming from MCU.
std::list< struct GUIDConfig > guids
GUIDs elements.
Definition: mcuApi.h:174
std::uint32_t software_exceptions
Software exceptions.
Definition: mcuApi.h:191
boost::function< void(const bool &available)> service_availability_handler
Prototype of the handler function used to monitor service availability.
Definition: mcuApi.h:221
void asyncGetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list< unsigned char > address, int lenght)
Method which requests one message with I2C information.
I2C Struct which contains the response received from the service.
Definition: mcuApi.h:117
virtual boost::system::error_code getEQVar(char &eq_id, char &var_id)
Method which requests to get EQ/Var values.
std::string part_number
Part Number of the equipment.
Definition: mcuApi.h:166
Defines a class for checking firmware binaries available for upgrading.
float battery_inner_percent
battery inner percent
Definition: mcuApi.h:138
void asyncGetGUIDValues(dpyMcu::guid_handler_function handler)
Method which requests one message with Part Number, Serial Number and CIDL of the equipment.
Definition: mcuApi.h:100
std::uint32_t hardware_exceptions
Hardware exceptions.
Definition: mcuApi.h:190
boost::function< void(boost::system::error_code error_code, dpyMcu::CanStatusEvent &)> can_status_handler_function
Prototype of the handler function for obtaining the CAN Status Information.
Definition: mcuApi.h:319
GUID list struct which contains the response received from the service.
Definition: mcuApi.h:172
float battery_extern_voltage
battery extern voltage
Definition: mcuApi.h:137
bool battery_type
battery type: 1 --> 24V, 0 --> 12V
Definition: mcuApi.h:139
std::uint32_t standby_hours_working
Standby hours working.
Definition: mcuApi.h:182
std::uint32_t duty_cycle
duty_cycle in percentage (range: 0% - 100%)
Definition: mcuApi.h:105
boost::function< void(boost::system::error_code error_code, dpyMcu::MCUStatus &)> mcu_status_handler_function
Prototype of the handler function for obtaining the MCU Status.
Definition: mcuApi.h:277
boost::function< void(boost::system::error_code error_code, dpyMcu::I2CValue &)> i2c_handler_function
Prototype of the handler function for obtaining the I2C information.
Definition: mcuApi.h:307
bool battery_protection_mode
battery protection mode
Definition: mcuApi.h:142
void asyncGetTimersConfig(dpyMcu::timers_handler_function handler)
Method which requests one message with Standby and Halt Timers.
boost::function< void(boost::system::error_code error_code, dpyMcu::LedsConfig &)> leds_handler_function
Prototype of the handler function for obtaining the LEDs configuration.
Definition: mcuApi.h:234
void asyncSetLedsConfig(dpyMcu::leds_handler_function handler, dpyMcu::LedsColor color, std::uint32_t period, std::uint32_t duty_cycle)
Method which requests to change the LED color state.
boost::function< void(boost::system::error_code error_code, bool enabled)> get_power_button_state_handler_function
Prototype of the handler function for obtaining the result of power button.
Definition: mcuApi.h:338
boost::function< void(boost::system::error_code error_code, dpyMcu::GpioConfig &)> gpio_handler_function
Prototype of the handler function for obtaining the GPIO Configuration.
Definition: mcuApi.h:295
Rfs
Defines the possible root file systems where binaries are located.
Definition: firmware.h:57
Update struct which contains the response received from the service.
Definition: mcuApi.h:126
std::uint32_t grace_period_minutes
grace period in minutes used to enter in halt mode irrevocably
Definition: mcuApi.h:201
boost::system::error_code getI2CValue(unsigned char busid, unsigned char deviceid, std::list< unsigned char > address, int length, dpyMcu::I2CValue &result)
(Sync) Method which requests one message with I2C information
void asyncGetVersion(dpyMcu::version_handler_function handler, dpyFirmware::Rfs rfs)
Method which requests the firware version of the MCU.
boost::system::error_code setI2CValue(unsigned char busid, unsigned char deviceid, std::list< unsigned char > address, std::list< unsigned char > values, dpyMcu::I2CValue &result)
(Sync) Method which requests to set a I2C address pin with a value
boost::function< void(boost::system::error_code error_code, dpyMcu::GUIDConfigList &)> guid_handler_function
Prototype of the handler function for obtaining the GUIDs.
Definition: mcuApi.h:258
std::int32_t temperature
temperature
Definition: mcuApi.h:140