Vector BLF

Loading...
Searching...
No Matches
LinMessage2.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/LinDatabyteTimestampEvent.h>
13#include <Vector/BLF/ObjectHeader.h>
14
15#include <Vector/BLF/vector_blf_export.h>
16
17 namespace Vector {
18 namespace BLF {
19
25 struct VECTOR_BLF_EXPORT LinMessage2 final : ObjectHeader, LinDatabyteTimestampEvent {
26 LinMessage2();
27
28 void read(AbstractFile & is) override;
29 void write(AbstractFile & os) override;
30 uint32_t calculateObjectSize() const override;
31
37 std::array<uint8_t, 8> data {};
38
44 uint16_t crc {};
45
54 uint8_t dir {};
55
64 uint8_t simulated {};
65
74 uint8_t isEtf {};
75
83 uint8_t etfAssocIndex {};
84
92 uint8_t etfAssocEtfId {};
93
98 uint8_t fsmId {};
99
104 uint8_t fsmState {};
105
107 uint8_t reservedLinMessage1 {};
108
110 uint16_t reservedLinMessage2 {};
111
112 /* the following variables are only available in Version 2 and above */
113
121 uint32_t respBaudrate {};
122
123 /* the following variables are only available in Version 3 and above */
124
132 double exactHeaderBaudrate {};
133
141 uint32_t earlyStopbitOffset {};
142
150 uint32_t earlyStopbitOffsetResponse {};
151
152 /* internal variables */
153
159 uint8_t apiMajor {3};
160};
161
162}
163}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::LinDatabyteTimestampEvent
Definition LinDatabyteTimestampEvent.h:23
Vector::BLF::LinMessage2::fsmId
uint8_t fsmId
Definition LinMessage2.h:98
Vector::BLF::LinMessage2::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition LinMessage2.cpp:75
Vector::BLF::LinMessage2::read
void read(AbstractFile &is) override
Definition LinMessage2.cpp:14
Vector::BLF::LinMessage2::crc
uint16_t crc
checksum byte
Definition LinMessage2.h:44
Vector::BLF::LinMessage2::fsmState
uint8_t fsmState
Definition LinMessage2.h:104
Vector::BLF::LinMessage2::earlyStopbitOffset
uint32_t earlyStopbitOffset
Early stop bit offset for UART timestamps in ns.
Definition LinMessage2.h:141
Vector::BLF::LinMessage2::apiMajor
uint8_t apiMajor
Definition LinMessage2.h:159
Vector::BLF::LinMessage2::simulated
uint8_t simulated
simulated frame
Definition LinMessage2.h:64
Vector::BLF::LinMessage2::exactHeaderBaudrate
double exactHeaderBaudrate
Exact baudrate of the header in bit/sec.
Definition LinMessage2.h:132
Vector::BLF::LinMessage2::earlyStopbitOffsetResponse
uint32_t earlyStopbitOffsetResponse
Early stop bit offset in frame response for UART timestamps in ns.
Definition LinMessage2.h:150
Vector::BLF::LinMessage2::etfAssocEtfId
uint8_t etfAssocEtfId
Unconditional frame associated with ETF - id of ETF.
Definition LinMessage2.h:92
Vector::BLF::LinMessage2::data
std::array< uint8_t, 8 > data
data bytes
Definition LinMessage2.h:37
Vector::BLF::LinMessage2::isEtf
uint8_t isEtf
Event-triggered frame.
Definition LinMessage2.h:74
Vector::BLF::LinMessage2::reservedLinMessage1
uint8_t reservedLinMessage1
Definition LinMessage2.h:107
Vector::BLF::LinMessage2::write
void write(AbstractFile &os) override
Definition LinMessage2.cpp:47
Vector::BLF::LinMessage2::respBaudrate
uint32_t respBaudrate
Response baudrate of the event in bit/sec.
Definition LinMessage2.h:121
Vector::BLF::LinMessage2::reservedLinMessage2
uint16_t reservedLinMessage2
Definition LinMessage2.h:110
Vector::BLF::LinMessage2::etfAssocIndex
uint8_t etfAssocIndex
Unconditional frame associated with ETF - serial index.
Definition LinMessage2.h:83
Vector::BLF::LinMessage2::dir
uint8_t dir
direction
Definition LinMessage2.h:54