tdl-xoa-driver 1.6.2__py3-none-any.whl → 1.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ if TYPE_CHECKING:
14
14
 
15
15
  from .bases.port_l23_genuine import BasePortL23Genuine
16
16
  from .layer1_freya import Layer1
17
+ from .layer1_freya_adv import Layer1Adv
17
18
 
18
19
 
19
20
  class FamilyFreya(BasePortL23Genuine):
@@ -30,6 +31,10 @@ class FamilyFreya(BasePortL23Genuine):
30
31
 
31
32
  self.layer1 = Layer1(self._conn, self)
32
33
  """Layer 1"""
34
+
35
+ self.layer1_adv = Layer1Adv(self._conn, self)
36
+ """Layer 1 Advanced"""
37
+
33
38
  return self
34
39
 
35
40
  on_dynamic_change = functools.partialmethod(utils.on_event, P_DYNAMIC)
@@ -64,7 +64,7 @@ class POdin1G3S6PE(POdin1G3S6P):
64
64
  ...
65
65
 
66
66
 
67
- class POdin1G3S2PT(FamilyOdin):
67
+ class POdin1G3S2PT(POdin1G3S6P):
68
68
  """L23 port on Odin-1G-3S-2P-T module.
69
69
  """
70
70
  ...
@@ -0,0 +1,38 @@
1
+ from typing import TYPE_CHECKING
2
+ from xoa_driver.internals.commands import (
3
+ PL1AD_RX_FREQ_CURR,
4
+ PL1AD_RX_FREQ_MAX,
5
+ PL1AD_RX_FREQ_MIN,
6
+ PL1AD_TX_FREQ_CURR,
7
+ )
8
+ if TYPE_CHECKING:
9
+ from xoa_driver.internals.core import interfaces as itf
10
+
11
+
12
+ class FrequencyAdv:
13
+ """Frequency Management"""
14
+
15
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
16
+ self.rx_curr = PL1AD_RX_FREQ_CURR(conn, module_id, port_id)
17
+ """Returns the current receive frequency.
18
+
19
+ :type: PL1AD_RX_FREQ_CURR
20
+ """
21
+
22
+ self.rx_max = PL1AD_RX_FREQ_MAX(conn, module_id, port_id)
23
+ """Returns the maximum receive frequency.
24
+
25
+ :type: PL1AD_RX_FREQ_MAX
26
+ """
27
+
28
+ self.rx_min = PL1AD_RX_FREQ_MIN(conn, module_id, port_id)
29
+ """Returns the minimum receive frequency.
30
+
31
+ :type: PL1AD_RX_FREQ_MIN
32
+ """
33
+
34
+ self.tx_curr = PL1AD_TX_FREQ_CURR(conn, module_id, port_id)
35
+ """Returns the current transmit frequency.
36
+
37
+ :type: PL1AD_TX_FREQ_CURR
38
+ """
@@ -0,0 +1,214 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ Union,
5
+ Self,
6
+ )
7
+ if TYPE_CHECKING:
8
+ from xoa_driver.internals.core import interfaces as itf
9
+ from xoa_driver.internals.hli.ports.port_l23.family_freya import FamilyFreya
10
+
11
+ from xoa_driver.internals.commands import (
12
+ PL1AD_RX_HIBER,
13
+ PL1AD_RX_HISER,
14
+ PL1AD_RX_HISER_ALARM,
15
+ PL1AD_RX_ITB_CNT,
16
+ PL1AD_TX_ITB,
17
+ PL1AD_RX_DEG_SER,
18
+ PL1AD_RX_DEG_SER_THRESH,
19
+ PL1AD_RX_ERR_CW_CNT,
20
+ PL1AD_TX_ERR_CW,
21
+ PL1AD_RX_SKEW,
22
+ PL1AD_RX_LOA_CNT,
23
+ PL1AD_RX_LOSYNC_CNT,
24
+ )
25
+
26
+
27
+ class PcsLaneAdv:
28
+ """PCS Lane Advanced Statistics"""
29
+
30
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, lane_idx: int) -> None:
31
+
32
+ self.rx_skew = PL1AD_RX_SKEW(conn, module_id, port_id, lane_idx)
33
+ """Returns the current Rx relative skew of the PCS lane measured in bits.
34
+
35
+ :type: PL1AD_RX_SKEW
36
+ """
37
+
38
+ # self.tx_skew = PL1AD_TX_SKEW(conn, module_id, port_id, lane_idx)
39
+ # """Returns the current Tx relative skew of the PCS lane measured in bits.
40
+
41
+ # :type: PL1AD_TX_SKEW
42
+ # """
43
+
44
+
45
+ # self.rx_loa_since_last = PL1AD_RX_LOA_CNT(conn, module_id, port_id, lane_idx)
46
+ # """Returns the number of cumulated Loss of Alignment conditions on the PCS lane since last query
47
+
48
+ # :type: PL1AD_RX_LOA_CNT
49
+ # """
50
+
51
+ # self.tx_loa = PL1AD_TX_LOA(conn, module_id, port_id, lane_idx)
52
+ # """Sends a Loss of Alignment from the Tx lane immediately when called.
53
+
54
+ # :type: PL1AD_TX_LOA
55
+ # """
56
+
57
+
58
+
59
+ class HighBer:
60
+ """High Bit Error Rate (BER) Alarm"""
61
+
62
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
63
+ self.status = PL1AD_RX_HIBER(conn, module_id, port_id)
64
+ """Returns the current and the latched High BER status of the port.
65
+
66
+ :type: PL1AD_RX_HIBER
67
+ """
68
+
69
+
70
+ class HighSer:
71
+ """High Symbol Error Rate (SER) Alarm"""
72
+
73
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
74
+ self.status = PL1AD_RX_HISER(conn, module_id, port_id)
75
+ """Returns the current and the latched High SER status of the port.
76
+
77
+ :type: PL1AD_RX_HISER
78
+ """
79
+
80
+ self.alarm = PL1AD_RX_HISER_ALARM(conn, module_id, port_id)
81
+ """High SER Alarm management.
82
+
83
+ :type: PL1AD_RX_HISER_ALARM
84
+ """
85
+
86
+ # self.tx_hi_ser = PL1AD_TX_HISER(conn, module_id, port_id)
87
+ # """Sends a High SER condition from the Tx port immediately when called.
88
+
89
+ # :type: PL1AD_TX_HISER
90
+ # """
91
+
92
+ # self.state = PL1AD_RX_HISER_CTRL(conn, module_id, port_id)
93
+ # """Enable or disable High SER detection.
94
+
95
+ # :type: PL1AD_RX_HISER_CTRL
96
+ # """
97
+
98
+ class InvalidTranscodeBlock:
99
+ """Invalid Transcode Block (ITB) Management"""
100
+
101
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
102
+ self.rx_itb_since_last = PL1AD_RX_ITB_CNT(conn, module_id, port_id)
103
+ """Returns the number of cumulated Invalid 256b/257b Transcode Blocks since last query.
104
+
105
+ :type: PL1AD_RX_ITB_CNT
106
+ """
107
+
108
+ self.tx_itb = PL1AD_TX_ITB(conn, module_id, port_id)
109
+ """Sends an Invalid 256b/257b Transcode Block from the Tx port immediately when called.
110
+
111
+ :type: PL1AD_TX_ITB
112
+ """
113
+
114
+
115
+
116
+ class DegradedSer:
117
+ """Degraded Symbol Error Rate (SER) Management"""
118
+
119
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
120
+ self.threshold = PL1AD_RX_DEG_SER_THRESH(conn, module_id, port_id)
121
+ """Configures the thresholds for the Degraded SER Alarm.
122
+
123
+ :type: PL1AD_RX_DEG_SER_THRESH
124
+ """
125
+
126
+ self.status = PL1AD_RX_DEG_SER(conn, module_id, port_id)
127
+ """The current and latched Degraded SER status of the port.
128
+
129
+ :type: PL1AD_RX_DEG_SER
130
+ """
131
+
132
+ # self.state = PL1AD_RX_DEG_SER_STATE(conn, module_id, port_id)
133
+ # """Enable or disable Degraded SER detection.
134
+
135
+ # :type: PL1AD_RX_DEG_SER_STATE
136
+ # """
137
+
138
+
139
+ class ErrorCodeword:
140
+ """Erroneous Codeword (CW) Management"""
141
+
142
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
143
+ self.rx_err_cw_since_last = PL1AD_RX_ERR_CW_CNT(conn, module_id, port_id)
144
+ """Returns the number of cumulative erroneous 64b/66b codewords since last query.
145
+
146
+ :type: PL1AD_RX_ERR_CW_CNT
147
+ """
148
+
149
+ self.tx_err_cw = PL1AD_TX_ERR_CW(conn, module_id, port_id)
150
+ """Sends an error 64b/66b codeword from the Tx port immediately when called.
151
+
152
+ :type: PL1AD_TX_ERR_CW
153
+ """
154
+
155
+
156
+ class PcsLayerAdv:
157
+ """Adv. Layer-1 - PCS layer configuration and status."""
158
+
159
+ def __init__(self, conn: "itf.IConnection", port: "FamilyFreya") -> None:
160
+ self._conn = conn
161
+ self.__port = port
162
+ module_id, port_id = port.kind
163
+
164
+ self.lane: Tuple["PcsLaneAdv", ...] = tuple(
165
+ PcsLaneAdv(self._conn, module_id, port_id, lane_idx=idx)
166
+ for idx in range(self.__port.info.capabilities.lane_count)
167
+ ) # TODO: need to fix, currently port.info.capabilities must be none because lanes are created before awaiting the port
168
+ """PCS Lane
169
+
170
+ :type: Tuple[PcsLaneAdv, ...]
171
+ """
172
+
173
+ self.deg_ser = DegradedSer(conn, module_id, port_id)
174
+ """Degraded Symbol Error Rate (SER) Management
175
+
176
+ :type: DegradedSer
177
+ """
178
+
179
+ self.err_cw = ErrorCodeword(conn, module_id, port_id)
180
+ """Erroneous Codeword (CW) Management
181
+
182
+ :type: ErrorCodeword
183
+ """
184
+
185
+ self.hi_ber = HighBer(conn, module_id, port_id)
186
+ """High Bit Error Rate (BER)
187
+
188
+ :type: HighBer
189
+ """
190
+
191
+ self.hi_ser = HighSer(conn, module_id, port_id)
192
+ """High Symbol Error Rate (SER)
193
+
194
+ :type: HighSer
195
+ """
196
+
197
+ self.itb = InvalidTranscodeBlock(conn, module_id, port_id)
198
+ """Invalid Transcode Block (ITB) Management
199
+
200
+ :type: InvalidTranscodeBlock
201
+ """
202
+
203
+ self.rx_total_loa_since_last = PL1AD_RX_LOA_CNT(conn, module_id, port_id) # TODO: Suggestion for R106 GA: The name of the XMP command is preferred to be changed to PL1AD_RX_LOA_TOTAL_CNT
204
+ """Returns the number of cumulated Loss of Alignment conditions since last query of the port.
205
+
206
+ :type: PL1AD_RX_LOA_CNT
207
+ """
208
+
209
+ self.rx_link_sync_loss_since_last = PL1AD_RX_LOSYNC_CNT(conn, module_id, port_id)
210
+ """Returns the number of cumulated Loss of Sync conditions since last query.
211
+
212
+ :type: PL1AD_RX_LOSYNC_CNT
213
+ """
214
+
@@ -0,0 +1,24 @@
1
+ from typing import TYPE_CHECKING
2
+ from xoa_driver.internals.commands import (
3
+ PL1AD_RX_LF_CNT,
4
+ PL1AD_RX_RF_CNT,
5
+ )
6
+ if TYPE_CHECKING:
7
+ from xoa_driver.internals.core import interfaces as itf
8
+
9
+
10
+ class RsFault:
11
+ """RS Fault Management"""
12
+
13
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
14
+ self.rx_local_fault_since_last = PL1AD_RX_LF_CNT(conn, module_id, port_id)
15
+ """Returns the number of cumulated Local Fault conditions since last query.
16
+
17
+ :type: PL1AD_RX_LF_CNT
18
+ """
19
+
20
+ self.rx_remote_fault_since_last = PL1AD_RX_RF_CNT(conn, module_id, port_id)
21
+ """Returns the number of cumulated Remote Fault conditions since last query.
22
+
23
+ :type: PL1AD_RX_RF_CNT
24
+ """
@@ -72,10 +72,15 @@ class FreyaPcsLayer(PcsLayer):
72
72
  class Layer1:
73
73
  def __init__(self, conn: "itf.IConnection", port: "FamilyFreya") -> None:
74
74
  module_id, port_id = port.kind
75
+
75
76
  self.serdes: Tuple[SerDesFreya, ...] = tuple(
76
77
  SerDesFreya(conn, module_id, port_id, serdes_xindex=idx)
77
78
  for idx in range(port.info.capabilities.serdes_count)
78
79
  )
80
+ """SerDes Lane
81
+
82
+ :type: Tuple[SerDesFreya, ...]
83
+ """
79
84
 
80
85
  self.impairment = Impair(conn, module_id, port_id)
81
86
  """Impairment functions
@@ -0,0 +1,61 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ )
5
+ if TYPE_CHECKING:
6
+ from xoa_driver.internals.core import interfaces as itf
7
+ from xoa_driver.internals.hli.ports.port_l23.family_freya import FamilyFreya
8
+
9
+ from xoa_driver.internals.commands import (
10
+ PL1AD_RX_LOL,
11
+ )
12
+
13
+ from .layer1_adv.freq import FrequencyAdv
14
+ from .layer1_adv.pcs_fec import PcsLayerAdv
15
+ from .layer1_adv.rs_fault import *
16
+
17
+ class SerdesAdv:
18
+ """Serdes Advanced Statistics"""
19
+
20
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_idx: int) -> None:
21
+
22
+ self.rx_cdr_lol_since_last = PL1AD_RX_LOL(conn, module_id, port_id, serdes_idx)
23
+ """Returns the current and the latched CDR Loss of Lock (LOL) status of the specified Serdes.
24
+
25
+ :type: PL1AD_RX_LOL
26
+ """
27
+
28
+
29
+ class Layer1Adv:
30
+ def __init__(self, conn: "itf.IConnection", port: "FamilyFreya") -> None:
31
+ module_id, port_id = port.kind
32
+
33
+ self.serdes: Tuple["SerdesAdv", ...] = tuple(
34
+ SerdesAdv(conn, module_id, port_id, serdes_idx=idx)
35
+ for idx in range(port.info.capabilities.serdes_count)
36
+ )
37
+ """SerDes Lane
38
+
39
+ :type: Tuple[SerdesAdv, ...]
40
+ """
41
+
42
+ self.freq = FrequencyAdv(conn, module_id, port_id)
43
+ """Frequency Management
44
+
45
+ :type: FrequencyAdv
46
+ """
47
+
48
+ self.rs_fault = RsFault(conn, module_id, port_id)
49
+ """RS Fault Management
50
+
51
+ :type: RsFault
52
+ """
53
+
54
+ self.pcs = PcsLayerAdv(conn, port)
55
+ """PCS configuration and status
56
+ """
57
+
58
+
59
+
60
+
61
+