Vector BLF

Loading...
Searching...
No Matches
LinShortOrSlowResponse.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
26 struct VECTOR_BLF_EXPORT LinShortOrSlowResponse final : ObjectHeader, LinDatabyteTimestampEvent {
27 LinShortOrSlowResponse();
28
29 void read(AbstractFile & is) override;
30 void write(AbstractFile & os) override;
31 uint32_t calculateObjectSize() const override;
32
38 uint32_t numberOfRespBytes {};
39
46 std::array<uint8_t, 9> respBytes {};
47
54 uint8_t slowResponse {};
55
63 uint8_t interruptedByBreak {};
64
66 uint8_t reservedLinShortOrSlowResponse {};
67};
68
69}
70}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::LinDatabyteTimestampEvent
Definition LinDatabyteTimestampEvent.h:23
Vector::BLF::LinShortOrSlowResponse::slowResponse
uint8_t slowResponse
non-zero, if the response was too slow
Definition LinShortOrSlowResponse.h:54
Vector::BLF::LinShortOrSlowResponse::respBytes
std::array< uint8_t, 9 > respBytes
the response bytes (can include the checksum)
Definition LinShortOrSlowResponse.h:46
Vector::BLF::LinShortOrSlowResponse::interruptedByBreak
uint8_t interruptedByBreak
non-zero, if the response was interrupted by a sync break
Definition LinShortOrSlowResponse.h:63
Vector::BLF::LinShortOrSlowResponse::write
void write(AbstractFile &os) override
Definition LinShortOrSlowResponse.cpp:25
Vector::BLF::LinShortOrSlowResponse::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition LinShortOrSlowResponse.cpp:35
Vector::BLF::LinShortOrSlowResponse::reservedLinShortOrSlowResponse
uint8_t reservedLinShortOrSlowResponse
Definition LinShortOrSlowResponse.h:66
Vector::BLF::LinShortOrSlowResponse::numberOfRespBytes
uint32_t numberOfRespBytes
number of valid response bytes
Definition LinShortOrSlowResponse.h:38
Vector::BLF::LinShortOrSlowResponse::read
void read(AbstractFile &is) override
Definition LinShortOrSlowResponse.cpp:14