Vector BLF: EthernetErrorEx.h Source File

Vector BLF

Loading...
Searching...
No Matches
EthernetErrorEx.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
16namespace Vector {
17namespace BLF {
18
22 struct VECTOR_BLF_EXPORT EthernetErrorEx final : ObjectHeader {
23 EthernetErrorEx();
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint32_t calculateObjectSize() const override;
28
34 virtual uint16_t calculateStructLength() const;
35
43 uint16_t structLength {};
44
53 uint16_t flags {};
54
58 uint16_t channel {};
59
63 uint16_t hardwareChannel {};
64
68 uint64_t frameDuration {};
69
73 uint32_t frameChecksum {};
74
78 uint16_t dir {};
79
83 uint16_t frameLength {};
84
88 uint32_t frameHandle {};
89
98 uint32_t error {};
99
103 std::vector<uint8_t> frameData {};
104};
105
106}
107}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::EthernetErrorEx::frameChecksum
uint32_t frameChecksum
Ethernet checksum.
Definition EthernetErrorEx.h:73
Vector::BLF::EthernetErrorEx::error
uint32_t error
Definition EthernetErrorEx.h:98
Vector::BLF::EthernetErrorEx::frameHandle
uint32_t frameHandle
Handle which refer the corresponding EthernetFrameForwarded event.
Definition EthernetErrorEx.h:88
Vector::BLF::EthernetErrorEx::calculateStructLength
virtual uint16_t calculateStructLength() const
Definition EthernetErrorEx.cpp:65
Vector::BLF::EthernetErrorEx::read
void read(AbstractFile &is) override
Definition EthernetErrorEx.cpp:14
Vector::BLF::EthernetErrorEx::write
void write(AbstractFile &os) override
Definition EthernetErrorEx.cpp:30
Vector::BLF::EthernetErrorEx::structLength
uint16_t structLength
Length of this structure.
Definition EthernetErrorEx.h:43
Vector::BLF::EthernetErrorEx::frameLength
uint16_t frameLength
Number of valid frameData bytes.
Definition EthernetErrorEx.h:83
Vector::BLF::EthernetErrorEx::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition EthernetErrorEx.cpp:49
Vector::BLF::EthernetErrorEx::hardwareChannel
uint16_t hardwareChannel
HW channel.
Definition EthernetErrorEx.h:63
Vector::BLF::EthernetErrorEx::frameDuration
uint64_t frameDuration
Transmission duration in [ns].
Definition EthernetErrorEx.h:68
Vector::BLF::EthernetErrorEx::dir
uint16_t dir
Direction flag: 0=Rx, 1=Tx, 2=TxRq.
Definition EthernetErrorEx.h:78
Vector::BLF::EthernetErrorEx::frameData
std::vector< uint8_t > frameData
Max 1612 data bytes per frame. Contains Ethernet header + Ethernet payload.
Definition EthernetErrorEx.h:103
Vector::BLF::EthernetErrorEx::flags
uint16_t flags
flags, which indicates the valid fields:
Definition EthernetErrorEx.h:53
Vector::BLF::EthernetErrorEx::channel
uint16_t channel
application channel, i.e. Eth 1
Definition EthernetErrorEx.h:58