Vector BLF

Loading...
Searching...
No Matches
CanMessage.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
16 namespace Vector {
17 namespace BLF {
18
26 struct VECTOR_BLF_EXPORT CanMessage final : ObjectHeader {
27 CanMessage();
28
29 void read(AbstractFile & is) override;
30 void write(AbstractFile & os) override;
31 uint32_t calculateObjectSize() const override;
32
38 uint16_t channel {};
39
51 uint8_t flags {};
52
59 uint8_t dlc {};
60
66 uint32_t id {};
67
73 std::array<uint8_t, 8> data {};
74};
75
76}
77}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::CanMessage::dlc
uint8_t dlc
CAN dlc.
Definition CanMessage.h:59
Vector::BLF::CanMessage::write
void write(AbstractFile &os) override
Definition CanMessage.cpp:23
Vector::BLF::CanMessage::channel
uint16_t channel
application channel
Definition CanMessage.h:38
Vector::BLF::CanMessage::data
std::array< uint8_t, 8 > data
CAN data.
Definition CanMessage.h:73
Vector::BLF::CanMessage::flags
uint8_t flags
CAN dir & rtr.
Definition CanMessage.h:51
Vector::BLF::CanMessage::read
void read(AbstractFile &is) override
Definition CanMessage.cpp:14
Vector::BLF::CanMessage::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition CanMessage.cpp:32