tdl-xoa-driver 1.5.1__py3-none-any.whl → 1.6.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.
Files changed (110) hide show
  1. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/METADATA +1 -1
  2. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/RECORD +87 -88
  3. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/licenses/LICENSE +1 -1
  4. xoa_driver/__init__.py +2 -2
  5. xoa_driver/enums.py +10 -10
  6. xoa_driver/functions/anlt.py +60 -78
  7. xoa_driver/functions/cli/testbed_config.py +1 -1
  8. xoa_driver/functions/cmis/_replies.py +4 -4
  9. xoa_driver/functions/mgmt.py +206 -250
  10. xoa_driver/functions/tools.py +11 -6
  11. xoa_driver/internals/commands/c_commands.py +59 -0
  12. xoa_driver/internals/commands/enums.py +101 -90
  13. xoa_driver/internals/commands/m4_commands.py +25 -0
  14. xoa_driver/internals/commands/m4e_commands.py +6 -0
  15. xoa_driver/internals/commands/m_commands.py +51 -1
  16. xoa_driver/internals/commands/p4_commands.py +63 -1
  17. xoa_driver/internals/commands/p4e_commands.py +9 -0
  18. xoa_driver/internals/commands/p4g_commands.py +139 -0
  19. xoa_driver/internals/commands/p_commands.py +455 -61
  20. xoa_driver/internals/commands/pc_commands.py +9 -0
  21. xoa_driver/internals/commands/pd_commands.py +11 -0
  22. xoa_driver/internals/commands/pe_commands.py +27 -0
  23. xoa_driver/internals/commands/pec_commands.py +9 -0
  24. xoa_driver/internals/commands/ped_commands.py +23 -0
  25. xoa_driver/internals/commands/pef_commands.py +43 -0
  26. xoa_driver/internals/commands/pf_commands.py +11 -0
  27. xoa_driver/internals/commands/pl1_commands.py +315 -48
  28. xoa_driver/internals/commands/pl_commands.py +8 -0
  29. xoa_driver/internals/commands/pm_commands.py +11 -0
  30. xoa_driver/internals/commands/pp_commands.py +84 -27
  31. xoa_driver/internals/commands/pr_commands.py +25 -0
  32. xoa_driver/internals/commands/ps_commands.py +47 -1
  33. xoa_driver/internals/commands/pt_commands.py +15 -0
  34. xoa_driver/internals/commands/px_commands.py +180 -136
  35. xoa_driver/internals/commands/subtypes.py +4 -3
  36. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +1 -1
  37. xoa_driver/internals/hli/indices/macsecscs/base_macsecsc.py +41 -3
  38. xoa_driver/internals/hli/modules/modules_l23/family_combi.py +0 -64
  39. xoa_driver/internals/hli/modules/modules_l23/family_edun.py +0 -2
  40. xoa_driver/internals/hli/modules/modules_l23/{family_g.py → family_loki.py} +29 -1
  41. xoa_driver/internals/hli/modules/modules_l23/family_odin.py +412 -0
  42. xoa_driver/internals/hli/modules/modules_l23/{family_l.py → family_thor.py} +44 -0
  43. xoa_driver/internals/hli/ports/port_l23/chimera/port_chimera.py +3 -3
  44. xoa_driver/internals/hli/ports/port_l23/family_edun.py +8 -43
  45. xoa_driver/internals/hli/ports/port_l23/{family_l1.py → family_freya.py} +9 -44
  46. xoa_driver/internals/hli/ports/port_l23/{family_g.py → family_loki.py} +32 -31
  47. xoa_driver/internals/hli/ports/port_l23/family_odin.py +225 -0
  48. xoa_driver/internals/hli/ports/port_l23/family_thor.py +67 -0
  49. xoa_driver/internals/hli/ports/port_l23/layer1/anlt.py +512 -0
  50. xoa_driver/internals/hli/ports/port_l23/layer1/brr.py +26 -0
  51. xoa_driver/internals/hli/ports/port_l23/layer1/eye_diagram.py +71 -0
  52. xoa_driver/internals/hli/ports/port_l23/{pcs_pma_ijkl_chimera.py → layer1/impair.py} +7 -7
  53. xoa_driver/internals/hli/ports/port_l23/layer1/laser_power.py +28 -0
  54. xoa_driver/internals/hli/ports/port_l23/{family_e.py → layer1/lower_power.py} +1 -51
  55. xoa_driver/internals/hli/ports/port_l23/{freya_l1.py → layer1/medium.py} +38 -358
  56. xoa_driver/internals/hli/ports/port_l23/layer1/pcs_fec.py +219 -0
  57. xoa_driver/internals/hli/ports/port_l23/layer1/pma.py +43 -0
  58. xoa_driver/internals/hli/ports/port_l23/layer1/prbs.py +39 -0
  59. xoa_driver/internals/hli/ports/port_l23/layer1/preamble.py +25 -0
  60. xoa_driver/internals/hli/ports/port_l23/{fault_jkl.py → layer1/rs_fault.py} +2 -2
  61. xoa_driver/internals/hli/ports/port_l23/layer1/siv.py +69 -0
  62. xoa_driver/internals/hli/ports/port_l23/layer1_edun.py +103 -0
  63. xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +103 -0
  64. xoa_driver/internals/hli/ports/port_l23/layer1_loki.py +74 -0
  65. xoa_driver/internals/hli/ports/port_l23/layer1_thor.py +70 -0
  66. xoa_driver/internals/hli/ports/port_l23/sec/__init__.py +0 -0
  67. xoa_driver/internals/hli/ports/port_l23/sec/macsec.py +108 -0
  68. xoa_driver/internals/hli/ports/port_l23/tcvr/__init__.py +0 -0
  69. xoa_driver/internals/hli/ports/port_l23/{bases/port_transceiver.py → tcvr/cmis.py} +4 -118
  70. xoa_driver/internals/hli/ports/port_l23/tcvr/transceiver.py +124 -0
  71. xoa_driver/internals/hli/ports/port_l23/trafficgen/__init__.py +0 -0
  72. xoa_driver/internals/hli/ports/port_l23/trafficgen/runt.py +32 -0
  73. xoa_driver/internals/hli/ports/port_l23/{bases/port_reception_statistics.py → trafficgen/rx_stats.py} +0 -21
  74. xoa_driver/internals/hli/ports/port_l23/{bases/port_l23.py → trafficgen/tgen.py} +31 -213
  75. xoa_driver/internals/hli/ports/port_l23/{bases/port_transmission_statistics.py → trafficgen/tx_stats.py} +2 -22
  76. xoa_driver/internals/hli/testers/l23_tester.py +1 -3
  77. xoa_driver/internals/utils/indices/_interfaces.py +18 -6
  78. xoa_driver/internals/utils/indices/index_manager.py +8 -2
  79. xoa_driver/internals/utils/managers/ports_manager.py +5 -2
  80. xoa_driver/misc.py +6 -6
  81. xoa_driver/modules.py +31 -47
  82. xoa_driver/ports.py +10 -29
  83. xoa_driver/internals/hli/modules/modules_l23/family_d.py +0 -75
  84. xoa_driver/internals/hli/modules/modules_l23/family_e.py +0 -85
  85. xoa_driver/internals/hli/modules/modules_l23/family_f.py +0 -145
  86. xoa_driver/internals/hli/modules/modules_l23/family_h.py +0 -40
  87. xoa_driver/internals/hli/modules/modules_l23/family_i.py +0 -25
  88. xoa_driver/internals/hli/modules/modules_l23/family_j.py +0 -25
  89. xoa_driver/internals/hli/modules/modules_l23/family_k.py +0 -39
  90. xoa_driver/internals/hli/modules/modules_l23/family_m.py +0 -25
  91. xoa_driver/internals/hli/modules/modules_l23/family_n.py +0 -40
  92. xoa_driver/internals/hli/ports/port_l23/bases/port_l23_genuine.py +0 -229
  93. xoa_driver/internals/hli/ports/port_l23/edun_l1.py +0 -181
  94. xoa_driver/internals/hli/ports/port_l23/family_combi.py +0 -37
  95. xoa_driver/internals/hli/ports/port_l23/family_d.py +0 -51
  96. xoa_driver/internals/hli/ports/port_l23/family_f.py +0 -151
  97. xoa_driver/internals/hli/ports/port_l23/family_h.py +0 -67
  98. xoa_driver/internals/hli/ports/port_l23/family_i.py +0 -84
  99. xoa_driver/internals/hli/ports/port_l23/family_j.py +0 -68
  100. xoa_driver/internals/hli/ports/port_l23/family_k.py +0 -73
  101. xoa_driver/internals/hli/ports/port_l23/family_l.py +0 -82
  102. xoa_driver/internals/hli/ports/port_l23/family_m.py +0 -29
  103. xoa_driver/internals/hli/ports/port_l23/pcs_pma_ghijkl.py +0 -369
  104. xoa_driver/internals/hli/ports/port_l23/pcs_pma_l.py +0 -78
  105. xoa_driver/internals/hli/ports/port_l23/port_l23ve.py +0 -101
  106. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/WHEEL +0 -0
  107. {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/top_level.txt +0 -0
  108. /xoa_driver/internals/hli/modules/modules_l23/{family_l1.py → family_freya.py} +0 -0
  109. /xoa_driver/internals/hli/ports/port_l23/{bases → layer1}/__init__.py +0 -0
  110. /xoa_driver/internals/hli/ports/port_l23/{bases/port_capture.py → trafficgen/capture.py} +0 -0
@@ -0,0 +1,70 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ Self,
5
+ )
6
+ if TYPE_CHECKING:
7
+ from xoa_driver.internals.core import interfaces as itf
8
+ from xoa_driver.internals.hli.ports.port_l23.family_thor import FamilyThor
9
+ from xoa_driver.internals.commands import (
10
+ PP_PRBSTYPE,
11
+ PP_LINKTRAINSTATUS,
12
+ )
13
+ from .layer1.prbs import Prbs
14
+ from .layer1.pcs_fec import PcsLayer
15
+ from .layer1.impair import Impair
16
+ from .layer1.medium import BasicMedium
17
+ from .layer1.rs_fault import RsFault
18
+ from .layer1.anlt import AnltBasic
19
+ from .tcvr.transceiver import Transceiver
20
+
21
+ class SerDesThor:
22
+ """L23 high-speed port SerDes configuration and status."""
23
+
24
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
25
+
26
+ self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
27
+ """PRBS
28
+
29
+ :type: Prbs
30
+ """
31
+
32
+ self.medium = BasicMedium(conn, module_id, port_id, serdes_xindex)
33
+ """Basic medium
34
+
35
+ :type: BasicMedium
36
+ """
37
+
38
+ self.lt_status = PP_LINKTRAINSTATUS(conn, module_id, port_id, serdes_xindex)
39
+ """LT status for Edun
40
+ :type: PP_LINKTRAINSTATUS
41
+ """
42
+
43
+ class Layer1:
44
+ def __init__(self, conn: "itf.IConnection", port: "FamilyThor") -> None:
45
+ module_id, port_id = port.kind
46
+ self.serdes: Tuple[SerDesThor, ...] = tuple(
47
+ SerDesThor(conn, module_id, port_id, serdes_xindex=idx)
48
+ for idx in range(port.info.capabilities.serdes_count)
49
+ )
50
+
51
+ self.impairment = Impair(conn, module_id, port_id)
52
+ """Impairment functions"""
53
+
54
+ self.rs_fault = RsFault(conn, module_id, port_id)
55
+ """RS Fault Management"""
56
+
57
+ self.pcs = PcsLayer(conn, port)
58
+ """PCS/FEC layer"""
59
+
60
+ self.prbs_config = PP_PRBSTYPE(conn, module_id, port_id)
61
+ """PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
62
+ """
63
+
64
+ self.anlt = AnltBasic(conn, module_id, port_id)
65
+ """Thor ANLT settings
66
+ """
67
+
68
+ self.transceiver = Transceiver(conn, module_id, port_id)
69
+ """Thor Transceiver configuration and status
70
+ """
@@ -0,0 +1,108 @@
1
+ import functools
2
+ from typing import TYPE_CHECKING
3
+ if TYPE_CHECKING:
4
+ from xoa_driver.internals.core import interfaces as itf
5
+ from xoa_driver.internals.commands import (
6
+ P_MACSEC_RX_ENABLE,
7
+ P_MACSEC_TX_STATS,
8
+ P_MACSEC_TX_CLEAR,
9
+ P_MACSEC_RX_STATS,
10
+ P_MACSEC_RX_CLEAR,
11
+ )
12
+ from xoa_driver.internals.utils import attributes as utils
13
+ from xoa_driver.internals.utils.indices import index_manager as idx_mgr
14
+ from xoa_driver.internals.hli.indices.macsecscs.genuine_macsecsc import GenuineMacSecTxScIdx, GenuineMacSecRxScIdx
15
+
16
+ MacSecTxScIndices = idx_mgr.IndexManager[GenuineMacSecTxScIdx]
17
+ MacSecRxScIndices = idx_mgr.IndexManager[GenuineMacSecRxScIdx]
18
+
19
+ class MACSecTxStats:
20
+ """MACSec TX SC Statistics"""
21
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
22
+
23
+ self.total = P_MACSEC_TX_STATS(conn, module_id, port_id)
24
+ """Port's total MACsec TX statistics
25
+
26
+ :type: P_MACSEC_TX_STATS
27
+ """
28
+
29
+ self.clear = P_MACSEC_TX_CLEAR(conn, module_id, port_id)
30
+ """Clear Port's MACsec TX statistics
31
+
32
+ :type: P_MACSEC_TX_CLEAR
33
+ """
34
+
35
+ class MACSecRxStats:
36
+ """MACSec RX SC Statistics"""
37
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
38
+
39
+ self.total = P_MACSEC_RX_STATS(conn, module_id, port_id)
40
+ """Port's total MACsec RX statistics
41
+
42
+ :type: P_MACSEC_RX_STATS
43
+ """
44
+
45
+ self.clear = P_MACSEC_RX_CLEAR(conn, module_id, port_id)
46
+ """Clear Port's MACsec RX statistics
47
+
48
+ :type: P_MACSEC_RX_CLEAR
49
+ """
50
+
51
+ class MacSecPortStats:
52
+ """MACSec Port Statistics"""
53
+
54
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
55
+ self.tx = MACSecTxStats(conn, module_id, port_id)
56
+ """L23 port's MACsec TX statistics.
57
+
58
+ :type: MACSecTxStats
59
+ """
60
+
61
+ self.rx = MACSecRxStats(conn, module_id, port_id)
62
+ """L23 port's MACsec RX statistics.
63
+
64
+ :type: MACSecRxStats
65
+ """
66
+
67
+
68
+ class MacSec:
69
+ """MACsec configuration and status."""
70
+
71
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
72
+ self.txscs: MacSecTxScIndices = idx_mgr.IndexManager(
73
+ conn,
74
+ GenuineMacSecTxScIdx,
75
+ module_id,
76
+ port_id
77
+ )
78
+ """MACSec TX SC index manager.
79
+
80
+ :type: MacSecTxScIndices
81
+ """
82
+
83
+ self.rxscs: MacSecRxScIndices = idx_mgr.IndexManager(
84
+ conn,
85
+ GenuineMacSecRxScIdx,
86
+ module_id,
87
+ port_id
88
+ )
89
+ """MACSec RX SC index manager.
90
+
91
+ :type: MacSecRxScIndices
92
+ """
93
+
94
+ self.decode = P_MACSEC_RX_ENABLE(conn, module_id, port_id)
95
+ """L23 port MACSec RX enable.
96
+
97
+ :type: P_MACSEC_RX_ENABLE
98
+ """
99
+
100
+ self.statistics = MacSecPortStats(conn, module_id, port_id)
101
+ """L23 port MACSec statistics.
102
+
103
+ :type: MacSecPortStats
104
+ """
105
+
106
+ on_macsec_rx_enable_change = functools.partialmethod(utils.on_event, P_MACSEC_RX_ENABLE)
107
+ """Register a callback to the event that the port MACsec RX enable status changes."""
108
+
@@ -2,12 +2,6 @@ from typing import TYPE_CHECKING
2
2
  if TYPE_CHECKING:
3
3
  from xoa_driver.internals.core import interfaces as itf
4
4
  from xoa_driver.internals.commands import (
5
- PX_RW,
6
- PX_MII,
7
- PX_TEMPERATURE,
8
- PX_RW_SEQ,
9
- PX_I2C_CONFIG,
10
- PX_RW_SEQ_BANK,
11
5
  PX_CDB_SUPPORT,
12
6
  PX_CDB_ABORT_PROCESSING,
13
7
  PX_CDB_CHANGE_PASSWORD,
@@ -33,115 +27,7 @@ from xoa_driver.internals.commands import (
33
27
  PX_CUST_CMD,
34
28
  )
35
29
 
36
-
37
- class PortTransceiver:
38
- """Transceiver access class."""
39
-
40
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
41
- self.__conn = conn
42
- self.__module_id = module_id
43
- self.__port_id = port_id
44
-
45
- self.i2c_config = PX_I2C_CONFIG(conn, module_id, port_id)
46
- """
47
- Access speed on a transceiver I2C access in the unit of KHz. Default to 100.
48
-
49
- When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from port.capabilities().
50
-
51
- The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default.
52
- """
53
-
54
- self.temperature = PX_TEMPERATURE(conn, module_id, port_id)
55
- """Transceiver temperature in Celsius.
56
-
57
- Temperature value before the decimal digit, and 1/256th of a degree Celsius after the decimal digit.
58
- """
59
-
60
- self.cmis = CMIS(conn, module_id, port_id)
61
- """
62
- Access CMIS interface.
63
- """
64
-
65
- def access_rw(self, page_address: int, register_address: int) -> "PX_RW":
66
- """Access to register interface by the transceiver.
67
-
68
- :param page_address: page address
69
- :type page_address: int
70
- :param register_address: register address
71
- :type register_address: int
72
- :return: transceiver register values
73
- :rtype: PX_RW
74
- """
75
-
76
- return PX_RW(
77
- self.__conn,
78
- self.__module_id,
79
- self.__port_id,
80
- page_address,
81
- register_address
82
- )
83
-
84
- def access_mii(self, register_address: int) -> "PX_MII":
85
- """Access to the register interface supported by the media-independent interface (MII) transceiver.
86
-
87
- :param register_address: register address
88
- :type register_address: int
89
- :return: register values
90
- :rtype: PX_MII
91
- """
92
- return PX_MII(
93
- self.__conn,
94
- self.__module_id,
95
- self.__port_id,
96
- register_address
97
- )
98
-
99
- def access_rw_seq(self, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ":
100
- """Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
101
-
102
- :param page_address: page address (0-255)
103
- :type page_address: int
104
- :param register_address: register address (0-255)
105
- :type register_address: int
106
- :param byte_count: the number of bytes to read/write
107
- :type byte_count: int
108
- :return: transceiver register values
109
- :rtype: PX_RW_SEQ
110
- """
111
- return PX_RW_SEQ(
112
- self.__conn,
113
- self.__module_id,
114
- self.__port_id,
115
- page_address,
116
- register_address,
117
- byte_count
118
- )
119
-
120
- def access_rw_seq_bank(self, bank_address: int, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ_BANK":
121
- """Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
122
-
123
- :param bank_address: bank address (0-255)
124
- :type bank_address: int
125
- :param page_address: page address (0-255)
126
- :type page_address: int
127
- :param register_address: register address (0-255)
128
- :type register_address: int
129
- :param byte_count: the number of bytes to read/write
130
- :type byte_count: int
131
- :return: transceiver register values
132
- :rtype: PX_RW_SEQ_BANK
133
- """
134
- return PX_RW_SEQ_BANK(
135
- self.__conn,
136
- self.__module_id,
137
- self.__port_id,
138
- bank_address,
139
- page_address,
140
- register_address,
141
- byte_count
142
- )
143
-
144
- class CMIS():
30
+ class Cmis():
145
31
  """CMIS access class.
146
32
  """
147
33
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
@@ -153,16 +39,16 @@ class CMIS():
153
39
  """Return the number of supported CDB instances.
154
40
  """
155
41
 
156
- def cdb(self, cdb_instance_id: int) -> "CDB":
42
+ def cdb(self, cdb_instance_id: int) -> "Cbd":
157
43
  """Access CMIS CDB command interface.
158
44
 
159
45
  :param cdb_instance_id: 0 for CDB Instance 1, 1 for CDB Instance 2
160
46
  :type cdb_instance_id: int
161
47
  """
162
- return CDB(self.__conn, self.__module_id, self.__port_id, cdb_instance_id)
48
+ return Cbd(self.__conn, self.__module_id, self.__port_id, cdb_instance_id)
163
49
 
164
50
 
165
- class CDB():
51
+ class Cbd():
166
52
  """CMIS CDB command access class.
167
53
  """
168
54
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, cdb_instance_id: int) -> None:
@@ -0,0 +1,124 @@
1
+ from typing import TYPE_CHECKING
2
+ if TYPE_CHECKING:
3
+ from xoa_driver.internals.core import interfaces as itf
4
+ from xoa_driver.internals.commands import (
5
+ PX_RW,
6
+ PX_MII,
7
+ PX_TEMPERATURE,
8
+ PX_RW_SEQ,
9
+ PX_I2C_CONFIG,
10
+ PX_RW_SEQ_BANK,
11
+ )
12
+ from xoa_driver.internals.hli.ports.port_l23.layer1.laser_power import LaserPower
13
+ from xoa_driver.internals.hli.ports.port_l23.tcvr.cmis import Cmis
14
+
15
+
16
+ class Transceiver:
17
+ """Transceiver access class."""
18
+
19
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
20
+ self.__conn = conn
21
+ self.__module_id = module_id
22
+ self.__port_id = port_id
23
+
24
+ self.i2c_config = PX_I2C_CONFIG(conn, module_id, port_id)
25
+ """
26
+ Access speed on a transceiver I2C access in the unit of KHz. Default to 100.
27
+
28
+ When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from port.capabilities().
29
+
30
+ The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default.
31
+ """
32
+
33
+ self.temperature = PX_TEMPERATURE(conn, module_id, port_id)
34
+ """Transceiver temperature in Celsius.
35
+
36
+ Temperature value before the decimal digit, and 1/256th of a degree Celsius after the decimal digit.
37
+ """
38
+
39
+ self.laser_power = LaserPower(conn, module_id, port_id)
40
+ """Laser power status.
41
+ """
42
+
43
+ self.cmis = Cmis(conn, module_id, port_id)
44
+ """CMIS transceiver configuration and status
45
+ """
46
+
47
+ def access_rw(self, page_address: int, register_address: int) -> "PX_RW":
48
+ """Access to register interface by the transceiver.
49
+
50
+ :param page_address: page address
51
+ :type page_address: int
52
+ :param register_address: register address
53
+ :type register_address: int
54
+ :return: transceiver register values
55
+ :rtype: PX_RW
56
+ """
57
+
58
+ return PX_RW(
59
+ self.__conn,
60
+ self.__module_id,
61
+ self.__port_id,
62
+ page_address,
63
+ register_address
64
+ )
65
+
66
+ def access_mii(self, register_address: int) -> "PX_MII":
67
+ """Access to the register interface supported by the media-independent interface (MII) transceiver.
68
+
69
+ :param register_address: register address
70
+ :type register_address: int
71
+ :return: register values
72
+ :rtype: PX_MII
73
+ """
74
+ return PX_MII(
75
+ self.__conn,
76
+ self.__module_id,
77
+ self.__port_id,
78
+ register_address
79
+ )
80
+
81
+ def access_rw_seq(self, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ":
82
+ """Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
83
+
84
+ :param page_address: page address (0-255)
85
+ :type page_address: int
86
+ :param register_address: register address (0-255)
87
+ :type register_address: int
88
+ :param byte_count: the number of bytes to read/write
89
+ :type byte_count: int
90
+ :return: transceiver register values
91
+ :rtype: PX_RW_SEQ
92
+ """
93
+ return PX_RW_SEQ(
94
+ self.__conn,
95
+ self.__module_id,
96
+ self.__port_id,
97
+ page_address,
98
+ register_address,
99
+ byte_count
100
+ )
101
+
102
+ def access_rw_seq_bank(self, bank_address: int, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ_BANK":
103
+ """Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
104
+
105
+ :param bank_address: bank address (0-255)
106
+ :type bank_address: int
107
+ :param page_address: page address (0-255)
108
+ :type page_address: int
109
+ :param register_address: register address (0-255)
110
+ :type register_address: int
111
+ :param byte_count: the number of bytes to read/write
112
+ :type byte_count: int
113
+ :return: transceiver register values
114
+ :rtype: PX_RW_SEQ_BANK
115
+ """
116
+ return PX_RW_SEQ_BANK(
117
+ self.__conn,
118
+ self.__module_id,
119
+ self.__port_id,
120
+ bank_address,
121
+ page_address,
122
+ register_address,
123
+ byte_count
124
+ )
@@ -0,0 +1,32 @@
1
+ import functools
2
+ from typing import TYPE_CHECKING
3
+ from xoa_driver.internals.commands import (
4
+ P_TXRUNTLENGTH,
5
+ P_RXRUNTLENGTH,
6
+ P_RXRUNTLEN_ERRS,
7
+
8
+ )
9
+ if TYPE_CHECKING:
10
+ from xoa_driver.internals.core import interfaces as itf
11
+
12
+ class Runt:
13
+ """Runt settings."""
14
+
15
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
16
+ self.tx_length = P_TXRUNTLENGTH(conn, module_id, port_id)
17
+ """L23 port's TX runt length.
18
+
19
+ :type: P_TXRUNTLENGTH
20
+ """
21
+
22
+ self.rx_length = P_RXRUNTLENGTH(conn, module_id, port_id)
23
+ """L23 port's RX runt length.
24
+
25
+ :type: P_RXRUNTLENGTH
26
+ """
27
+
28
+ self.has_length_errors = P_RXRUNTLEN_ERRS(conn, module_id, port_id)
29
+ """L23 port's RX runt length errors..
30
+
31
+ :type: P_RXRUNTLEN_ERRS
32
+ """
@@ -25,8 +25,6 @@ from xoa_driver.internals.commands import (
25
25
  PR_CALIBRATE,
26
26
  PR_UAT_STATUS,
27
27
  PR_UAT_TIME,
28
- P_MACSEC_RX_STATS,
29
- P_MACSEC_RX_CLEAR
30
28
 
31
29
  )
32
30
 
@@ -190,22 +188,6 @@ class GPrsUat():
190
188
  """
191
189
 
192
190
 
193
- class MACSecRxStats:
194
- """MACSec RX SC Statistics"""
195
- def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
196
-
197
- self.total = P_MACSEC_RX_STATS(conn, module_id, port_id)
198
- """Port's total MACsec RX statistics
199
-
200
- :type: P_MACSEC_RX_STATS
201
- """
202
-
203
- self.clear = P_MACSEC_RX_CLEAR(conn, module_id, port_id)
204
- """Clear Port's MACsec RX statistics
205
-
206
- :type: P_MACSEC_RX_CLEAR
207
- """
208
-
209
191
 
210
192
  class GenuinePortReceptionStatistics(PortReceptionStatistics):
211
193
  """L23 port RX statistics."""
@@ -224,8 +206,5 @@ class GenuinePortReceptionStatistics(PortReceptionStatistics):
224
206
  :type: GPrsUat
225
207
  """
226
208
 
227
- self.macsec = MACSecRxStats(conn, module_id, port_id)
228
- """L23 port's MACsec RX statistics.
229
- """
230
209
 
231
210
  # endregion