tdl-xoa-driver 1.0.0__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 (325) hide show
  1. tdl_xoa_driver-1.0.0.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0.dist-info/top_level.txt +1 -0
  6. xoa_driver/__init__.py +2 -0
  7. xoa_driver/enums.py +399 -0
  8. xoa_driver/exceptions.py +77 -0
  9. xoa_driver/functions/__init__.py +0 -0
  10. xoa_driver/functions/anlt.py +744 -0
  11. xoa_driver/functions/anlt_ll_debug.py +429 -0
  12. xoa_driver/functions/cli.py +581 -0
  13. xoa_driver/functions/exceptions.py +72 -0
  14. xoa_driver/functions/headers.py +608 -0
  15. xoa_driver/functions/mgmt.py +515 -0
  16. xoa_driver/functions/tools.py +256 -0
  17. xoa_driver/hlfuncs.py +18 -0
  18. xoa_driver/internals/__init__.py +0 -0
  19. xoa_driver/internals/commands/__init__.py +31 -0
  20. xoa_driver/internals/commands/c_commands.py +2041 -0
  21. xoa_driver/internals/commands/enums.py +3289 -0
  22. xoa_driver/internals/commands/m4_commands.py +700 -0
  23. xoa_driver/internals/commands/m4e_commands.py +107 -0
  24. xoa_driver/internals/commands/m_commands.py +1875 -0
  25. xoa_driver/internals/commands/p4_commands.py +2221 -0
  26. xoa_driver/internals/commands/p4e_commands.py +160 -0
  27. xoa_driver/internals/commands/p4g_commands.py +7253 -0
  28. xoa_driver/internals/commands/p_commands.py +6000 -0
  29. xoa_driver/internals/commands/pc_commands.py +335 -0
  30. xoa_driver/internals/commands/pd_commands.py +355 -0
  31. xoa_driver/internals/commands/pe_commands.py +1018 -0
  32. xoa_driver/internals/commands/pec_commands.py +265 -0
  33. xoa_driver/internals/commands/ped_commands.py +1034 -0
  34. xoa_driver/internals/commands/pef_commands.py +2216 -0
  35. xoa_driver/internals/commands/pf_commands.py +379 -0
  36. xoa_driver/internals/commands/pl1_commands.py +1588 -0
  37. xoa_driver/internals/commands/pl_commands.py +178 -0
  38. xoa_driver/internals/commands/pm_commands.py +256 -0
  39. xoa_driver/internals/commands/pp_commands.py +2341 -0
  40. xoa_driver/internals/commands/pr_commands.py +812 -0
  41. xoa_driver/internals/commands/ps_commands.py +2311 -0
  42. xoa_driver/internals/commands/pt_commands.py +370 -0
  43. xoa_driver/internals/commands/px_commands.py +303 -0
  44. xoa_driver/internals/commands/subtypes.py +86 -0
  45. xoa_driver/internals/core/__init__.py +0 -0
  46. xoa_driver/internals/core/builders.py +39 -0
  47. xoa_driver/internals/core/exceptions.py +69 -0
  48. xoa_driver/internals/core/funcs.py +81 -0
  49. xoa_driver/internals/core/funcs.pyi +1072 -0
  50. xoa_driver/internals/core/interfaces.py +47 -0
  51. xoa_driver/internals/core/token.py +44 -0
  52. xoa_driver/internals/core/transporter/__init__.py +0 -0
  53. xoa_driver/internals/core/transporter/_processor.py +83 -0
  54. xoa_driver/internals/core/transporter/_publisher.py +101 -0
  55. xoa_driver/internals/core/transporter/_request_id_counter.py +28 -0
  56. xoa_driver/internals/core/transporter/_stream.py +99 -0
  57. xoa_driver/internals/core/transporter/_typings.py +43 -0
  58. xoa_driver/internals/core/transporter/exceptions.py +44 -0
  59. xoa_driver/internals/core/transporter/handler.py +127 -0
  60. xoa_driver/internals/core/transporter/logger/__init__.py +10 -0
  61. xoa_driver/internals/core/transporter/logger/__logger.py +94 -0
  62. xoa_driver/internals/core/transporter/logger/__state_off.py +32 -0
  63. xoa_driver/internals/core/transporter/logger/__state_on_default.py +70 -0
  64. xoa_driver/internals/core/transporter/logger/__state_on_loguru.py +51 -0
  65. xoa_driver/internals/core/transporter/logger/__state_on_user.py +48 -0
  66. xoa_driver/internals/core/transporter/protocol/__init__.py +0 -0
  67. xoa_driver/internals/core/transporter/protocol/_constants.py +77 -0
  68. xoa_driver/internals/core/transporter/protocol/_utils.py +59 -0
  69. xoa_driver/internals/core/transporter/protocol/exceptions.py +271 -0
  70. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +70 -0
  71. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +283 -0
  72. xoa_driver/internals/core/transporter/protocol/payload/descriptor.py +119 -0
  73. xoa_driver/internals/core/transporter/protocol/payload/exceptions.py +20 -0
  74. xoa_driver/internals/core/transporter/protocol/payload/field.py +296 -0
  75. xoa_driver/internals/core/transporter/protocol/payload/types.py +173 -0
  76. xoa_driver/internals/core/transporter/protocol/payload/utils.py +53 -0
  77. xoa_driver/internals/core/transporter/protocol/struct_header.py +123 -0
  78. xoa_driver/internals/core/transporter/protocol/struct_request.py +65 -0
  79. xoa_driver/internals/core/transporter/protocol/struct_response.py +89 -0
  80. xoa_driver/internals/core/transporter/registry.py +43 -0
  81. xoa_driver/internals/exceptions/__init__.py +9 -0
  82. xoa_driver/internals/exceptions/modules.py +13 -0
  83. xoa_driver/internals/exceptions/testers.py +21 -0
  84. xoa_driver/internals/hli_v1/__init__.py +0 -0
  85. xoa_driver/internals/hli_v1/indices/__init__.py +0 -0
  86. xoa_driver/internals/hli_v1/indices/base_index.py +39 -0
  87. xoa_driver/internals/hli_v1/indices/connection_group/__init__.py +0 -0
  88. xoa_driver/internals/hli_v1/indices/connection_group/cg.py +186 -0
  89. xoa_driver/internals/hli_v1/indices/connection_group/histogram.py +78 -0
  90. xoa_driver/internals/hli_v1/indices/connection_group/l2.py +94 -0
  91. xoa_driver/internals/hli_v1/indices/connection_group/l3.py +130 -0
  92. xoa_driver/internals/hli_v1/indices/connection_group/raw.py +200 -0
  93. xoa_driver/internals/hli_v1/indices/connection_group/replay.py +109 -0
  94. xoa_driver/internals/hli_v1/indices/connection_group/tcp.py +314 -0
  95. xoa_driver/internals/hli_v1/indices/connection_group/tls.py +198 -0
  96. xoa_driver/internals/hli_v1/indices/connection_group/udp.py +133 -0
  97. xoa_driver/internals/hli_v1/indices/connection_group/user_state.py +28 -0
  98. xoa_driver/internals/hli_v1/indices/filter/__init__.py +0 -0
  99. xoa_driver/internals/hli_v1/indices/filter/base_filter.py +65 -0
  100. xoa_driver/internals/hli_v1/indices/filter/genuine_filter.py +20 -0
  101. xoa_driver/internals/hli_v1/indices/length_term.py +49 -0
  102. xoa_driver/internals/hli_v1/indices/macsecscs/__init__.py +0 -0
  103. xoa_driver/internals/hli_v1/indices/macsecscs/base_macsecsc.py +224 -0
  104. xoa_driver/internals/hli_v1/indices/macsecscs/genuine_macsecsc.py +72 -0
  105. xoa_driver/internals/hli_v1/indices/match_term.py +64 -0
  106. xoa_driver/internals/hli_v1/indices/port_dataset.py +72 -0
  107. xoa_driver/internals/hli_v1/indices/streams/__init__.py +0 -0
  108. xoa_driver/internals/hli_v1/indices/streams/base_stream.py +405 -0
  109. xoa_driver/internals/hli_v1/indices/streams/genuine_stream.py +64 -0
  110. xoa_driver/internals/hli_v1/modules/__init__.py +0 -0
  111. xoa_driver/internals/hli_v1/modules/__interfaces.py +21 -0
  112. xoa_driver/internals/hli_v1/modules/base_module.py +138 -0
  113. xoa_driver/internals/hli_v1/modules/module_chimera.py +366 -0
  114. xoa_driver/internals/hli_v1/modules/module_l23ve.py +73 -0
  115. xoa_driver/internals/hli_v1/modules/module_l47.py +397 -0
  116. xoa_driver/internals/hli_v1/modules/module_l47ve.py +9 -0
  117. xoa_driver/internals/hli_v1/modules/modules_l23/__init__.py +0 -0
  118. xoa_driver/internals/hli_v1/modules/modules_l23/family_combi.py +83 -0
  119. xoa_driver/internals/hli_v1/modules/modules_l23/family_d.py +75 -0
  120. xoa_driver/internals/hli_v1/modules/modules_l23/family_e.py +85 -0
  121. xoa_driver/internals/hli_v1/modules/modules_l23/family_f.py +145 -0
  122. xoa_driver/internals/hli_v1/modules/modules_l23/family_g.py +84 -0
  123. xoa_driver/internals/hli_v1/modules/modules_l23/family_h.py +40 -0
  124. xoa_driver/internals/hli_v1/modules/modules_l23/family_i.py +25 -0
  125. xoa_driver/internals/hli_v1/modules/modules_l23/family_j.py +25 -0
  126. xoa_driver/internals/hli_v1/modules/modules_l23/family_k.py +39 -0
  127. xoa_driver/internals/hli_v1/modules/modules_l23/family_l.py +55 -0
  128. xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py +800 -0
  129. xoa_driver/internals/hli_v1/modules/modules_l23/family_m.py +25 -0
  130. xoa_driver/internals/hli_v1/modules/modules_l23/family_n.py +40 -0
  131. xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +383 -0
  132. xoa_driver/internals/hli_v1/ports/__init__.py +0 -0
  133. xoa_driver/internals/hli_v1/ports/base_port.py +125 -0
  134. xoa_driver/internals/hli_v1/ports/port_l23/__init__.py +0 -0
  135. xoa_driver/internals/hli_v1/ports/port_l23/bases/__init__.py +0 -0
  136. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_capture.py +70 -0
  137. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +527 -0
  138. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23_genuine.py +229 -0
  139. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_reception_statistics.py +231 -0
  140. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +117 -0
  141. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transmission_statistics.py +131 -0
  142. xoa_driver/internals/hli_v1/ports/port_l23/chimera/__init__.py +0 -0
  143. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  144. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  145. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/general.py +396 -0
  146. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/shadow.py +104 -0
  147. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/working.py +36 -0
  148. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_custom_distribution.py +125 -0
  149. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_distribution.py +174 -0
  150. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_chimera.py +119 -0
  151. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_emulation.py +244 -0
  152. xoa_driver/internals/hli_v1/ports/port_l23/chimera/reception_statistics.py +24 -0
  153. xoa_driver/internals/hli_v1/ports/port_l23/chimera/transmission_statistics.py +24 -0
  154. xoa_driver/internals/hli_v1/ports/port_l23/family_combi.py +37 -0
  155. xoa_driver/internals/hli_v1/ports/port_l23/family_d.py +51 -0
  156. xoa_driver/internals/hli_v1/ports/port_l23/family_e.py +107 -0
  157. xoa_driver/internals/hli_v1/ports/port_l23/family_f.py +151 -0
  158. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +77 -0
  159. xoa_driver/internals/hli_v1/ports/port_l23/family_h.py +67 -0
  160. xoa_driver/internals/hli_v1/ports/port_l23/family_i.py +84 -0
  161. xoa_driver/internals/hli_v1/ports/port_l23/family_j.py +68 -0
  162. xoa_driver/internals/hli_v1/ports/port_l23/family_k.py +73 -0
  163. xoa_driver/internals/hli_v1/ports/port_l23/family_l.py +82 -0
  164. xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py +166 -0
  165. xoa_driver/internals/hli_v1/ports/port_l23/family_m.py +29 -0
  166. xoa_driver/internals/hli_v1/ports/port_l23/fault_jkl.py +24 -0
  167. xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +722 -0
  168. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ghijkl.py +369 -0
  169. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ijkl_chimera.py +60 -0
  170. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_l.py +78 -0
  171. xoa_driver/internals/hli_v1/ports/port_l23/port_l23ve.py +101 -0
  172. xoa_driver/internals/hli_v1/ports/port_l47/__init__.py +0 -0
  173. xoa_driver/internals/hli_v1/ports/port_l47/counters.py +174 -0
  174. xoa_driver/internals/hli_v1/ports/port_l47/main.py +228 -0
  175. xoa_driver/internals/hli_v1/ports/port_l47/packet_engine.py +31 -0
  176. xoa_driver/internals/hli_v1/revisions.py +11 -0
  177. xoa_driver/internals/hli_v1/testers/__init__.py +0 -0
  178. xoa_driver/internals/hli_v1/testers/_base_tester.py +259 -0
  179. xoa_driver/internals/hli_v1/testers/genuine/__init__.py +0 -0
  180. xoa_driver/internals/hli_v1/testers/genuine/l_23/__init__.py +0 -0
  181. xoa_driver/internals/hli_v1/testers/genuine/l_23/health.py +16 -0
  182. xoa_driver/internals/hli_v1/testers/genuine/l_23/rest_api.py +38 -0
  183. xoa_driver/internals/hli_v1/testers/genuine/l_23/time_keeper.py +57 -0
  184. xoa_driver/internals/hli_v1/testers/genuine/l_23/upload_file.py +29 -0
  185. xoa_driver/internals/hli_v1/testers/genuine/management_interface.py +42 -0
  186. xoa_driver/internals/hli_v1/testers/l23_tester.py +196 -0
  187. xoa_driver/internals/hli_v1/testers/l23ve_tester.py +114 -0
  188. xoa_driver/internals/hli_v1/testers/l47_tester.py +106 -0
  189. xoa_driver/internals/hli_v1/testers/l47ve_tester.py +54 -0
  190. xoa_driver/internals/hli_v2/__init__.py +0 -0
  191. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  192. xoa_driver/internals/hli_v2/indices/base_index.py +39 -0
  193. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  194. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +115 -0
  195. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +59 -0
  196. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +71 -0
  197. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +96 -0
  198. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +148 -0
  199. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +89 -0
  200. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +261 -0
  201. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +166 -0
  202. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +112 -0
  203. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +25 -0
  204. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  205. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +50 -0
  206. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +17 -0
  207. xoa_driver/internals/hli_v2/indices/length_term.py +44 -0
  208. xoa_driver/internals/hli_v2/indices/match_term.py +49 -0
  209. xoa_driver/internals/hli_v2/indices/port_dataset.py +53 -0
  210. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  211. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +234 -0
  212. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +32 -0
  213. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  214. xoa_driver/internals/hli_v2/modules/__interfaces.py +21 -0
  215. xoa_driver/internals/hli_v2/modules/base_module.py +125 -0
  216. xoa_driver/internals/hli_v2/modules/module_chimera.py +358 -0
  217. xoa_driver/internals/hli_v2/modules/module_l23ve.py +58 -0
  218. xoa_driver/internals/hli_v2/modules/module_l47.py +230 -0
  219. xoa_driver/internals/hli_v2/modules/module_l47ve.py +8 -0
  220. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  221. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +73 -0
  222. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +75 -0
  223. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +85 -0
  224. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +144 -0
  225. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +84 -0
  226. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +40 -0
  227. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +25 -0
  228. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +25 -0
  229. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +39 -0
  230. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +55 -0
  231. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +797 -0
  232. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +25 -0
  233. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +40 -0
  234. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +339 -0
  235. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  236. xoa_driver/internals/hli_v2/ports/base_port.py +105 -0
  237. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  238. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  239. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +64 -0
  240. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +441 -0
  241. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +172 -0
  242. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +156 -0
  243. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +117 -0
  244. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +59 -0
  245. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  246. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  247. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  248. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +340 -0
  249. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +99 -0
  250. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +36 -0
  251. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +116 -0
  252. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +102 -0
  253. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +113 -0
  254. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +420 -0
  255. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +22 -0
  256. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +22 -0
  257. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +36 -0
  258. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +49 -0
  259. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +96 -0
  260. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +144 -0
  261. xoa_driver/internals/hli_v2/ports/port_l23/family_g.py +77 -0
  262. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +60 -0
  263. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +66 -0
  264. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +53 -0
  265. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +58 -0
  266. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +67 -0
  267. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +149 -0
  268. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +28 -0
  269. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +22 -0
  270. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +342 -0
  271. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +50 -0
  272. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +65 -0
  273. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +81 -0
  274. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  275. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +146 -0
  276. xoa_driver/internals/hli_v2/ports/port_l47/main.py +137 -0
  277. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +20 -0
  278. xoa_driver/internals/hli_v2/revisions.py +11 -0
  279. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  280. xoa_driver/internals/hli_v2/testers/_base_tester.py +207 -0
  281. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  282. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  283. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +16 -0
  284. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +34 -0
  285. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +50 -0
  286. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +26 -0
  287. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +38 -0
  288. xoa_driver/internals/hli_v2/testers/l23_tester.py +159 -0
  289. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +98 -0
  290. xoa_driver/internals/hli_v2/testers/l47_tester.py +95 -0
  291. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +50 -0
  292. xoa_driver/internals/state_storage/__init__.py +0 -0
  293. xoa_driver/internals/state_storage/_speed_detector.py +121 -0
  294. xoa_driver/internals/state_storage/modules_state.py +128 -0
  295. xoa_driver/internals/state_storage/ports_state.py +154 -0
  296. xoa_driver/internals/state_storage/testers_state.py +104 -0
  297. xoa_driver/internals/utils/__init__.py +0 -0
  298. xoa_driver/internals/utils/attributes.py +33 -0
  299. xoa_driver/internals/utils/cap_id.py +63 -0
  300. xoa_driver/internals/utils/con_traffic_light.py +88 -0
  301. xoa_driver/internals/utils/indices/__init__.py +0 -0
  302. xoa_driver/internals/utils/indices/_interfaces.py +26 -0
  303. xoa_driver/internals/utils/indices/header_modifier_manager.py +56 -0
  304. xoa_driver/internals/utils/indices/index_manager.py +95 -0
  305. xoa_driver/internals/utils/indices/observer.py +17 -0
  306. xoa_driver/internals/utils/kind.py +19 -0
  307. xoa_driver/internals/utils/managers/__init__.py +0 -0
  308. xoa_driver/internals/utils/managers/abc.py +44 -0
  309. xoa_driver/internals/utils/managers/exceptions.py +22 -0
  310. xoa_driver/internals/utils/managers/modules_manager.py +118 -0
  311. xoa_driver/internals/utils/managers/ports_manager.py +116 -0
  312. xoa_driver/internals/utils/rev_tool.py +21 -0
  313. xoa_driver/internals/utils/session.py +117 -0
  314. xoa_driver/internals/warn.py +32 -0
  315. xoa_driver/lli.py +15 -0
  316. xoa_driver/misc.py +57 -0
  317. xoa_driver/modules.py +448 -0
  318. xoa_driver/ports.py +332 -0
  319. xoa_driver/testers.py +37 -0
  320. xoa_driver/utils.py +12 -0
  321. xoa_driver/v2/__init__.py +11 -0
  322. xoa_driver/v2/misc.py +77 -0
  323. xoa_driver/v2/modules.py +308 -0
  324. xoa_driver/v2/ports.py +232 -0
  325. xoa_driver/v2/testers.py +24 -0
@@ -0,0 +1,1588 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ import typing
4
+ import functools
5
+ from xoa_driver.internals.core.builders import (
6
+ build_get_request,
7
+ build_set_request
8
+ )
9
+ from xoa_driver.internals.core import interfaces
10
+ from xoa_driver.internals.core.token import Token
11
+ from xoa_driver.internals.core.transporter.registry import register_command
12
+ from xoa_driver.internals.core.transporter.protocol.payload import (
13
+ field,
14
+ RequestBodyStruct,
15
+ ResponseBodyStruct,
16
+ XmpByte,
17
+ XmpInt,
18
+ XmpSequence,
19
+ XmpStr,
20
+ Hex,
21
+ XmpHex,
22
+ XmpLong,
23
+ )
24
+ from .enums import (
25
+ LinkTrainFrameLock,
26
+ LinkTrainCmdResults,
27
+ LinkTrainCmd,
28
+ Layer1ConfigType,
29
+ OnOff,
30
+ FreyaLinkTrainingMode,
31
+ FreyaAutonegMode,
32
+ FreyaTecAbility,
33
+ FreyaFECAbility,
34
+ FreyaPauseAbility,
35
+ AutoNegMode,
36
+ AutoNegStatus,
37
+ FreyaTechAbilityHCDStatus,
38
+ FECMode,
39
+ PauseMode,
40
+ FreyaOutOfSyncPreset,
41
+ TimeoutMode,
42
+ LinkTrainingStatusMode,
43
+ LinkTrainingStatus,
44
+ LinkTrainingFailureType,
45
+ Layer1Control,
46
+ Layer1Opcode,
47
+ FreyaPCSVariant,
48
+ FreyaTecAbilityHCD,
49
+ FecCodewordBitErrorMaskMode,
50
+ StartOrStop,
51
+ FreyaPresetResponse,
52
+ FreyaPresetIndex,
53
+ FreyaTapIndex,
54
+ FreyaLinkTrainingRangeResponse,
55
+ )
56
+
57
+
58
+ @register_command
59
+ @dataclass
60
+ class PL1_AUTONEGINFO:
61
+ """
62
+ .. versionadded:: 2.0
63
+
64
+ .. warning::
65
+
66
+ Still in beta mode. Subjected to changes
67
+
68
+ Get L1 auto-negotiation information. Information is split into a number of pages.
69
+
70
+ """
71
+
72
+ code: typing.ClassVar[int] = 385
73
+ pushed: typing.ClassVar[bool] = False
74
+
75
+ _connection: 'interfaces.IConnection'
76
+ _module: int
77
+ _port: int
78
+ _page_xindex: int
79
+
80
+ class GetDataAttr(ResponseBodyStruct):
81
+ rx_link_codeword_count: int = field(XmpInt(signed=False))
82
+ """received number of Link Code Words (Base Pages)."""
83
+ rx_next_page_message_count: int = field(XmpInt(signed=False))
84
+ """received number of Next Pages - Message Pages."""
85
+ rx_next_page_unformatted_count: int = field(XmpInt(signed=False))
86
+ """received number of Nex Pages - Unformatted Pages."""
87
+ tx_link_codeword_count: int = field(XmpInt(signed=False))
88
+ """transmitted number of Link Code Words (Base Pages)."""
89
+ tx_next_page_message_count: int = field(XmpInt(signed=False))
90
+ """transmitted number of Next Pages - Message Pages."""
91
+ tx_next_page_unformatted_count: int = field(XmpInt(signed=False))
92
+ """transmitted number of Nex Pages - Unformatted Pages."""
93
+ negotiation_hcd_fail_count: int = field(XmpInt(signed=False))
94
+ """number of negotiation HCD (Highest Common Denominator) failures."""
95
+ negotiation_fec_fail_count: int = field(XmpInt(signed=False))
96
+ """number of negotiation FEC failures."""
97
+ negotiation_loss_of_sync_count: int = field(XmpInt(signed=False))
98
+ """number of negotiation Loss of Sync failures."""
99
+ negotiation_timeout_count: int = field(XmpInt(signed=False))
100
+ """number of negotiation timeouts."""
101
+ negotiation_success_count: int = field(XmpInt(signed=False))
102
+ """number of negotiation successes."""
103
+ duration_us: int = field(XmpInt(signed=False))
104
+ """duration of the auto-negotiation in microseconds, from autoneg is enabled on the port to the negotiation is finished."""
105
+
106
+ def get(self) -> Token[GetDataAttr]:
107
+ """Get L1 auto-negotiation information. Information is split into a number of pages.
108
+
109
+ :return: L1 auto-negotiation information
110
+ :rtype: PL1_AUTONEGINFO.GetDataAttr
111
+ """
112
+
113
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._page_xindex]))
114
+
115
+
116
+ @register_command
117
+ @dataclass
118
+ class PL1_LINKTRAININFO:
119
+ """
120
+ .. versionadded:: 2.0
121
+
122
+ .. warning::
123
+
124
+ Still in beta mode. Subjected to changes
125
+
126
+ Get L1 link training information. Information is per Serdes and split into a number of pages.
127
+ """
128
+
129
+ code: typing.ClassVar[int] = 386
130
+ pushed: typing.ClassVar[bool] = False
131
+
132
+ _connection: 'interfaces.IConnection'
133
+ _module: int
134
+ _port: int
135
+ _serdes_xindex: int
136
+ _page_xindex: int
137
+
138
+ class GetDataAttr(ResponseBodyStruct):
139
+ duration_us: int = field(XmpInt(signed=False))
140
+ """duration of the auto-negotiation process in microseconds, from autoneg is enabled on the port to the negotiation is finished."""
141
+ lock_lost_count: int = field(XmpInt(signed=False))
142
+ """number of lost locks on auto-neg."""
143
+ pre1_current_level: int = field(XmpInt(signed=False))
144
+ """c(-1) current level."""
145
+ pre1_rx_increment_req_count: int = field(XmpInt(signed=False))
146
+ """c(-1) received number of increment requests."""
147
+ pre1_rx_decrement_req_count: int = field(XmpInt(signed=False))
148
+ """c(-1) received number of decrement requests."""
149
+ pre1_rx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
150
+ """c(-1) received number of maximum limits of coefficient and equalization requests reached."""
151
+ pre1_rx_eq_limit_reached_count: int = field(XmpInt(signed=False))
152
+ """c(-1) received number of maximum limits of equalization requests reached."""
153
+ pre1_rx_coeff_not_supported_count: int = field(XmpInt(signed=False))
154
+ """c(-1) received number of coefficients not supported."""
155
+ pre1_rx_coeff_at_limit_count: int = field(XmpInt(signed=False))
156
+ """c(-1) received number of coefficients at limit."""
157
+ pre1_tx_increment_req_count: int = field(XmpInt(signed=False))
158
+ """c(-1) transmitted number of increment requests."""
159
+ pre1_tx_decrement_req_count: int = field(XmpInt(signed=False))
160
+ """c(-1) transmitted number of decrement requests."""
161
+ pre1_tx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
162
+ """c(-1) transmitted number of maximum limits of coefficient and equalization requests reached."""
163
+ pre1_tx_eq_limit_reached_count: int = field(XmpInt(signed=False))
164
+ """c(-1) transmitted number of maximum limits of equalization requests reached."""
165
+ pre1_tx_coeff_not_supported_count: int = field(XmpInt(signed=False))
166
+ """c(-1) transmitted number of coefficients not supported."""
167
+ pre1_tx_coeff_at_limit_count: int = field(XmpInt(signed=False))
168
+ """c(-1) transmitted number of coefficients at limit."""
169
+ main_current_level: int = field(XmpInt(signed=False))
170
+ """c(0) current level."""
171
+ main_rx_increment_req_count: int = field(XmpInt(signed=False))
172
+ """c(0) received number of increment requests."""
173
+ main_rx_decrement_req_count: int = field(XmpInt(signed=False))
174
+ """c(0) received number of decrement requests."""
175
+ main_rx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
176
+ """c(0) received number of maximum limits of coefficient and equalization requests reached."""
177
+ main_rx_eq_limit_reached_count: int = field(XmpInt(signed=False))
178
+ """c(0) received number of maximum limits of equalization requests reached."""
179
+ main_rx_coeff_not_supported_count: int = field(XmpInt(signed=False))
180
+ """c(0) received number of coefficients not supported."""
181
+ main_rx_coeff_at_limit_count: int = field(XmpInt(signed=False))
182
+ """c(0) received number of coefficients at limit."""
183
+ main_tx_increment_req_count: int = field(XmpInt(signed=False))
184
+ """c(0) transmitted number of increment requests."""
185
+ main_tx_decrement_req_count: int = field(XmpInt(signed=False))
186
+ """c(0) transmitted number of decrement requests."""
187
+ main_tx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
188
+ """c(0) transmitted number of maximum limits of coefficient and equalization requests reached."""
189
+ main_tx_eq_limit_reached_count: int = field(XmpInt(signed=False))
190
+ """c(0) transmitted number of maximum limits of equalization requests reached."""
191
+ main_tx_coeff_not_supported_count: int = field(XmpInt(signed=False))
192
+ """c(0) transmitted number of coefficients not supported."""
193
+ main_tx_coeff_at_limit_count: int = field(XmpInt(signed=False))
194
+ """c(0) transmitted number of coefficients at limit."""
195
+ post1_current_level: int = field(XmpInt(signed=False))
196
+ """c(1) current level."""
197
+ post1_rx_increment_req_count: int = field(XmpInt(signed=False))
198
+ """c(1) received number of increment requests."""
199
+ post1_rx_decrement_req_count: int = field(XmpInt(signed=False))
200
+ """c(1) received number of decrement requests."""
201
+ post1_rx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
202
+ """c(1) received number of maximum limits of coefficient and equalization requests reached."""
203
+ post1_rx_eq_limit_reached_count: int = field(XmpInt(signed=False))
204
+ """c(1) received number of maximum limits of equalization requests reached."""
205
+ post1_rx_coeff_not_supported_count: int = field(XmpInt(signed=False))
206
+ """c(1) received number of coefficients not supported."""
207
+ post1_rx_coeff_at_limit_count: int = field(XmpInt(signed=False))
208
+ """c(1) received number of coefficients at limit."""
209
+ post1_tx_increment_req_count: int = field(XmpInt(signed=False))
210
+ """c(1) transmitted number of increment requests."""
211
+ post1_tx_decrement_req_count: int = field(XmpInt(signed=False))
212
+ """c(1) transmitted number of decrement requests."""
213
+ post1_tx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
214
+ """c(1) transmitted number of maximum limits of coefficient and equalization requests reached."""
215
+ post1_tx_eq_limit_reached_count: int = field(XmpInt(signed=False))
216
+ """c(1) transmitted number of maximum limits of equalization requests reached."""
217
+ post1_tx_coeff_not_supported_count: int = field(XmpInt(signed=False))
218
+ """c(1) transmitted number of coefficients not supported."""
219
+ post1_tx_coeff_at_limit_count: int = field(XmpInt(signed=False))
220
+ """c(1) transmitted number of coefficients at limit."""
221
+ pre2_current_level: int = field(XmpInt(signed=False))
222
+ """c(-2) current level."""
223
+ pre2_rx_increment_req_count: int = field(XmpInt(signed=False))
224
+ """c(-2) received number of increment requests."""
225
+ pre2_rx_decrement_req_count: int = field(XmpInt(signed=False))
226
+ """c(-2) received number of decrement requests."""
227
+ pre2_rx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
228
+ """c(-2) received number of maximum limits of coefficient and equalization requests reached."""
229
+ pre2_rx_eq_limit_reached_count: int = field(XmpInt(signed=False))
230
+ """c(-2) received number of maximum limits of equalization requests reached."""
231
+ pre2_rx_coeff_not_supported_count: int = field(XmpInt(signed=False))
232
+ """c(-2) received number of coefficients not supported."""
233
+ pre2_rx_coeff_at_limit_count: int = field(XmpInt(signed=False))
234
+ """c(-2) received number of coefficients at limit."""
235
+ pre2_tx_increment_req_count: int = field(XmpInt(signed=False))
236
+ """c(-2) transmitted number of increment requests."""
237
+ pre2_tx_decrement_req_count: int = field(XmpInt(signed=False))
238
+ """c(-2) transmitted number of decrement requests."""
239
+ pre2_tx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
240
+ """c(-2) transmitted number of maximum limits of coefficient and equalization requests reached."""
241
+ pre2_tx_eq_limit_reached_count: int = field(XmpInt(signed=False))
242
+ """c(-2) transmitted number of maximum limits of equalization requests reached."""
243
+ pre2_tx_coeff_not_supported_count: int = field(XmpInt(signed=False))
244
+ """c(-2) transmitted number of coefficients not supported."""
245
+ pre2_tx_coeff_at_limit_count: int = field(XmpInt(signed=False))
246
+ """c(-2) transmitted number of coefficients at limit."""
247
+ pre3_current_level: int = field(XmpInt(signed=False))
248
+ """c(-3) current level."""
249
+ pre3_rx_increment_req_count: int = field(XmpInt(signed=False))
250
+ """c(-3) received number of increment requests."""
251
+ pre3_rx_decrement_req_count: int = field(XmpInt(signed=False))
252
+ """c(-3) received number of decrement requests."""
253
+ pre3_rx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
254
+ """c(-3) received number of maximum limits of coefficient and equalization requests reached."""
255
+ pre3_rx_eq_limit_reached_count: int = field(XmpInt(signed=False))
256
+ """c(-3) received number of maximum limits of equalization requests reached."""
257
+ pre3_rx_coeff_not_supported_count: int = field(XmpInt(signed=False))
258
+ """c(-3) received number of coefficients not supported."""
259
+ pre3_rx_coeff_at_limit_count: int = field(XmpInt(signed=False))
260
+ """c(-3) received number of coefficients at limit."""
261
+ pre3_tx_increment_req_count: int = field(XmpInt(signed=False))
262
+ """c(-3) transmitted number of increment requests."""
263
+ pre3_tx_decrement_req_count: int = field(XmpInt(signed=False))
264
+ """c(-3) transmitted number of decrement requests."""
265
+ pre3_tx_coeff_eq_limit_reached_count: int = field(XmpInt(signed=False))
266
+ """c(-3) transmitted number of maximum limits of coefficient and equalization requests reached."""
267
+ pre3_tx_eq_limit_reached_count: int = field(XmpInt(signed=False))
268
+ """c(-3) transmitted number of maximum limits of equalization requests reached."""
269
+ pre3_tx_coeff_not_supported_count: int = field(XmpInt(signed=False))
270
+ """c(-3) transmitted number of coefficients not supported."""
271
+ pre3_tx_coeff_at_limit_count: int = field(XmpInt(signed=False))
272
+ """c(-3) transmitted number of coefficients at limit."""
273
+ prbs_total_bits_high: int = field(XmpInt(signed=False))
274
+ """PRBS total bits (most significant 32-bit)."""
275
+ prbs_total_bits_low: int = field(XmpInt(signed=False))
276
+ """PRBS total bits (least significant 32-bit)."""
277
+ prbs_total_error_bits_high: int = field(XmpInt(signed=False))
278
+ """PRBS total error bits (most significant 32-bit, only bit 15-0 should be used)."""
279
+ prbs_total_error_bits_low: int = field(XmpInt(signed=False))
280
+ """PRBS total error bits (least significant 32-bit)."""
281
+ frame_lock: LinkTrainFrameLock = field(XmpInt(signed=False))
282
+ """frame lock status of the local end."""
283
+ remote_frame_lock: LinkTrainFrameLock = field(XmpInt(signed=False))
284
+ """frame lock status of the remote end."""
285
+ num_frame_errors: int = field(XmpInt(signed=False))
286
+
287
+ num_overruns: int = field(XmpInt(signed=False))
288
+
289
+ last_ic_received: int = field(XmpInt(signed=False))
290
+
291
+ last_ic_sent: int = field(XmpInt(signed=False))
292
+
293
+ def get(self) -> Token[GetDataAttr]:
294
+ """Get L1 link training information. Information is per Serdes and split into a number of pages.
295
+
296
+ :return: L1 link training information
297
+ :rtype: PL1_LINKTRAININFO.GetDataAttr
298
+ """
299
+
300
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._page_xindex]))
301
+
302
+
303
+ @register_command
304
+ @dataclass
305
+ class PL1_LOG:
306
+ """
307
+ .. versionadded:: 2.0
308
+
309
+ .. warning::
310
+
311
+ Still in beta mode. Subjected to changes
312
+
313
+ Return a log line of either AN or LT for the given Serdes. The log string line contains the latest 100 lines.
314
+ """
315
+
316
+ code: typing.ClassVar[int] = 387
317
+ pushed: typing.ClassVar[bool] = False
318
+
319
+ _connection: 'interfaces.IConnection'
320
+ _module: int
321
+ _port: int
322
+
323
+ class GetDataAttr(ResponseBodyStruct):
324
+ log_string: str = field(XmpStr())
325
+ """ANLT log string"""
326
+
327
+ def get(self) -> Token[GetDataAttr]:
328
+ """Return a log line of ANLT of all serdes on a port. (latest 100 lines)
329
+
330
+ :return: a log line from AN/LT for the given Serdes.
331
+ :rtype: PL1_LOG.GetDataAttr
332
+ """
333
+
334
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
335
+
336
+
337
+
338
+ @register_command
339
+ @dataclass
340
+ class PL1_CFG_TMP:
341
+ """
342
+ .. versionadded:: 1.1
343
+
344
+ .. warning::
345
+
346
+ Still in beta mode. Subjected to changes
347
+
348
+ Configure some L1 parameters.
349
+ """
350
+
351
+ code: typing.ClassVar[int] = 388
352
+ pushed: typing.ClassVar[bool] = False
353
+
354
+ _connection: "interfaces.IConnection"
355
+ _module: int
356
+ _port: int
357
+ _serdes_xindex: int
358
+ _type: Layer1ConfigType
359
+
360
+ class GetDataAttr(ResponseBodyStruct):
361
+ """Data structure of the get response.
362
+ """
363
+ values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
364
+
365
+ class SetDataAttr(RequestBodyStruct):
366
+ """Data structure of the set action.
367
+ """
368
+ values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
369
+
370
+ def get(self) -> "Token[GetDataAttr]":
371
+ """Get various L1 parameters
372
+
373
+ :return: various L1 parameters
374
+ :rtype: PL1_CFG_TMP.GetDataAttr
375
+ """
376
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._type]))
377
+
378
+ def set(self, values: typing.List[int]) -> "Token":
379
+ """Get various L1 parameters
380
+
381
+ :param values: L1 parameters
382
+ :type values: typing.List[int]
383
+ """
384
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._type], values=values))
385
+
386
+
387
+ @register_command
388
+ @dataclass
389
+ class PL1_LINKTRAIN_CMD:
390
+ """
391
+ .. versionadded:: 1.1
392
+
393
+ .. warning::
394
+
395
+ Still in beta mode. Subjected to changes
396
+
397
+ Link training RPC. Issue link training commands on a given serdes and poll for status
398
+ """
399
+
400
+ code: typing.ClassVar[int] = 389
401
+ pushed: typing.ClassVar[bool] = False
402
+
403
+ _connection: 'interfaces.IConnection'
404
+ _module: int
405
+ _port: int
406
+ _serdes_xindex: int
407
+
408
+ class GetDataAttr(ResponseBodyStruct):
409
+ cmd: int = field(XmpByte())
410
+
411
+ arg: int = field(XmpByte())
412
+
413
+ result: LinkTrainCmdResults = field(XmpByte())
414
+
415
+ flags: int = field(XmpByte())
416
+
417
+ class SetDataAttr(RequestBodyStruct):
418
+ cmd: LinkTrainCmd = field(XmpByte())
419
+
420
+ arg: int = field(XmpByte())
421
+
422
+ def get(self) -> Token[GetDataAttr]:
423
+ """Get status of current command
424
+
425
+ :return: 4 bytes: command, arg, result, flags
426
+ :rtype: PL1_LINKTRAIN_CMD.GetDataAttr
427
+ """
428
+
429
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
430
+
431
+ def set(self, cmd: LinkTrainCmd, arg: int) -> Token[None]:
432
+ """Issue a link train command (cmd, arg)
433
+
434
+ """
435
+
436
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], cmd=cmd, arg=arg))
437
+
438
+
439
+ @register_command
440
+ @dataclass
441
+ class PL1_LT_PHYTXEQ_RANGE:
442
+ """
443
+ .. versionadded:: 2.9
444
+
445
+ Configure the lower and the upper bound of transmit equalizer (native value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached.
446
+
447
+ """
448
+
449
+ code: typing.ClassVar[int] = 417
450
+ pushed: typing.ClassVar[bool] = False
451
+
452
+ _connection: 'interfaces.IConnection'
453
+ _module: int
454
+ _port: int
455
+ _serdes_xindex: int
456
+ _tap_xindex: FreyaTapIndex
457
+
458
+ class GetDataAttr(ResponseBodyStruct):
459
+ response: FreyaLinkTrainingRangeResponse = field(XmpByte())
460
+ """byte, the response when either of the bounds is triggered. Default is AUTO."""
461
+ min: int = field(XmpInt())
462
+ """integer, the lower bound of the tap. When set, the value is ignored when <response> == AUTO."""
463
+ max: int = field(XmpInt())
464
+ """integer, the upper bound of the tap. When set, the value is ignored when <response> == AUTO.)"""
465
+
466
+ class SetDataAttr(RequestBodyStruct):
467
+ response: FreyaLinkTrainingRangeResponse = field(XmpByte())
468
+ """byte, the response when either of the bounds is triggered. Default is AUTO."""
469
+ min: int = field(XmpInt())
470
+ """integer, the lower bound of the tap. When set, the value is ignored when <response> == AUTO."""
471
+ max: int = field(XmpInt())
472
+ """integer, the upper bound of the tap. When set, the value is ignored when <response> == AUTO.)"""
473
+
474
+
475
+ def get(self) -> Token[GetDataAttr]:
476
+ """Get the lower and the upper bound of transmit equalizer (native value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached."""
477
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._tap_xindex]))
478
+
479
+ def set(self, response:FreyaLinkTrainingRangeResponse, min: int, max: int) -> Token[None]:
480
+ """Set the lower and the upper bound of transmit equalizer (native value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached."""
481
+ return Token(
482
+ self._connection,
483
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._tap_xindex], response=response, min=min, max=max))
484
+
485
+
486
+ @register_command
487
+ @dataclass
488
+ class PL1_LT_PHYTXEQ_RANGE_COEFF:
489
+ """
490
+ .. versionadded:: 2.9
491
+
492
+ Configure the lower and the upper bound of transmit equalizer (IEEE coefficient value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached.
493
+
494
+ Whenever <response> == AUTO (the default), min and max will have their default values, which can be read with “get”. Any value that attempt to set the min and max when <response> == AUTO will be ignored by the chassis.
495
+
496
+ """
497
+
498
+ code: typing.ClassVar[int] = 419
499
+ pushed: typing.ClassVar[bool] = False
500
+
501
+ _connection: 'interfaces.IConnection'
502
+ _module: int
503
+ _port: int
504
+ _serdes_xindex: int
505
+ _tap_xindex: FreyaTapIndex
506
+
507
+ class GetDataAttr(ResponseBodyStruct):
508
+ response: FreyaLinkTrainingRangeResponse = field(XmpByte())
509
+ """byte, the response when either of the bounds is triggered. Default is AUTO."""
510
+ min: int = field(XmpInt())
511
+ """
512
+ integer, the lower bound of the tap. When set, the value is ignored when <response> == AUTO.
513
+
514
+ * For <tap_index> == PRE3/PRE/POST, negative, scaled by 1E3.
515
+ * For <tap_index> == MAIN/PRE2, positive, scaled by 1E3.
516
+
517
+ """
518
+ max: int = field(XmpInt())
519
+ """
520
+ integer, the upper bound of the tap. When set, the value is ignored when <response> == AUTO.
521
+
522
+ * For <tap_index> == PRE3/PRE/POST, negative, scaled by 1E3.
523
+ * For <tap_index> == MAIN/PRE2, positive, scaled by 1E3.
524
+
525
+ """
526
+
527
+ class SetDataAttr(RequestBodyStruct):
528
+ response: FreyaLinkTrainingRangeResponse = field(XmpByte())
529
+ """byte, the response when either of the bounds is triggered. Default is AUTO."""
530
+ min: int = field(XmpInt())
531
+ """
532
+ integer, the lower bound of the tap. When set, the value is ignored when <response> == AUTO.
533
+
534
+ * For <tap_index> == PRE3/PRE/POST, negative, scaled by 1E3.
535
+ * For <tap_index> == MAIN/PRE2, positive, scaled by 1E3.
536
+
537
+ """
538
+ max: int = field(XmpInt())
539
+ """
540
+ integer, the upper bound of the tap. When set, the value is ignored when <response> == AUTO.
541
+
542
+ * For <tap_index> == PRE3/PRE/POST, negative, scaled by 1E3.
543
+ * For <tap_index> == MAIN/PRE2, positive, scaled by 1E3.
544
+
545
+ """
546
+
547
+
548
+ def get(self) -> Token[GetDataAttr]:
549
+ """Get the lower and the upper bound of transmit equalizer (IEEE coefficient value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached."""
550
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._tap_xindex]))
551
+
552
+ def set(self, response:FreyaLinkTrainingRangeResponse, min: int, max: int) -> Token[None]:
553
+ """Set the lower and the upper bound of transmit equalizer (IEEE coefficient value) of the serdes, and how the serdes responds to an increment/decrement request when either bound is reached."""
554
+ return Token(
555
+ self._connection,
556
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._tap_xindex], response=response, min=min, max=max))
557
+
558
+ @register_command
559
+ @dataclass
560
+ class PL1_CTRL:
561
+ """
562
+ .. versionadded:: 2.5
563
+
564
+ The Signal Integrity feature offers the equivalent of an Equivalent Time oscilloscope trace of the RX PAM4 signal (later, also PAM2). The trace is done with the A/D converter in the GTM receiver also doing the data sampling / CDR function, i.e. the trace is taken after the RX equalizer.
565
+
566
+ The HW characteristics of the Versal GTM used in Freya are: Trace length = 2000 samples, sample resolution = 7 bits 2's complement, i.e. range = -64..63.
567
+
568
+ Using the sampled eye scan feature through CLI involves two steps:
569
+
570
+ Trigger the acquisition of a trace (PL1_CTRL)
571
+
572
+ Retrieve the trace data (PL1_GET_DATA)
573
+
574
+ This command is a generic control function related to Layer 1 / SERDES. For now, only used for signal integrity scan.
575
+ """
576
+
577
+ code: typing.ClassVar[int] = 424
578
+ pushed: typing.ClassVar[bool] = False
579
+
580
+ _connection: 'interfaces.IConnection'
581
+ _module: int
582
+ _port: int
583
+ _serdes_xindex: int
584
+ _func_xindex: Layer1Control
585
+
586
+ class SetDataAttr(RequestBodyStruct):
587
+ opcode: Layer1Opcode = field(XmpInt())
588
+ """Operation code"""
589
+
590
+ def set(self, opcode: Layer1Opcode) -> Token[None]:
591
+ """Set the control command
592
+
593
+ :param opcode: operation code
594
+ :type opcode: Layer1Opcode
595
+ """
596
+
597
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._func_xindex], opcode=opcode))
598
+
599
+ @register_command
600
+ @dataclass
601
+ class PL1_GET_DATA:
602
+ """
603
+ .. versionadded:: 2.5
604
+
605
+ The Signal Integrity feature offers the equivalent of an Equivalent Time oscilloscope trace of the RX PAM4 signal (later, also PAM2). The trace is done with the A/D converter in the GTM receiver also doing the data sampling / CDR function, i.e. the trace is taken after the RX equalizer.
606
+
607
+ The HW characteristics of the Versal GTM used in Freya are: Trace length = 2000 samples, sample resolution = 7 bits 2’s complement, i.e. range = -64..63.
608
+
609
+ Using the sampled eye scan feature through CLI involves two steps:
610
+
611
+ Trigger the acquisition of a trace (PL1_CTRL)
612
+
613
+ Retrieve the trace data (PL1_GET_DATA)
614
+
615
+ This command is a generic function to retrieve dynamic data related to Layer 1 / SERDES. For now, only used for signal integrity scan.
616
+
617
+ For ``func==0``, sampled eye scan:
618
+
619
+ * ``result==0``: No data available.
620
+
621
+ "No data available" means that either a scan was never started, an acquisition was started and in progress, or the acquired data has become too old (e.g. older than 500 ms). The acquisition time for a trace is in the very low ms-range. If ``result==0``, ``sweep_no`` and ``age_us`` are dummy (=0), and no additional data are returned.
622
+
623
+ * ``result==1``: Data returned. In that case, the rest of the parameters apply:
624
+
625
+ ``sweep_no``: per-SERDES trace acquisition counter: 1,2,3… Each trace can be returned multiple times, to different users, within its lifetime. A new trace acquisition is triggered with the PL1_CTRL command.
626
+
627
+ ``age_us``: The “age” of the trace data in microseconds, i.e. the time from data acquisition from hardware was completed until the time the command reply data is generated.
628
+
629
+ ``value``: The rest of the reply is a set of 16 bit signed 2-complement sample values. With present hardware, the range of each sample is -64..63. In XMP scripting, each sample value is represented as two bytes, msb first.
630
+
631
+ With present implementation, 2006 sample values (4012 bytes) are returned.
632
+
633
+ The first 6 sample values are so-called “sampled levels”: <p1> <p2> < p3> <m1> <m2> <m3>
634
+ """
635
+
636
+ code: typing.ClassVar[int] = 425
637
+ pushed: typing.ClassVar[bool] = False
638
+
639
+ _connection: 'interfaces.IConnection'
640
+ _module: int
641
+ _port: int
642
+ _serdes_xindex: int
643
+ _func_xindex: Layer1Control
644
+
645
+ class GetDataAttr(ResponseBodyStruct):
646
+ result: int = field(XmpInt())
647
+ """Data availability."""
648
+
649
+ sweep_no: int = field(XmpInt())
650
+ """per-SERDES trace acquisition counter."""
651
+
652
+ age_us: int = field(XmpInt())
653
+ """the age of the trace data in microseconds, i.e. the time from data acquisition from hardware was completed until the time the command reply data is generated."""
654
+
655
+ value: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
656
+ """a set of 16 bit signed 2-complement sample values. With present hardware, the range of each sample is -64..63. In CLI scripting, each sample value is represented as two bytes, msb first."""
657
+
658
+ def get(self) -> Token[GetDataAttr]:
659
+
660
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._func_xindex]))
661
+
662
+
663
+ @register_command
664
+ @dataclass
665
+ class PL1_PRESET_CONFIG:
666
+ """
667
+ .. versionadded:: 2.9
668
+
669
+ Configure the preset values (native values) of a serdes and the response to the received IC request.
670
+
671
+ """
672
+
673
+ code: typing.ClassVar[int] = 426
674
+ pushed: typing.ClassVar[bool] = False
675
+
676
+ _connection: 'interfaces.IConnection'
677
+ _module: int
678
+ _port: int
679
+ _serdes_xindex: int
680
+ _preset_xindex: FreyaPresetIndex
681
+
682
+ class GetDataAttr(ResponseBodyStruct):
683
+ response: FreyaPresetResponse = field(XmpByte())
684
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
685
+ pre3: int = field(XmpInt())
686
+ """integer, pre3 tap value. Default = 0 (neutral)"""
687
+ pre2: int = field(XmpInt())
688
+ """integer, pre2 tap value. Default = 0 (neutral)"""
689
+ pre: int = field(XmpInt())
690
+ """integer, pre tap value. Default = 0 (neutral)"""
691
+ main: int = field(XmpInt())
692
+ """integer, main tap value."""
693
+ post: int = field(XmpInt())
694
+ """integer, post tap value. Default = 0 (neutral)"""
695
+
696
+ class SetDataAttr(RequestBodyStruct):
697
+ response: FreyaPresetResponse = field(XmpByte())
698
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
699
+ pre3: int = field(XmpInt())
700
+ """integer, pre3 tap value. Default = 0 (neutral)"""
701
+ pre2: int = field(XmpInt())
702
+ """integer, pre2 tap value. Default = 0 (neutral)"""
703
+ pre: int = field(XmpInt())
704
+ """integer, pre tap value. Default = 0 (neutral)"""
705
+ main: int = field(XmpInt())
706
+ """integer, main tap value."""
707
+ post: int = field(XmpInt())
708
+ """integer, post tap value. Default = 0 (neutral)"""
709
+
710
+
711
+ def get(self) -> Token[GetDataAttr]:
712
+ """Get the preset values (native values) of a serdes and the response to the received IC request."""
713
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex]))
714
+
715
+ def set(self, response:FreyaPresetResponse, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
716
+ """Set the preset values (native values) of a serdes and the response to the received IC request."""
717
+ return Token(
718
+ self._connection,
719
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex], response=response, pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
720
+
721
+
722
+ @register_command
723
+ @dataclass
724
+ class PL1_PRESET_RESET:
725
+ """
726
+ .. versionadded:: 2.9
727
+
728
+ Reset the preset of the serdes to its default values.
729
+
730
+ """
731
+
732
+ code: typing.ClassVar[int] = 427
733
+ pushed: typing.ClassVar[bool] = False
734
+
735
+ _connection: 'interfaces.IConnection'
736
+ _module: int
737
+ _port: int
738
+ _serdes_xindex: int
739
+ _preset_xindex: FreyaPresetIndex
740
+
741
+ class SetDataAttr(RequestBodyStruct):
742
+ pass
743
+
744
+
745
+ def set(self) -> Token[None]:
746
+ """Reset the preset of the serdes to its default values.
747
+ """
748
+ return Token(
749
+ self._connection,
750
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex]))
751
+
752
+ @register_command
753
+ @dataclass
754
+ class PL1_PRESET_CONFIG_LEVEL:
755
+ """
756
+ .. versionadded:: 2.9
757
+
758
+ Configure the preset values (mV/dB values) of a serdes and the response to the received IC request.
759
+
760
+ """
761
+
762
+ code: typing.ClassVar[int] = 428
763
+ pushed: typing.ClassVar[bool] = False
764
+
765
+ _connection: 'interfaces.IConnection'
766
+ _module: int
767
+ _port: int
768
+ _serdes_xindex: int
769
+ _preset_xindex: FreyaPresetIndex
770
+
771
+ class GetDataAttr(ResponseBodyStruct):
772
+ response: FreyaPresetResponse = field(XmpByte())
773
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
774
+ pre3: int = field(XmpInt())
775
+ """integer, pre3 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
776
+ pre2: int = field(XmpInt())
777
+ """integer, pre2 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
778
+ pre: int = field(XmpInt())
779
+ """integer, pre tap value in dB/10, ranges from 0 to 187. Default = 0 (neutral)"""
780
+ main: int = field(XmpInt())
781
+ """integer, main tap value in mV, ranges from 507 to 998."""
782
+ post: int = field(XmpInt())
783
+ """integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
784
+
785
+ class SetDataAttr(RequestBodyStruct):
786
+ response: FreyaPresetResponse = field(XmpByte())
787
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
788
+ pre3: int = field(XmpInt())
789
+ """integer, pre3 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
790
+ pre2: int = field(XmpInt())
791
+ """integer, pre2 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
792
+ pre: int = field(XmpInt())
793
+ """integer, pre tap value in dB/10, ranges from 0 to 187. Default = 0 (neutral)"""
794
+ main: int = field(XmpInt())
795
+ """integer, main tap value in mV, ranges from 507 to 998."""
796
+ post: int = field(XmpInt())
797
+ """integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
798
+
799
+
800
+ def get(self) -> Token[GetDataAttr]:
801
+ """Get the preset values (mV/dB values) of a serdes and the response to the received IC request"""
802
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex]))
803
+
804
+ def set(self, response:FreyaPresetResponse, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
805
+ """Set the preset values (mV/dB values) of a serdes and the response to the received IC request"""
806
+ return Token(
807
+ self._connection,
808
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex], response=response, pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
809
+
810
+
811
+ @register_command
812
+ @dataclass
813
+ class PL1_PRESET_CONFIG_COEFF:
814
+ """
815
+ .. versionadded:: 2.9
816
+
817
+ Configure the preset values (IEEE coefficient values) of a serdes and the response to the received IC request.
818
+
819
+ """
820
+
821
+ code: typing.ClassVar[int] = 429
822
+ pushed: typing.ClassVar[bool] = False
823
+
824
+ _connection: 'interfaces.IConnection'
825
+ _module: int
826
+ _port: int
827
+ _serdes_xindex: int
828
+ _preset_xindex: FreyaPresetIndex
829
+
830
+ class GetDataAttr(ResponseBodyStruct):
831
+ response: FreyaPresetResponse = field(XmpByte())
832
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
833
+ pre3: int = field(XmpInt())
834
+ """integer, pre3 tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
835
+ pre2: int = field(XmpInt())
836
+ """integer, pre2 tap value, positive, scaled by 1E3. Default = 0 (neutral)"""
837
+ pre: int = field(XmpInt())
838
+ """integer, pre tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
839
+ main: int = field(XmpInt())
840
+ """integer, main tap value, positive, scaled by 1E3. Default = 1000"""
841
+ post: int = field(XmpInt())
842
+ """integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
843
+
844
+ class SetDataAttr(RequestBodyStruct):
845
+ response: FreyaPresetResponse = field(XmpByte())
846
+ """integer, byte, the response to the received IC request. Default = ACCEPT."""
847
+ pre3: int = field(XmpInt())
848
+ """integer, pre3 tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
849
+ pre2: int = field(XmpInt())
850
+ """integer, pre2 tap value, positive, scaled by 1E3. Default = 0 (neutral)"""
851
+ pre: int = field(XmpInt())
852
+ """integer, pre tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
853
+ main: int = field(XmpInt())
854
+ """integer, main tap value, positive, scaled by 1E3. Default = 1000"""
855
+ post: int = field(XmpInt())
856
+ """integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
857
+
858
+
859
+ def get(self) -> Token[GetDataAttr]:
860
+ """Get the preset values (IEEE coefficient values) of a serdes and the response to the received IC request."""
861
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex]))
862
+
863
+ def set(self, response:FreyaPresetResponse, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
864
+ """Set the preset values (IEEE coefficient values) of a serdes and the response to the received IC request."""
865
+ return Token(
866
+ self._connection,
867
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._preset_xindex], response=response, pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
868
+
869
+
870
+ @register_command
871
+ @dataclass
872
+ class PL1_PHYTXEQ_LEVEL:
873
+ """
874
+ .. versionadded:: 2.5
875
+
876
+ Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
877
+
878
+ .. note::
879
+
880
+ PL1_PHYTXEQ, PL1_PHYTXEQ_LEVEL, and PL1_PHYTXEQ_COEFF facilitate the configuration and retrieval of TX tap values, each offering a unique perspective. Modifications made with any of these parameters will result in updates to the read results across all of them.
881
+
882
+ """
883
+
884
+ code: typing.ClassVar[int] = 430
885
+ pushed: typing.ClassVar[bool] = False
886
+
887
+ _connection: 'interfaces.IConnection'
888
+ _module: int
889
+ _port: int
890
+ _serdes_xindex: int
891
+
892
+ class GetDataAttr(ResponseBodyStruct):
893
+ pre3: int = field(XmpInt())
894
+ """integer, pre3 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
895
+ pre2: int = field(XmpInt())
896
+ """integer, pre2 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
897
+ pre: int = field(XmpInt())
898
+ """integer, pre tap value in dB/10, ranges from 0 to 187. Default = 0 (neutral)"""
899
+ main: int = field(XmpInt())
900
+ """integer, main tap value in mV, ranges from 507 to 998."""
901
+ post: int = field(XmpInt())
902
+ """integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
903
+
904
+ class SetDataAttr(RequestBodyStruct):
905
+ pre3: int = field(XmpInt())
906
+ """integer, pre3 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
907
+ pre2: int = field(XmpInt())
908
+ """integer, pre2 tap value in dB/10, ranges from 0 to 71. Default = 0 (neutral)"""
909
+ pre: int = field(XmpInt())
910
+ """integer, pre tap value in dB/10, ranges from 0 to 187. Default = 0 (neutral)"""
911
+ main: int = field(XmpInt())
912
+ """integer, main tap value in mV, ranges from 507 to 998."""
913
+ post: int = field(XmpInt())
914
+ """integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
915
+
916
+ def get(self) -> Token[GetDataAttr]:
917
+
918
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
919
+
920
+ def set(self, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
921
+
922
+ return Token(
923
+ self._connection,
924
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
925
+
926
+ @register_command
927
+ @dataclass
928
+ class PL1_PHYTXEQ_COEFF:
929
+ """
930
+ .. versionadded:: 2.5
931
+
932
+ Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
933
+
934
+ .. note::
935
+
936
+ PL1_PHYTXEQ, PL1_PHYTXEQ_LEVEL, and PL1_PHYTXEQ_COEFF facilitate the configuration and retrieval of TX tap values, each offering a unique perspective. Modifications made with any of these parameters will result in updates to the read results across all of them.
937
+
938
+ The following rules apply:
939
+
940
+ * 0.5 approx. ≤ main ≤ 1
941
+ * -0.4 approx ≤ post ≤ 0
942
+ * -0.4 approx ≤ pre ≤ 0
943
+ * 0 ≤ pre2 ≤ 0.25 approx.
944
+ * -0.25 approx ≤ pre3 ≤ 0
945
+ * The sum of the absolute value of each coefficients must be ≤ 1.
946
+ * A sum of 1 corresponds to a TX output voltage swing of 1000 mVpp approximately.
947
+
948
+ """
949
+
950
+ code: typing.ClassVar[int] = 431
951
+ pushed: typing.ClassVar[bool] = False
952
+
953
+ _connection: 'interfaces.IConnection'
954
+ _module: int
955
+ _port: int
956
+ _serdes_xindex: int
957
+
958
+ class GetDataAttr(ResponseBodyStruct):
959
+ pre3: int = field(XmpInt())
960
+ """integer, pre3 tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
961
+ pre2: int = field(XmpInt())
962
+ """integer, pre2 tap value, positive, scaled by 1E3. Default = 0 (neutral)"""
963
+ pre: int = field(XmpInt())
964
+ """integer, pre tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
965
+ main: int = field(XmpInt())
966
+ """integer, main tap value, positive, scaled by 1E3. Default = 1000"""
967
+ post: int = field(XmpInt())
968
+ """integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
969
+
970
+ class SetDataAttr(RequestBodyStruct):
971
+ pre3: int = field(XmpInt())
972
+ """integer, pre3 tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
973
+ pre2: int = field(XmpInt())
974
+ """integer, pre2 tap value, positive, scaled by 1E3. Default = 0 (neutral)"""
975
+ pre: int = field(XmpInt())
976
+ """integer, pre tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
977
+ main: int = field(XmpInt())
978
+ """integer, main tap value, positive, scaled by 1E3. Default = 1000"""
979
+ post: int = field(XmpInt())
980
+ """integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
981
+
982
+ def get(self) -> Token[GetDataAttr]:
983
+
984
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
985
+
986
+ def set(self, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
987
+
988
+ return Token(
989
+ self._connection,
990
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
991
+
992
+ @register_command
993
+ @dataclass
994
+ class PL1_AUTONEG_STATUS:
995
+ """
996
+ .. versionadded:: 2.5
997
+
998
+ Returns received technology abilities, FEC abilities, pause abilities, HCD technology ability, FEC mode result, and pause mode result.
999
+ """
1000
+
1001
+ code: typing.ClassVar[int] = 432
1002
+ pushed: typing.ClassVar[bool] = False
1003
+
1004
+ _connection: 'interfaces.IConnection'
1005
+ _module: int
1006
+ _port: int
1007
+
1008
+ class GetDataAttr(ResponseBodyStruct):
1009
+ mode: AutoNegMode = field(XmpInt())
1010
+ """Autoneg mode"""
1011
+ autoneg_state: AutoNegStatus = field(XmpInt())
1012
+ """Autoneg state"""
1013
+ received_tech_abilities: Hex = field(XmpHex(size=8))
1014
+ """Received technology abilities from the remote port"""
1015
+ received_fec_abilities: Hex = field(XmpHex(size=1))
1016
+ """Received FEC capabilities from the remote port"""
1017
+ received_pause_mode: Hex = field(XmpHex(size=1))
1018
+ """Received pause capabilities from the remote port"""
1019
+ tech_ability_hcd_status: FreyaTechAbilityHCDStatus = field(XmpInt())
1020
+ """HCD technology ability negotiation status"""
1021
+ tech_ability_hcd_value: FreyaTecAbilityHCD = field(XmpInt())
1022
+ """HCD technology ability negotiation result"""
1023
+ fec_mode_result: FECMode = field(XmpInt())
1024
+ """FEC mode negotiation result"""
1025
+ pause_mode_result: PauseMode = field(XmpInt())
1026
+ """Pause mode negotiation result"""
1027
+
1028
+ def get(self) -> Token[GetDataAttr]:
1029
+
1030
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1031
+
1032
+ @register_command
1033
+ @dataclass
1034
+ class PL1_AUTONEG_ABILITIES:
1035
+ """
1036
+ .. versionadded:: 2.5
1037
+
1038
+ Return the supported technology abilities, FEC abilities, and pause abilities of the port.
1039
+ """
1040
+
1041
+ code: typing.ClassVar[int] = 433
1042
+ pushed: typing.ClassVar[bool] = False
1043
+
1044
+ _connection: 'interfaces.IConnection'
1045
+ _module: int
1046
+ _port: int
1047
+
1048
+ class GetDataAttr(ResponseBodyStruct):
1049
+ tech_abilities_supported: Hex = field(XmpHex(size=8))
1050
+ """supported technology abilities by the port. This returns a value in Hex of the format 0xHHHHHHHH (64 bits). Each bit corresponds to technology ability as shown below. A bit of 1 means the corresponding technology ability is supported by the port."""
1051
+
1052
+ fec_modes_supported: Hex = field(XmpHex(size=1))
1053
+ """supported FEC modes by the port. This returns a value in Hex of the format 0xH (8 bits). Each bit corresponds to FEC mode as shown below. A bit of 1 means the corresponding FEC mode is supported by the port."""
1054
+
1055
+ pause_modes_supported: Hex = field(XmpHex(size=1))
1056
+ """pause abilities supported by the port. This returns a value in Hex of the format 0xH (8 bits). Each bit corresponds to pause mode as shown below. A bit of 1 means the corresponding FEC mode is supported by the port."""
1057
+
1058
+ def get(self) -> Token[GetDataAttr]:
1059
+
1060
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1061
+
1062
+ @register_command
1063
+ @dataclass
1064
+ class PL1_PCS_VARIANT:
1065
+ """
1066
+ .. versionadded:: 2.5
1067
+
1068
+ PCS variant configuration.
1069
+ """
1070
+
1071
+ code: typing.ClassVar[int] = 434
1072
+ pushed: typing.ClassVar[bool] = False
1073
+
1074
+ _connection: 'interfaces.IConnection'
1075
+ _module: int
1076
+ _port: int
1077
+
1078
+ class GetDataAttr(ResponseBodyStruct):
1079
+ variant: FreyaPCSVariant = field(XmpByte())
1080
+ """PCS variant"""
1081
+
1082
+ class SetDataAttr(RequestBodyStruct):
1083
+ variant: FreyaPCSVariant = field(XmpByte())
1084
+ """PCS variant"""
1085
+
1086
+ def get(self) -> Token[GetDataAttr]:
1087
+
1088
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1089
+
1090
+ def set(self, variant: FreyaPCSVariant) -> Token[None]:
1091
+
1092
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, variant=variant))
1093
+
1094
+
1095
+
1096
+ @register_command
1097
+ @dataclass
1098
+ class PL1_CWE_CYCLE:
1099
+ """
1100
+ .. versionadded:: 2.7
1101
+
1102
+ Configure the FEC codeword error injection cycle.
1103
+ """
1104
+
1105
+ code: typing.ClassVar[int] = 435
1106
+ pushed: typing.ClassVar[bool] = False
1107
+
1108
+ _connection: 'interfaces.IConnection'
1109
+ _module: int
1110
+ _port: int
1111
+
1112
+ class GetDataAttr(ResponseBodyStruct):
1113
+ loop: int = field(XmpInt())
1114
+ """Loop count of the FEC codeword error injection cycle. <loop> == 0 means continuous."""
1115
+ cycle_len: int = field(XmpInt())
1116
+ """The number of FEC codewords in the cycle, must be larger than 0 and an even number."""
1117
+ error_len: int = field(XmpInt())
1118
+ """The number of consecutive errored FEC codewords in a cycle, must not be larger than cycle_len"""
1119
+
1120
+ class SetDataAttr(RequestBodyStruct):
1121
+ loop: int = field(XmpInt())
1122
+ """Loop count of the FEC codeword error injection cycle. <loop> == 0 means continuous."""
1123
+ cycle_len: int = field(XmpInt())
1124
+ """The number of FEC codewords in the cycle, must be larger than 0 and an even number."""
1125
+ error_len: int = field(XmpInt())
1126
+ """The number of consecutive errored FEC codewords in a cycle, must not be larger than cycle_len"""
1127
+
1128
+ def get(self) -> Token[GetDataAttr]:
1129
+
1130
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1131
+
1132
+ def set(self, loop: int, cycle_len: int, error_len: int) -> Token[None]:
1133
+
1134
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, loop=loop, cycle_len=cycle_len, error_len=error_len))
1135
+
1136
+ set_continuous = functools.partialmethod(set, 0)
1137
+ """Set continuous loop
1138
+ """
1139
+
1140
+
1141
+ @register_command
1142
+ @dataclass
1143
+ class PL1_CWE_ERR_SYM_INDICES:
1144
+ """
1145
+ .. versionadded:: 2.7
1146
+
1147
+ Configure the positions of the errored symbols in errored codewords.
1148
+ """
1149
+
1150
+ code: typing.ClassVar[int] = 436
1151
+ pushed: typing.ClassVar[bool] = False
1152
+
1153
+ _connection: 'interfaces.IConnection'
1154
+ _module: int
1155
+ _port: int
1156
+
1157
+ class GetDataAttr(ResponseBodyStruct):
1158
+ error_sym_indices: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1159
+ """the indices of the position of the errored symbols.
1160
+
1161
+ * An empty list means there is no errored symbol in the errored codewords.
1162
+
1163
+ * The indices in the list must not duplicate.
1164
+
1165
+ * The indices in the list do not necessarily need to be sorted.
1166
+
1167
+ * The maximum value of an index must not be larger than what the FEC schema allows, e.g. an index must not be larger than 543 for RS(544, 514).
1168
+
1169
+ """
1170
+
1171
+ class SetDataAttr(RequestBodyStruct):
1172
+ error_sym_indices: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1173
+ """the indices of the position of the errored symbols.
1174
+
1175
+ * An empty list means there is no errored symbol in the errored codewords.
1176
+
1177
+ * The indices in the list must not duplicate.
1178
+
1179
+ * The indices in the list do not necessarily need to be sorted.
1180
+
1181
+ * The maximum value of an index must not be larger than what the FEC schema allows, e.g. an index must not be larger than 543 for RS(544, 514).
1182
+
1183
+ """
1184
+
1185
+ def get(self) -> Token[GetDataAttr]:
1186
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1187
+
1188
+ def set(self, error_sym_indices: typing.List[int]) -> Token[None]:
1189
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, error_sym_indices=error_sym_indices))
1190
+
1191
+
1192
+ @register_command
1193
+ @dataclass
1194
+ class PL1_CWE_BIT_ERR_MASK:
1195
+ """
1196
+ .. versionadded:: 2.7
1197
+
1198
+ Configure the bit error mask for the errored symbols.
1199
+ """
1200
+
1201
+ code: typing.ClassVar[int] = 437
1202
+ pushed: typing.ClassVar[bool] = False
1203
+
1204
+ _connection: 'interfaces.IConnection'
1205
+ _module: int
1206
+ _port: int
1207
+
1208
+ class GetDataAttr(ResponseBodyStruct):
1209
+ mode: FecCodewordBitErrorMaskMode = field(XmpInt())
1210
+ """bit error mask mode."""
1211
+ bitmask: Hex = field(XmpHex(size=2))
1212
+ """bit error mask for the errored symbols, big endian, only 10 bits are effective."""
1213
+
1214
+ class SetDataAttr(RequestBodyStruct):
1215
+ mode: FecCodewordBitErrorMaskMode = field(XmpInt())
1216
+ """bit error mask mode."""
1217
+ bitmask: Hex = field(XmpHex(size=2))
1218
+ """bit error mask for the errored symbols, big endian, only 10 bits are effective."""
1219
+
1220
+ def get(self) -> Token[GetDataAttr]:
1221
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1222
+
1223
+ def set(self, mode: FecCodewordBitErrorMaskMode, bitmask: Hex) -> Token[None]:
1224
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, mode=mode, bitmask=bitmask))
1225
+
1226
+ set_all_bits = functools.partialmethod(set, FecCodewordBitErrorMaskMode.STATIC, Hex("03FF"))
1227
+ """Set all bits to errored bits in an errored symbol.
1228
+ """
1229
+
1230
+ set_no_bits = functools.partialmethod(set, FecCodewordBitErrorMaskMode.STATIC, Hex("0000"))
1231
+ """Set no bits to errored bits in an errored symbol.
1232
+ """
1233
+
1234
+
1235
+ @register_command
1236
+ @dataclass
1237
+ class PL1_CWE_FEC_ENGINE:
1238
+ """
1239
+ .. versionadded:: 2.7
1240
+
1241
+ Configure which FEC engines to use.
1242
+ """
1243
+
1244
+ code: typing.ClassVar[int] = 438
1245
+ pushed: typing.ClassVar[bool] = False
1246
+
1247
+ _connection: 'interfaces.IConnection'
1248
+ _module: int
1249
+ _port: int
1250
+
1251
+ class GetDataAttr(ResponseBodyStruct):
1252
+ bitmask: Hex = field(XmpHex(size=1))
1253
+ """big endian.
1254
+
1255
+ * the highest bit corresponds to FEC engine 4 (0x08)
1256
+
1257
+ * the lowest bit corresponds to FEC engine 1 (0x01)
1258
+
1259
+ """
1260
+
1261
+ class SetDataAttr(RequestBodyStruct):
1262
+ bitmask: Hex = field(XmpHex(size=1))
1263
+ """big endian.
1264
+
1265
+ * the highest bit corresponds to FEC engine 4 (0x08)
1266
+
1267
+ * the lowest bit corresponds to FEC engine 1 (0x01)
1268
+
1269
+ """
1270
+
1271
+ def get(self) -> Token[GetDataAttr]:
1272
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1273
+
1274
+ def set(self, bitmask: Hex) -> Token[None]:
1275
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, bitmask=bitmask))
1276
+
1277
+ set_all_engines = functools.partialmethod(set, Hex("0F"))
1278
+ """Use all FEC engines
1279
+ """
1280
+
1281
+
1282
+ @register_command
1283
+ @dataclass
1284
+ class PL1_CWE_FEC_STATS:
1285
+ """
1286
+ .. versionadded:: 2.7
1287
+
1288
+ FEC error injection statistics.
1289
+ """
1290
+
1291
+ code: typing.ClassVar[int] = 439
1292
+ pushed: typing.ClassVar[bool] = False
1293
+
1294
+ _connection: 'interfaces.IConnection'
1295
+ _module: int
1296
+ _port: int
1297
+
1298
+ class GetDataAttr(ResponseBodyStruct):
1299
+ total_cw: int = field(XmpLong())
1300
+ """Total codewords transmitted."""
1301
+ total_correctable_cw: int = field(XmpLong())
1302
+ """Total injected correctable codewords."""
1303
+ total_uncorrectable_cw: int = field(XmpLong())
1304
+ """Total uncorrectable codewords transmitted."""
1305
+ total_error_free_cw: int = field(XmpLong())
1306
+ """Total error-free codewords transmitted."""
1307
+ total_symbol_error: int = field(XmpLong())
1308
+ """Total injected symbol errors."""
1309
+
1310
+ def get(self) -> Token[GetDataAttr]:
1311
+
1312
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1313
+
1314
+
1315
+ @register_command
1316
+ @dataclass
1317
+ class PL1_AUTONEG_CONFIG:
1318
+ """
1319
+ .. versionadded:: 2.5
1320
+
1321
+ Auto-negotiation configuration for Freya
1322
+ """
1323
+
1324
+ code: typing.ClassVar[int] = 440
1325
+ pushed: typing.ClassVar[bool] = False
1326
+
1327
+ _connection: 'interfaces.IConnection'
1328
+ _module: int
1329
+ _port: int
1330
+
1331
+ class GetDataAttr(ResponseBodyStruct):
1332
+ advertised_tech_abilities: Hex = field(XmpHex(size=8))
1333
+ advertised_fec_abilities: Hex = field(XmpHex(size=1))
1334
+ advertised_pause_mode: Hex = field(XmpHex(size=1))
1335
+
1336
+ class SetDataAttr(RequestBodyStruct):
1337
+ advertised_tech_abilities: Hex = field(XmpHex(size=8))
1338
+ advertised_fec_abilities: Hex = field(XmpHex(size=1))
1339
+ advertised_pause_mode: Hex = field(XmpHex(size=1))
1340
+
1341
+ def get(self) -> Token[GetDataAttr]:
1342
+
1343
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1344
+
1345
+ def set(self, advertised_tech_abilities: Hex, advertised_fec_abilities: Hex, advertised_pause_mode: Hex) -> Token[None]:
1346
+
1347
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, advertised_tech_abilities=advertised_tech_abilities, advertised_fec_abilities=advertised_fec_abilities, advertised_pause_mode=advertised_pause_mode))
1348
+
1349
+ @register_command
1350
+ @dataclass
1351
+ class PL1_ANLT:
1352
+ """
1353
+ .. versionadded:: 2.5
1354
+
1355
+ ANLT action
1356
+ """
1357
+
1358
+ code: typing.ClassVar[int] = 441
1359
+ pushed: typing.ClassVar[bool] = False
1360
+
1361
+ _connection: 'interfaces.IConnection'
1362
+ _module: int
1363
+ _port: int
1364
+
1365
+ class GetDataAttr(ResponseBodyStruct):
1366
+ an_mode: FreyaAutonegMode = field(XmpByte())
1367
+
1368
+ lt_mode: FreyaLinkTrainingMode = field(XmpByte())
1369
+
1370
+ class SetDataAttr(RequestBodyStruct):
1371
+ an_mode: FreyaAutonegMode = field(XmpByte())
1372
+
1373
+ lt_mode: FreyaLinkTrainingMode = field(XmpByte())
1374
+
1375
+ def get(self) -> Token[GetDataAttr]:
1376
+
1377
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1378
+
1379
+ def set(self, an_mode: FreyaAutonegMode, lt_mode: FreyaLinkTrainingMode) -> Token[None]:
1380
+
1381
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, an_mode=an_mode, lt_mode=lt_mode))
1382
+
1383
+ enable_an_only = functools.partialmethod(set, FreyaAutonegMode.ENABLED, FreyaLinkTrainingMode.DISABLED)
1384
+ """Enable Autoneg only.
1385
+ """
1386
+
1387
+ enable_lt_auto_only = functools.partialmethod(set, FreyaAutonegMode.DISABLED, FreyaLinkTrainingMode.ENABLED_AUTO)
1388
+ """Enable Link Training (auto) only.
1389
+ """
1390
+
1391
+ enable_lt_interactive_only = functools.partialmethod(set, FreyaAutonegMode.DISABLED, FreyaLinkTrainingMode.ENABLED_INTERACTIVE)
1392
+ """Enable Link Training (interactive) only.
1393
+ """
1394
+
1395
+ enable_an_lt_auto = functools.partialmethod(set, FreyaAutonegMode.ENABLED, FreyaLinkTrainingMode.ENABLED_AUTO)
1396
+ """Enable Autoneg + Link Training (auto).
1397
+ """
1398
+
1399
+ enable_an_lt_interactive = functools.partialmethod(set, FreyaAutonegMode.ENABLED, FreyaLinkTrainingMode.ENABLED_INTERACTIVE)
1400
+ """Enable Autoneg + Link Training (interactive).
1401
+ """
1402
+
1403
+ disable_anlt = functools.partialmethod(set, FreyaAutonegMode.DISABLED, FreyaLinkTrainingMode.DISABLED)
1404
+ """Disable ANLT.
1405
+ """
1406
+
1407
+ @register_command
1408
+ @dataclass
1409
+ class PL1_PHYTXEQ:
1410
+ """
1411
+ .. versionadded:: 2.5
1412
+
1413
+ Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
1414
+
1415
+ .. note::
1416
+
1417
+ PL1_PHYTXEQ, PL1_PHYTXEQ_LEVEL, and PL1_PHYTXEQ_COEFF facilitate the configuration and retrieval of TX tap values, each offering a unique perspective. Modifications made with any of these parameters will result in updates to the read results across all of them.
1418
+
1419
+ """
1420
+
1421
+ code: typing.ClassVar[int] = 442
1422
+ pushed: typing.ClassVar[bool] = False
1423
+
1424
+ _connection: 'interfaces.IConnection'
1425
+ _module: int
1426
+ _port: int
1427
+ _serdes_xindex: int
1428
+
1429
+ class GetDataAttr(ResponseBodyStruct):
1430
+ pre3: int = field(XmpInt())
1431
+ """integer, pre3 tap value. Default = 0 (neutral)"""
1432
+ pre2: int = field(XmpInt())
1433
+ """integer, pre2 tap value. Default = 0 (neutral)"""
1434
+ pre: int = field(XmpInt())
1435
+ """integer, pre tap value. Default = 0 (neutral)"""
1436
+ main: int = field(XmpInt())
1437
+ """integer, main tap value."""
1438
+ post: int = field(XmpInt())
1439
+ """integer, post tap value. Default = 0 (neutral)"""
1440
+
1441
+ class SetDataAttr(RequestBodyStruct):
1442
+ pre3: int = field(XmpInt())
1443
+ """integer, pre3 tap value. Default = 0 (neutral)"""
1444
+ pre2: int = field(XmpInt())
1445
+ """integer, pre2 tap value. Default = 0 (neutral)"""
1446
+ pre: int = field(XmpInt())
1447
+ """integer, pre tap value. Default = 0 (neutral)"""
1448
+ main: int = field(XmpInt())
1449
+ """integer, main tap value."""
1450
+ post: int = field(XmpInt())
1451
+ """integer, post tap value. Default = 0 (neutral)"""
1452
+
1453
+ def get(self) -> Token[GetDataAttr]:
1454
+
1455
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1456
+
1457
+ def set(self, pre3:int, pre2: int, pre: int, main: int, post: int) -> Token[None]:
1458
+
1459
+ return Token(
1460
+ self._connection,
1461
+ build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], pre3=pre3, pre2=pre2, pre=pre, main=main, post=post))
1462
+
1463
+ @register_command
1464
+ @dataclass
1465
+ class PL1_LINKTRAIN_CONFIG:
1466
+ """
1467
+ .. versionadded:: 2.5
1468
+
1469
+ Per-port link training settings
1470
+ """
1471
+
1472
+ code: typing.ClassVar[int] = 443
1473
+ pushed: typing.ClassVar[bool] = False
1474
+
1475
+ _connection: 'interfaces.IConnection'
1476
+ _module: int
1477
+ _port: int
1478
+
1479
+ class GetDataAttr(ResponseBodyStruct):
1480
+ oos_preset: FreyaOutOfSyncPreset = field(XmpByte())
1481
+ timeout_mode: TimeoutMode = field(XmpByte())
1482
+
1483
+ class SetDataAttr(RequestBodyStruct):
1484
+ oos_preset: FreyaOutOfSyncPreset = field(XmpByte())
1485
+ timeout_mode: TimeoutMode = field(XmpByte())
1486
+
1487
+ def get(self) -> Token[GetDataAttr]:
1488
+
1489
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1490
+
1491
+ def set(self, oos_preset: FreyaOutOfSyncPreset, timeout_mode: TimeoutMode) -> Token[None]:
1492
+
1493
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, oos_preset=oos_preset, timeout_mode=timeout_mode))
1494
+
1495
+ @register_command
1496
+ @dataclass
1497
+ class PL1_LINKTRAIN_STATUS:
1498
+ """
1499
+ Per-lane link training status
1500
+ """
1501
+
1502
+ code: typing.ClassVar[int] = 444
1503
+ pushed: typing.ClassVar[bool] = False
1504
+
1505
+ _connection: 'interfaces.IConnection'
1506
+ _module: int
1507
+ _port: int
1508
+ _serdes_xindex: int
1509
+
1510
+ class GetDataAttr(ResponseBodyStruct):
1511
+ mode: LinkTrainingStatusMode = field(XmpByte())
1512
+ """coded byte, link training mode"""
1513
+ status: LinkTrainingStatus = field(XmpByte())
1514
+ """coded byte, lane status."""
1515
+ failure: LinkTrainingFailureType = field(XmpByte())
1516
+ """coded byte, failure type."""
1517
+
1518
+ def get(self) -> Token[GetDataAttr]:
1519
+ """Get link training status of a lane of a port.
1520
+
1521
+ :return: link training status of a lane of a port, including mode, lane status, and failure type.
1522
+ :rtype: PP_LINKTRAINSTATUS.GetDataAttr
1523
+ """
1524
+
1525
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1526
+
1527
+ @register_command
1528
+ @dataclass
1529
+ class PL1_CWE_CONTROL:
1530
+ """
1531
+ .. versionadded:: 2.7
1532
+
1533
+ Control the FEC codeword error injection.
1534
+ """
1535
+
1536
+ code: typing.ClassVar[int] = 445
1537
+ pushed: typing.ClassVar[bool] = False
1538
+
1539
+ _connection: 'interfaces.IConnection'
1540
+ _module: int
1541
+ _port: int
1542
+
1543
+ class GetDataAttr(ResponseBodyStruct):
1544
+ action: StartOrStop = field(XmpByte())
1545
+ """Control action for FEC codeword error injection"""
1546
+
1547
+ class SetDataAttr(RequestBodyStruct):
1548
+ action: StartOrStop = field(XmpByte())
1549
+ """Control action for FEC codeword error injection"""
1550
+
1551
+ def get(self) -> Token[GetDataAttr]:
1552
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1553
+
1554
+ def set(self, action: StartOrStop) -> Token[None]:
1555
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, action=action))
1556
+
1557
+ set_start = functools.partialmethod(set, StartOrStop.START)
1558
+ """Start FEC codeword error injection.
1559
+ """
1560
+
1561
+ set_stop = functools.partialmethod(set, StartOrStop.STOP)
1562
+ """Stop FEC codeword error injection.
1563
+ """
1564
+
1565
+
1566
+ @register_command
1567
+ @dataclass
1568
+ class PL1_CWE_FEC_STATS_CLEAR:
1569
+ """
1570
+ .. versionadded:: 2.7
1571
+
1572
+ Clear FEC codeword injection TX stats
1573
+ """
1574
+
1575
+ code: typing.ClassVar[int] = 446
1576
+ pushed: typing.ClassVar[bool] = False
1577
+
1578
+ _connection: 'interfaces.IConnection'
1579
+ _module: int
1580
+ _port: int
1581
+
1582
+ class SetDataAttr(RequestBodyStruct):
1583
+ pass
1584
+
1585
+ def set(self) -> Token[None]:
1586
+ """Clear FEC codeword injection TX stats
1587
+ """
1588
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))