Vector BLF: CanFdMessage.h Source File

Vector BLF

Loading...
Searching...
No Matches
CanFdMessage.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <array>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeader.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16namespace Vector {
17namespace BLF {
18
22 struct VECTOR_BLF_EXPORT CanFdMessage final : ObjectHeader {
23 CanFdMessage();
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint32_t calculateObjectSize() const override;
28
32 uint16_t channel {};
33
37 enum Flags : uint8_t {
39 TX = (1 << 0),
40
42 NERR = (1 << 5),
43
45 WU = (1 << 6),
46
48 RTR = (1 << 7)
49 };
50
58 uint8_t flags {};
59
63 uint8_t dlc {};
64
68 uint32_t id {};
69
73 uint32_t frameLength {};
74
78 uint8_t arbBitCount {};
79
83 enum CanFdFlags : uint8_t {
85 EDL = (1 << 0),
86
88 BRS = (1 << 1),
89
91 ESI = (1 << 2)
92 };
93
97 uint8_t canFdFlags {};
98
102 uint8_t validDataBytes {};
103
105 uint8_t reservedCanFdMessage1 {};
106
108 uint32_t reservedCanFdMessage2 {};
109
113 std::array<uint8_t, 64> data {};
114
116 uint32_t reservedCanFdMessage3 {};
117};
118
119}
120}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::CanFdMessage
CAN_FD_MESSAGE.
Definition CanFdMessage.h:22
Vector::BLF::CanFdMessage::CanFdFlags
CanFdFlags
Definition CanFdMessage.h:83
Vector::BLF::CanFdMessage::Flags
Flags
Definition CanFdMessage.h:37
Vector::BLF::ObjectHeader
Object header.
Definition ObjectHeader.h:22