Vector BLF: EthernetStatus.h Source File

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
14namespace Vector {
15namespace 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
ETHERNET_STATUS.
Definition: EthernetStatus.h:22
Vector::BLF::EthernetStatus::Duplex
Duplex
Definition: EthernetStatus.h:108
Vector::BLF::EthernetStatus::Flags
Flags
Definition: EthernetStatus.h:35
Vector::BLF::EthernetStatus::flags
uint16_t flags
Definition: EthernetStatus.h:65
Vector::BLF::EthernetStatus::Mdi
Mdi
Definition: EthernetStatus.h:125
Vector::BLF::EthernetStatus::LinkStatus
LinkStatus
Definition: EthernetStatus.h:68
Vector::BLF::EthernetStatus::Connector
Connector
Definition: EthernetStatus.h:140
Vector::BLF::EthernetStatus::EthernetPhy
EthernetPhy
Definition: EthernetStatus.h:91
Vector::BLF::EthernetStatus::Pairs
Pairs
Definition: EthernetStatus.h:170
Vector::BLF::EthernetStatus::ClockMode
ClockMode
Definition: EthernetStatus.h:155
Vector::BLF::ObjectHeader
Object header.
Definition: ObjectHeader.h:22