source: pacpussensors/trunk/CanGateway/CanFrame.h@ 2

Last change on this file since 2 was 2, checked in by DHERBOMEZ Gérald, 11 years ago

correction of minor bugs (include and link). Build on Windows OK.

File size: 501 bytes
Line 
1#ifndef __CANFRAME_H__
2#define __CANFRAME_H__
3
4#include <cstddef>
5
6#include "Pacpus/kernel/cstdint.h"
7#include "Pacpus/kernel/road_time.h"
8
9/// Basic structure of a CAN frame
10struct CanFrame
11{
12 static const std::size_t MAX_CAN_MSG_LENGTH = 8;
13
14 uint32_t id;
15 uint8_t dlc;
16 uint8_t data [MAX_CAN_MSG_LENGTH];
17};
18
19/// CAN structure with timestamping
20struct TimestampedCanFrame
21{
22 CanFrame frame;
23 road_time_t time;
24 road_timerange_t timerange;
25};
26
27#endif
Note: See TracBrowser for help on using the repository browser.