tdl-xoa-driver 1.0.0b1__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.0b1.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0b1.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0b1.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0b1.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0b1.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,2341 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ import typing
4
+ import functools
5
+
6
+ from xoa_driver.internals.core.builders import (
7
+ build_get_request,
8
+ build_set_request
9
+ )
10
+ from xoa_driver.internals.core import interfaces
11
+ from xoa_driver.internals.core.token import Token
12
+ from xoa_driver.internals.core.transporter.registry import register_command
13
+ from xoa_driver.internals.core.transporter.protocol.payload import (
14
+ field,
15
+ RequestBodyStruct,
16
+ ResponseBodyStruct,
17
+ XmpByte,
18
+ XmpHex,
19
+ XmpInt,
20
+ XmpLong,
21
+ XmpSequence,
22
+ XmpStr,
23
+ Hex,
24
+ )
25
+ from .enums import (
26
+ OnOff,
27
+ StartOrStop,
28
+ InjectErrorType,
29
+ HeaderLockStatus,
30
+ AlignLockStatus,
31
+ PRBSLockStatus,
32
+ SerdesStatus,
33
+ FECMode,
34
+ PRBSInsertedType,
35
+ PRBSPolynomial,
36
+ PRBSInvertState,
37
+ PRBSStatisticsMode,
38
+ AutoNegMode,
39
+ AutoNegTecAbility,
40
+ AutoNegFECOption,
41
+ PauseMode,
42
+ AutoNegFECType,
43
+ AutoNegStatus,
44
+ AutoNegFECStatus,
45
+ LinkTrainingMode,
46
+ PAM4FrameSize,
47
+ LinkTrainingInitCondition,
48
+ NRZPreset,
49
+ TimeoutMode,
50
+ LinkTrainingStatusMode,
51
+ LinkTrainingStatus,
52
+ LinkTrainingFailureType,
53
+ PRBSOnOff,
54
+ ErrorOnOff,
55
+ PRBSPattern,
56
+ PHYSignalStatus,
57
+ OnOffDefault,
58
+ RxEqExtCap,
59
+ RxEqExtCapMode,
60
+ PreCodingMode,
61
+ GrayCodingMode,
62
+ Endianness
63
+ )
64
+
65
+
66
+ @register_command
67
+ @dataclass
68
+ class PP_ALARMS_ERRORS:
69
+ """
70
+ Obtain the error count of each alarm, PCS Error, FEC Error, Header Error, Align
71
+ Error, BIP Error, and High BER Error.
72
+ """
73
+
74
+ code: typing.ClassVar[int] = 272
75
+ pushed: typing.ClassVar[bool] = False
76
+
77
+ _connection: 'interfaces.IConnection'
78
+ _module: int
79
+ _port: int
80
+
81
+ class GetDataAttr(ResponseBodyStruct):
82
+ total_alarms: int = field(XmpInt())
83
+ """integer, total number of triggered alarms"""
84
+ valid_mask: Hex = field(XmpHex(size=8))
85
+ """8 hex bytes, mask of valid alarms"""
86
+ los_error_count: int = field(XmpLong())
87
+ """long integer, number of no-sync alarms"""
88
+ total_pcs_error_count: int = field(XmpLong())
89
+ """long integer, number of errors of PCS error alarm"""
90
+ total_fec_error_count: int = field(XmpLong())
91
+ """long integer, number of errors of FEC error alarm"""
92
+ total_header_error_count: int = field(XmpLong())
93
+ """long integer, number of errors of header error alarm"""
94
+ total_align_error_count: int = field(XmpLong())
95
+ """long integer, number of errors of alignment error alarm"""
96
+ total_bip_error_count: int = field(XmpLong())
97
+ """long integer, number of errors of BIP error alarm"""
98
+ total_higher_error_count: int = field(XmpLong())
99
+ """long integer, number of errors of high BER error alarm"""
100
+
101
+ def get(self) -> Token[GetDataAttr]:
102
+ """Get the error count of each alarm, PCS Error, FEC Error, Header Error, Align Error, BIP Error, and High BER Error.
103
+
104
+ :return: the error count of each alarm, PCS Error, FEC Error, Header Error, Align Error, BIP Error, and High BER Error.
105
+ :rtype: PP_ALARMS_ERRORS.GetDataAttr
106
+ """
107
+
108
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
109
+
110
+
111
+ @register_command
112
+ @dataclass
113
+ class PP_TXLANECONFIG:
114
+ """
115
+ The virtual lane index and artificial skew for data transmitted on a specified
116
+ physical lane.
117
+ """
118
+
119
+ code: typing.ClassVar[int] = 280
120
+ pushed: typing.ClassVar[bool] = True
121
+
122
+ _connection: 'interfaces.IConnection'
123
+ _module: int
124
+ _port: int
125
+ _lane_xindex: int
126
+
127
+ class GetDataAttr(ResponseBodyStruct):
128
+ virt_lane_index: int = field(XmpInt())
129
+ """integer, virtual lane index."""
130
+ skew: int = field(XmpInt())
131
+ """integer, the inserted skew on the lane, in bit units."""
132
+
133
+ class SetDataAttr(RequestBodyStruct):
134
+ virt_lane_index: int = field(XmpInt())
135
+ """integer, virtual lane index."""
136
+ skew: int = field(XmpInt())
137
+ """integer, the inserted skew on the lane, in bit units."""
138
+
139
+ def get(self) -> Token[GetDataAttr]:
140
+ """Get the virtual lane index and artificial skew for data transmitted on a specified physical lane.
141
+
142
+ :return: virtual lane index, and the inserted skew on the lane, in bit units.
143
+ :rtype: PP_TXLANECONFIG.GetDataAttr
144
+ """
145
+
146
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._lane_xindex]))
147
+
148
+ def set(self, virt_lane_index: int, skew: int) -> Token[None]:
149
+ """Set the virtual lane index and artificial skew for data transmitted on a specified physical lane.
150
+
151
+ :param virt_lane_index: virtual lane index
152
+ :type virt_lane_index: int
153
+ :param skew: the inserted skew on the lane, in bit units
154
+ :type skew: int
155
+ """
156
+
157
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._lane_xindex], virt_lane_index=virt_lane_index, skew=skew))
158
+
159
+
160
+ @register_command
161
+ @dataclass
162
+ class PP_TXLANEINJECT:
163
+ """
164
+ Inject a particular kind of CAUI error into a specific physical lane.
165
+ """
166
+
167
+ code: typing.ClassVar[int] = 281
168
+ pushed: typing.ClassVar[bool] = False
169
+
170
+ _connection: 'interfaces.IConnection'
171
+ _module: int
172
+ _port: int
173
+ _lane_xindex: int
174
+
175
+ class SetDataAttr(RequestBodyStruct):
176
+ inject_error_type: InjectErrorType = field(XmpByte())
177
+ """coded byte, specifying what kind of error to inject."""
178
+
179
+ def set(self, inject_error_type: InjectErrorType) -> Token[None]:
180
+ """Inject a particular kind of CAUI error into a specific physical lane.
181
+
182
+ :param inject_error_type: specifying what kind of error to inject
183
+ :type inject_error_type: InjectErrorType
184
+ """
185
+
186
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._lane_xindex], inject_error_type=inject_error_type))
187
+
188
+ set_headererror = functools.partialmethod(set, InjectErrorType.HEADERERROR)
189
+ """Inject Header error into a specific physical lane.
190
+ """
191
+
192
+ set_alignerror = functools.partialmethod(set, InjectErrorType.ALIGNERROR)
193
+ """Inject Alignment error into a specific physical lane.
194
+ """
195
+
196
+ set_bip8error = functools.partialmethod(set, InjectErrorType.BIP8ERROR)
197
+ """Inject BIP8 error into a specific physical lane.
198
+ """
199
+
200
+
201
+ @register_command
202
+ @dataclass
203
+ class PP_TXPRBSCONFIG:
204
+ """
205
+ The PRBS configuration for a particular SerDes. When PRBS is enabled for any SerDes
206
+ then the overall link is compromised and drops out of sync.
207
+ """
208
+
209
+ code: typing.ClassVar[int] = 282
210
+ pushed: typing.ClassVar[bool] = True
211
+
212
+ _connection: 'interfaces.IConnection'
213
+ _module: int
214
+ _port: int
215
+ _serdes_xindex: int
216
+
217
+ class GetDataAttr(ResponseBodyStruct):
218
+ prbs_seed: int = field(XmpInt())
219
+ """integer, PRBS seed value."""
220
+ prbs_on_off: PRBSOnOff = field(XmpByte())
221
+ """code byte, whether this SerDes is transmitting PRBS data."""
222
+ error_on_off: ErrorOnOff = field(XmpByte())
223
+ """code byte, whether bit-level errors are injected into this SerDes."""
224
+
225
+ class SetDataAttr(RequestBodyStruct):
226
+ prbs_seed: int = field(XmpInt())
227
+ """integer, PRBS seed value."""
228
+ prbs_on_off: PRBSOnOff = field(XmpByte())
229
+ """code byte, whether this SerDes is transmitting PRBS data."""
230
+ error_on_off: ErrorOnOff = field(XmpByte())
231
+ """code byte, whether bit-level errors are injected into this SerDes."""
232
+
233
+ def get(self) -> Token[GetDataAttr]:
234
+ """Get the PRBS configuration for a particular SerDes. When PRBS is enabled for any SerDes
235
+ then the overall link is compromised and drops out of sync.
236
+
237
+ :return: the PRBS configuration for a particular SerDes
238
+ :rtype: PP_TXPRBSCONFIG.GetDataAttr
239
+ """
240
+
241
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
242
+
243
+ def set(self, prbs_seed: int, prbs_on_off: PRBSOnOff, error_on_off: ErrorOnOff) -> Token[None]:
244
+ """Set the PRBS configuration for a particular SerDes.
245
+
246
+ :param prbs_seed: not used, set to 0.
247
+ :type prbs_seed: int
248
+ :param prbs_on_off: whether this SerDes is transmitting PRBS data.
249
+ :type prbs_on_off: PRBSOnOff
250
+ :param error_on_off: whether bit-level errors are injected into this SerDes
251
+ :type error_on_off: ErrorOnOff
252
+ """
253
+
254
+ return Token(
255
+ self._connection,
256
+ build_set_request(
257
+ self,
258
+ module=self._module,
259
+ port=self._port,
260
+ indices=[self._serdes_xindex],
261
+ prbs_seed=prbs_seed,
262
+ prbs_on_off=prbs_on_off,
263
+ error_on_off=error_on_off
264
+ )
265
+ )
266
+
267
+
268
+ @register_command
269
+ @dataclass
270
+ class PP_TXERRORRATE:
271
+ """
272
+ The rate of continuous bit-level error injection. Errors are injected evenly
273
+ across the SerDes where injection is enabled.
274
+ """
275
+
276
+ code: typing.ClassVar[int] = 283
277
+ pushed: typing.ClassVar[bool] = False
278
+
279
+ _connection: 'interfaces.IConnection'
280
+ _module: int
281
+ _port: int
282
+
283
+ class GetDataAttr(ResponseBodyStruct):
284
+ rate: int = field(XmpLong())
285
+ """long integer, the number of bits between each error. 0, no error injection."""
286
+
287
+ class SetDataAttr(RequestBodyStruct):
288
+ rate: int = field(XmpLong())
289
+ """long integer, the number of bits between each error. 0, no error injection."""
290
+
291
+ def get(self) -> Token[GetDataAttr]:
292
+ """Get the rate of continuous bit-level error injection. Errors are injected evenly
293
+ across the SerDes where injection is enabled.
294
+
295
+ :return: the number of bits between each error. 0, no error injection
296
+ :rtype: PP_TXERRORRATE.GetDataAttr
297
+ """
298
+
299
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
300
+
301
+ def set(self, rate: int) -> Token[None]:
302
+ """Set the rate of continuous bit-level error injection. Errors are injected evenly
303
+ across the SerDes where injection is enabled.
304
+
305
+ :param rate: the number of bits between each error. 0, no error injection
306
+ :type rate: int
307
+ """
308
+
309
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, rate=rate))
310
+
311
+
312
+ @register_command
313
+ @dataclass
314
+ class PP_TXINJECTONE:
315
+ """
316
+ Inject a single bit-level error into the SerDes where injection has been enabled.
317
+ """
318
+
319
+ code: typing.ClassVar[int] = 284
320
+ pushed: typing.ClassVar[bool] = False
321
+
322
+ _connection: 'interfaces.IConnection'
323
+ _module: int
324
+ _port: int
325
+
326
+ class SetDataAttr(RequestBodyStruct):
327
+ pass
328
+
329
+ def set(self) -> Token[None]:
330
+ """Inject a single bit-level error into one of the SerDes where injection is
331
+ enabled.
332
+ """
333
+
334
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
335
+
336
+
337
+ @register_command
338
+ @dataclass
339
+ class PP_RXTOTALSTATS:
340
+ """
341
+ Provides FEC Total counters.
342
+ """
343
+
344
+ code: typing.ClassVar[int] = 270
345
+ pushed: typing.ClassVar[bool] = False
346
+
347
+ _connection: 'interfaces.IConnection'
348
+ _module: int
349
+ _port: int
350
+
351
+ class GetDataAttr(ResponseBodyStruct):
352
+ total_rx_bit_count: int = field(XmpLong())
353
+ """integer, total received bits"""
354
+
355
+ total_rx_codeword_count: int = field(XmpLong())
356
+ """integer, total received codewords"""
357
+
358
+ total_corrected_codeword_count: int = field(XmpLong())
359
+ """integer, total corrected codewords"""
360
+
361
+ total_uncorrectable_codeword_count: int = field(XmpLong())
362
+ """integer, total uncorrectable codewords"""
363
+
364
+ total_corrected_symbol_count: int = field(XmpLong())
365
+ """integer, total corrected symbol count."""
366
+
367
+ total_pre_fec_ber: int = field(XmpLong())
368
+ """integer, total pre-FEC BER estimate sent as "total_pre_fec_ber = received_bits / total_corfecerrs".
369
+ To get the real total pre-BER, calculate the inverse: 1/total_pre_fec_ber. If zero physical bit errors have been detected,
370
+ the negative value "-received_bits" is provided, which can be used to generate the "< BER" value.
371
+ """
372
+
373
+ total_post_fec_ber: int = field(XmpLong())
374
+ """integer, total post-FEC BER estimate sent as "total_post_fec_ber = received_bits / total_estimated_uncorrectable_errors".
375
+ To get the real total post-BER, calculate the inverse: 1/total_post_fec_ber. If zero physical bit errors have been detected,
376
+ the negative value "-received_bits" is provided, which can be used to generate the "< BER" value.
377
+ """
378
+
379
+ def get(self) -> Token[GetDataAttr]:
380
+ """Get FEC Total counters of the port
381
+
382
+ :return:
383
+ 1. Total RX bits
384
+
385
+ 2. Total codewords
386
+
387
+ 3. Corrected codewords
388
+
389
+ 4. Uncorrectable codewords
390
+
391
+ 5. Corrected symbols
392
+
393
+ 6. Pre-FEC BER estimate, sent as "total_pre_fec_ber = received_bits / total_corfecerrs".
394
+ To get the real total pre-BER, calculate the inverse: 1/total_pre_fec_ber.
395
+ If zero physical bit errors have been detected, the negative value "-received_bits" is provided, which can be used to generate the "< BER" value.
396
+
397
+ 7. Post-FEC BER estimate sent as "total_post_fec_ber = received_bits / total_estimated_uncorrectable_errors".
398
+ To get the real total post-BER, calculate the inverse: 1/total_post_fec_ber.
399
+ If zero physical bit errors have been detected, the negative value "-received_bits" is provided, which can be used to generate the "< BER" value.
400
+
401
+ :rtype: PP_RXTOTALSTATS.GetDataAttr
402
+ """
403
+
404
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
405
+
406
+
407
+ @register_command
408
+ @dataclass
409
+ class PP_RXFECSTATS:
410
+ """
411
+ Provides statistics on how many FEC blocks have been seen with a given number of symbol errors.
412
+ """
413
+
414
+ code: typing.ClassVar[int] = 286
415
+ pushed: typing.ClassVar[bool] = False
416
+
417
+ _connection: 'interfaces.IConnection'
418
+ _module: int
419
+ _port: int
420
+
421
+ class GetDataAttr(ResponseBodyStruct):
422
+ stats_type: int = field(XmpLong())
423
+ """long integer, currently always 0."""
424
+ data_count: int = field(XmpLong())
425
+ """long integer, number of values."""
426
+ stats: typing.List[int] = field(XmpSequence(types_chunk=[XmpLong()]))
427
+ """list of long integers, array of length value_count. The stats array shows how many FEC blocks have been seen with [0, 1, 2, 3....15, >15] symbol errors and the last one is the sum of FEC blocks with <=n symbol errors"""
428
+ # sum_of_zero_and_correctable_fec_block: int = field(XmpLong())
429
+ # """long integer, the sum of FEC blocks with <=n symbol errors."""
430
+
431
+ def get(self) -> Token[GetDataAttr]:
432
+ """Get statistics on how many FEC blocks have been seen with a given number of symbol errors.
433
+
434
+ :return: stats type (currently always 0), number of values, correction stats array, and the number of received uncorrectable code words.
435
+
436
+ :rtype: PP_RXFECSTATS.GetDataAttr
437
+ """
438
+
439
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
440
+
441
+
442
+ @register_command
443
+ @dataclass
444
+ class PP_LINKFLAP_PARAMS:
445
+ """
446
+ Set port 'link flap' parameters. Notice: Period must be larger than duration.
447
+ """
448
+
449
+ code: typing.ClassVar[int] = 287
450
+ pushed: typing.ClassVar[bool] = False
451
+
452
+ _connection: 'interfaces.IConnection'
453
+ _module: int
454
+ _port: int
455
+
456
+ class GetDataAttr(ResponseBodyStruct):
457
+ duration: int = field(XmpInt())
458
+ """integer, 0 ms - 1000 ms; increments of 1 ms; 0 = permanently link down."""
459
+ period: int = field(XmpInt())
460
+ """integer, 10 ms - 50000 ms; number of ms - must be multiple of 10 ms."""
461
+ repetition: int = field(XmpInt())
462
+ """integer, 1 - 64K; 0 = continuous."""
463
+
464
+ class SetDataAttr(RequestBodyStruct):
465
+ duration: int = field(XmpInt())
466
+ """integer, 0 ms - 1000 ms; increments of 1 ms; 0 = permanently link down."""
467
+ period: int = field(XmpInt())
468
+ """integer, 10 ms - 50000 ms; number of ms - must be multiple of 10 ms."""
469
+ repetition: int = field(XmpInt())
470
+ """integer, 1 - 64K; 0 = continuous."""
471
+
472
+ def get(self) -> Token[GetDataAttr]:
473
+ """Get port 'link flap' settings.
474
+
475
+ :return: duration, period, and repetition of link flapping.
476
+ :rtype: PP_LINKFLAP_PARAMS.GetDataAttr
477
+ """
478
+
479
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
480
+
481
+ def set(self, duration: int, period: int, repetition: int) -> Token[None]:
482
+ """Set port 'link flap' settings. Notice: Period must be larger than duration.
483
+
484
+ :param duration: 0 ms - 1000 ms; increments of 1 ms; 0 = permanently link down.
485
+ :type duration: int
486
+ :param period: 10 ms - 50000 ms; number of ms - must be multiple of 10 ms.
487
+ :type period: int
488
+ :param repetition: 1 - 64K; 0 = continuous.
489
+ :type repetition: int
490
+ """
491
+
492
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, duration=duration, period=period, repetition=repetition))
493
+
494
+
495
+ @register_command
496
+ @dataclass
497
+ class PP_LINKFLAP_ENABLE:
498
+ """
499
+ Enable / disable port 'link flap'.
500
+ """
501
+
502
+ code: typing.ClassVar[int] = 288
503
+ pushed: typing.ClassVar[bool] = False
504
+
505
+ _connection: 'interfaces.IConnection'
506
+ _module: int
507
+ _port: int
508
+
509
+ class GetDataAttr(ResponseBodyStruct):
510
+ on_off: OnOff = field(XmpByte())
511
+ """coded byte, whether link flap is enabled."""
512
+
513
+ class SetDataAttr(RequestBodyStruct):
514
+ on_off: OnOff = field(XmpByte())
515
+ """coded byte, whether link flap is enabled."""
516
+
517
+ def get(self) -> Token[GetDataAttr]:
518
+ """Get the port 'link flap' status of the port.
519
+
520
+ :return: whether link flap is enabled
521
+ :rtype: PP_LINKFLAP_ENABLE.GetDataAttr
522
+ """
523
+
524
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
525
+
526
+ def set(self, on_off: OnOff) -> Token[None]:
527
+ """Set the port 'link flap' status of the port.
528
+
529
+ :param on_off: whether link flap is enabled
530
+ :type on_off: OnOff
531
+ """
532
+
533
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, on_off=on_off))
534
+
535
+ set_off = functools.partialmethod(set, OnOff.OFF)
536
+ """Disable the port 'link flap'.
537
+ """
538
+
539
+ set_on = functools.partialmethod(set, OnOff.ON)
540
+ """Enable the port 'link flap'.
541
+ """
542
+
543
+
544
+ @register_command
545
+ @dataclass
546
+ class PP_PMAERRPUL_PARAMS:
547
+ """
548
+ The 'PMA pulse error inject'.
549
+
550
+ .. note::
551
+
552
+ Period must be > duration. BER will be: coeff * 10exp
553
+ """
554
+
555
+ code: typing.ClassVar[int] = 289
556
+ pushed: typing.ClassVar[bool] = False
557
+
558
+ _connection: 'interfaces.IConnection'
559
+ _module: int
560
+ _port: int
561
+
562
+ class GetDataAttr(ResponseBodyStruct):
563
+ duration: int = field(XmpInt())
564
+ """integer, 0 ms - 5000m s; increments of 1 ms; 0 = constant BER"""
565
+ period: int = field(XmpInt())
566
+ """integer, 10 ms - 50000 ms; number of ms - must be multiple of 10 ms"""
567
+ repetition: int = field(XmpInt())
568
+ """integer, 1 - 64K; 0 = continuous"""
569
+ coeff: int = field(XmpInt())
570
+ """long integer, (0.01 < coeff < 9.99) * 100"""
571
+ exp: int = field(XmpInt(climb=(-16, -4)))
572
+ """integer, -3 < exp < -17"""
573
+
574
+ class SetDataAttr(RequestBodyStruct):
575
+ duration: int = field(XmpInt())
576
+ """integer, 0 ms - 5000m s; increments of 1 ms; 0 = constant BER"""
577
+ period: int = field(XmpInt())
578
+ """integer, 10 ms - 50000 ms; number of ms - must be multiple of 10 ms"""
579
+ repetition: int = field(XmpInt())
580
+ """integer, 1 - 64K; 0 = continuous"""
581
+ coeff: int = field(XmpInt())
582
+ """long integer, (0.01 < coeff < 9.99) * 100"""
583
+ exp: int = field(XmpInt(climb=(-16, -4)))
584
+ """integer, -3 < exp < -17"""
585
+
586
+ def get(self) -> Token[GetDataAttr]:
587
+ """Get PMA pulse error injection settings.
588
+
589
+ :return: PMA pulse error injection settings
590
+ :rtype: PP_PMAERRPUL_PARAMS.GetDataAttr
591
+ """
592
+
593
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
594
+
595
+ def set(self, duration: int, period: int, repetition: int, coeff: int, exp: int) -> Token[None]:
596
+ """Set PMA pulse error injection settings.
597
+
598
+ :param duration: 0 ms - 5000m s; increments of 1 ms; 0 = constant BER
599
+ :type duration: int
600
+ :param period: 10 ms - 50000 ms; number of ms - must be multiple of 10 ms
601
+ :type period: int
602
+ :param repetition: 1 - 64K; 0 = continuous
603
+ :type repetition: int
604
+ :param coeff: (0.01 < coeff < 9.99) * 100
605
+ :type coeff: int
606
+ :param exp: -3 < exp < -17
607
+ :type exp: int
608
+ """
609
+
610
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, duration=duration, period=period, repetition=repetition, coeff=coeff, exp=exp))
611
+
612
+
613
+ @register_command
614
+ @dataclass
615
+ class PP_RXLANELOCK:
616
+ """
617
+ Whether the receiver has achieved header lock and alignment lock on the data
618
+ received on a specified physical lane.
619
+ """
620
+
621
+ code: typing.ClassVar[int] = 290
622
+ pushed: typing.ClassVar[bool] = False
623
+
624
+ _connection: 'interfaces.IConnection'
625
+ _module: int
626
+ _port: int
627
+ _lane_xindex: int
628
+
629
+ class GetDataAttr(ResponseBodyStruct):
630
+ header_lock: HeaderLockStatus = field(XmpByte())
631
+ """coded byte, whether this lane has achieved header lock."""
632
+ align_lock: AlignLockStatus = field(XmpByte())
633
+ """coded byte, whether this lane has achieved alignment lock."""
634
+
635
+ def get(self) -> Token[GetDataAttr]:
636
+ """Get whether the receiver has achieved header lock and alignment lock on the data
637
+ received on a specified physical lane.
638
+
639
+ :return: whether this lane has achieved header lock, and whether this lane has achieved alignment lock.
640
+ :rtype: PP_RXLANELOCK.GetDataAttr
641
+ """
642
+
643
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._lane_xindex]))
644
+
645
+
646
+ @register_command
647
+ @dataclass
648
+ class PP_RXLANESTATUS:
649
+ """
650
+ The virtual lane index and actual skew for data received on a specified physical
651
+ lane. This is only meaningful when the lane is in header lock and alignment
652
+ lock.
653
+ """
654
+
655
+ code: typing.ClassVar[int] = 291
656
+ pushed: typing.ClassVar[bool] = False
657
+
658
+ _connection: 'interfaces.IConnection'
659
+ _module: int
660
+ _port: int
661
+ _lane_xindex: int
662
+
663
+ class GetDataAttr(ResponseBodyStruct):
664
+ virtual_lane: int = field(XmpInt())
665
+ """integer, the logical lane number."""
666
+ skew: int = field(XmpInt())
667
+ """integer, the measured skew on the lane, in bit units."""
668
+
669
+ def get(self) -> Token[GetDataAttr]:
670
+ """Get the virtual lane index and actual skew for data received on a specified physical lane.
671
+
672
+ :return: the virtual lane index and actual skew for data received on a specified physical lane
673
+ :rtype: PP_RXLANESTATUS.GetDataAttr
674
+ """
675
+
676
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._lane_xindex]))
677
+
678
+
679
+ @register_command
680
+ @dataclass
681
+ class PP_RXLANEERRORS:
682
+ """
683
+ Statistics about errors detected at the physical coding sub-layer on the data
684
+ received on a specified physical lane.
685
+ """
686
+
687
+ code: typing.ClassVar[int] = 271
688
+ pushed: typing.ClassVar[bool] = False
689
+
690
+ _connection: 'interfaces.IConnection'
691
+ _module: int
692
+ _port: int
693
+ _lane_xindex: int
694
+
695
+ class GetDataAttr(ResponseBodyStruct):
696
+ header_error_count: int = field(XmpLong())
697
+ """long integer, the number of header errors."""
698
+ alignment_error_count: int = field(XmpLong())
699
+ """long integer, the number of alignment errors."""
700
+ bip8_error_count: int = field(XmpLong())
701
+ """long integer, the number of bip8 errors."""
702
+ corrected_fec_error_count: int = field(XmpLong())
703
+ """long integer, corrected FEC bit errors."""
704
+ pre_ber: int = field(XmpLong())
705
+ """long integer, received_bits / corfecerrs. To get the pre_ber, calculate the inverse: 1/pre_ber.
706
+ If zero bit errors have been received, the negative value "-received_bits" is provided, which can be used to generate the "< BER" value.
707
+ """
708
+
709
+ def get(self) -> Token[GetDataAttr]:
710
+ """Get statistics about errors detected at the physical coding sub-layer on the data
711
+ received on a specified physical lane.
712
+
713
+ :return: the number of header errors, the number of alignment errors, the number of bip8 errors, and corrected FEC bit errors
714
+ :rtype: PP_RXLANEERRORS.GetDataAttr
715
+ """
716
+
717
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._lane_xindex]))
718
+
719
+
720
+ @register_command
721
+ @dataclass
722
+ class PP_RXPRBSSTATUS:
723
+ """
724
+ Statistics about PRBS pattern detection on the data received on a specified
725
+ SerDes.
726
+ """
727
+
728
+ code: typing.ClassVar[int] = 293
729
+ pushed: typing.ClassVar[bool] = False
730
+
731
+ _connection: 'interfaces.IConnection'
732
+ _module: int
733
+ _port: int
734
+ _serdes_xindex: int
735
+
736
+ class GetDataAttr(ResponseBodyStruct):
737
+ byte_count: int = field(XmpLong())
738
+ """long integer, the number of bytes received while in PRBS lock."""
739
+ error_count: int = field(XmpLong())
740
+ """long integer, the number of errors detected while in PRBS lock."""
741
+ lock: PRBSLockStatus = field(XmpByte())
742
+ """coded byte, whether this lane is in PRBS lock."""
743
+
744
+ def get(self) -> Token[GetDataAttr]:
745
+ """Get the statistics about PRBS pattern detection on the data received on a specified
746
+ SerDes.
747
+
748
+ :return: the number of bytes received while in PRBS lock, the number of errors detected while in PRBS lock, and whether this SerDes is in PRBS lock.
749
+ :rtype: PP_RXPRBSSTATUS.GetDataAttr
750
+ """
751
+
752
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
753
+
754
+
755
+ @register_command
756
+ @dataclass
757
+ class PP_RXCLEAR:
758
+ """
759
+ Clear all the PCS/PMA receiver statistics for a port.
760
+ """
761
+
762
+ code: typing.ClassVar[int] = 294
763
+ pushed: typing.ClassVar[bool] = False
764
+
765
+ _connection: 'interfaces.IConnection'
766
+ _module: int
767
+ _port: int
768
+
769
+ class SetDataAttr(RequestBodyStruct):
770
+ pass
771
+
772
+ def set(self) -> Token[None]:
773
+ """Clear all the PCS/PMA receiver statistics for a port.
774
+ """
775
+
776
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
777
+
778
+
779
+ @register_command
780
+ @dataclass
781
+ class PP_RXLASERPOWER:
782
+ """
783
+ Reading of the optical power level of the received signal. There is one value
784
+ for each laser/wavelength, and the number of these depends on the kind of CFP
785
+ transceiver used. The list is empty if the CFP transceiver does not support
786
+ optical power read-out.
787
+ """
788
+
789
+ code: typing.ClassVar[int] = 295
790
+ pushed: typing.ClassVar[bool] = False
791
+
792
+ _connection: 'interfaces.IConnection'
793
+ _module: int
794
+ _port: int
795
+
796
+ class GetDataAttr(ResponseBodyStruct):
797
+ nanowatts: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
798
+ """list of integers, received signal level, in nanowatts. 0, when no signal."""
799
+
800
+ def get(self) -> Token[GetDataAttr]:
801
+ """Get the readings of the optical power level of the received signal.
802
+
803
+ :return: received signal level, in nanowatts. 0, when no signal.
804
+ :rtype: PP_RXLASERPOWER.GetDataAttr
805
+ """
806
+
807
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
808
+
809
+
810
+ @register_command
811
+ @dataclass
812
+ class PP_TXLASERPOWER:
813
+ """
814
+ Reading of the optical power level of the transmission signal. There is one
815
+ value for each laser/wavelength, and the number of these depends on the kind of CFP transceiver used. The list is empty if the CFP transceiver does not support optical power read-out.
816
+ """
817
+
818
+ code: typing.ClassVar[int] = 296
819
+ pushed: typing.ClassVar[bool] = False
820
+
821
+ _connection: 'interfaces.IConnection'
822
+ _module: int
823
+ _port: int
824
+
825
+ class GetDataAttr(ResponseBodyStruct):
826
+ nanowatts: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
827
+ """list of integers, received signal level, in nanowatts. 0, when no signal."""
828
+
829
+ def get(self) -> Token[GetDataAttr]:
830
+ """Get the reading of the optical power level of the transmission signal.
831
+
832
+ :return: received signal level, in nanowatts. 0, when no signal.
833
+ :rtype: PP_TXLASERPOWER.GetDataAttr
834
+ """
835
+
836
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
837
+
838
+
839
+ @register_command
840
+ @dataclass
841
+ class PP_PMAERRPUL_ENABLE:
842
+ """
843
+ Enable / disable 'PMA pulse error inject'.
844
+ """
845
+
846
+ code: typing.ClassVar[int] = 300
847
+ pushed: typing.ClassVar[bool] = False
848
+
849
+ _connection: 'interfaces.IConnection'
850
+ _module: int
851
+ _port: int
852
+
853
+ class GetDataAttr(ResponseBodyStruct):
854
+ on_off: OnOff = field(XmpByte())
855
+ """coded byte, whether PMA pulse error inject is enabled."""
856
+
857
+ class SetDataAttr(RequestBodyStruct):
858
+ on_off: OnOff = field(XmpByte())
859
+ """coded byte, whether PMA pulse error inject is enabled."""
860
+
861
+ def get(self) -> Token[GetDataAttr]:
862
+ """Get the status of 'PMA pulse error inject'.
863
+
864
+ :return: whether PMA pulse error inject is enabled
865
+ :rtype: PP_PMAERRPUL_ENABLE.GetDataAttr
866
+ """
867
+
868
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
869
+
870
+ def set(self, on_off: OnOff) -> Token[None]:
871
+ """Set the status of 'PMA pulse error inject'.
872
+
873
+ :param on_off: whether PMA pulse error inject is enabled
874
+ :type on_off: OnOff
875
+ """
876
+
877
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, on_off=on_off))
878
+
879
+ set_off = functools.partialmethod(set, OnOff.OFF)
880
+ """Disable 'PMA pulse error inject'.
881
+ """
882
+
883
+ set_on = functools.partialmethod(set, OnOff.ON)
884
+ """Enable 'PMA pulse error inject'.
885
+ """
886
+
887
+
888
+ @register_command
889
+ @dataclass
890
+ class PP_EYEMEASURE:
891
+ """
892
+ Start/stop a new BER eye-measure on a 25G serdes. Use "get" to see the status of
893
+ the data gathering process.
894
+ """
895
+
896
+ code: typing.ClassVar[int] = 353
897
+ pushed: typing.ClassVar[bool] = False
898
+
899
+ _connection: 'interfaces.IConnection'
900
+ _module: int
901
+ _port: int
902
+ _serdes_xindex: int
903
+
904
+ class GetDataAttr(ResponseBodyStruct):
905
+ status: SerdesStatus = field(XmpByte())
906
+ """coded byte, status of the serdes."""
907
+ dummy: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
908
+ """list of bytes, should always be 0, reserved for future expansion."""
909
+
910
+ class SetDataAttr(RequestBodyStruct):
911
+ status: StartOrStop = field(XmpByte())
912
+ """coded byte, status of the serdes."""
913
+ dummy: typing.List[int] = field(XmpSequence(types_chunk=[XmpByte()]))
914
+ """list of bytes, should always be 0, reserved for future expansion."""
915
+
916
+ def get(self) -> Token[GetDataAttr]:
917
+ """Get the status of the BER eye-measure data gathering process.
918
+
919
+ :return: status of the serdes
920
+ :rtype: PP_EYEMEASURE.GetDataAttr
921
+ """
922
+
923
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
924
+
925
+ def set(self, status: StartOrStop) -> Token[None]:
926
+ """Start/stop a new BER eye-measure on a 25G serdes.
927
+
928
+ :param status: status of the serdes
929
+ :type status: StartOrStop
930
+ """
931
+
932
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], status=status, dummy=[]))
933
+
934
+ set_stop = functools.partialmethod(set, StartOrStop.STOP)
935
+ """Start a new BER eye-measure on a 25G serdes.
936
+ """
937
+
938
+ set_start = functools.partialmethod(set, StartOrStop.START)
939
+ """Stop a new BER eye-measure on a 25G serdes.
940
+ """
941
+
942
+
943
+ @register_command
944
+ @dataclass
945
+ class PP_EYERESOLUTION:
946
+ """
947
+ Set or get the resolution used for the next BER eye-measurement.
948
+ """
949
+
950
+ code: typing.ClassVar[int] = 354
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
+ x_resolution: int = field(XmpInt())
960
+ """integer, number of columns, must be between 9 and 65 and be in the form 2^n+1"""
961
+ y_resolution: int = field(XmpInt())
962
+ """integer, number of columns, must be between 7 and 255 and be in the form 2^n-1"""
963
+
964
+ class SetDataAttr(RequestBodyStruct):
965
+ x_resolution: int = field(XmpInt())
966
+ """integer, number of columns, must be between 9 and 65 and be in the form 2^n+1"""
967
+ y_resolution: int = field(XmpInt())
968
+ """integer, number of columns, must be between 7 and 255 and be in the form 2^n-1"""
969
+
970
+ def get(self) -> Token[GetDataAttr]:
971
+ """Get the resolution used for the next BER eye-measurement.
972
+
973
+ :return: x resolution and y resolution
974
+ :rtype: PP_EYERESOLUTION.GetDataAttr
975
+ """
976
+
977
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
978
+
979
+ def set(self, x_resolution: int, y_resolution: int) -> Token[None]:
980
+ """Set the resolution used for the next BER eye-measurement.
981
+
982
+ :param x_resolution: number of columns, must be between 9 and 65 and be in the form 2^n+1
983
+ :type x_resolution: int
984
+ :param y_resolution: number of columns, must be between 7 and 255 and be in the form 2^n-1
985
+ :type y_resolution: int
986
+ """
987
+
988
+ return Token(
989
+ self._connection,
990
+ build_set_request(
991
+ self,
992
+ module=self._module,
993
+ port=self._port,
994
+ indices=[self._serdes_xindex],
995
+ x_resolution=x_resolution,
996
+ y_resolution=y_resolution
997
+ )
998
+ )
999
+
1000
+
1001
+ @register_command
1002
+ @dataclass
1003
+ class PP_EYEREAD:
1004
+ """
1005
+ Read a single column of a measured BER eye on a 25G serdes. Every readout also
1006
+ returns the resolution (x,y) and the number of valid columns (used to facilitate
1007
+ reading out the eye while it is being measured). Note that the columns of the
1008
+ eye-data will be measured in the order: xres-1, xres-2, xres-3, ... 0. The
1009
+ values show the number of bit errors measured out of a total of 1M bits at each
1010
+ of the individual sampling points (x=timeaxis, y = 0/1 threshold).
1011
+ """
1012
+
1013
+ code: typing.ClassVar[int] = 355
1014
+ pushed: typing.ClassVar[bool] = False
1015
+
1016
+ _connection: 'interfaces.IConnection'
1017
+ _module: int
1018
+ _port: int
1019
+ _serdes_xindex: int
1020
+ _colum_xindex: int
1021
+
1022
+ class GetDataAttr(ResponseBodyStruct):
1023
+ x_resolution: int = field(XmpInt())
1024
+ """integer, specifying X resolution."""
1025
+ y_resolution: int = field(XmpInt())
1026
+ """integer, specifying Y resolution."""
1027
+ valid_column_count: int = field(XmpInt())
1028
+ """integer, specifying the number of valid columns."""
1029
+ values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
1030
+ """list of integers, showing the number of bit errors measured out of a total of 1M bits at each of the individual sampling points (x=timeaxis, y = 0/1 threshold)."""
1031
+
1032
+ def get(self) -> Token[GetDataAttr]:
1033
+ """Read a single column of a measured BER eye on a 25G serdes.
1034
+
1035
+ :return: x resolution, y resolution, number of valid columns, and the number of bit errors measured out of a total of 1M bits
1036
+ at each of the individual sampling points (x=timeaxis, y = 0/1 threshold).
1037
+ :rtype: PP_EYEREAD.GetDataAttr
1038
+ """
1039
+
1040
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._colum_xindex]))
1041
+
1042
+
1043
+ @register_command
1044
+ @dataclass
1045
+ class PP_EYEINFO:
1046
+ """
1047
+ Read out BER eye-measurement information such as the vertical and horizontal
1048
+ bathtub curve information on a 25G serdes. This must be called after "PP_EYEMEASURE"
1049
+ has run to return valid results. Use "get" to see the status of the data
1050
+ gathering process.
1051
+
1052
+ """
1053
+
1054
+ code: typing.ClassVar[int] = 356
1055
+ pushed: typing.ClassVar[bool] = False
1056
+
1057
+ _connection: 'interfaces.IConnection'
1058
+ _module: int
1059
+ _port: int
1060
+ _serdes_xindex: int
1061
+
1062
+ class GetDataAttr(ResponseBodyStruct):
1063
+ width_mui: int = field(XmpInt())
1064
+ """integer, value and unit 0..1000 (mUI), group = Horizontal bathtub curve"""
1065
+ height_mv: int = field(XmpInt())
1066
+ """integer, value and unit 0..1000 (mV), group = Vertical bathtub curve"""
1067
+ h_slope_left: int = field(XmpInt())
1068
+ """integer, value and unit (Q/UI) x100, signed integer, group = Horizontal bathtub curve"""
1069
+ h_slope_right: int = field(XmpInt())
1070
+ """integer, value and unit (Q/UI) x100, signed integer, group = Horizontal bathtub curve"""
1071
+ y_intercept_left: int = field(XmpInt())
1072
+ """integer, value and unit (Q) x100, signed integer, group = Horizontal bathtub curve"""
1073
+ y_intercept_right: int = field(XmpInt())
1074
+ """integer, value and unit (Q) x100, signed integer, group = Horizontal bathtub curve"""
1075
+ r_squared_fit_left: int = field(XmpInt())
1076
+ """integer, value and unit Int x100, group = Horizontal bathtub curve"""
1077
+ r_squared_fit_right: int = field(XmpInt())
1078
+ """integer, value and unit Int x100, group = Horizontal bathtub curve"""
1079
+ est_rj_rms_left: int = field(XmpInt())
1080
+ """integer, value and unit (mUI) x1000, group = Horizontal bathtub curve"""
1081
+ est_rj_rms_right: int = field(XmpInt())
1082
+ """integer, value and unit (mUI) x1000, group = Horizontal bathtub curve"""
1083
+ est_dj_pp: int = field(XmpInt())
1084
+ """integer, value and unit (mUI) x1000, group = Horizontal bathtub curve"""
1085
+ v_slope_bottom: int = field(XmpInt())
1086
+ """integer, value and unit (mV/Q) x100, signed integer, group = Vertical bathtub curve"""
1087
+ v_slope_top: int = field(XmpInt())
1088
+ """integer, value and unit (mV/Q) x100, signed integer, group = Vertical bathtub curve"""
1089
+ x_intercept_bottom: int = field(XmpInt())
1090
+ """integer, value and unit (Q) x100), signed integer, group = Vertical bathtub curve"""
1091
+ x_intercept_top: int = field(XmpInt())
1092
+ """integer, value and unit (Q) x100, signed integer, group = Vertical bathtub curve"""
1093
+ r_squared_fit_bottom: int = field(XmpInt())
1094
+ """integer, value and unit Int x100, group = Vertical bathtub curve"""
1095
+ r_squared_fit_top: int = field(XmpInt())
1096
+ """integer, value and unit Int x100, group = Vertical bathtub curve"""
1097
+ est_rj_rms_bottom: int = field(XmpInt())
1098
+ """integer, value and unit (mV) x1000, group = Vertical bathtub curve"""
1099
+ est_rj_rms_top: int = field(XmpInt())
1100
+ """integer, value and unit (mV) x1000, group = Vertical bathtub curve"""
1101
+
1102
+ def get(self) -> Token[GetDataAttr]:
1103
+ """Read out BER eye-measurement information such as the vertical and horizontal
1104
+ bathtub curve information on a 25G serdes. This must be called after "PP_EYEMEASURE"
1105
+ has run to return valid results. Use "get" to see the status of the data
1106
+ gathering process.
1107
+
1108
+ :return: BER eye-measurement information such as the vertical and horizontal bathtub curve information on a 25G serdes
1109
+ :rtype: PP_EYEINFO.GetDataAttr
1110
+ """
1111
+
1112
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1113
+
1114
+
1115
+ @register_command
1116
+ @dataclass
1117
+ class PP_PHYTXEQ:
1118
+ """
1119
+ Control and monitor the equalizer settings of the on-board PHY in the
1120
+ transmission direction (towards the transceiver cage) on Thor and Loki modules.
1121
+
1122
+ .. versionchanged:: 1.1
1123
+
1124
+ """
1125
+
1126
+ code: typing.ClassVar[int] = 358
1127
+ pushed: typing.ClassVar[bool] = True
1128
+
1129
+ _connection: 'interfaces.IConnection'
1130
+ _module: int
1131
+ _port: int
1132
+ _serdes_xindex: int
1133
+
1134
+ class GetDataAttr(ResponseBodyStruct):
1135
+ pre: int = field(XmpInt())
1136
+ """integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
1137
+ main: int = field(XmpInt())
1138
+ """integer, amplification, (range: Module dependent), default = 0 (neutral)."""
1139
+ post: int = field(XmpInt())
1140
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1141
+ pre2: int = field(XmpInt())
1142
+ """integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
1143
+ pre3_post2: int = field(XmpInt())
1144
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1145
+ post3: int = field(XmpInt())
1146
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1147
+ mode: int = field(XmpInt())
1148
+ """integer, value must be 4"""
1149
+
1150
+ class SetDataAttr(RequestBodyStruct):
1151
+ pre: int = field(XmpInt())
1152
+ """integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
1153
+ main: int = field(XmpInt())
1154
+ """integer, amplification, (range: Module dependent), default = 0 (neutral)."""
1155
+ post: int = field(XmpInt())
1156
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1157
+ pre2: int = field(XmpInt())
1158
+ """integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
1159
+ pre3_post2: int = field(XmpInt())
1160
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1161
+ post3: int = field(XmpInt())
1162
+ """integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
1163
+ mode: int = field(XmpInt())
1164
+ """integer, value must be 4"""
1165
+
1166
+ def get(self) -> Token[GetDataAttr]:
1167
+ """Get the equalizer settings of the on-board PHY in the
1168
+ transmission direction (towards the transceiver cage) on Thor and Loki modules.
1169
+
1170
+ :return: preemphasis, (range: Module dependent), default = 0 (neutral).
1171
+ :rtype: PP_PHYTXEQ.GetDataAttr
1172
+ """
1173
+
1174
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1175
+
1176
+ def set(self, pre2: int, pre: int, main: int, post: int, pre3_post2: int, post3: int) -> Token[None]:
1177
+ """Set the equalizer settings of the on-board PHY in the
1178
+ transmission direction (towards the transceiver cage) on Thor and Loki modules.
1179
+
1180
+ :param pre2: pre2 emphasis
1181
+ :type pre2: int
1182
+ :param pre: pre emphasis
1183
+ :type pre: int
1184
+ :param main: main emphasis
1185
+ :type main: int
1186
+ :param post: post emphasis
1187
+ :type post: int
1188
+ :param pre3_post2: post2 or pre3 emphasis
1189
+ :type pre3_post2: int
1190
+ :param post3: post3 emphasis
1191
+ :type post3: int
1192
+ """
1193
+
1194
+ return Token(
1195
+ self._connection,
1196
+ build_set_request(
1197
+ self,
1198
+ module=self._module,
1199
+ port=self._port,
1200
+ indices=[self._serdes_xindex],
1201
+ pre2=pre2,
1202
+ pre=pre,
1203
+ main=main,
1204
+ post=post,
1205
+ pre3_post2=pre3_post2,
1206
+ post3=post3,
1207
+ mode=4))
1208
+
1209
+
1210
+ @register_command
1211
+ @dataclass
1212
+ class PP_PHYRETUNE:
1213
+ """
1214
+ Trigger a new retuning of the receive equalizer on the PHY for one of the 25G
1215
+ serdes. Useful if e.g. a direct attached copper cable or loop transceiver does
1216
+ not go into sync after insertion. Note that the retuning will cause disruption
1217
+ of the traffic on all serdes.
1218
+ """
1219
+
1220
+ code: typing.ClassVar[int] = 359
1221
+ pushed: typing.ClassVar[bool] = False
1222
+
1223
+ _connection: 'interfaces.IConnection'
1224
+ _module: int
1225
+ _port: int
1226
+ _serdes_xindex: int
1227
+
1228
+ class SetDataAttr(RequestBodyStruct):
1229
+ dummy: int = field(XmpByte())
1230
+ """byte, reserved for future improvements, always set to 1"""
1231
+
1232
+ def set(self, dummy: int) -> Token[None]:
1233
+ """Trigger a new retuning of the receive equalizer on the PHY for one of the 25G
1234
+ serdes.
1235
+
1236
+ :param dummy: reserved for future improvements, always set to 1
1237
+ :type dummy: int
1238
+ """
1239
+
1240
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], dummy=dummy))
1241
+
1242
+
1243
+ @register_command
1244
+ @dataclass
1245
+ class PP_PHYAUTOTUNE:
1246
+ """
1247
+ Enable or disable the automatic receiving of PHY retuning (see PP_PHYRETUNE), which
1248
+ is performed on the 25G interfaces as soon as a signal is detected by the
1249
+ transceiver. Useful if a bad signal causes the PHY to continuously retune or if
1250
+ for some other reason it is preferable to use manual retuning (PP_PHYRETUNE).
1251
+ """
1252
+
1253
+ code: typing.ClassVar[int] = 360
1254
+ pushed: typing.ClassVar[bool] = False
1255
+
1256
+ _connection: 'interfaces.IConnection'
1257
+ _module: int
1258
+ _port: int
1259
+ _serdes_xindex: int
1260
+
1261
+ class GetDataAttr(ResponseBodyStruct):
1262
+ on_off: int = field(XmpByte())
1263
+ """coded byte, enable/disable automatic receiving PHY retuning. Default is enabled."""
1264
+
1265
+ class SetDataAttr(RequestBodyStruct):
1266
+ on_off: int = field(XmpByte())
1267
+ """coded byte, enable/disable automatic receiving PHY retuning. Default is enabled."""
1268
+
1269
+ def get(self) -> Token[GetDataAttr]:
1270
+ """Get whether the auto PHY retuning is enabled.
1271
+
1272
+ :return: enable/disable automatic receiving PHY retuning
1273
+ :rtype: PP_PHYAUTOTUNE.GetDataAttr
1274
+ """
1275
+
1276
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1277
+
1278
+ def set(self, on_off: OnOff) -> Token[None]:
1279
+ """Enable/disable automatic receiving PHY retuning. Default is enabled.
1280
+
1281
+ :param on_off: Enable/disable automatic receiving PHY retuning. Default is enabled
1282
+ :type on_off: OnOff
1283
+ """
1284
+
1285
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], on_off=on_off))
1286
+
1287
+ set_off = functools.partialmethod(set, OnOff.OFF)
1288
+ """Turn off tap autotune.
1289
+ """
1290
+
1291
+ set_on = functools.partialmethod(set, OnOff.ON)
1292
+ """Turn off tap autotune.
1293
+ """
1294
+
1295
+
1296
+ @register_command
1297
+ @dataclass
1298
+ class PP_EYEBER:
1299
+ """
1300
+ Obtain BER estimations of an eye diagram.
1301
+ """
1302
+
1303
+ code: typing.ClassVar[int] = 361
1304
+ pushed: typing.ClassVar[bool] = False
1305
+
1306
+ _connection: 'interfaces.IConnection'
1307
+ _module: int
1308
+ _port: int
1309
+ _serdes_xindex: int
1310
+
1311
+ class GetDataAttr(ResponseBodyStruct):
1312
+ eye_ber_estimation: str = field(XmpStr())
1313
+ """string, BER estimations of an eye diagram"""
1314
+
1315
+ def get(self) -> Token[GetDataAttr]:
1316
+ """GEt BER estimations of an eye diagram.
1317
+
1318
+ :return: BER estimations of an eye diagram
1319
+ :rtype: PP_EYEBER.GetDataAttr
1320
+ """
1321
+
1322
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1323
+
1324
+
1325
+ @register_command
1326
+ @dataclass
1327
+ class PP_PHYAUTONEG:
1328
+ """
1329
+ Auto-negotiation settings of the PHY.
1330
+ """
1331
+
1332
+ code: typing.ClassVar[int] = 362
1333
+ pushed: typing.ClassVar[bool] = False
1334
+
1335
+ _connection: 'interfaces.IConnection'
1336
+ _module: int
1337
+ _port: int
1338
+
1339
+ class GetDataAttr(ResponseBodyStruct):
1340
+ fec_mode: OnOff = field(XmpInt())
1341
+ """coded integer, FEC mode ON or OFF."""
1342
+ reserved_1: int = field(XmpInt())
1343
+ """integer, reserved for future use."""
1344
+ reserved_2: int = field(XmpInt())
1345
+ """integer, reserved for future use."""
1346
+ reserved_3: int = field(XmpInt())
1347
+ """integer, reserved for future use."""
1348
+ reserved_4: int = field(XmpInt())
1349
+ """integer, reserved for future use."""
1350
+
1351
+ class SetDataAttr(RequestBodyStruct):
1352
+ fec_mode: OnOff = field(XmpInt())
1353
+ """coded integer, FEC mode ON or OFF."""
1354
+ reserved_1: int = field(XmpInt())
1355
+ """integer, reserved for future use."""
1356
+ reserved_2: int = field(XmpInt())
1357
+ """integer, reserved for future use."""
1358
+ reserved_3: int = field(XmpInt())
1359
+ """integer, reserved for future use."""
1360
+ reserved_4: int = field(XmpInt())
1361
+ """integer, reserved for future use."""
1362
+
1363
+ def get(self) -> Token[GetDataAttr]:
1364
+ """Get auto-negotiation settings of the PHY.
1365
+
1366
+ :return: FEC mode ON or OFF
1367
+ :rtype: PP_PHYAUTONEG.GetDataAttr
1368
+ """
1369
+
1370
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1371
+
1372
+ def set(self, fec_mode: OnOff, reserved_1: int, reserved_2: int, reserved_3: int, reserved_4: int) -> Token[None]:
1373
+ """Set auto-negotiation settings of the PHY.
1374
+
1375
+ :param fec_mode: FEC mode ON or OFF
1376
+ :type fec_mode: OnOff
1377
+ :param reserved_1: reserved for future use.
1378
+ :type reserved_1: int
1379
+ :param reserved_2: reserved for future use.
1380
+ :type reserved_2: int
1381
+ :param reserved_3: reserved for future use.
1382
+ :type reserved_3: int
1383
+ :param reserved_4: reserved for future use.
1384
+ :type reserved_4: int
1385
+ """
1386
+
1387
+ return Token(
1388
+ self._connection,
1389
+ build_set_request(
1390
+ self,
1391
+ module=self._module,
1392
+ port=self._port, fec_mode=fec_mode,
1393
+ reserved_1=reserved_1,
1394
+ reserved_2=reserved_2,
1395
+ reserved_3=reserved_3,
1396
+ reserved_4=reserved_4
1397
+ )
1398
+ )
1399
+
1400
+ set_off = functools.partialmethod(set, OnOff.OFF)
1401
+ """Enable auto-negotiation settings of the PHY.
1402
+ """
1403
+
1404
+ set_on = functools.partialmethod(set, OnOff.ON)
1405
+ """Disable auto-negotiation settings of the PHY.
1406
+ """
1407
+
1408
+
1409
+ @register_command
1410
+ @dataclass
1411
+ class PP_TXPRBSTYPE:
1412
+ """
1413
+ The TX PRBS type used when the interface is in PRBS mode.
1414
+ """
1415
+
1416
+ code: typing.ClassVar[int] = 364
1417
+ pushed: typing.ClassVar[bool] = False
1418
+
1419
+ _connection: 'interfaces.IConnection'
1420
+ _module: int
1421
+ _port: int
1422
+
1423
+ class GetDataAttr(ResponseBodyStruct):
1424
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1425
+ """coded byte, PRBS inserted type."""
1426
+ prbs_pattern: PRBSPattern = field(XmpByte())
1427
+ """coded byte, PRBS pattern."""
1428
+ invert: PRBSInvertState = field(XmpByte())
1429
+ """coded byte, PRBS invert state."""
1430
+
1431
+ class SetDataAttr(RequestBodyStruct):
1432
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1433
+ """coded byte, PRBS inserted type."""
1434
+ prbs_pattern: PRBSPattern = field(XmpByte())
1435
+ """coded byte, PRBS pattern."""
1436
+ invert: PRBSInvertState = field(XmpByte())
1437
+ """coded byte, PRBS invert state."""
1438
+
1439
+ def get(self) -> Token[GetDataAttr]:
1440
+ """Get the TX PRBS type used when the interface is in PRBS mode.
1441
+
1442
+ :return: PRBS inserted type, PRBS pattern, and PRBS invert state.
1443
+ :rtype: PP_TXPRBSTYPE.GetDataAttr
1444
+ """
1445
+
1446
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1447
+
1448
+ def set(self, prbs_inserted_type: PRBSInsertedType, prbs_pattern: PRBSPattern, invert: PRBSInvertState) -> Token[None]:
1449
+ """Set the TX PRBS type used when the interface is in PRBS mode.
1450
+
1451
+ :param prbs_inserted_type: PRBS inserted type
1452
+ :type prbs_inserted_type: PRBSInsertedType
1453
+ :param prbs_pattern: PRBS pattern
1454
+ :type prbs_pattern: PRBSPattern
1455
+ :param invert: PRBS invert state
1456
+ :type invert: PRBSInvertState
1457
+ """
1458
+
1459
+ return Token(
1460
+ self._connection,
1461
+ build_set_request(
1462
+ self,
1463
+ module=self._module,
1464
+ port=self._port,
1465
+ prbs_inserted_type=prbs_inserted_type,
1466
+ prbs_pattern=prbs_pattern,
1467
+ invert=invert
1468
+ )
1469
+ )
1470
+
1471
+
1472
+ @register_command
1473
+ @dataclass
1474
+ class PP_RXPRBSTYPE:
1475
+ """
1476
+ The RX PRBS type used when the interface is in PRBS mode.
1477
+ """
1478
+
1479
+ code: typing.ClassVar[int] = 365
1480
+ pushed: typing.ClassVar[bool] = False
1481
+
1482
+ _connection: 'interfaces.IConnection'
1483
+ _module: int
1484
+ _port: int
1485
+
1486
+ class GetDataAttr(ResponseBodyStruct):
1487
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1488
+ """coded byte, PRBS inserted type."""
1489
+ prbs_pattern: PRBSPattern = field(XmpByte())
1490
+ """coded byte, PRBS pattern."""
1491
+ invert: PRBSInvertState = field(XmpByte())
1492
+ """coded byte, PRBS invert state."""
1493
+ statistics_mode: PRBSStatisticsMode = field(XmpByte())
1494
+ """coded byte, PRBS statistics mode"""
1495
+
1496
+ class SetDataAttr(RequestBodyStruct):
1497
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1498
+ """coded byte, PRBS inserted type."""
1499
+ prbs_pattern: PRBSPattern = field(XmpByte())
1500
+ """coded byte, PRBS pattern."""
1501
+ invert: PRBSInvertState = field(XmpByte())
1502
+ """coded byte, PRBS invert state."""
1503
+ statistics_mode: PRBSStatisticsMode = field(XmpByte())
1504
+ """coded byte, PRBS statistics mode"""
1505
+
1506
+ def get(self) -> Token[GetDataAttr]:
1507
+ """Get the RX PRBS type used when the interface is in PRBS mode.
1508
+
1509
+ :return: PRBS inserted type, PRBS pattern, PRBS invert state, and PRBS statistics mode.
1510
+ :rtype: PP_RXPRBSTYPE.GetDataAttr
1511
+ """
1512
+
1513
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1514
+
1515
+ def set(self, prbs_inserted_type: PRBSInsertedType, prbs_pattern: PRBSPattern, invert: PRBSInvertState, statistics_mode: PRBSStatisticsMode) -> Token[None]:
1516
+ """Set the RX PRBS type used when the interface is in PRBS mode.
1517
+
1518
+ :param prbs_inserted_type: PRBS inserted type
1519
+ :type prbs_inserted_type: PRBSInsertedType
1520
+ :param prbs_pattern: PRBS pattern
1521
+ :type prbs_pattern: PRBSPattern
1522
+ :param invert: PRBS invert state
1523
+ :type invert: PRBSInvertState
1524
+ :param statistics_mode: PRBS statistics mode
1525
+ :type statistics_mode: PRBSStatisticsMode
1526
+ """
1527
+
1528
+ return Token(
1529
+ self._connection,
1530
+ build_set_request(
1531
+ self,
1532
+ module=self._module,
1533
+ port=self._port,
1534
+ prbs_inserted_type=prbs_inserted_type,
1535
+ prbs_pattern=prbs_pattern,
1536
+ invert=invert,
1537
+ statistics_mode=statistics_mode
1538
+ )
1539
+ )
1540
+
1541
+
1542
+ @register_command
1543
+ @dataclass
1544
+ class PP_FECMODE:
1545
+ """
1546
+ FEC mode for port that supports FEC.
1547
+ """
1548
+
1549
+ code: typing.ClassVar[int] = 366
1550
+ pushed: typing.ClassVar[bool] = True
1551
+
1552
+ _connection: 'interfaces.IConnection'
1553
+ _module: int
1554
+ _port: int
1555
+
1556
+ class GetDataAttr(ResponseBodyStruct):
1557
+ mode: FECMode = field(XmpByte())
1558
+ """coded byte, FEC mode for port."""
1559
+
1560
+ class SetDataAttr(RequestBodyStruct):
1561
+ mode: FECMode = field(XmpByte())
1562
+ """coded byte, FEC mode for port."""
1563
+
1564
+ def get(self) -> Token[GetDataAttr]:
1565
+ """Get the FEC mode for port that supports FEC.
1566
+
1567
+ :return: the FEC mode for port
1568
+ :rtype: PP_FECMODE.GetDataAttr
1569
+ """
1570
+
1571
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1572
+
1573
+ def set(self, mode: FECMode) -> Token[None]:
1574
+ """Set the FEC mode for port that supports FEC.
1575
+
1576
+ :param mode: FEC mode for port
1577
+ :type mode: FECMode
1578
+ """
1579
+
1580
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, mode=mode))
1581
+
1582
+ set_off = functools.partialmethod(set, FECMode.OFF)
1583
+ """Turn FEC off."""
1584
+
1585
+ set_rs_fec = functools.partialmethod(set, FECMode.RS_FEC)
1586
+ """Turn RS FEC on, either RS-FEC KR or RS-FEC KP, automatically selected based on the FEC modes supported by the port."""
1587
+
1588
+ set_fc_fec = functools.partialmethod(set, FECMode.FC_FEC)
1589
+ """Turn Firecode FEC on."""
1590
+
1591
+
1592
+ @register_command
1593
+ @dataclass
1594
+ class PP_EYEDWELLBITS:
1595
+ """
1596
+ Min and max dwell bits for an eye capture.
1597
+ """
1598
+
1599
+ code: typing.ClassVar[int] = 367
1600
+ pushed: typing.ClassVar[bool] = False
1601
+
1602
+ _connection: 'interfaces.IConnection'
1603
+ _module: int
1604
+ _port: int
1605
+ _serdes_xindex: int
1606
+
1607
+ class GetDataAttr(ResponseBodyStruct):
1608
+ min_dwell_bit_count: int = field(XmpInt())
1609
+ """integer, minimum dwell bits for an eye capture"""
1610
+ max_dwell_bit_count: int = field(XmpInt())
1611
+ """integer, maximum dwell bits for an eye capture"""
1612
+
1613
+ class SetDataAttr(RequestBodyStruct):
1614
+ min_dwell_bit_count: int = field(XmpInt())
1615
+ """integer, minimum dwell bits for an eye capture"""
1616
+ max_dwell_bit_count: int = field(XmpInt())
1617
+ """integer, maximum dwell bits for an eye capture"""
1618
+
1619
+ def get(self) -> Token[GetDataAttr]:
1620
+ """Get the min and max dwell bits for an eye capture.
1621
+
1622
+ :return: the min and the max dwell bits for an eye capture
1623
+ :rtype: PP_EYEDWELLBITS.GetDataAttr
1624
+ """
1625
+
1626
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1627
+
1628
+ def set(self, min_dwell_bit_count: int, max_dwell_bit_count: int) -> Token[None]:
1629
+ """Set the min and max dwell bits for an eye capture.
1630
+
1631
+ :param min_dwell_bit_count: minimum dwell bits for an eye capture
1632
+ :type min_dwell_bit_count: int
1633
+ :param max_dwell_bit_count: maximum dwell bits for an eye capture
1634
+ :type max_dwell_bit_count: int
1635
+ """
1636
+
1637
+ return Token(
1638
+ self._connection,
1639
+ build_set_request(
1640
+ self,
1641
+ module=self._module,
1642
+ port=self._port,
1643
+ indices=[self._serdes_xindex],
1644
+ min_dwell_bit_count=min_dwell_bit_count,
1645
+ max_dwell_bit_count=max_dwell_bit_count
1646
+ )
1647
+ )
1648
+
1649
+
1650
+ @register_command
1651
+ @dataclass
1652
+ class PP_PHYSIGNALSTATUS:
1653
+ """
1654
+ Obtain the PHY signal status.
1655
+ """
1656
+
1657
+ code: typing.ClassVar[int] = 375
1658
+ pushed: typing.ClassVar[bool] = False
1659
+
1660
+ _connection: 'interfaces.IConnection'
1661
+ _module: int
1662
+ _port: int
1663
+
1664
+ class GetDataAttr(ResponseBodyStruct):
1665
+ phy_signal_status: PHYSignalStatus = field(XmpByte())
1666
+ """coded byte, PHY signal status"""
1667
+
1668
+ def get(self) -> Token[GetDataAttr]:
1669
+ """Get the PHY signal status.
1670
+
1671
+ :return: PHY signal status
1672
+ :rtype: PP_PHYSIGNALSTATUS.GetDataAttr
1673
+ """
1674
+
1675
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1676
+
1677
+
1678
+ @register_command
1679
+ @dataclass
1680
+ class PP_PRBSTYPE:
1681
+ """
1682
+ Defines the PRBS type used when the interface is in PRBS mode.
1683
+ """
1684
+
1685
+ code: typing.ClassVar[int] = 378
1686
+ pushed: typing.ClassVar[bool] = False
1687
+
1688
+ _connection: 'interfaces.IConnection'
1689
+ _module: int
1690
+ _port: int
1691
+
1692
+ class GetDataAttr(ResponseBodyStruct):
1693
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1694
+ """coded byte, specifying where the PRBS is inserted."""
1695
+ polynomial: PRBSPolynomial = field(XmpByte())
1696
+ """coded byte, specifying which PRBS that is used."""
1697
+ invert: PRBSInvertState = field(XmpByte())
1698
+ """coded byte, specifying if the PRBS is inverted."""
1699
+ statistics_mode: PRBSStatisticsMode = field(XmpByte())
1700
+ """coded byte, specifying PRBS statistics mode, accumulative or for last second"""
1701
+
1702
+ class SetDataAttr(RequestBodyStruct):
1703
+ prbs_inserted_type: PRBSInsertedType = field(XmpByte())
1704
+ """coded byte, specifying where the PRBS is inserted."""
1705
+ polynomial: PRBSPolynomial = field(XmpByte())
1706
+ """coded byte, specifying which PRBS to use."""
1707
+ invert: PRBSInvertState = field(XmpByte())
1708
+ """coded byte, specifying if the PRBS is inverted."""
1709
+ statistics_mode: PRBSStatisticsMode = field(XmpByte())
1710
+ """coded byte, specifying PRBS statistics mode, accumulative or for last second"""
1711
+
1712
+ def get(self) -> Token[GetDataAttr]:
1713
+ """Get the PRBS type used when the interface is in PRBS mode.
1714
+
1715
+ :return: where the PRBS is inserted, which PRBS that is used, if the PRBS is inverted, and PRBS statistics mode
1716
+ :rtype: PP_PRBSTYPE.GetDataAttr
1717
+ """
1718
+
1719
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1720
+
1721
+ def set(self, prbs_inserted_type: PRBSInsertedType, polynomial: PRBSPolynomial, invert: PRBSInvertState, statistics_mode: PRBSStatisticsMode) -> Token[None]:
1722
+ """Set the PRBS type used when the interface is in PRBS mode.
1723
+
1724
+ :param prbs_inserted_type: specifying where the PRBS is inserted
1725
+ :type prbs_inserted_type: PRBSInsertedType
1726
+ :param polynomial: specifying which PRBS that is used
1727
+ :type polynomial: PRBSPolynomial
1728
+ :param invert: specifying if the PRBS is inverted
1729
+ :type invert: PRBSInvertState
1730
+ :param statistics_mode: specifying PRBS statistics mode, accumulative or for last second
1731
+ :type statistics_mode: PRBSStatisticsMode
1732
+ """
1733
+
1734
+ return Token(
1735
+ self._connection,
1736
+ build_set_request(
1737
+ self,
1738
+ module=self._module,
1739
+ port=self._port,
1740
+ prbs_inserted_type=prbs_inserted_type,
1741
+ polynomial=polynomial,
1742
+ invert=invert,
1743
+ statistics_mode=statistics_mode
1744
+ )
1745
+ )
1746
+
1747
+
1748
+ @register_command
1749
+ @dataclass
1750
+ class PP_PHYSETTINGS:
1751
+ """
1752
+ Get/Set low-level PHY settings.
1753
+ """
1754
+
1755
+ code: typing.ClassVar[int] = 379
1756
+ pushed: typing.ClassVar[bool] = False
1757
+
1758
+ _connection: 'interfaces.IConnection'
1759
+ _module: int
1760
+ _port: int
1761
+
1762
+ class GetDataAttr(ResponseBodyStruct):
1763
+ link_training_on_off: OnOff = field(XmpInt())
1764
+ """coded integer, enabling/disabling link training."""
1765
+ precode_on_off: OnOffDefault = field(XmpInt())
1766
+ """coded integer, enabling/disabling link precode."""
1767
+ graycode_on_off: OnOff = field(XmpInt())
1768
+ """coded integer, enabling/disabling link graycode."""
1769
+ pam4_msb_lsb_swap: OnOff = field(XmpInt())
1770
+ """coded integer, enabling/disabling PAM4 MSB/LSB swap."""
1771
+
1772
+ class SetDataAttr(RequestBodyStruct):
1773
+ link_training_on_off: OnOff = field(XmpInt())
1774
+ """coded integer, enabling/disabling link training."""
1775
+ precode_on_off: OnOffDefault = field(XmpInt())
1776
+ """coded integer, enabling/disabling link precode."""
1777
+ graycode_on_off: OnOff = field(XmpInt())
1778
+ """coded integer, enabling/disabling link graycode."""
1779
+ pam4_msb_lsb_swap: OnOff = field(XmpInt())
1780
+ """coded integer, enabling/disabling PAM4 MSB/LSB swap."""
1781
+
1782
+ def get(self) -> Token[GetDataAttr]:
1783
+ """Get low-level PHY settings.
1784
+
1785
+ :return: low-level PHY settings
1786
+ :rtype: PP_PHYSETTINGS.GetDataAttr
1787
+ """
1788
+
1789
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
1790
+
1791
+ def set(self, link_training_on_off: OnOff, precode_on_off: OnOffDefault, graycode_on_off: OnOff, pam4_msb_lsb_swap: OnOff) -> Token[None]:
1792
+ """Set low-level PHY settings.
1793
+
1794
+ :param link_training_on_off: enabling/disabling link training
1795
+ :type link_training_on_off: OnOff
1796
+ :param precode_on_off: enabling/disabling link precode
1797
+ :type precode_on_off: OnOffDefault
1798
+ :param graycode_on_off: enabling/disabling link graycode.
1799
+ :type graycode_on_off: OnOff
1800
+ :param pam4_msb_lsb_swap: enabling/disabling PAM4 MSB/LSB swap.
1801
+ :type pam4_msb_lsb_swap: OnOff
1802
+ """
1803
+
1804
+ return Token(
1805
+ self._connection,
1806
+ build_set_request(
1807
+ self,
1808
+ module=self._module,
1809
+ port=self._port,
1810
+ link_training_on_off=link_training_on_off,
1811
+ precode_on_off=precode_on_off,
1812
+ graycode_on_off=graycode_on_off,
1813
+ pam4_msb_lsb_swap=pam4_msb_lsb_swap
1814
+ )
1815
+ )
1816
+
1817
+
1818
+ @register_command
1819
+ @dataclass
1820
+ class PP_PHYRXEQ:
1821
+ """
1822
+ RX EQ parameters (For non Freya Modules).
1823
+ """
1824
+
1825
+ code: typing.ClassVar[int] = 380
1826
+ pushed: typing.ClassVar[bool] = True
1827
+
1828
+ _connection: 'interfaces.IConnection'
1829
+ _module: int
1830
+ _port: int
1831
+ _serdes_xindex: int
1832
+
1833
+ class GetDataAttr(ResponseBodyStruct):
1834
+ auto: int = field(XmpInt())
1835
+ """integer, auto on or off"""
1836
+ ctle: int = field(XmpInt())
1837
+ """integer, Continuous Time Linear equalization"""
1838
+ reserved: int = field(XmpInt())
1839
+ """integer, reserved"""
1840
+
1841
+ class SetDataAttr(RequestBodyStruct):
1842
+ auto: int = field(XmpInt())
1843
+ """integer, auto on or off"""
1844
+ ctle: int = field(XmpInt())
1845
+ """integer, Continuous Time Linear equalization"""
1846
+ reserved: int = field(XmpInt())
1847
+ """integer, reserved"""
1848
+
1849
+ def get(self) -> Token[GetDataAttr]:
1850
+ """Get RX EQ parameters.
1851
+
1852
+ :return: auto on or off, CTLE, and reserved.
1853
+ :rtype: PP_PHYRXEQ.GetDataAttr
1854
+ """
1855
+
1856
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
1857
+
1858
+ def set(self, auto: int, ctle: int, reserved: int) -> Token[None]:
1859
+ """Set RX EQ parameters.
1860
+
1861
+ :param auto: auto on or off
1862
+ :type auto: int
1863
+ :param ctle: Continuous Time Linear equalization
1864
+ :type ctle: int
1865
+ :param reserved: reserved
1866
+ :type reserved: int
1867
+ """
1868
+
1869
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], auto=auto, ctle=ctle, reserved=reserved))
1870
+
1871
+
1872
+ @register_command
1873
+ @dataclass
1874
+ class PP_PHYRXEQ_EXT:
1875
+ """
1876
+ GET/SET RX EQ Advanced parameters(Only for Freya Modules).
1877
+ """
1878
+
1879
+ code: typing.ClassVar[int] = 397
1880
+ pushed: typing.ClassVar[bool] = True
1881
+
1882
+ _connection: 'interfaces.IConnection'
1883
+ _module: int
1884
+ _port: int
1885
+ _serdes_xindex: int
1886
+ _capability_type: RxEqExtCap
1887
+
1888
+ class GetDataAttr(ResponseBodyStruct):
1889
+ mode: RxEqExtCapMode = field(XmpInt())
1890
+ """The capability mode"""
1891
+ value: int = field(XmpInt())
1892
+ """The value for the capability"""
1893
+
1894
+ class SetDataAttr(RequestBodyStruct):
1895
+ mode: RxEqExtCapMode = field(XmpInt())
1896
+ """The capability mode Auto/Manual/Freeze"""
1897
+ value: int = field(XmpInt())
1898
+ """The value for the capability"""
1899
+
1900
+ def get(self) -> Token[GetDataAttr]:
1901
+ """Get RX EQ Advanced parameters.
1902
+
1903
+ :return: mode Auto/Manual/Freeze, value.
1904
+ :rtype: PP_PHYRXEQ_EXT.GetDataAttr
1905
+ """
1906
+
1907
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._capability_type]))
1908
+
1909
+ def set(self, mode: RxEqExtCapMode, value: int) -> Token[None]:
1910
+ """Set RX EQ Advanced parameters.
1911
+ The type of the capability(RxEqExtCap) should be passed as the second index.
1912
+
1913
+ :param mode: Auto/Manual/Freeze
1914
+ :type mode: RxEqExtCapMode
1915
+ :param value: The value for the capability
1916
+ :type value: int
1917
+ """
1918
+
1919
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._capability_type], mode=mode, value=value))
1920
+
1921
+
1922
+ @register_command
1923
+ @dataclass
1924
+ class PP_PHYRXEQSTATUS_EXT:
1925
+ """
1926
+ Get RX EQ advanced parameter values. (Only for Freya modules)
1927
+ """
1928
+
1929
+ code: typing.ClassVar[int] = 398
1930
+ pushed: typing.ClassVar[bool] = True
1931
+
1932
+ _connection: 'interfaces.IConnection'
1933
+ _module: int
1934
+ _port: int
1935
+ _serdes_xindex: int
1936
+ _capability_type: RxEqExtCap
1937
+
1938
+ class GetDataAttr(ResponseBodyStruct):
1939
+ value1: int = field(XmpInt())
1940
+ """the 1st value for the capability"""
1941
+ value2: int = field(XmpInt())
1942
+ """the 2nd value for the capability"""
1943
+
1944
+
1945
+ def get(self) -> Token[GetDataAttr]:
1946
+ """Get RX EQ Advanced parameters.
1947
+
1948
+ :return: mode Auto/Manual/Freeze, value.
1949
+ :rtype: PP_PHYRXEQ_EXT.GetDataAttr
1950
+ """
1951
+
1952
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex, self._capability_type]))
1953
+
1954
+
1955
+
1956
+ @register_command
1957
+ @dataclass
1958
+ class PP_AUTONEG:
1959
+ """
1960
+ Auto-negotiation settings of the PHY - for Thor-400G-7S-1P Thor-400G-7S-1P[b]
1961
+ and [c]
1962
+ """
1963
+
1964
+ code: typing.ClassVar[int] = 381
1965
+ pushed: typing.ClassVar[bool] = False
1966
+
1967
+ _connection: 'interfaces.IConnection'
1968
+ _module: int
1969
+ _port: int
1970
+
1971
+ class GetDataAttr(ResponseBodyStruct):
1972
+ mode: AutoNegMode = field(XmpInt())
1973
+ """coded integer, mode"""
1974
+ tec_ability: AutoNegTecAbility = field(XmpInt())
1975
+ """coded integer, technical ability."""
1976
+ fec_capable: int = field(XmpInt())
1977
+ """coded integer, FEC capable."""
1978
+ fec_requested: int = field(XmpInt())
1979
+ """coded integer, FEC requested."""
1980
+ pause_mode: PauseMode = field(XmpInt())
1981
+ """coded integer, pause mode."""
1982
+
1983
+ class SetDataAttr(RequestBodyStruct):
1984
+ mode: AutoNegMode = field(XmpInt())
1985
+ """coded integer, mode"""
1986
+ tec_ability: AutoNegTecAbility = field(XmpInt())
1987
+ """coded integer, technical ability."""
1988
+ fec_capable: int = field(XmpInt())
1989
+ """coded integer, FEC capable."""
1990
+ fec_requested: int = field(XmpInt())
1991
+ """coded integer, FEC requested."""
1992
+ pause_mode: PauseMode = field(XmpInt())
1993
+ """coded integer, pause mode."""
1994
+
1995
+ def get(self) -> Token[GetDataAttr]:
1996
+ """Get the auto-negotiation settings of the PHY.
1997
+
1998
+ :return: auto-negotiation settings of the PHY including mode, technical ability, FEC capable, FEC requested, and pause mode.
1999
+ :rtype: PP_AUTONEG.GetDataAttr
2000
+ """
2001
+
2002
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2003
+
2004
+ def set(self, mode: AutoNegMode, tec_ability: AutoNegTecAbility, fec_capable: AutoNegFECOption, fec_requested: AutoNegFECOption, pause_mode: PauseMode) -> Token[None]:
2005
+ """Set the auto-negotiation settings of the PHY.
2006
+
2007
+ :param mode: auto neg mode
2008
+ :type mode: AutoNegMode
2009
+ :param tec_ability: technical ability
2010
+ :type tec_ability: AutoNegTecAbility
2011
+ :param fec_capable: FEC capable
2012
+ :type fec_capable: AutoNegFECOption
2013
+ :param fec_requested: FEC requested
2014
+ :type fec_requested: AutoNegFECOption
2015
+ :param pause_mode: pause mode
2016
+ :type pause_mode: PauseMode
2017
+ """
2018
+
2019
+ return Token(
2020
+ self._connection,
2021
+ build_set_request(
2022
+ self,
2023
+ module=self._module,
2024
+ port=self._port,
2025
+ mode=mode,
2026
+ tec_ability=tec_ability,
2027
+ fec_capable=fec_capable,
2028
+ fec_requested=fec_requested,
2029
+ pause_mode=pause_mode
2030
+ )
2031
+ )
2032
+
2033
+
2034
+ @register_command
2035
+ @dataclass
2036
+ class PP_AUTONEGSTATUS:
2037
+ """
2038
+ Status of auto-negotiation settings of the PHY - for Thor-400G-7S-1P[b] and [c]
2039
+ """
2040
+
2041
+ code: typing.ClassVar[int] = 382
2042
+ pushed: typing.ClassVar[bool] = True
2043
+
2044
+ _connection: 'interfaces.IConnection'
2045
+ _module: int
2046
+ _port: int
2047
+
2048
+ class GetDataAttr(ResponseBodyStruct):
2049
+ mode: AutoNegMode = field(XmpInt())
2050
+ """coded integer, mode"""
2051
+ fec: AutoNegFECType = field(XmpInt())
2052
+ """codec integer, FEC."""
2053
+ auto_state: AutoNegStatus = field(XmpInt())
2054
+ """coded integer, auto-negotiation state."""
2055
+ tec_ability: AutoNegTecAbility = field(XmpInt())
2056
+ """coded integer, technical ability."""
2057
+ fec_capable: int = field(XmpInt())
2058
+ """coded integer, FEC capable partner."""
2059
+ fec_requested: int = field(XmpInt())
2060
+ """coded integer, FEC requested partner."""
2061
+ pause_mode: PauseMode = field(XmpInt())
2062
+ """coded integer, pause mode."""
2063
+
2064
+ def get(self) -> Token[GetDataAttr]:
2065
+ """Get the status of auto-negotiation settings of the PHY.
2066
+
2067
+ :return: the status of auto-negotiation settings of the PHY
2068
+ :rtype: PP_AUTONEGSTATUS.GetDataAttr
2069
+ """
2070
+
2071
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2072
+
2073
+
2074
+ @register_command
2075
+ @dataclass
2076
+ class PP_LINKTRAIN:
2077
+ """
2078
+ Link training settings - for Thor-400G-7S-1P and Freya modules
2079
+ """
2080
+
2081
+ code: typing.ClassVar[int] = 383
2082
+ pushed: typing.ClassVar[bool] = True
2083
+
2084
+ _connection: 'interfaces.IConnection'
2085
+ _module: int
2086
+ _port: int
2087
+
2088
+ class GetDataAttr(ResponseBodyStruct):
2089
+ mode: LinkTrainingMode = field(XmpByte())
2090
+ """coded byte, link training mode"""
2091
+ pam4_frame_size: PAM4FrameSize = field(XmpByte())
2092
+ """codec byte, PAM4 frame size."""
2093
+ nrz_pam4_init_cond: LinkTrainingInitCondition = field(XmpByte())
2094
+ """coded byte, link training init condition."""
2095
+ nrz_preset: NRZPreset = field(XmpByte())
2096
+ """coded byte, NRZ preset."""
2097
+ timeout_mode: TimeoutMode = field(XmpByte())
2098
+ """coded byte, timeout mode."""
2099
+
2100
+ class SetDataAttr(RequestBodyStruct):
2101
+ mode: LinkTrainingMode = field(XmpByte())
2102
+ """coded byte, link training mode"""
2103
+ pam4_frame_size: PAM4FrameSize = field(XmpByte())
2104
+ """codec byte, PAM4 frame size."""
2105
+ nrz_pam4_init_cond: LinkTrainingInitCondition = field(XmpByte())
2106
+ """coded byte, link training init condition."""
2107
+ nrz_preset: NRZPreset = field(XmpByte())
2108
+ """coded byte, NRZ preset."""
2109
+ timeout_mode: TimeoutMode = field(XmpByte())
2110
+ """coded byte, timeout mode."""
2111
+
2112
+ def get(self) -> Token[GetDataAttr]:
2113
+ """Get the link training settings of the port.
2114
+
2115
+ :return: the link training settings, including mode, PAM4 frame size, link training init condition, NRZ preset, and timeout mode.
2116
+ :rtype: PP_LINKTRAIN.GetDataAttr
2117
+ """
2118
+
2119
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
2120
+
2121
+ def set(
2122
+ self,
2123
+ mode: LinkTrainingMode,
2124
+ pam4_frame_size: PAM4FrameSize,
2125
+ nrz_pam4_init_cond: LinkTrainingInitCondition,
2126
+ nrz_preset: NRZPreset,
2127
+ timeout_mode: TimeoutMode
2128
+ ) -> Token[None]:
2129
+ """Set the link training settings of the port.
2130
+
2131
+ :param mode: link training mode
2132
+ :type mode: LinkTrainingMode
2133
+ :param pam4_frame_size: PAM4 frame size
2134
+ :type pam4_frame_size: PAM4FrameSize
2135
+ :param nrz_pam4_init_cond: link training init condition
2136
+ :type nrz_pam4_init_cond: LinkTrainingInitCondition
2137
+ :param nrz_preset: NRZ preset
2138
+ :type nrz_preset: NRZPreset
2139
+ :param timeout_mode: timeout mode
2140
+ :type timeout_mode: TimeoutMode
2141
+ """
2142
+
2143
+ return Token(
2144
+ self._connection,
2145
+ build_set_request(
2146
+ self,
2147
+ module=self._module,
2148
+ port=self._port,
2149
+ mode=mode,
2150
+ pam4_frame_size=pam4_frame_size,
2151
+ nrz_pam4_init_cond=nrz_pam4_init_cond,
2152
+ nrz_preset=nrz_preset,
2153
+ timeout_mode=timeout_mode
2154
+ )
2155
+ )
2156
+
2157
+
2158
+ @register_command
2159
+ @dataclass
2160
+ class PP_LINKTRAINSTATUS:
2161
+ """
2162
+ Per lane Link training status - for Thor-400G-7S-1P and Freya modules
2163
+ """
2164
+
2165
+ code: typing.ClassVar[int] = 384
2166
+ pushed: typing.ClassVar[bool] = True
2167
+
2168
+ _connection: 'interfaces.IConnection'
2169
+ _module: int
2170
+ _port: int
2171
+ _serdes_xindex: int
2172
+
2173
+ class GetDataAttr(ResponseBodyStruct):
2174
+ mode: LinkTrainingStatusMode = field(XmpByte())
2175
+ """coded byte, link training mode"""
2176
+ status: LinkTrainingStatus = field(XmpByte())
2177
+ """coded byte, lane status."""
2178
+ failure: LinkTrainingFailureType = field(XmpByte())
2179
+ """coded byte, failure type."""
2180
+
2181
+ def get(self) -> Token[GetDataAttr]:
2182
+ """Get link training status of a lane of a port.
2183
+
2184
+ :return: link training status of a lane of a port, including mode, lane status, and failure type.
2185
+ :rtype: PP_LINKTRAINSTATUS.GetDataAttr
2186
+ """
2187
+
2188
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
2189
+
2190
+ @register_command
2191
+ @dataclass
2192
+ class PP_PRECODING:
2193
+ """
2194
+ GET/SET Pre-Coding Configurations. (only for Freya)
2195
+ """
2196
+
2197
+ code: typing.ClassVar[int] = 420
2198
+ pushed: typing.ClassVar[bool] = True
2199
+
2200
+ _connection: 'interfaces.IConnection'
2201
+ _module: int
2202
+ _port: int
2203
+ _serdes_xindex: int
2204
+
2205
+ class GetDataAttr(ResponseBodyStruct):
2206
+ rx_mode: PreCodingMode = field(XmpInt())
2207
+ """RX Mode Off/On"""
2208
+ rx_endianness: Endianness = field(XmpInt())
2209
+ """RX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2210
+ tx_mode: PreCodingMode = field(XmpInt())
2211
+ """TX Mode Off/On"""
2212
+ tx_endianness: Endianness = field(XmpInt())
2213
+ """TX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2214
+
2215
+ class SetDataAttr(RequestBodyStruct):
2216
+ rx_mode: PreCodingMode = field(XmpInt())
2217
+ """RX Mode Off/On"""
2218
+ rx_endianness: Endianness = field(XmpInt())
2219
+ """RX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2220
+ tx_mode: PreCodingMode = field(XmpInt())
2221
+ """TX Mode Off/On"""
2222
+ tx_endianness: Endianness = field(XmpInt())
2223
+ """TX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2224
+
2225
+ def get(self) -> Token[GetDataAttr]:
2226
+ """Get the Pre-Coding Configurations.
2227
+
2228
+ :return: Pre-Coding configurations including rx_mode, rx_endianness, tx_mode, and tx_endianness.
2229
+ :rtype: PP_PRECODING.GetDataAttr
2230
+ """
2231
+
2232
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
2233
+
2234
+ def set(self, rx_mode: PreCodingMode, rx_endianness: Endianness, tx_mode: PreCodingMode, tx_endianness: Endianness) -> Token[None]:
2235
+ """Set the Rx Pre-coding settings of the PHY.
2236
+
2237
+ :param rx_mode: The RX Mode(Off/On/Auto)
2238
+ :type rx_mode: PreCodingMode
2239
+ :param rx_endianness: RX Endianness type
2240
+ :type rx_endianness: Endianness
2241
+ :param tx_mode: The TX Mode(Off/On/Auto)
2242
+ :type tx_mode: PreCodingMode
2243
+ :param tx_endianness: TX Endianness type
2244
+ :type endianness: Endianness
2245
+ """
2246
+
2247
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], rx_mode=rx_mode, rx_endianness=rx_endianness, tx_mode=tx_mode, tx_endianness=tx_endianness))
2248
+
2249
+ @register_command
2250
+ @dataclass
2251
+ class PP_GRAYCODING:
2252
+ """
2253
+ GET/SET Gray-Coding Configurations. (only for Freya)
2254
+ """
2255
+
2256
+ code: typing.ClassVar[int] = 421
2257
+ pushed: typing.ClassVar[bool] = True
2258
+
2259
+ _connection: 'interfaces.IConnection'
2260
+ _module: int
2261
+ _port: int
2262
+ _serdes_xindex: int
2263
+
2264
+ class GetDataAttr(ResponseBodyStruct):
2265
+ rx_mode: GrayCodingMode = field(XmpInt())
2266
+ """RX Mode Off/On/Auto"""
2267
+ rx_endianness: Endianness = field(XmpInt())
2268
+ """RX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2269
+ tx_mode: GrayCodingMode = field(XmpInt())
2270
+ """TX Mode Off/On/Auto"""
2271
+ tx_endianness: Endianness = field(XmpInt())
2272
+ """TX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2273
+
2274
+ class SetDataAttr(RequestBodyStruct):
2275
+ rx_mode: GrayCodingMode = field(XmpInt())
2276
+ """RX Mode Off/On/Auto"""
2277
+ rx_endianness: Endianness = field(XmpInt())
2278
+ """RX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2279
+ tx_mode: GrayCodingMode = field(XmpInt())
2280
+ """TX Mode Off/On/Auto"""
2281
+ tx_endianness: Endianness = field(XmpInt())
2282
+ """TX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2283
+
2284
+ def get(self) -> Token[GetDataAttr]:
2285
+ """Get the Gray-Coding Configurations.
2286
+
2287
+ :return: Gray-Coding configurations including rx_mode, rx_endianness, tx_mode, and tx_endianness.
2288
+ :rtype: PP_GRAYCODING.GetDataAttr
2289
+ """
2290
+
2291
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
2292
+
2293
+ def set(self, rx_mode: GrayCodingMode, rx_endianness: Endianness, tx_mode: GrayCodingMode, tx_endianness: Endianness) -> Token[None]:
2294
+ """Set the Rx Gray-coding settings of the PHY.
2295
+
2296
+ :param rx_mode: The RX Mode(Off/On/Auto)
2297
+ :type rx_mode: GrayCodingMode
2298
+ :param rx_endianness: RX Endianness type
2299
+ :type rx_endianness: Endianness
2300
+ :param tx_mode: The TX Mode(Off/On/Auto)
2301
+ :type tx_mode: GrayCodingMode
2302
+ :param tx_endianness: TX Endianness type
2303
+ :type endianness: Endianness
2304
+ """
2305
+
2306
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], rx_mode=rx_mode, rx_endianness=rx_endianness, tx_mode=tx_mode, tx_endianness=tx_endianness))
2307
+
2308
+
2309
+ @register_command
2310
+ @dataclass
2311
+ class PP_PRECODINGSTATUS:
2312
+ """
2313
+ GET Pre-Coding status (only for Freya)
2314
+ """
2315
+
2316
+ code: typing.ClassVar[int] = 422
2317
+ pushed: typing.ClassVar[bool] = True
2318
+
2319
+ _connection: 'interfaces.IConnection'
2320
+ _module: int
2321
+ _port: int
2322
+ _serdes_xindex: int
2323
+
2324
+ class GetDataAttr(ResponseBodyStruct):
2325
+ rx_mode: OnOff = field(XmpInt())
2326
+ """RX Mode Off/On"""
2327
+ rx_endianness: Endianness = field(XmpInt())
2328
+ """RX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2329
+ tx_mode: OnOff = field(XmpInt())
2330
+ """TX Mode Off/On"""
2331
+ tx_endianness: Endianness = field(XmpInt())
2332
+ """TX Endianness Normal/Reverted(BigEndian/LittleEndian)) """
2333
+
2334
+ def get(self) -> Token[GetDataAttr]:
2335
+ """Get the Pre-Coding Configurations.
2336
+
2337
+ :return: Pre-Coding configurations including rx_mode, rx_endianness, tx_mode, and tx_endianness.
2338
+ :rtype: PP_PRECODING.GetDataAttr
2339
+ """
2340
+
2341
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))