Vector BLF

Loading...
Searching...
No Matches
FunctionBus.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 <vector>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeader.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16 namespace Vector {
17 namespace BLF {
18
22 struct VECTOR_BLF_EXPORT FunctionBus final : ObjectHeader {
23 FunctionBus();
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint32_t calculateObjectSize() const override;
28
30 enum FunctionBusObjectType : uint32_t {
31 Undefined = 0,
32 Signal = 1,
33 ServiceFunction = 2,
34 State = 3
35 };
36
38 uint32_t functionBusObjectType {};
39
40 uint32_t veType {};
41
43 uint32_t nameLength {};
44
46 uint32_t dataLength {};
47
49 std::string name {};
50
52 std::vector<uint8_t> data {};
53};
54
55}
56}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::FunctionBus::FunctionBusObjectType
FunctionBusObjectType
Definition FunctionBus.h:30
Vector::BLF::FunctionBus::read
void read(AbstractFile &is) override
Definition FunctionBus.cpp:14
Vector::BLF::FunctionBus::data
std::vector< uint8_t > data
Definition FunctionBus.h:52
Vector::BLF::FunctionBus::dataLength
uint32_t dataLength
Definition FunctionBus.h:46
Vector::BLF::FunctionBus::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition FunctionBus.cpp:40
Vector::BLF::FunctionBus::write
void write(AbstractFile &os) override
Definition FunctionBus.cpp:26
Vector::BLF::FunctionBus::functionBusObjectType
uint32_t functionBusObjectType
Definition FunctionBus.h:38
Vector::BLF::FunctionBus::name
std::string name
Definition FunctionBus.h:49
Vector::BLF::FunctionBus::nameLength
uint32_t nameLength
Definition FunctionBus.h:43