Vector BLF: SerialEvent.h Source File

Vector BLF

Loading...
Searching...
No Matches
SerialEvent.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#include <vector>
11
12#include <Vector/BLF/AbstractFile.h>
13#include <Vector/BLF/CompactSerialEvent.h>
14#include <Vector/BLF/GeneralSerialEvent.h>
15#include <Vector/BLF/ObjectHeader.h>
16#include <Vector/BLF/SingleByteSerialEvent.h>
17
18#include <Vector/BLF/vector_blf_export.h>
19
20namespace Vector {
21namespace BLF {
22
28 struct VECTOR_BLF_EXPORT SerialEvent final : ObjectHeader {
29 SerialEvent();
30 virtual ~SerialEvent() noexcept = default;
31 SerialEvent(const SerialEvent &) = default;
32 SerialEvent & operator=(const SerialEvent &) = default;
33 SerialEvent(SerialEvent &&) = default;
34 SerialEvent & operator=(SerialEvent &&) = default;
35
36 void read(AbstractFile & is) override;
37 void write(AbstractFile & os) override;
38 uint32_t calculateObjectSize() const override;
39
41 enum Flags : uint32_t {
43 KLineEvent = 0x00000001,
44
50 DiagRequest = 0x00000002,
51
57 SingleByte = 0x00000004,
58
64 CompactByte = 0x00000008
65 };
66
68 uint32_t flags {};
69
75 uint32_t port {};
76
82 uint32_t baudrate {};
83
85 uint32_t reservedSerialEvent {};
86
88 GeneralSerialEvent general {};
89
91 SingleByteSerialEvent singleByte {};
92
94 CompactSerialEvent compact {};
95};
96
97}
98}
Vector::BLF::AbstractFile
Definition: AbstractFile.h:19
Vector::BLF::CompactSerialEvent
Definition: CompactSerialEvent.h:23
Vector::BLF::GeneralSerialEvent
Definition: GeneralSerialEvent.h:23
Vector::BLF::ObjectHeader
Object header.
Definition: ObjectHeader.h:22
Vector::BLF::SerialEvent
SERIAL_EVENT.
Definition: SerialEvent.h:28
Vector::BLF::SerialEvent::Flags
Flags
Definition: SerialEvent.h:41
Vector::BLF::SingleByteSerialEvent
Definition: SingleByteSerialEvent.h:23