ecuClient.h
Go to the documentation of this file.
1 
4 #pragma once
5 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
6 #include "ecuProto.pb.h"
7 #include "ecuApi.h"
8 
15 class EcuClient: public DpyMwClient
16 {
17 private:
18  void RegisterCallbacks();
19 public:
20  EcuClient(std::string ip, int dport, int sport);
21  ~EcuClient();
22  void ecuAlarmEvent_S(dpyEcu::alarm_event_handler_function handler);
23  void ecuAlarmEvent_U();
24  void asyncGetCurrentProtocol(dpyEcu::protocols_handler_function handler);
25  void asyncGetParameter(dpyEcu::parameters_handler_function handler, std::vector<std::string> EPIDs);
26  void asyncGetAvailableEPIDs(dpyEcu::epids_handler_function handler);
27  void asyncSetAlarm(dpyEcu::confirmation_alarm_handler_function handler, dpyEcu::Alarm alarm);
28  void asyncDeleteAlarm(dpyEcu::confirmation_alarm_handler_function handler, uint32_t id);
29  void asyncGetConfiguredAlarms(dpyEcu::alarms_handler_function handler);
30  void asyncAddCanFilter(dpyEcu::result_handler_function handler, dpyEcu::CANBusIdType id_type, uint32_t can_id, uint32_t can_mask);
31  void asyncRemoveCanFilter(dpyEcu::result_handler_function handler, dpyEcu::CANBusIdType id_type, uint32_t can_id);
32  void asyncResetCanFilter(dpyEcu::result_handler_function handler);
33  void asyncSetCanBusConfiguration(dpyEcu::result_handler_function handler, dpyEcu::CANBusConfiguration conf);
34  void ecuCanBusMessages_S(dpyEcu::can_bus_message_handler_function handler);
35  void ecuCanBusMessages_U();
36 };
boost::function< void(boost::system::error_code &ec, dpyEcu::Protocol protocols)> protocols_handler_function
Handler for protocols function callback. This type of function is called when the get protocols callb...
Definition: ecuApi.h:60
Alarm info.
Definition: ecuTypes.h:101
CAN BUS configuration structure.
Definition: ecuTypes.h:66
boost::function< void(boost::system::error_code &ec, dpyEcu::CANBusFrame frame)> can_bus_message_handler_function
Handler for CAN bus message function callback. This type of function is called when a CAN bus frame i...
Definition: ecuApi.h:74
CANBusIdType
CAN bus frame type.
Definition: ecuTypes.h:57
boost::function< void(boost::system::error_code &ec, std::pair< dpyEcu::Alarm, dpyEcu::Parameter > alarm_event)> alarm_event_handler_function
Handler for alarm event function callback. This type of function is called when the ecuAlarmEvent_S c...
Definition: ecuApi.h:67
boost::function< void(boost::system::error_code &ec, uint16_t id)> confirmation_alarm_handler_function
Handler for status function callback. This type of function is called when the status callback is don...
Definition: ecuApi.h:47
boost::function< void(boost::system::error_code &ec, std::vector< dpyEcu::Parameter > params)> parameters_handler_function
Handler for vehicle information. This type of function is called when the status callback is done...
Definition: ecuApi.h:33
boost::function< void(boost::system::error_code &ec, std::vector< std::string > EPIDs)> epids_handler_function
Handler for vehicle available parameters. This type of function is called when the status callback is...
Definition: ecuApi.h:40
boost::function< void(boost::system::error_code &ec, std::vector< dpyEcu::Alarm > alarms)> alarms_handler_function
Handler for status function callback. This type of function is called when the status callback is don...
Definition: ecuApi.h:53
boost::function< void(boost::system::error_code error_code)> result_handler_function
Prototype of the handler function for obtaining a result.
Definition: ecuApi.h:20
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
This class is responsible of the client logic. His main target is to subscribe to the server informat...
Definition: ecuClient.h:15