Vector BLF

Loading...
Searching...
No Matches
EthernetRxError.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
24 struct VECTOR_BLF_EXPORT EthernetRxError final : ObjectHeader {
25 EthernetRxError();
26
27 void read(AbstractFile & is) override;
28 void write(AbstractFile & os) override;
29 uint32_t calculateObjectSize() const override;
30
36 virtual uint16_t calculateStructLength() const;
37
45 uint16_t structLength {};
46
50 uint16_t channel {};
51
53 enum Dir : uint16_t {
55 Rx = 0,
56
58 Tx = 1,
59
61 TxRq = 2
62 };
63
67 uint16_t dir {};
68
72 uint16_t hardwareChannel {};
73
79 uint32_t fcs {};
80
87 uint16_t frameDataLength {};
88
90 uint16_t reservedEthernetRxError {};
91
100 uint32_t error {};
101
108 std::vector<uint8_t> frameData {};
109};
110
111}
112}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::EthernetRxError::write
void write(AbstractFile &os) override
Definition EthernetRxError.cpp:31
Vector::BLF::EthernetRxError::fcs
uint32_t fcs
Frame Check Sum.
Definition EthernetRxError.h:79
Vector::BLF::EthernetRxError::Dir
Dir
Definition EthernetRxError.h:53
Vector::BLF::EthernetRxError::Tx
@ Tx
Definition EthernetRxError.h:58
Vector::BLF::EthernetRxError::Rx
@ Rx
Definition EthernetRxError.h:55
Vector::BLF::EthernetRxError::TxRq
@ TxRq
Definition EthernetRxError.h:61
Vector::BLF::EthernetRxError::frameDataLength
uint16_t frameDataLength
Number of valid raw ethernet data bytes.
Definition EthernetRxError.h:87
Vector::BLF::EthernetRxError::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition EthernetRxError.cpp:51
Vector::BLF::EthernetRxError::read
void read(AbstractFile &is) override
Definition EthernetRxError.cpp:14
Vector::BLF::EthernetRxError::calculateStructLength
virtual uint16_t calculateStructLength() const
Definition EthernetRxError.cpp:65
Vector::BLF::EthernetRxError::error
uint32_t error
Definition EthernetRxError.h:100
Vector::BLF::EthernetRxError::frameData
std::vector< uint8_t > frameData
Max 1600 data bytes per frame.
Definition EthernetRxError.h:108
Vector::BLF::EthernetRxError::channel
uint16_t channel
Definition EthernetRxError.h:50
Vector::BLF::EthernetRxError::structLength
uint16_t structLength
Length of this structure.
Definition EthernetRxError.h:45
Vector::BLF::EthernetRxError::hardwareChannel
uint16_t hardwareChannel
HW channel. 0 = invalid.
Definition EthernetRxError.h:72
Vector::BLF::EthernetRxError::reservedEthernetRxError
uint16_t reservedEthernetRxError
Definition EthernetRxError.h:90
Vector::BLF::EthernetRxError::dir
uint16_t dir
Direction flag.
Definition EthernetRxError.h:67