Vector BLF: MostEthernetPkt.h Source File

Vector BLF

Loading...
Searching...
No Matches
MostEthernetPkt.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/ObjectHeader2.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16namespace Vector {
17namespace BLF {
18
24 struct VECTOR_BLF_EXPORT MostEthernetPkt final : ObjectHeader2 {
25 MostEthernetPkt();
26
27 void read(AbstractFile & is) override;
28 void write(AbstractFile & os) override;
29 uint32_t calculateObjectSize() const override;
30
36 uint16_t channel {};
37
46 uint8_t dir {};
47
49 uint8_t reservedMostEthernetPkt1 {};
50
52 uint32_t reservedMostEthernetPkt2 {};
53
59 uint64_t sourceMacAdr {};
60
66 uint64_t destMacAdr {};
67
80 uint8_t transferType {};
81
112 uint8_t state {};
113
151 uint8_t ackNack {};
152
154 uint8_t reservedMostEthernetPkt3 {};
155
161 uint32_t crc {};
162
171 uint8_t pAck {};
172
182 uint8_t cAck {};
183
185 uint16_t reservedMostEthernetPkt4 {};
186
192 uint32_t pktDataLength {};
193
195 uint64_t reservedMostEthernetPkt5 {};
196
202 std::vector<uint8_t> pktData {};
203};
204
205}
206}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::MostEthernetPkt::sourceMacAdr
uint64_t sourceMacAdr
48 bit source address
Definition MostEthernetPkt.h:59
Vector::BLF::MostEthernetPkt::transferType
uint8_t transferType
Tranfer Type.
Definition MostEthernetPkt.h:80
Vector::BLF::MostEthernetPkt::crc
uint32_t crc
Cyclic Redundancy Check.
Definition MostEthernetPkt.h:161
Vector::BLF::MostEthernetPkt::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition MostEthernetPkt.cpp:66
Vector::BLF::MostEthernetPkt::read
void read(AbstractFile &is) override
Definition MostEthernetPkt.cpp:14
Vector::BLF::MostEthernetPkt::ackNack
uint8_t ackNack
acknowledge code
Definition MostEthernetPkt.h:151
Vector::BLF::MostEthernetPkt::destMacAdr
uint64_t destMacAdr
48 bit target address
Definition MostEthernetPkt.h:66
Vector::BLF::MostEthernetPkt::cAck
uint8_t cAck
CRC acknowledge from the packet receiver(s) to the packet transmitter.
Definition MostEthernetPkt.h:182
Vector::BLF::MostEthernetPkt::reservedMostEthernetPkt5
uint64_t reservedMostEthernetPkt5
Definition MostEthernetPkt.h:195
Vector::BLF::MostEthernetPkt::pAck
uint8_t pAck
a preemptive acknowledge code
Definition MostEthernetPkt.h:171
Vector::BLF::MostEthernetPkt::reservedMostEthernetPkt2
uint32_t reservedMostEthernetPkt2
Definition MostEthernetPkt.h:52
Vector::BLF::MostEthernetPkt::write
void write(AbstractFile &os) override
Definition MostEthernetPkt.cpp:39
Vector::BLF::MostEthernetPkt::pktData
std::vector< uint8_t > pktData
variable data
Definition MostEthernetPkt.h:202
Vector::BLF::MostEthernetPkt::reservedMostEthernetPkt3
uint8_t reservedMostEthernetPkt3
Definition MostEthernetPkt.h:154
Vector::BLF::MostEthernetPkt::channel
uint16_t channel
application channel
Definition MostEthernetPkt.h:36
Vector::BLF::MostEthernetPkt::reservedMostEthernetPkt4
uint16_t reservedMostEthernetPkt4
Definition MostEthernetPkt.h:185
Vector::BLF::MostEthernetPkt::state
uint8_t state
transmission status
Definition MostEthernetPkt.h:112
Vector::BLF::MostEthernetPkt::pktDataLength
uint32_t pktDataLength
length of variable data in bytes (1506 max)
Definition MostEthernetPkt.h:192
Vector::BLF::MostEthernetPkt::dir
uint8_t dir
direction: 0: Rx; 1: Tx; 2: TxRequest
Definition MostEthernetPkt.h:46
Vector::BLF::MostEthernetPkt::reservedMostEthernetPkt1
uint8_t reservedMostEthernetPkt1
Definition MostEthernetPkt.h:49