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::arbBitCount
uint8_t arbBitCount
bit count of arbitration phase
Definition CanFdMessage.h:78
Vector::BLF::CanFdMessage::dlc
uint8_t dlc
CAN dlc.
Definition CanFdMessage.h:63
Vector::BLF::CanFdMessage::frameLength
uint32_t frameLength
message length in ns - without 3 inter frame space bits and by Rx-message also without 1 End-Of-Frame...
Definition CanFdMessage.h:73
Vector::BLF::CanFdMessage::channel
uint16_t channel
application channel
Definition CanFdMessage.h:32
Vector::BLF::CanFdMessage::CanFdFlags
CanFdFlags
Definition CanFdMessage.h:83
Vector::BLF::CanFdMessage::ESI
@ ESI
Definition CanFdMessage.h:91
Vector::BLF::CanFdMessage::BRS
@ BRS
Definition CanFdMessage.h:88
Vector::BLF::CanFdMessage::EDL
@ EDL
Definition CanFdMessage.h:85
Vector::BLF::CanFdMessage::reservedCanFdMessage3
uint32_t reservedCanFdMessage3
Definition CanFdMessage.h:116
Vector::BLF::CanFdMessage::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition CanFdMessage.cpp:47
Vector::BLF::CanFdMessage::flags
uint8_t flags
CAN dir & rtr.
Definition CanFdMessage.h:58
Vector::BLF::CanFdMessage::validDataBytes
uint8_t validDataBytes
Valid payload length of data.
Definition CanFdMessage.h:102
Vector::BLF::CanFdMessage::reservedCanFdMessage2
uint32_t reservedCanFdMessage2
Definition CanFdMessage.h:108
Vector::BLF::CanFdMessage::data
std::array< uint8_t, 64 > data
CAN FD data.
Definition CanFdMessage.h:113
Vector::BLF::CanFdMessage::reservedCanFdMessage1
uint8_t reservedCanFdMessage1
Definition CanFdMessage.h:105
Vector::BLF::CanFdMessage::Flags
Flags
Definition CanFdMessage.h:37
Vector::BLF::CanFdMessage::WU
@ WU
Definition CanFdMessage.h:45
Vector::BLF::CanFdMessage::TX
@ TX
Definition CanFdMessage.h:39
Vector::BLF::CanFdMessage::RTR
@ RTR
Definition CanFdMessage.h:48
Vector::BLF::CanFdMessage::NERR
@ NERR
Definition CanFdMessage.h:42
Vector::BLF::CanFdMessage::write
void write(AbstractFile &os) override
Definition CanFdMessage.cpp:31
Vector::BLF::CanFdMessage::canFdFlags
uint8_t canFdFlags
CAN FD flags.
Definition CanFdMessage.h:97
Vector::BLF::CanFdMessage::read
void read(AbstractFile &is) override
Definition CanFdMessage.cpp:14