ecuTypes.h
Go to the documentation of this file.
1 
4 
7 #pragma once
8 
9 #include <string>
10 #include <vector>
11 #include <boost/system/error_code.hpp>
12 
18 namespace dpyEcu {
19 
21 struct Protocol
22 {
23  std::string name;
24  std::string version;
25 };
26 
28 struct Parameter
29 {
30  std::string timestamp;
31  std::string id;
32  std::string value;
33  std::string units;
34 };
35 
38 {
39  uint32_t timestamp;
40  bool is_remote;
41  bool is_ext;
42  bool is_error;
43  uint32_t id;
44  uint32_t data_size;
45  std::string data;
46 };
47 
50 {
51  RESET = 0, //<! Reset filters
52  ADD = 1, //<! Add filter
53  REMOVE = 2 //<! Remove filter
54 };
55 
58 {
59  STANDARD = 0, //<! Standard frame
60  EXTENDED = 1, //<! Extended frame
61  J1939 = 2, //<! J1939 frame
62  CUSTOM = 3 //<! CUSTOM frame
63 };
64 
67  uint32_t baudrate;
68 };
69 
70 /*
71  * @brief Structure containing ECU information
72  */
73 struct ECUInfoConf {
74  std::string type;
75  std::string interface="";
76  int baud;
78  int timeout_ms;
80  int usleep;
81 };
82 
85 {
87  uint32_t can_id;
88  uint32_t can_mask;
89 };
90 
91 //-----------------------------Alarm event -----------------------------//
92 
95 {
97  THRESHOLD = 1
98 };
99 
101 struct Alarm
102 {
104  std::string parameterId;
105  int32_t threshold;
106 };
107 
110 {
113 };
114 
115 }
CANBusIdType id_type
CAN bus frame type.
Definition: ecuTypes.h:86
bool is_ext
Frame type (STD or EXT)
Definition: ecuTypes.h:41
std::string timestamp
timestamp of the info requested
Definition: ecuTypes.h:30
Alarm info.
Definition: ecuTypes.h:101
CAN BUS configuration structure.
Definition: ecuTypes.h:66
std::string value
value obtained
Definition: ecuTypes.h:32
uint32_t can_id
CAN Bus ID.
Definition: ecuTypes.h:87
std::string data
CAN Frame data.
Definition: ecuTypes.h:45
uint32_t id
CAN Frame ID field (usually represented as a hex number)).
Definition: ecuTypes.h:43
Parameter parameterInfo
information of the parameter
Definition: ecuTypes.h:112
ECU Protocol info.
Definition: ecuTypes.h:21
bool is_error
CAN Frame Error State Indicator.
Definition: ecuTypes.h:42
uint32_t timestamp
Frame timestamp.
Definition: ecuTypes.h:39
bool is_remote
Frame type (DATA or REMOTE)
Definition: ecuTypes.h:40
std::string type
ECU type (MCU, SYSFS, GPIO_KEY, PIC_MCU)
Definition: ecuTypes.h:74
uint32_t baudrate
CAN bus Baudrate.
Definition: ecuTypes.h:67
int max_lenth_buff
Gpio default value.
Definition: ecuTypes.h:77
Can bus filter structure.
Definition: ecuTypes.h:84
Parameter information.
Definition: ecuTypes.h:28
Alarm when the state of the param changes.
Definition: ecuTypes.h:96
int usleep
Gpio default value.
Definition: ecuTypes.h:80
CANBusIdType
CAN bus frame type.
Definition: ecuTypes.h:57
AlarmType
Type of ECU alarm.
Definition: ecuTypes.h:94
int baud
Gpio default value.
Definition: ecuTypes.h:76
uint32_t can_mask
CAN Bus Mask.
Definition: ecuTypes.h:88
Deepsy ECU namespace that includes the different enums, structs or method signatures that should be u...
Definition: ecuApi.h:14
std::string version
version
Definition: ecuTypes.h:24
It contains the CAN Bus Frame structure.
Definition: ecuTypes.h:37
int update_time_s
Gpio default value.
Definition: ecuTypes.h:79
Alarm event.
Definition: ecuTypes.h:109
std::string units
units obtained
Definition: ecuTypes.h:33
std::string name
name of the protocol
Definition: ecuTypes.h:23
Definition: ecuTypes.h:73
int32_t threshold
threshold set
Definition: ecuTypes.h:105
std::string id
identifier of the parameter
Definition: ecuTypes.h:31
AlarmType type
Type of the alarm.
Definition: ecuTypes.h:103
std::string parameterId
ID of the parameter.
Definition: ecuTypes.h:104
Alarm alarmInfo
information of the alarm
Definition: ecuTypes.h:111
Alarm set by threshold.
Definition: ecuTypes.h:97
CANBusFilterOperation
CAN bus filter operation.
Definition: ecuTypes.h:49
uint32_t data_size
CAN Frame data size.
Definition: ecuTypes.h:44
int timeout_ms
Gpio default value.
Definition: ecuTypes.h:78