mcuApi.h
Go to the documentation of this file.
226 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::PowerInformationConfig &)> power_mng_handler_function;
232 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::LedsConfig &)> leds_handler_function;
238 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::PowerStateConfig &)> power_states_handler_function;
244 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::TimersConfig &)> timers_handler_function;
250 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::UpdateConfig &)> update_firmware_handler_function;
256 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GUIDConfigList &)> guid_handler_function;
263 typedef boost::function<void(boost::system::error_code error_code, char &, char &)> eqvar_handler_function;
269 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::WorkingTimeConfig &)> working_time_handler_function;
275 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::MCUStatus &)> mcu_status_handler_function;
281 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::BatteryProtectionConfig &)> battery_protection_handler_function;
287 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::DateConfig &)> rtc_date_handler_function;
293 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GpioConfig &)> gpio_handler_function;
299 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::GpiosAvailable &)> gpios_events_handler_function;
305 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::I2CValue &)> i2c_handler_function;
311 typedef boost::function<void(boost::system::error_code error_code, const dpyFirmware::FirmwareVersionInfo& fw_version)> version_handler_function;
317 typedef boost::function<void(boost::system::error_code error_code, dpyMcu::CanStatusEvent &)> can_status_handler_function;
329 typedef boost::function<void(boost::system::error_code error_code)> set_power_button_state_handler_function;
336 typedef boost::function<void(boost::system::error_code error_code, bool enabled)> get_power_button_state_handler_function;
394 void asyncSetLedsConfig(dpyMcu::leds_handler_function handler, dpyMcu::LedsColor color, std::uint32_t period, std::uint32_t duty_cycle);
407 void asyncSetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler, float idle_voltage, float voltage_percentage_threshold,
506 void asyncSetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number, bool gpio_value);
522 void asyncGetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int lenght);
533 void asyncSetI2CValue(dpyMcu::i2c_handler_function handler, unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, std::list<unsigned char> values);
558 boost::system::error_code setI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, std::list<unsigned char> values,dpyMcu::I2CValue& result);
570 boost::system::error_code getI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int length,dpyMcu::I2CValue& result);
582 virtual void asyncSetLedsConfig(dpyMcu::leds_handler_function handler, dpyMcu::LedsColor color, std::uint32_t period, std::uint32_t duty_cycle);
583 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);
584 virtual void asyncGetBatteryProtectionConfig(dpyMcu::battery_protection_handler_function handler);
597 virtual void asyncGetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number);
598 virtual void asyncSetGpioValue(dpyMcu::gpio_handler_function handler, std::uint32_t gpio_number, bool gpio_value);
602 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);
603 virtual boost::system::error_code getI2CValue(unsigned char busid, unsigned char deviceid, std::list<unsigned char> address, int lenght,dpyMcu::I2CValue& value);
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:342
I2C Struct which contains the response received from the service.
Definition: mcuApi.h:115
std::string serial_number
Serial Number of the equipment.
Definition: mcuApi.h:165
PowerInformation struct which contains the response received from the service.
Definition: mcuApi.h:144
float battery_inner_percent
battery inner percent
Definition: mcuApi.h:136
std::uint32_t hardware_exceptions
Hardware exceptions.
Definition: mcuApi.h:188
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:244
std::uint32_t period
Period in seconds (range: 0 - 10)
Definition: mcuApi.h:102
std::uint32_t software_exceptions
Software exceptions.
Definition: mcuApi.h:189
GUID struct which contains the response received from the service.
Definition: mcuApi.h:161
DateConfig struct which contains the response received from the service.
Definition: mcuApi.h:203
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:275
Working Time struct which contains the response received from the service.
Definition: mcuApi.h:176
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:311
std::uint32_t timer_halt_minutes
Halt Timer.
Definition: mcuApi.h:157
std::string part_number
Part Number of the equipment.
Definition: mcuApi.h:164
std::uint32_t timer_standby_minutes
Standby Timer.
Definition: mcuApi.h:156
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:293
std::uint32_t grace_period_minutes
grace period in minutes used to enter in halt mode irrevocably
Definition: mcuApi.h:199
Battery Protection Config struct which contains the response received from the service.
Definition: mcuApi.h:193
boost::function< void(const bool &available)> service_availability_handler
Prototype of the handler function used to monitor service availability.
Definition: mcuApi.h:219
std::string partition_written
partition_written
Definition: mcuApi.h:127
std::uint32_t duty_cycle
duty_cycle in percentage (range: 0% - 100%)
Definition: mcuApi.h:103
float voltage_percentage_over_idle_voltage_threshold
voltage percentage threshold calculated over idle voltage
Definition: mcuApi.h:197
Defines a class for checking firmware binaries available for upgrading.
Rfs
Defines the possible root file systems where binaries are located.
Definition: firmware.h:54
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:317
std::uint32_t power_on_hours_working
Power-On hours working.
Definition: mcuApi.h:179
MCU Status struct which contains the response received from the service.
Definition: mcuApi.h:185
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:269
Deepsy Mcu namespace that includes the different enums, structs or method signatures that should be u...
Definition: mcuApi.h:15
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:299
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:336
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:305
PowerInformation struct which contains the response received from the service.
Definition: mcuApi.h:131
Update struct which contains the response received from the service.
Definition: mcuApi.h:124
Timers struct which contains the response received from the service.
Definition: mcuApi.h:153
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:256
bool battery_protection_mode
battery protection mode
Definition: mcuApi.h:140
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:329
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:250
float hysteresis_percentage_over_idle_voltage
hysteresis percentage calculated over idle voltage
Definition: mcuApi.h:198
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:281
Definition: mcuApi.h:98
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:287
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:238
float battery_extern_voltage
battery extern voltage
Definition: mcuApi.h:135
float idle_voltage
idle voltage identified by ignition position off, engine off and stationary vehicle ...
Definition: mcuApi.h:196
bool battery_type
battery type: 1 –> 24V, 0 –> 12V
Definition: mcuApi.h:137
GUID list struct which contains the response received from the service.
Definition: mcuApi.h:170
std::list< struct GUIDConfig > guids
GUIDs elements.
Definition: mcuApi.h:172
std::string cidl_number
CIDL Number of the equipment.
Definition: mcuApi.h:166
std::uint32_t standby_hours_working
Standby hours working.
Definition: mcuApi.h:180
std::int32_t temperature
temperature
Definition: mcuApi.h:138
std::uint32_t halt_hours_working
Halt hours working.
Definition: mcuApi.h:181
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:323
std::uint32_t event_flags
set flags to enter in power state
Definition: mcuApi.h:148
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:263
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:232
boost::shared_ptr< McuClient > mClient
Reference to an Client Object.
Definition: mcuApi.h:357
GPIO Struct which contains the response received from the service.
Definition: mcuApi.h:107
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:226