Vector BLF

Loading...
Searching...
No Matches
EthernetStatus.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/BLF/AbstractFile.h>
10#include <Vector/BLF/ObjectHeader.h>
11
12#include <Vector/BLF/vector_blf_export.h>
13
14 namespace Vector {
15 namespace BLF {
16
22 struct VECTOR_BLF_EXPORT EthernetStatus final : ObjectHeader {
23 EthernetStatus();
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint32_t calculateObjectSize() const override;
28
32 uint16_t channel {};
33
35 enum Flags : uint16_t {
37 LinkStatus = 0x0001,
38
40 Bitrate = 0x0002,
41
43 EthernetPhy = 0x0004,
44
46 Duplex = 0x0008,
47
49 MdiType = 0x0010,
50
52 Connector = 0x0020,
53
55 ClockMode = 0x0040,
56
58 BrPair = 0x0080,
59
61 HardwareChannel = 0x0100,
62 };
63
65 uint16_t flags;
66
68 enum LinkStatus : uint8_t {
70 UnknownLinkStatus = 0,
71
73 LinkDown = 1,
74
76 LinkUp = 2,
77
79 Negotiate = 3,
80
82 LinkError = 4
83 };
84
88 uint8_t linkStatus {};
89
91 enum EthernetPhy : uint8_t {
93 UnknownEthernetPhy = 0,
94
96 Ieee802_3 = 1,
97
99 BroadR_Reach = 2
100 };
101
105 uint8_t ethernetPhy {};
106
108 enum Duplex : uint8_t {
110 UnknownDuplex = 0,
111
113 HalfDuplex = 1,
114
116 FullDuplex = 2
117 };
118
122 uint8_t duplex {};
123
125 enum Mdi : uint8_t {
127 UnknownMdi = 0,
128
130 Direct = 1,
131
133 Crossover = 2
134 };
135
137 uint8_t mdi {};
138
140 enum Connector : uint8_t {
142 UnknownConnector = 0,
143
145 Rj45 = 1,
146
148 DSub = 2
149 };
150
152 uint8_t connector {};
153
155 enum ClockMode : uint8_t {
157 UnknownClockMode = 0,
158
160 Master = 1,
161
163 Slave = 2
164 };
165
167 uint8_t clockMode {};
168
170 enum Pairs : uint8_t {
172 UnknownPairs = 0,
173
175 Br1Pair = 1,
176
178 Br2Pair = 2,
179
181 Br4Pair = 3
182 };
183
185 uint8_t pairs {};
186
188 uint8_t hardwareChannel {};
189
193 uint32_t bitrate {};
194};
195
196}
197}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::EthernetStatus::ethernetPhy
uint8_t ethernetPhy
Ethernet Phy.
Definition EthernetStatus.h:105
Vector::BLF::EthernetStatus::read
void read(AbstractFile &is) override
Definition EthernetStatus.cpp:14
Vector::BLF::EthernetStatus::channel
uint16_t channel
Definition EthernetStatus.h:32
Vector::BLF::EthernetStatus::Duplex
Duplex
Definition EthernetStatus.h:108
Vector::BLF::EthernetStatus::HalfDuplex
@ HalfDuplex
Definition EthernetStatus.h:113
Vector::BLF::EthernetStatus::UnknownDuplex
@ UnknownDuplex
Definition EthernetStatus.h:110
Vector::BLF::EthernetStatus::FullDuplex
@ FullDuplex
Definition EthernetStatus.h:116
Vector::BLF::EthernetStatus::mdi
uint8_t mdi
Definition EthernetStatus.h:137
Vector::BLF::EthernetStatus::Flags
Flags
Definition EthernetStatus.h:35
Vector::BLF::EthernetStatus::HardwareChannel
@ HardwareChannel
Definition EthernetStatus.h:61
Vector::BLF::EthernetStatus::BrPair
@ BrPair
Definition EthernetStatus.h:58
Vector::BLF::EthernetStatus::Bitrate
@ Bitrate
Definition EthernetStatus.h:40
Vector::BLF::EthernetStatus::MdiType
@ MdiType
Definition EthernetStatus.h:49
Vector::BLF::EthernetStatus::clockMode
uint8_t clockMode
Definition EthernetStatus.h:167
Vector::BLF::EthernetStatus::flags
uint16_t flags
Definition EthernetStatus.h:65
Vector::BLF::EthernetStatus::Mdi
Mdi
Definition EthernetStatus.h:125
Vector::BLF::EthernetStatus::Direct
@ Direct
Definition EthernetStatus.h:130
Vector::BLF::EthernetStatus::UnknownMdi
@ UnknownMdi
Definition EthernetStatus.h:127
Vector::BLF::EthernetStatus::Crossover
@ Crossover
Definition EthernetStatus.h:133
Vector::BLF::EthernetStatus::bitrate
uint32_t bitrate
Bitrate in [kbit/sec].
Definition EthernetStatus.h:193
Vector::BLF::EthernetStatus::LinkStatus
LinkStatus
Definition EthernetStatus.h:68
Vector::BLF::EthernetStatus::LinkError
@ LinkError
Definition EthernetStatus.h:82
Vector::BLF::EthernetStatus::UnknownLinkStatus
@ UnknownLinkStatus
Definition EthernetStatus.h:70
Vector::BLF::EthernetStatus::LinkDown
@ LinkDown
Definition EthernetStatus.h:73
Vector::BLF::EthernetStatus::Negotiate
@ Negotiate
Definition EthernetStatus.h:79
Vector::BLF::EthernetStatus::LinkUp
@ LinkUp
Definition EthernetStatus.h:76
Vector::BLF::EthernetStatus::write
void write(AbstractFile &os) override
Definition EthernetStatus.cpp:29
Vector::BLF::EthernetStatus::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition EthernetStatus.cpp:44
Vector::BLF::EthernetStatus::connector
uint8_t connector
Definition EthernetStatus.h:152
Vector::BLF::EthernetStatus::pairs
uint8_t pairs
Definition EthernetStatus.h:185
Vector::BLF::EthernetStatus::hardwareChannel
uint8_t hardwareChannel
Definition EthernetStatus.h:188
Vector::BLF::EthernetStatus::duplex
uint8_t duplex
Duplex.
Definition EthernetStatus.h:122
Vector::BLF::EthernetStatus::Connector
Connector
Definition EthernetStatus.h:140
Vector::BLF::EthernetStatus::DSub
@ DSub
Definition EthernetStatus.h:148
Vector::BLF::EthernetStatus::UnknownConnector
@ UnknownConnector
Definition EthernetStatus.h:142
Vector::BLF::EthernetStatus::Rj45
@ Rj45
Definition EthernetStatus.h:145
Vector::BLF::EthernetStatus::EthernetPhy
EthernetPhy
Definition EthernetStatus.h:91
Vector::BLF::EthernetStatus::Ieee802_3
@ Ieee802_3
Definition EthernetStatus.h:96
Vector::BLF::EthernetStatus::BroadR_Reach
@ BroadR_Reach
Definition EthernetStatus.h:99
Vector::BLF::EthernetStatus::UnknownEthernetPhy
@ UnknownEthernetPhy
Definition EthernetStatus.h:93
Vector::BLF::EthernetStatus::Pairs
Pairs
Definition EthernetStatus.h:170
Vector::BLF::EthernetStatus::Br2Pair
@ Br2Pair
Definition EthernetStatus.h:178
Vector::BLF::EthernetStatus::UnknownPairs
@ UnknownPairs
Definition EthernetStatus.h:172
Vector::BLF::EthernetStatus::Br4Pair
@ Br4Pair
Definition EthernetStatus.h:181
Vector::BLF::EthernetStatus::Br1Pair
@ Br1Pair
Definition EthernetStatus.h:175
Vector::BLF::EthernetStatus::ClockMode
ClockMode
Definition EthernetStatus.h:155
Vector::BLF::EthernetStatus::Master
@ Master
Definition EthernetStatus.h:160
Vector::BLF::EthernetStatus::UnknownClockMode
@ UnknownClockMode
Definition EthernetStatus.h:157
Vector::BLF::EthernetStatus::Slave
@ Slave
Definition EthernetStatus.h:163
Vector::BLF::EthernetStatus::linkStatus
uint8_t linkStatus
Link Status.
Definition EthernetStatus.h:88