tdl-xoa-driver 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. tdl_xoa_driver-1.0.0.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0.dist-info/top_level.txt +1 -0
  6. xoa_driver/__init__.py +2 -0
  7. xoa_driver/enums.py +399 -0
  8. xoa_driver/exceptions.py +77 -0
  9. xoa_driver/functions/__init__.py +0 -0
  10. xoa_driver/functions/anlt.py +744 -0
  11. xoa_driver/functions/anlt_ll_debug.py +429 -0
  12. xoa_driver/functions/cli.py +581 -0
  13. xoa_driver/functions/exceptions.py +72 -0
  14. xoa_driver/functions/headers.py +608 -0
  15. xoa_driver/functions/mgmt.py +515 -0
  16. xoa_driver/functions/tools.py +256 -0
  17. xoa_driver/hlfuncs.py +18 -0
  18. xoa_driver/internals/__init__.py +0 -0
  19. xoa_driver/internals/commands/__init__.py +31 -0
  20. xoa_driver/internals/commands/c_commands.py +2041 -0
  21. xoa_driver/internals/commands/enums.py +3289 -0
  22. xoa_driver/internals/commands/m4_commands.py +700 -0
  23. xoa_driver/internals/commands/m4e_commands.py +107 -0
  24. xoa_driver/internals/commands/m_commands.py +1875 -0
  25. xoa_driver/internals/commands/p4_commands.py +2221 -0
  26. xoa_driver/internals/commands/p4e_commands.py +160 -0
  27. xoa_driver/internals/commands/p4g_commands.py +7253 -0
  28. xoa_driver/internals/commands/p_commands.py +6000 -0
  29. xoa_driver/internals/commands/pc_commands.py +335 -0
  30. xoa_driver/internals/commands/pd_commands.py +355 -0
  31. xoa_driver/internals/commands/pe_commands.py +1018 -0
  32. xoa_driver/internals/commands/pec_commands.py +265 -0
  33. xoa_driver/internals/commands/ped_commands.py +1034 -0
  34. xoa_driver/internals/commands/pef_commands.py +2216 -0
  35. xoa_driver/internals/commands/pf_commands.py +379 -0
  36. xoa_driver/internals/commands/pl1_commands.py +1588 -0
  37. xoa_driver/internals/commands/pl_commands.py +178 -0
  38. xoa_driver/internals/commands/pm_commands.py +256 -0
  39. xoa_driver/internals/commands/pp_commands.py +2341 -0
  40. xoa_driver/internals/commands/pr_commands.py +812 -0
  41. xoa_driver/internals/commands/ps_commands.py +2311 -0
  42. xoa_driver/internals/commands/pt_commands.py +370 -0
  43. xoa_driver/internals/commands/px_commands.py +303 -0
  44. xoa_driver/internals/commands/subtypes.py +86 -0
  45. xoa_driver/internals/core/__init__.py +0 -0
  46. xoa_driver/internals/core/builders.py +39 -0
  47. xoa_driver/internals/core/exceptions.py +69 -0
  48. xoa_driver/internals/core/funcs.py +81 -0
  49. xoa_driver/internals/core/funcs.pyi +1072 -0
  50. xoa_driver/internals/core/interfaces.py +47 -0
  51. xoa_driver/internals/core/token.py +44 -0
  52. xoa_driver/internals/core/transporter/__init__.py +0 -0
  53. xoa_driver/internals/core/transporter/_processor.py +83 -0
  54. xoa_driver/internals/core/transporter/_publisher.py +101 -0
  55. xoa_driver/internals/core/transporter/_request_id_counter.py +28 -0
  56. xoa_driver/internals/core/transporter/_stream.py +99 -0
  57. xoa_driver/internals/core/transporter/_typings.py +43 -0
  58. xoa_driver/internals/core/transporter/exceptions.py +44 -0
  59. xoa_driver/internals/core/transporter/handler.py +127 -0
  60. xoa_driver/internals/core/transporter/logger/__init__.py +10 -0
  61. xoa_driver/internals/core/transporter/logger/__logger.py +94 -0
  62. xoa_driver/internals/core/transporter/logger/__state_off.py +32 -0
  63. xoa_driver/internals/core/transporter/logger/__state_on_default.py +70 -0
  64. xoa_driver/internals/core/transporter/logger/__state_on_loguru.py +51 -0
  65. xoa_driver/internals/core/transporter/logger/__state_on_user.py +48 -0
  66. xoa_driver/internals/core/transporter/protocol/__init__.py +0 -0
  67. xoa_driver/internals/core/transporter/protocol/_constants.py +77 -0
  68. xoa_driver/internals/core/transporter/protocol/_utils.py +59 -0
  69. xoa_driver/internals/core/transporter/protocol/exceptions.py +271 -0
  70. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +70 -0
  71. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +283 -0
  72. xoa_driver/internals/core/transporter/protocol/payload/descriptor.py +119 -0
  73. xoa_driver/internals/core/transporter/protocol/payload/exceptions.py +20 -0
  74. xoa_driver/internals/core/transporter/protocol/payload/field.py +296 -0
  75. xoa_driver/internals/core/transporter/protocol/payload/types.py +173 -0
  76. xoa_driver/internals/core/transporter/protocol/payload/utils.py +53 -0
  77. xoa_driver/internals/core/transporter/protocol/struct_header.py +123 -0
  78. xoa_driver/internals/core/transporter/protocol/struct_request.py +65 -0
  79. xoa_driver/internals/core/transporter/protocol/struct_response.py +89 -0
  80. xoa_driver/internals/core/transporter/registry.py +43 -0
  81. xoa_driver/internals/exceptions/__init__.py +9 -0
  82. xoa_driver/internals/exceptions/modules.py +13 -0
  83. xoa_driver/internals/exceptions/testers.py +21 -0
  84. xoa_driver/internals/hli_v1/__init__.py +0 -0
  85. xoa_driver/internals/hli_v1/indices/__init__.py +0 -0
  86. xoa_driver/internals/hli_v1/indices/base_index.py +39 -0
  87. xoa_driver/internals/hli_v1/indices/connection_group/__init__.py +0 -0
  88. xoa_driver/internals/hli_v1/indices/connection_group/cg.py +186 -0
  89. xoa_driver/internals/hli_v1/indices/connection_group/histogram.py +78 -0
  90. xoa_driver/internals/hli_v1/indices/connection_group/l2.py +94 -0
  91. xoa_driver/internals/hli_v1/indices/connection_group/l3.py +130 -0
  92. xoa_driver/internals/hli_v1/indices/connection_group/raw.py +200 -0
  93. xoa_driver/internals/hli_v1/indices/connection_group/replay.py +109 -0
  94. xoa_driver/internals/hli_v1/indices/connection_group/tcp.py +314 -0
  95. xoa_driver/internals/hli_v1/indices/connection_group/tls.py +198 -0
  96. xoa_driver/internals/hli_v1/indices/connection_group/udp.py +133 -0
  97. xoa_driver/internals/hli_v1/indices/connection_group/user_state.py +28 -0
  98. xoa_driver/internals/hli_v1/indices/filter/__init__.py +0 -0
  99. xoa_driver/internals/hli_v1/indices/filter/base_filter.py +65 -0
  100. xoa_driver/internals/hli_v1/indices/filter/genuine_filter.py +20 -0
  101. xoa_driver/internals/hli_v1/indices/length_term.py +49 -0
  102. xoa_driver/internals/hli_v1/indices/macsecscs/__init__.py +0 -0
  103. xoa_driver/internals/hli_v1/indices/macsecscs/base_macsecsc.py +224 -0
  104. xoa_driver/internals/hli_v1/indices/macsecscs/genuine_macsecsc.py +72 -0
  105. xoa_driver/internals/hli_v1/indices/match_term.py +64 -0
  106. xoa_driver/internals/hli_v1/indices/port_dataset.py +72 -0
  107. xoa_driver/internals/hli_v1/indices/streams/__init__.py +0 -0
  108. xoa_driver/internals/hli_v1/indices/streams/base_stream.py +405 -0
  109. xoa_driver/internals/hli_v1/indices/streams/genuine_stream.py +64 -0
  110. xoa_driver/internals/hli_v1/modules/__init__.py +0 -0
  111. xoa_driver/internals/hli_v1/modules/__interfaces.py +21 -0
  112. xoa_driver/internals/hli_v1/modules/base_module.py +138 -0
  113. xoa_driver/internals/hli_v1/modules/module_chimera.py +366 -0
  114. xoa_driver/internals/hli_v1/modules/module_l23ve.py +73 -0
  115. xoa_driver/internals/hli_v1/modules/module_l47.py +397 -0
  116. xoa_driver/internals/hli_v1/modules/module_l47ve.py +9 -0
  117. xoa_driver/internals/hli_v1/modules/modules_l23/__init__.py +0 -0
  118. xoa_driver/internals/hli_v1/modules/modules_l23/family_combi.py +83 -0
  119. xoa_driver/internals/hli_v1/modules/modules_l23/family_d.py +75 -0
  120. xoa_driver/internals/hli_v1/modules/modules_l23/family_e.py +85 -0
  121. xoa_driver/internals/hli_v1/modules/modules_l23/family_f.py +145 -0
  122. xoa_driver/internals/hli_v1/modules/modules_l23/family_g.py +84 -0
  123. xoa_driver/internals/hli_v1/modules/modules_l23/family_h.py +40 -0
  124. xoa_driver/internals/hli_v1/modules/modules_l23/family_i.py +25 -0
  125. xoa_driver/internals/hli_v1/modules/modules_l23/family_j.py +25 -0
  126. xoa_driver/internals/hli_v1/modules/modules_l23/family_k.py +39 -0
  127. xoa_driver/internals/hli_v1/modules/modules_l23/family_l.py +55 -0
  128. xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py +800 -0
  129. xoa_driver/internals/hli_v1/modules/modules_l23/family_m.py +25 -0
  130. xoa_driver/internals/hli_v1/modules/modules_l23/family_n.py +40 -0
  131. xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +383 -0
  132. xoa_driver/internals/hli_v1/ports/__init__.py +0 -0
  133. xoa_driver/internals/hli_v1/ports/base_port.py +125 -0
  134. xoa_driver/internals/hli_v1/ports/port_l23/__init__.py +0 -0
  135. xoa_driver/internals/hli_v1/ports/port_l23/bases/__init__.py +0 -0
  136. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_capture.py +70 -0
  137. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +527 -0
  138. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23_genuine.py +229 -0
  139. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_reception_statistics.py +231 -0
  140. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +117 -0
  141. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transmission_statistics.py +131 -0
  142. xoa_driver/internals/hli_v1/ports/port_l23/chimera/__init__.py +0 -0
  143. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  144. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  145. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/general.py +396 -0
  146. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/shadow.py +104 -0
  147. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/working.py +36 -0
  148. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_custom_distribution.py +125 -0
  149. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_distribution.py +174 -0
  150. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_chimera.py +119 -0
  151. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_emulation.py +244 -0
  152. xoa_driver/internals/hli_v1/ports/port_l23/chimera/reception_statistics.py +24 -0
  153. xoa_driver/internals/hli_v1/ports/port_l23/chimera/transmission_statistics.py +24 -0
  154. xoa_driver/internals/hli_v1/ports/port_l23/family_combi.py +37 -0
  155. xoa_driver/internals/hli_v1/ports/port_l23/family_d.py +51 -0
  156. xoa_driver/internals/hli_v1/ports/port_l23/family_e.py +107 -0
  157. xoa_driver/internals/hli_v1/ports/port_l23/family_f.py +151 -0
  158. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +77 -0
  159. xoa_driver/internals/hli_v1/ports/port_l23/family_h.py +67 -0
  160. xoa_driver/internals/hli_v1/ports/port_l23/family_i.py +84 -0
  161. xoa_driver/internals/hli_v1/ports/port_l23/family_j.py +68 -0
  162. xoa_driver/internals/hli_v1/ports/port_l23/family_k.py +73 -0
  163. xoa_driver/internals/hli_v1/ports/port_l23/family_l.py +82 -0
  164. xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py +166 -0
  165. xoa_driver/internals/hli_v1/ports/port_l23/family_m.py +29 -0
  166. xoa_driver/internals/hli_v1/ports/port_l23/fault_jkl.py +24 -0
  167. xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +722 -0
  168. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ghijkl.py +369 -0
  169. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ijkl_chimera.py +60 -0
  170. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_l.py +78 -0
  171. xoa_driver/internals/hli_v1/ports/port_l23/port_l23ve.py +101 -0
  172. xoa_driver/internals/hli_v1/ports/port_l47/__init__.py +0 -0
  173. xoa_driver/internals/hli_v1/ports/port_l47/counters.py +174 -0
  174. xoa_driver/internals/hli_v1/ports/port_l47/main.py +228 -0
  175. xoa_driver/internals/hli_v1/ports/port_l47/packet_engine.py +31 -0
  176. xoa_driver/internals/hli_v1/revisions.py +11 -0
  177. xoa_driver/internals/hli_v1/testers/__init__.py +0 -0
  178. xoa_driver/internals/hli_v1/testers/_base_tester.py +259 -0
  179. xoa_driver/internals/hli_v1/testers/genuine/__init__.py +0 -0
  180. xoa_driver/internals/hli_v1/testers/genuine/l_23/__init__.py +0 -0
  181. xoa_driver/internals/hli_v1/testers/genuine/l_23/health.py +16 -0
  182. xoa_driver/internals/hli_v1/testers/genuine/l_23/rest_api.py +38 -0
  183. xoa_driver/internals/hli_v1/testers/genuine/l_23/time_keeper.py +57 -0
  184. xoa_driver/internals/hli_v1/testers/genuine/l_23/upload_file.py +29 -0
  185. xoa_driver/internals/hli_v1/testers/genuine/management_interface.py +42 -0
  186. xoa_driver/internals/hli_v1/testers/l23_tester.py +196 -0
  187. xoa_driver/internals/hli_v1/testers/l23ve_tester.py +114 -0
  188. xoa_driver/internals/hli_v1/testers/l47_tester.py +106 -0
  189. xoa_driver/internals/hli_v1/testers/l47ve_tester.py +54 -0
  190. xoa_driver/internals/hli_v2/__init__.py +0 -0
  191. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  192. xoa_driver/internals/hli_v2/indices/base_index.py +39 -0
  193. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  194. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +115 -0
  195. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +59 -0
  196. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +71 -0
  197. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +96 -0
  198. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +148 -0
  199. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +89 -0
  200. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +261 -0
  201. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +166 -0
  202. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +112 -0
  203. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +25 -0
  204. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  205. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +50 -0
  206. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +17 -0
  207. xoa_driver/internals/hli_v2/indices/length_term.py +44 -0
  208. xoa_driver/internals/hli_v2/indices/match_term.py +49 -0
  209. xoa_driver/internals/hli_v2/indices/port_dataset.py +53 -0
  210. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  211. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +234 -0
  212. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +32 -0
  213. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  214. xoa_driver/internals/hli_v2/modules/__interfaces.py +21 -0
  215. xoa_driver/internals/hli_v2/modules/base_module.py +125 -0
  216. xoa_driver/internals/hli_v2/modules/module_chimera.py +358 -0
  217. xoa_driver/internals/hli_v2/modules/module_l23ve.py +58 -0
  218. xoa_driver/internals/hli_v2/modules/module_l47.py +230 -0
  219. xoa_driver/internals/hli_v2/modules/module_l47ve.py +8 -0
  220. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  221. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +73 -0
  222. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +75 -0
  223. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +85 -0
  224. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +144 -0
  225. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +84 -0
  226. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +40 -0
  227. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +25 -0
  228. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +25 -0
  229. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +39 -0
  230. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +55 -0
  231. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +797 -0
  232. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +25 -0
  233. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +40 -0
  234. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +339 -0
  235. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  236. xoa_driver/internals/hli_v2/ports/base_port.py +105 -0
  237. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  238. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  239. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +64 -0
  240. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +441 -0
  241. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +172 -0
  242. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +156 -0
  243. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +117 -0
  244. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +59 -0
  245. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  246. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  247. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  248. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +340 -0
  249. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +99 -0
  250. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +36 -0
  251. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +116 -0
  252. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +102 -0
  253. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +113 -0
  254. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +420 -0
  255. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +22 -0
  256. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +22 -0
  257. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +36 -0
  258. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +49 -0
  259. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +96 -0
  260. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +144 -0
  261. xoa_driver/internals/hli_v2/ports/port_l23/family_g.py +77 -0
  262. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +60 -0
  263. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +66 -0
  264. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +53 -0
  265. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +58 -0
  266. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +67 -0
  267. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +149 -0
  268. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +28 -0
  269. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +22 -0
  270. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +342 -0
  271. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +50 -0
  272. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +65 -0
  273. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +81 -0
  274. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  275. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +146 -0
  276. xoa_driver/internals/hli_v2/ports/port_l47/main.py +137 -0
  277. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +20 -0
  278. xoa_driver/internals/hli_v2/revisions.py +11 -0
  279. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  280. xoa_driver/internals/hli_v2/testers/_base_tester.py +207 -0
  281. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  282. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  283. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +16 -0
  284. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +34 -0
  285. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +50 -0
  286. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +26 -0
  287. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +38 -0
  288. xoa_driver/internals/hli_v2/testers/l23_tester.py +159 -0
  289. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +98 -0
  290. xoa_driver/internals/hli_v2/testers/l47_tester.py +95 -0
  291. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +50 -0
  292. xoa_driver/internals/state_storage/__init__.py +0 -0
  293. xoa_driver/internals/state_storage/_speed_detector.py +121 -0
  294. xoa_driver/internals/state_storage/modules_state.py +128 -0
  295. xoa_driver/internals/state_storage/ports_state.py +154 -0
  296. xoa_driver/internals/state_storage/testers_state.py +104 -0
  297. xoa_driver/internals/utils/__init__.py +0 -0
  298. xoa_driver/internals/utils/attributes.py +33 -0
  299. xoa_driver/internals/utils/cap_id.py +63 -0
  300. xoa_driver/internals/utils/con_traffic_light.py +88 -0
  301. xoa_driver/internals/utils/indices/__init__.py +0 -0
  302. xoa_driver/internals/utils/indices/_interfaces.py +26 -0
  303. xoa_driver/internals/utils/indices/header_modifier_manager.py +56 -0
  304. xoa_driver/internals/utils/indices/index_manager.py +95 -0
  305. xoa_driver/internals/utils/indices/observer.py +17 -0
  306. xoa_driver/internals/utils/kind.py +19 -0
  307. xoa_driver/internals/utils/managers/__init__.py +0 -0
  308. xoa_driver/internals/utils/managers/abc.py +44 -0
  309. xoa_driver/internals/utils/managers/exceptions.py +22 -0
  310. xoa_driver/internals/utils/managers/modules_manager.py +118 -0
  311. xoa_driver/internals/utils/managers/ports_manager.py +116 -0
  312. xoa_driver/internals/utils/rev_tool.py +21 -0
  313. xoa_driver/internals/utils/session.py +117 -0
  314. xoa_driver/internals/warn.py +32 -0
  315. xoa_driver/lli.py +15 -0
  316. xoa_driver/misc.py +57 -0
  317. xoa_driver/modules.py +448 -0
  318. xoa_driver/ports.py +332 -0
  319. xoa_driver/testers.py +37 -0
  320. xoa_driver/utils.py +12 -0
  321. xoa_driver/v2/__init__.py +11 -0
  322. xoa_driver/v2/misc.py +77 -0
  323. xoa_driver/v2/modules.py +308 -0
  324. xoa_driver/v2/ports.py +232 -0
  325. xoa_driver/v2/testers.py +24 -0
@@ -0,0 +1,1875 @@
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
+ ReservedStatus,
27
+ ReservedAction,
28
+ OnOff,
29
+ TimingSource,
30
+ MediaCFPState,
31
+ MediaCFPType,
32
+ SMAInputFunction,
33
+ SMAOutputFunction,
34
+ SMAStatus,
35
+ HasDemo,
36
+ IsValid,
37
+ IsPermanent,
38
+ YesNo,
39
+ UpdateState,
40
+ IsOnline,
41
+ TXClockSource,
42
+ TXClockStatus,
43
+ LoopBandwidth,
44
+ MediaConfigurationType,
45
+ ImpairmentLatencyMode,
46
+ PPMSweepStatus,
47
+ PPMSweepMode,
48
+ ModuleModelName
49
+ )
50
+
51
+
52
+ @register_command
53
+ @dataclass
54
+ class M_RESERVATION:
55
+ """
56
+ Set this command to reserve, release, or relinquish a module itself (as
57
+ opposed to its ports). The module must be reserved before its hardware image can
58
+ be upgraded. The owner of the session must already have been specified.
59
+ Reservation will fail if the chassis or any ports are reserved for other users.
60
+
61
+ .. note::
62
+
63
+ The reservation parameters are slightly asymmetric with respect to set/get. When querying for the current reservation state, the chassis will use these values.
64
+
65
+ """
66
+
67
+ code: typing.ClassVar[int] = 72
68
+ pushed: typing.ClassVar[bool] = True
69
+
70
+ _connection: 'interfaces.IConnection'
71
+ _module: int
72
+
73
+ class GetDataAttr(ResponseBodyStruct):
74
+ operation: ReservedStatus = field(XmpByte())
75
+ """coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get.
76
+ When set, it contains the operation to perform. When get, it contains the status.
77
+ """
78
+
79
+ class SetDataAttr(RequestBodyStruct):
80
+ operation: ReservedAction = field(XmpByte())
81
+ """coded byte, containing the operation to perform. The reservation parameters are asymmetric with respect to set/get.
82
+ When set, it contains the operation to perform. When get, it contains the status.
83
+ """
84
+
85
+ def get(self) -> Token[GetDataAttr]:
86
+ """Get the reservation status of the test module.
87
+
88
+ :return: the reservation status of the test module
89
+ :rtype: M_RESERVATION.GetDataAttr
90
+ """
91
+
92
+ return Token(self._connection, build_get_request(self, module=self._module))
93
+
94
+ def set(self, operation: ReservedAction) -> Token[None]:
95
+ """Set the reservation status of the test module.
96
+
97
+ :param operation: reservation operation to perform
98
+ :type operation: ReservedAction
99
+ """
100
+
101
+ return Token(self._connection, build_set_request(self, module=self._module, operation=operation))
102
+
103
+ set_release = functools.partialmethod(set, ReservedAction.RELEASE)
104
+ """Release the test module.
105
+ """
106
+
107
+ set_reserve = functools.partialmethod(set, ReservedAction.RESERVE)
108
+ """Reserve the test module.
109
+ """
110
+
111
+ set_relinquish = functools.partialmethod(set, ReservedAction.RELINQUISH)
112
+ """Release the ownership of the test module from another user.
113
+ """
114
+
115
+
116
+ @register_command
117
+ @dataclass
118
+ class M_RESERVEDBY:
119
+ """
120
+ Identify the user who has a module reserved. Returns an empty string if the
121
+ module is not currently reserved by anyone.
122
+ """
123
+
124
+ code: typing.ClassVar[int] = 73
125
+ pushed: typing.ClassVar[bool] = True
126
+
127
+ _connection: 'interfaces.IConnection'
128
+ _module: int
129
+
130
+ class GetDataAttr(ResponseBodyStruct):
131
+ username: str = field(XmpStr())
132
+ """string, containing the name of the current owner of the module."""
133
+
134
+ def get(self) -> Token[GetDataAttr]:
135
+ """Get the username who has reserved the test module.
136
+
137
+ :return: the username who has reserved the test module
138
+ :rtype: M_RESERVEDBY.GetDataAttr
139
+ """
140
+
141
+ return Token(self._connection, build_get_request(self, module=self._module))
142
+
143
+
144
+ @register_command
145
+ @dataclass
146
+ class M_MODEL:
147
+ """
148
+ Gets the legacy model P/N name of a Xena test module.
149
+ """
150
+
151
+ code: typing.ClassVar[int] = 75
152
+ pushed: typing.ClassVar[bool] = True
153
+
154
+ _connection: 'interfaces.IConnection'
155
+ _module: int
156
+
157
+ class GetDataAttr(ResponseBodyStruct):
158
+ model: str = field(XmpStr())
159
+ """string, the legacy model P/N name of a Xena test module."""
160
+
161
+ def get(self) -> Token[GetDataAttr]:
162
+ """Gets the legacy model P/N name of a Xena test module.
163
+
164
+ :return: the legacy model P/N name of a Xena test module
165
+ :rtype: M_MODEL.GetDataAttr
166
+ """
167
+
168
+ return Token(self._connection, build_get_request(self, module=self._module))
169
+
170
+
171
+ @register_command
172
+ @dataclass
173
+ class M_SERIALNO:
174
+ """
175
+ Gets the unique serial number of a module.
176
+ """
177
+
178
+ code: typing.ClassVar[int] = 76
179
+ pushed: typing.ClassVar[bool] = True
180
+
181
+ _connection: 'interfaces.IConnection'
182
+ _module: int
183
+
184
+ class GetDataAttr(ResponseBodyStruct):
185
+ serial_number: int = field(XmpInt())
186
+ """integer, the serial number of this module."""
187
+
188
+ def get(self) -> Token[GetDataAttr]:
189
+ """Gets the unique serial number of the test module.
190
+
191
+ :return: the serial number of this test module
192
+ :rtype: M_SERIALNO.GetDataAttr
193
+ """
194
+
195
+ return Token(self._connection, build_get_request(self, module=self._module))
196
+
197
+
198
+ @register_command
199
+ @dataclass
200
+ class M_VERSIONNO:
201
+ """
202
+ Gets the version number of the hardware image installed on a module.
203
+ """
204
+
205
+ code: typing.ClassVar[int] = 77
206
+ pushed: typing.ClassVar[bool] = True
207
+
208
+ _connection: 'interfaces.IConnection'
209
+ _module: int
210
+
211
+ class GetDataAttr(ResponseBodyStruct):
212
+ version: int = field(XmpInt())
213
+ """integer, the hardware image version number."""
214
+
215
+ def get(self) -> Token[GetDataAttr]:
216
+ """Gets the version number of the hardware image installed on the test module.
217
+
218
+ :return: the hardware image version number of the test module
219
+ :rtype: M_VERSIONNO.GetDataAttr
220
+ """
221
+
222
+ return Token(self._connection, build_get_request(self, module=self._module))
223
+
224
+
225
+ @register_command
226
+ @dataclass
227
+ class M_STATUS:
228
+ """
229
+ Get status readings for the test module itself.
230
+ """
231
+
232
+ code: typing.ClassVar[int] = 79
233
+ pushed: typing.ClassVar[bool] = True
234
+
235
+ _connection: 'interfaces.IConnection'
236
+ _module: int
237
+
238
+ class GetDataAttr(ResponseBodyStruct):
239
+ temperature: int = field(XmpInt())
240
+ """integer, temperature of the main hardware chip, in degrees Celsius."""
241
+
242
+ def get(self) -> Token[GetDataAttr]:
243
+ """Get the status readings of the test module
244
+
245
+ :return: temperature of the main hardware chip, in degrees Celsius
246
+ :rtype: M_STATUS.GetDataAttr
247
+ """
248
+
249
+ return Token(self._connection, build_get_request(self, module=self._module))
250
+
251
+
252
+ @register_command
253
+ @dataclass
254
+ class M_PORTCOUNT:
255
+ """
256
+ Gets the maximum number of ports on a module.
257
+
258
+ .. note::
259
+
260
+ For a CFP-type module this number refers to the maximum number of ports possible on the module regardless of the media configuration.
261
+ So if a CFP-type module can be set in for instance either 1x100G mode or 8x10G mode then this command will always return 8.
262
+ If you want the current number of ports for a CFP-type module you need to read the M_CFPCONFIGEXT` command which returns the number of current ports.
263
+
264
+ """
265
+
266
+ code: typing.ClassVar[int] = 80
267
+ pushed: typing.ClassVar[bool] = False
268
+
269
+ _connection: 'interfaces.IConnection'
270
+ _module: int
271
+
272
+ class GetDataAttr(ResponseBodyStruct):
273
+ port_count: int = field(XmpInt())
274
+ """integer, the maximum number of ports."""
275
+
276
+ def get(self) -> Token[GetDataAttr]:
277
+ """Gets the maximum number of ports on a module.
278
+
279
+ :return: the maximum number of ports on the test module
280
+ :rtype: M_PORTCOUNT.GetDataAttr
281
+ """
282
+
283
+ return Token(self._connection, build_get_request(self, module=self._module))
284
+
285
+
286
+ @register_command
287
+ @dataclass
288
+ class M_UPGRADE:
289
+ """
290
+ Transfers a hardware image file from the chassis to a module. This image will
291
+ take effect when the chassis is powered-on the next time. The transfer takes
292
+ approximately 3 minutes, but no further action is required by the client.
293
+ """
294
+
295
+ code: typing.ClassVar[int] = 81
296
+ pushed: typing.ClassVar[bool] = False
297
+
298
+ _connection: 'interfaces.IConnection'
299
+ _module: int
300
+
301
+ class SetDataAttr(RequestBodyStruct):
302
+ magic: int = field(XmpInt())
303
+ """integer, must be the special value -1480937026."""
304
+ image_name: str = field(XmpStr())
305
+ """string, the fully qualified name of a file previously uploaded to the chassis."""
306
+
307
+ def set(self, image_name: str) -> Token[None]:
308
+ """Transfers a hardware image file from the chassis to a module. This image will
309
+ take effect when the chassis is powered-on the next time. The transfer takes
310
+ approximately 3 minutes, but no further action is required by the client.
311
+
312
+ :param image_name: the fully qualified name of a file previously uploaded to the chassis
313
+ :type image_name: str
314
+ """
315
+
316
+ return Token(self._connection, build_set_request(self, module=self._module, magic=-1480937026, image_name=image_name))
317
+
318
+
319
+ @register_command
320
+ @dataclass
321
+ class M_UPGRADEPROGRESS:
322
+ """
323
+ Provides a value indicating the current stage of an ongoing hardware image
324
+ upgrade operation. This is for information only; the upgrade operation runs to
325
+ completion by itself. The progress values are pushed to the client without it
326
+ having to request them.
327
+ """
328
+
329
+ code: typing.ClassVar[int] = 82
330
+ pushed: typing.ClassVar[bool] = False
331
+
332
+ _connection: 'interfaces.IConnection'
333
+ _module: int
334
+
335
+ class GetDataAttr(ResponseBodyStruct):
336
+ progress: int = field(XmpInt())
337
+ """integer, the current stage within the three phases.
338
+ 0: Failure.
339
+ 1-100: Erase completion percentage.
340
+ 101-200: Write completion percentage
341
+ 201-300: Verify completion percentage.
342
+ """
343
+
344
+ def get(self) -> Token[GetDataAttr]:
345
+ """Get the current stage of an ongoing hardware image
346
+ upgrade operation. This is for information only; the upgrade operation runs to
347
+ completion by itself. The progress values are pushed to the client without it
348
+ having to request them.
349
+
350
+ :param progress: the current stage within the three phases.
351
+ 0: Failure.
352
+ 1-100: Erase completion percentage.
353
+ 101-200: Write completion percentage.
354
+ 201-300: Verify completion percentage.
355
+ :type progress: M_UPGRADEPROGRESS.GetDataAttr
356
+ """
357
+
358
+ return Token(self._connection, build_get_request(self, module=self._module))
359
+
360
+
361
+ @register_command
362
+ @dataclass
363
+ class M_TIMESYNC:
364
+ """
365
+ Control how the test module timestamp clock is running, either freely in the
366
+ chassis or locked to an external system time. Running with free chassis time
367
+ allows nano-second precision measurements of latencies, but only when the
368
+ transmitting and receiving ports are in the same chassis. Running with locked
369
+ external time enables inter-chassis latency measurements, but can introduce
370
+ small time discontinuities as the test module time is adjusted.
371
+ """
372
+
373
+ code: typing.ClassVar[int] = 83
374
+ pushed: typing.ClassVar[bool] = True
375
+
376
+ _connection: 'interfaces.IConnection'
377
+ _module: int
378
+
379
+ class GetDataAttr(ResponseBodyStruct):
380
+ source: int = field(XmpByte())
381
+ """coded byte, selecting the time sync mode."""
382
+
383
+ class SetDataAttr(RequestBodyStruct):
384
+ source: int = field(XmpByte())
385
+ """coded byte, selecting the time sync mode."""
386
+
387
+ def get(self) -> Token[GetDataAttr]:
388
+ """Get the time sync mode of the test module timestamp clock.
389
+
390
+ :return: the time sync mode of the test module timestamp clock
391
+ :rtype: M_TIMESYNC.GetDataAttr
392
+ """
393
+
394
+ return Token(self._connection, build_get_request(self, module=self._module))
395
+
396
+ def set(self, source: TimingSource) -> Token[None]:
397
+ """Set the time sync mode of the test module timestamp clock.
398
+
399
+ :param mode: the time sync mode of the test module timestamp clock
400
+ :type mode: TimingSource
401
+ """
402
+
403
+ return Token(self._connection, build_set_request(self, module=self._module, source=source))
404
+
405
+ set_chassis = functools.partialmethod(set, TimingSource.CHASSIS)
406
+ """Set the time sync mode of the test module to Chassis Mode.
407
+ """
408
+
409
+ set_external = functools.partialmethod(set, TimingSource.EXTERNAL)
410
+ """Set the time sync mode of the test module to External Mode.
411
+ """
412
+
413
+ set_module = functools.partialmethod(set, TimingSource.MODULE)
414
+ """Set the time sync mode of the test module to Module Mode.
415
+ """
416
+
417
+
418
+ @register_command
419
+ @dataclass
420
+ class M_CFPTYPE:
421
+ """
422
+ Get information about the transceiver currently inserted into the cages.
423
+ """
424
+
425
+ code: typing.ClassVar[int] = 84
426
+ pushed: typing.ClassVar[bool] = True
427
+
428
+ _connection: 'interfaces.IConnection'
429
+ _module: int
430
+
431
+ class GetDataAttr(ResponseBodyStruct):
432
+ state: MediaCFPState = field(XmpByte())
433
+ """coded byte, specifying the CFP state."""
434
+ type: MediaCFPType = field(XmpByte())
435
+ """coded byte, specifying the CFP type."""
436
+
437
+ def get(self) -> Token[GetDataAttr]:
438
+ """Get CFP type information about the transceiver currently inserted into the cage.
439
+
440
+ :return:
441
+ - the CFP state
442
+ - the CFP type
443
+ :rtype: M_CFPTYPE.GetDataAttr
444
+ """
445
+
446
+ return Token(self._connection, build_get_request(self, module=self._module))
447
+
448
+ # WAS DEPRICATED IN V1 - Suppose to be removed in V2
449
+ @register_command
450
+ @dataclass
451
+ class M_CFPCONFIG:
452
+ """
453
+ .. deprecated:: 1.3
454
+
455
+ The current number of ports and their speed of a CFP test module. If the CFP
456
+ type is NOTFLEXIBLE then it reflects the transceiver currently in the CFP cage.
457
+ If the CFP type is FLEXIBLE (or NOTPRESENT) then the configuration can be changed
458
+ explicitly. The following combinations are possible: 4x10G, 8x10G, 1x40G, 2x40G,
459
+ and 1x100G. (replaced by :class:`M_CFPCONFIGEXT`)
460
+ """
461
+
462
+ code: typing.ClassVar[int] = 85
463
+ pushed: typing.ClassVar[bool] = True
464
+
465
+ _connection: 'interfaces.IConnection'
466
+ _module: int
467
+
468
+ class GetDataAttr(ResponseBodyStruct):
469
+ port_count: int = field(XmpByte())
470
+ """byte, number of ports."""
471
+ port_speed: int = field(XmpByte())
472
+ """byte, port speed, in Gbps."""
473
+
474
+ class SetDataAttr(RequestBodyStruct):
475
+ port_count: int = field(XmpByte())
476
+ """byte, number of ports."""
477
+ port_speed: int = field(XmpByte())
478
+ """byte, port speed, in Gbps."""
479
+
480
+ def get(self) -> Token[GetDataAttr]:
481
+ """Get the current number of ports and their speed of a CFP test module.
482
+
483
+ :return:
484
+ - number of ports
485
+ - port speed, in Gbps
486
+ :rtype: M_CFPCONFIG.GetDataAttr
487
+ """
488
+
489
+ return Token(self._connection, build_get_request(self, module=self._module))
490
+
491
+ def set(self, port_count: int, port_speed: int) -> Token[None]:
492
+ """Set the current number of ports and their speed of a CFP test module.
493
+
494
+ :param port_count: number of ports
495
+ :type port_count: int
496
+ :param port_speed: port speed, in Gbps
497
+ :type port_speed: int
498
+ """
499
+
500
+ return Token(self._connection, build_set_request(self, module=self._module, port_count=port_count, port_speed=port_speed))
501
+
502
+
503
+ @register_command
504
+ @dataclass
505
+ class M_COMMENT:
506
+ """
507
+ Gets the user-defined description string of a module.
508
+ """
509
+
510
+ code: typing.ClassVar[int] = 86
511
+ pushed: typing.ClassVar[bool] = True
512
+
513
+ _connection: 'interfaces.IConnection'
514
+ _module: int
515
+
516
+ class GetDataAttr(ResponseBodyStruct):
517
+ comment: str = field(XmpStr())
518
+ """string, the user-specified comment/description for the module."""
519
+
520
+ class SetDataAttr(RequestBodyStruct):
521
+ comment: str = field(XmpStr())
522
+ """string, the user-specified comment/description for the module."""
523
+
524
+ def get(self) -> Token[GetDataAttr]:
525
+ """Get the user-defined description string of a module.
526
+
527
+ :return: the user-specified comment/description for the module
528
+ :rtype: M_COMMENT.GetDataAttr
529
+ """
530
+
531
+ return Token(self._connection, build_get_request(self, module=self._module))
532
+
533
+ def set(self, comment: str) -> Token[None]:
534
+ """Set the user-defined description string of a module.
535
+
536
+ :param comment: the user-specified comment/description for the module
537
+ :type comment: str
538
+ """
539
+
540
+ return Token(self._connection, build_set_request(self, module=self._module, comment=comment))
541
+
542
+
543
+ @register_command
544
+ @dataclass
545
+ class M_UPGRADEPAR:
546
+ """
547
+ Parallel module upgrade.
548
+
549
+ Transfers a hardware image file from the chassis to a module. This image will
550
+ take effect when the chassis is powered-on the next time. The transfer takes
551
+ approximately 3 minutes, but no further action is required by the client.
552
+ """
553
+
554
+ code: typing.ClassVar[int] = 87
555
+ pushed: typing.ClassVar[bool] = False
556
+
557
+ _connection: 'interfaces.IConnection'
558
+ _module: int
559
+
560
+ class SetDataAttr(RequestBodyStruct):
561
+ magic: int = field(XmpInt())
562
+ """integer, must be the special value -1480937026."""
563
+ image_name: str = field(XmpStr())
564
+ """string, the fully qualified name of a file previously uploaded to the chassis."""
565
+
566
+ def set(self, image_name: str) -> Token[None]:
567
+ """Transfers a hardware image file from the chassis to a module. This image will
568
+ take effect when the chassis is powered-on the next time. The transfer takes
569
+ approximately 3 minutes, but no further action is required by the client.
570
+
571
+ :param image_name: the fully qualified name of a file previously uploaded to the chassis
572
+ :type image_name: str
573
+ """
574
+
575
+ return Token(self._connection, build_set_request(self, module=self._module, magic=-1480937026, image_name=image_name))
576
+
577
+
578
+ @register_command
579
+ @dataclass
580
+ class M_TIMEADJUSTMENT:
581
+ """
582
+ Control time adjustment for module wall clock.
583
+ """
584
+
585
+ code: typing.ClassVar[int] = 88
586
+ pushed: typing.ClassVar[bool] = False
587
+
588
+ _connection: 'interfaces.IConnection'
589
+ _module: int
590
+
591
+ class GetDataAttr(ResponseBodyStruct):
592
+ adjust: int = field(XmpInt())
593
+ """integer, adjustment in nanoseconds. This value should be a multiple of 8 as it will be converted to a number of 125 MHz clocks."""
594
+
595
+ class SetDataAttr(RequestBodyStruct):
596
+ adjust: int = field(XmpInt())
597
+ """integer, adjustment in nanoseconds. This value should be a multiple of 8 as it will be converted to a number of 125 MHz clocks."""
598
+
599
+ def get(self) -> Token[GetDataAttr]:
600
+ """Get the time adjustment value for the module clock.
601
+
602
+ :return: the time adjustment value for the module clock
603
+ :rtype: M_TIMEADJUSTMENT.GetDataAttr
604
+ """
605
+
606
+ return Token(self._connection, build_get_request(self, module=self._module))
607
+
608
+ def set(self, adjust: int) -> Token[None]:
609
+ """Set the time adjustment value for the module clock. This value should be a multiple of 8 as it will be converted to a number of 125 MHz clocks.
610
+
611
+ :param adjust: the time adjustment value for the module clock
612
+ :type adjust: int
613
+ """
614
+
615
+ return Token(self._connection, build_set_request(self, module=self._module, adjust=adjust))
616
+
617
+
618
+ @register_command
619
+ @dataclass
620
+ class M_CAPABILITIES:
621
+ """
622
+ Gets the module capabilities.
623
+ """
624
+
625
+ code: typing.ClassVar[int] = 89
626
+ pushed: typing.ClassVar[bool] = False
627
+
628
+ _connection: 'interfaces.IConnection'
629
+ _module: int
630
+
631
+ class GetDataAttr(ResponseBodyStruct):
632
+ can_advanced_timing: YesNo = field(XmpInt())
633
+ """coded integer, is advanced timing functions supported?"""
634
+ can_local_time_adjust: YesNo = field(XmpInt())
635
+ """coded integer, is local time adjustment supported?"""
636
+ can_media_config: YesNo = field(XmpInt())
637
+ """coded integer, is module media configuration supported?"""
638
+ require_multi_image: YesNo = field(XmpInt())
639
+ """coded integer, does this module switch images during runtime?"""
640
+ is_chimera: YesNo = field(XmpInt())
641
+ """coded integer, is this a Chimera module?"""
642
+ max_clock_ppm: int = field(XmpInt())
643
+ """integer, maximum supported absolute +- clock ppm setting."""
644
+ can_tsn: YesNo = field(XmpInt())
645
+ """coded integer, does this module support Time Sensitive Networking (TSN) ?"""
646
+ can_ppm_sweep: YesNo = field(XmpInt())
647
+ """coded integer, does this module support Local Clock Adjustment/Sweep (aka. PPM Sweep) ?"""
648
+ monitoring_bitmask: int = field(XmpInt())
649
+ """extended module monitoring capabilities"""
650
+
651
+ def get(self) -> Token[GetDataAttr]:
652
+ """Get the test module capabilities.
653
+
654
+ :return:
655
+ - is advanced timing functions supported?
656
+ - is local time adjustment supported?
657
+ - is module media configuration supported?
658
+ - does this module switch images during runtime?
659
+ - is this a Chimera module?
660
+ - maximum supported absolute +- clock ppm setting.
661
+ - does this module support Time Sensitive Networking (TSN) ?
662
+ - does this module support Local Clock Adjustment/Sweep (aka. PPM Sweep) ?
663
+
664
+ :rtype: M_CAPABILITIES.GetDataAttr
665
+ """
666
+
667
+ return Token(self._connection, build_get_request(self, module=self._module))
668
+
669
+
670
+ @register_command
671
+ @dataclass
672
+ class M_MEDIASUPPORT:
673
+ """
674
+ This command shows the available speeds on a module. The structure of the returned value is
675
+ ``[ <cage_type> <available_speed_count> [<ports_per_speed> <speed>] ]``.
676
+ ``[<ports_per_speed> <speed>]`` is repeated until all speeds supported by the ``<cage_type>`` has been listed.
677
+ ``[<cage_type> <available_speed_count>]`` is repeated for all cage types on the module including the related ``<ports_per_speed> <speed>`` information.
678
+ """
679
+
680
+ code: typing.ClassVar[int] = 90
681
+ pushed: typing.ClassVar[bool] = True
682
+
683
+ _connection: 'interfaces.IConnection'
684
+ _module: int
685
+
686
+ class GetDataAttr(ResponseBodyStruct):
687
+ media_info_list: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
688
+ """coded integer, media information"""
689
+
690
+ def get(self) -> Token[GetDataAttr]:
691
+ """Get the media supports by the port, including cage type, available speed count, ports per speed, and the corresponding speed.
692
+
693
+ :return:
694
+ a list of integers. The structure of the returned value is ``[ <cage_type> <available_speed_count>[<ports_per_speed> <speed>] ]``.
695
+ ``[<ports_per_speed> <speed>]`` is repeated until all speeds supported by the ``<cage_type>`` has been listed.
696
+ ``[<cage_type> <available_speed_count>]`` is repeated for all cage types on the module including the related ``<ports_per_speed> <speed>`` information.
697
+
698
+ :rtype: M_MEDIASUPPORT.GetDataAttr
699
+ """
700
+
701
+ return Token(self._connection, build_get_request(self, module=self._module))
702
+
703
+
704
+ @register_command
705
+ @dataclass
706
+ class M_FPGAREIMAGE:
707
+ """
708
+ Reload FPGA image.
709
+ """
710
+
711
+ code: typing.ClassVar[int] = 91
712
+ pushed: typing.ClassVar[bool] = False
713
+
714
+ _connection: 'interfaces.IConnection'
715
+ _module: int
716
+
717
+ class SetDataAttr(RequestBodyStruct):
718
+ key_code: int = field(XmpInt())
719
+ """integer, must be 42."""
720
+
721
+ def set(self) -> Token[None]:
722
+ """Reload the FPGA image.
723
+
724
+ :param key_code: must be 42.
725
+ :type key_code: int.
726
+ """
727
+
728
+ return Token(self._connection, build_set_request(self, module=self._module, key_code=42))
729
+
730
+
731
+ @register_command
732
+ @dataclass
733
+ class M_MULTIUSER:
734
+ """
735
+ Enable or disable multiple sessions to control the same module.
736
+ """
737
+
738
+ code: typing.ClassVar[int] = 92
739
+ pushed: typing.ClassVar[bool] = False
740
+
741
+ _connection: 'interfaces.IConnection'
742
+ _module: int
743
+
744
+ class GetDataAttr(ResponseBodyStruct):
745
+ on_off: OnOff = field(XmpByte())
746
+ """coded byte, enable or disable multiple sessions to control the same module."""
747
+
748
+ class SetDataAttr(RequestBodyStruct):
749
+ on_off: OnOff = field(XmpByte())
750
+ """coded byte, enable or disable multiple sessions to control the same module."""
751
+
752
+ def get(self) -> Token[GetDataAttr]:
753
+ """Get the status of multiple sessions controlling the same module.
754
+
755
+ :return: the status of multiple sessions controlling the same module
756
+ :rtype: M_MULTIUSER.GetDataAttr
757
+ """
758
+
759
+ return Token(self._connection, build_get_request(self, module=self._module))
760
+
761
+ def set(self, on_off: OnOff) -> Token[None]:
762
+ """Enable or disable multiple sessions to control the same module.
763
+
764
+ :param on_off: Enable or disable multiple sessions to control the same module
765
+ :type on_off: OnOff
766
+ """
767
+
768
+ return Token(self._connection, build_set_request(self, module=self._module, on_off=on_off))
769
+
770
+ set_off = functools.partialmethod(set, OnOff.OFF)
771
+ """Disable multiple sessions to control the same module.
772
+ """
773
+
774
+ set_on = functools.partialmethod(set, OnOff.ON)
775
+ """Enable multiple sessions to control the same module.
776
+ """
777
+
778
+
779
+ @register_command
780
+ @dataclass
781
+ class M_CFPCONFIGEXT:
782
+ """
783
+ This property defines the current number of ports and the speed of each of them
784
+ on a CFP test module. If the CFP type is ``NOTFLEXIBLE`` then it reflects the
785
+ transceiver currently in the CFP cage. If the CFP type is ``FLEXIBLE`` (or
786
+ ``NOTPRESENT``) then the configuration can be changed explicitly. The following
787
+ combinations are possible: 2x10G, 4x10G, 8x10G, 2x25G, 4x25G, 8x25G, 1x40G,
788
+ 2x40G, 2x50G, 4x50G, 8x50G, 1x100G, 2x100G, 4x100G, 2x200G, and 1x400G.
789
+ (replaces :class:`M_CFPCONFIGEXT`)
790
+
791
+ .. note::
792
+
793
+ ``<portspeed_list>`` is a list of integers, where the first element is the number of ports followed by a number of port speeds in Mbps.
794
+ The number of port speeds equals the value of the number of ports.
795
+ For example if the configuration is 4x25G, ``<portspeed_list>`` will be ``[4, 25000, 25000, 25000, 25000]``.
796
+ """
797
+
798
+ code: typing.ClassVar[int] = 93
799
+ pushed: typing.ClassVar[bool] = True
800
+
801
+ _connection: 'interfaces.IConnection'
802
+ _module: int
803
+
804
+ class GetDataAttr(ResponseBodyStruct):
805
+ portspeed_list: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
806
+
807
+ class SetDataAttr(RequestBodyStruct):
808
+ portspeed_list: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
809
+
810
+ def get(self) -> Token[GetDataAttr]:
811
+ """Get a list of port count and corresponding speeds supported by the current module config.
812
+
813
+ :return: a list of port count and corresponding speeds supported by the current module config
814
+ :rtype: M_CFPCONFIGEXT.GetDataAttr
815
+ """
816
+
817
+ return Token(self._connection, build_get_request(self, module=self._module))
818
+
819
+ def set(self, portspeed_list: typing.List[int]) -> Token[None]:
820
+ """"""
821
+
822
+ return Token(self._connection, build_set_request(self, module=self._module, portspeed_list=portspeed_list))
823
+
824
+
825
+ @register_command
826
+ @dataclass
827
+ class M_CLOCKPPB:
828
+ """
829
+ Makes small adjustments to the local clock of the test module, which drives the
830
+ TX rate of the test ports.
831
+ """
832
+
833
+ code: typing.ClassVar[int] = 94
834
+ pushed: typing.ClassVar[bool] = True
835
+
836
+ _connection: 'interfaces.IConnection'
837
+ _module: int
838
+
839
+ class GetDataAttr(ResponseBodyStruct):
840
+ ppb: int = field(XmpInt())
841
+ """integer, adjustment from nominal value, in parts-per-billion, positive or negative."""
842
+
843
+ class SetDataAttr(RequestBodyStruct):
844
+ ppb: int = field(XmpInt())
845
+ """integer, adjustment from nominal value, in parts-per-billion, positive or negative."""
846
+
847
+ def get(self) -> Token[GetDataAttr]:
848
+ """Get the module clock adjustment in ppb.
849
+
850
+ :return: the module clock adjustment in ppb
851
+ :rtype: M_CLOCKPPB.GetDataAttr
852
+ """
853
+
854
+ return Token(self._connection, build_get_request(self, module=self._module))
855
+
856
+ def set(self, ppb: int) -> Token[None]:
857
+ """Set the module clock adjustment in ppb.
858
+
859
+ :param ppb: adjustment from nominal value, in parts-per-billion, positive or negative
860
+ :type ppb: int
861
+ """
862
+
863
+ return Token(self._connection, build_set_request(self, module=self._module, ppb=ppb))
864
+
865
+
866
+ @register_command
867
+ @dataclass
868
+ class M_SMAINPUT:
869
+ """
870
+ For test modules with SMA (SubMiniature version A) connectors, selects the function of the SMA input.
871
+ """
872
+
873
+ code: typing.ClassVar[int] = 95
874
+ pushed: typing.ClassVar[bool] = True
875
+
876
+ _connection: 'interfaces.IConnection'
877
+ _module: int
878
+
879
+ class GetDataAttr(ResponseBodyStruct):
880
+ sma_in: SMAInputFunction = field(XmpByte())
881
+ """coded byte, specifying the function of the SMA input."""
882
+
883
+ class SetDataAttr(RequestBodyStruct):
884
+ sma_in: SMAInputFunction = field(XmpByte())
885
+ """coded byte, specifying the function of the SMA input."""
886
+
887
+ def get(self) -> Token[GetDataAttr]:
888
+ """Get the function of the SMA (SubMiniature version A) input of the module
889
+
890
+ :return: the function of the SMA (SubMiniature version A) input of the module
891
+ :rtype: M_SMAINPUT.GetDataAttr
892
+ """
893
+
894
+ return Token(self._connection, build_get_request(self, module=self._module))
895
+
896
+ def set(self, sma_in: SMAInputFunction) -> Token[None]:
897
+ """Set the function of the SMA (SubMiniature version A) input of the module
898
+
899
+ :param sma_in: the function of the SMA (SubMiniature version A) input of the module
900
+ :type sma_in: SMAInputFunction
901
+ """
902
+
903
+ return Token(self._connection, build_set_request(self, module=self._module, sma_in=sma_in))
904
+
905
+ set_notused = functools.partialmethod(set, SMAInputFunction.NOT_USED)
906
+ """Set SMA input to Not Used
907
+ """
908
+
909
+ set_tx2mhz = functools.partialmethod(set, SMAInputFunction.TX2MHZ)
910
+ """Set SMA input to TX Clock Ref. 2.048 MHz
911
+ """
912
+
913
+ set_tx10mhz = functools.partialmethod(set, SMAInputFunction.TX10MHZ)
914
+ """Set SMA input to TX Clock Ref. 10.0 MHz
915
+ """
916
+
917
+
918
+ @register_command
919
+ @dataclass
920
+ class M_SMAOUTPUT:
921
+ """
922
+ For test modules with SMA (SubMiniature version A) connectors, selects the function of the SMA output.
923
+ """
924
+
925
+ code: typing.ClassVar[int] = 96
926
+ pushed: typing.ClassVar[bool] = True
927
+
928
+ _connection: 'interfaces.IConnection'
929
+ _module: int
930
+
931
+ class GetDataAttr(ResponseBodyStruct):
932
+ sma_out: SMAOutputFunction = field(XmpByte())
933
+ """coded byte, specifying the function of the SMA output."""
934
+
935
+ class SetDataAttr(RequestBodyStruct):
936
+ sma_out: SMAOutputFunction = field(XmpByte())
937
+ """coded byte, specifying the function of the SMA output."""
938
+
939
+ def get(self) -> Token[GetDataAttr]:
940
+ """Get the function of the SMA (SubMiniature version A) output of the module
941
+
942
+ :return: the function of the SMA (SubMiniature version A) output of the module
943
+ :rtype: M_SMAOUTPUT.GetDataAttr
944
+ """
945
+
946
+ return Token(self._connection, build_get_request(self, module=self._module))
947
+
948
+ def set(self, sma_out: SMAOutputFunction) -> Token[None]:
949
+ """Set the function of the SMA (SubMiniature version A) output of the module
950
+
951
+ :param sma_out: the function of the SMA (SubMiniature version A) output of the module
952
+ :type sma_out: SMAOutputFunction
953
+ """
954
+
955
+ return Token(self._connection, build_set_request(self, module=self._module, sma_out=sma_out))
956
+
957
+ set_disabled = functools.partialmethod(set, SMAOutputFunction.DISABLED)
958
+ """Set SMA output function to Disabled.
959
+ """
960
+
961
+ set_passthrough = functools.partialmethod(set, SMAOutputFunction.PASSTHROUGH)
962
+ """Set SMA output function to Pass-Through.
963
+ """
964
+
965
+ set_p0sof = functools.partialmethod(set, SMAOutputFunction.P0SOF)
966
+ """Set SMA output function to Port 0 Start-of-Frame Pulse.
967
+ """
968
+
969
+ set_p1sof = functools.partialmethod(set, SMAOutputFunction.P1SOF)
970
+ """Set SMA output function to Port 1 Start-of-Frame Pulse.
971
+ """
972
+
973
+ set_ref2mhz = functools.partialmethod(set, SMAOutputFunction.REF2MHZ)
974
+ """Set SMA output function to TX Clock (nom. 2.048 MHz).
975
+ """
976
+
977
+ set_ref10mhz = functools.partialmethod(set, SMAOutputFunction.REF10MHZ)
978
+ """Set SMA output function to TX Clock (nom. 10.0 MHz).
979
+ """
980
+
981
+ set_ref125mhz = functools.partialmethod(set, SMAOutputFunction.REF125MHZ)
982
+ """Set SMA output function to TX Clock (nom. 125 MHz).
983
+ """
984
+
985
+ set_ref156mhz = functools.partialmethod(set, SMAOutputFunction.REF156MHZ)
986
+ """Set SMA output function to TX Clock (nom. 156.25 MHz).
987
+ """
988
+
989
+ set_p0rxclk = functools.partialmethod(set, SMAOutputFunction.P0RXCLK)
990
+ """Set SMA output function to Port 0 RX Clock (nom. 10.0 MHz).
991
+ """
992
+
993
+ set_p1rxclk = functools.partialmethod(set, SMAOutputFunction.P1RXCLK)
994
+ """Set SMA output function to Port 1 RX Clock (nom. 10.0 MHz).
995
+ """
996
+
997
+ set_p0rxclk2mhz = functools.partialmethod(set, SMAOutputFunction.P0RXCLK2MHZ)
998
+ """Set SMA output function to Port 0 RX Clock (nom. 2.048 MHz).
999
+ """
1000
+
1001
+ set_p1rxclk2mhz = functools.partialmethod(set, SMAOutputFunction.P1RXCLK2MHZ)
1002
+ """Set SMA output function to Port 1 RX Clock (nom. 2.048 MHz).
1003
+ """
1004
+
1005
+ set_ts_pps = functools.partialmethod(set, SMAOutputFunction.TS_PPS)
1006
+ """Set SMA output function to Timing Source (Pulse-Per-Second).
1007
+ """
1008
+
1009
+
1010
+ @register_command
1011
+ @dataclass
1012
+ class M_SMASTATUS:
1013
+ """
1014
+ For test modules with SMA connectors, this returns the status of the SMA input.
1015
+ """
1016
+
1017
+ code: typing.ClassVar[int] = 97
1018
+ pushed: typing.ClassVar[bool] = True
1019
+
1020
+ _connection: 'interfaces.IConnection'
1021
+ _module: int
1022
+
1023
+ class GetDataAttr(ResponseBodyStruct):
1024
+ status: SMAStatus = field(XmpByte())
1025
+ """coded byte, specifying the status of the SMA input."""
1026
+
1027
+ def get(self) -> Token[GetDataAttr]:
1028
+ """Get the status of the SMA input
1029
+
1030
+ :return: the status of the SMA input
1031
+ :rtype: M_SMASTATUS.GetDataAttr
1032
+ """
1033
+
1034
+ return Token(self._connection, build_get_request(self, module=self._module))
1035
+
1036
+
1037
+ @register_command
1038
+ @dataclass
1039
+ class M_NAME:
1040
+ """
1041
+ Gets the name of a module.
1042
+ """
1043
+
1044
+ code: typing.ClassVar[int] = 99
1045
+ pushed: typing.ClassVar[bool] = True
1046
+
1047
+ _connection: 'interfaces.IConnection'
1048
+ _module: int
1049
+
1050
+ class GetDataAttr(ResponseBodyStruct):
1051
+ name: str = field(XmpStr())
1052
+ """string, the name for the module."""
1053
+
1054
+ def get(self) -> Token[GetDataAttr]:
1055
+ """Get the name of the module.
1056
+
1057
+ :return: the name of the module
1058
+ :rtype: M_NAME.GetDataAttr
1059
+ """
1060
+
1061
+ return Token(self._connection, build_get_request(self, module=self._module))
1062
+
1063
+
1064
+ @register_command
1065
+ @dataclass
1066
+ class M_REVISION:
1067
+ """
1068
+ Gets the model P/N name of a Xena test module.
1069
+ """
1070
+
1071
+ code: typing.ClassVar[int] = 100
1072
+ pushed: typing.ClassVar[bool] = True
1073
+
1074
+ _connection: 'interfaces.IConnection'
1075
+ _module: int
1076
+
1077
+ class GetDataAttr(ResponseBodyStruct):
1078
+ revision: str = field(XmpStr())
1079
+ """string, the model P/N name of a Xena test module."""
1080
+
1081
+ def get(self) -> Token[GetDataAttr]:
1082
+ """Get the model P/N name of a Xena test module.
1083
+
1084
+ :return: the model P/N name of a Xena test module.
1085
+ :rtype: M_REVISION.GetDataAttr
1086
+ """
1087
+
1088
+ return Token(self._connection, build_get_request(self, module=self._module))
1089
+
1090
+
1091
+ @register_command
1092
+ @dataclass
1093
+ class M_VERSIONSTR:
1094
+ """
1095
+ Returns module version number in the new format, e.g. "99.0.0+1.0".
1096
+
1097
+ Obsoletes M_VERSIONNO.
1098
+ """
1099
+
1100
+ code: typing.ClassVar[int] = 101
1101
+ pushed: typing.ClassVar[bool] = False
1102
+
1103
+ _connection: 'interfaces.IConnection'
1104
+ _module: int
1105
+
1106
+ class GetDataAttr(ResponseBodyStruct):
1107
+ version_str: str = field(XmpStr())
1108
+ """string, module version number in the new format."""
1109
+
1110
+ def get(self) -> Token[GetDataAttr]:
1111
+ """Returns module version number in the new format.
1112
+
1113
+ :return: module version number in the new format.
1114
+ :rtype: M_VERSIONSTR.GetDataAttr
1115
+ """
1116
+
1117
+ return Token(self._connection, build_get_request(self, module=self._module))
1118
+
1119
+
1120
+ @register_command
1121
+ @dataclass
1122
+ class M_MEDIA:
1123
+ """
1124
+ For the test modules that support media configuration (check M_CAPABILITIES), this command sets the desired media type (front port).
1125
+ """
1126
+
1127
+ code: typing.ClassVar[int] = 342
1128
+ pushed: typing.ClassVar[bool] = False
1129
+
1130
+ _connection: 'interfaces.IConnection'
1131
+ _module: int
1132
+
1133
+ class GetDataAttr(ResponseBodyStruct):
1134
+ media_config: MediaConfigurationType = field(XmpByte())
1135
+ """coded byte, specifying the active front port: CFP4, QSFP28, CXP, SFP28."""
1136
+
1137
+ class SetDataAttr(RequestBodyStruct):
1138
+ media_config: MediaConfigurationType = field(XmpByte())
1139
+ """coded byte, specifying the active front port: CFP4, QSFP28, CXP, SFP28."""
1140
+
1141
+ def get(self) -> Token[GetDataAttr]:
1142
+ """Get the media type of the test module.
1143
+
1144
+ :return: the media type of the test module
1145
+ :rtype: M_MEDIA.GetDataAttr
1146
+ """
1147
+
1148
+ return Token(self._connection, build_get_request(self, module=self._module))
1149
+
1150
+ def set(self, media_config: MediaConfigurationType) -> Token[None]:
1151
+ """Set the media type of the test module.
1152
+
1153
+ :param media_config: the media type of the test module
1154
+ :type media_config: MediaType
1155
+ """
1156
+
1157
+ return Token(self._connection, build_set_request(self, module=self._module, media_config=media_config))
1158
+
1159
+
1160
+ @register_command
1161
+ @dataclass
1162
+ class M_CLOCKSYNCSTATUS:
1163
+ """
1164
+ Get module's clock sync status.
1165
+ """
1166
+
1167
+ code: typing.ClassVar[int] = 370
1168
+ pushed: typing.ClassVar[bool] = False
1169
+
1170
+ _connection: 'interfaces.IConnection'
1171
+ _module: int
1172
+
1173
+ class GetDataAttr(ResponseBodyStruct):
1174
+ m_clock_diff: int = field(XmpLong())
1175
+ """long integer, module clock diff"""
1176
+ m_correction: int = field(XmpLong())
1177
+ """long integer, module correction"""
1178
+ m_tune_is_increase: int = field(XmpLong())
1179
+ """long integer, whether module tune is increased"""
1180
+ m_tune_value: int = field(XmpLong())
1181
+ """long integer, module tune value"""
1182
+ m_is_steady_state: int = field(XmpLong())
1183
+ """long integer, whether module is in steady state"""
1184
+
1185
+ def get(self) -> Token[GetDataAttr]:
1186
+ """Get the test module's clock sync status.
1187
+
1188
+ :return: the test module's clock sync status
1189
+ :rtype: M_CLOCKSYNCSTATUS.GetDataAttr
1190
+ """
1191
+
1192
+ return Token(self._connection, build_get_request(self, module=self._module))
1193
+
1194
+
1195
+ @register_command
1196
+ @dataclass
1197
+ class M_LICENSE_DEMO_INFO:
1198
+ """
1199
+ Returns info about the demo status of the module. Only applicable to L47 test module.
1200
+ """
1201
+
1202
+ code: typing.ClassVar[int] = 400
1203
+ pushed: typing.ClassVar[bool] = True
1204
+
1205
+ _connection: 'interfaces.IConnection'
1206
+ _module: int
1207
+
1208
+ class GetDataAttr(ResponseBodyStruct):
1209
+ demo: HasDemo = field(XmpByte())
1210
+ """coded byte, specifies if this is a demo module or not."""
1211
+ valid: IsValid = field(XmpByte())
1212
+ """coded byte, if this is a demo module, specifies if the demo license is valid."""
1213
+ permanent: IsPermanent = field(XmpByte())
1214
+ """coded byte, if this is a demo module and the demo license is valid, specifies if the demo license is permanent."""
1215
+ expiration: int = field(XmpLong())
1216
+ """long integer, if this is a demo module and the demo license is valid and not permanent,
1217
+ specifies the expiration date of the demo license - in seconds since Jan 1, 1970.
1218
+ """
1219
+
1220
+ def get(self) -> Token[GetDataAttr]:
1221
+ """Get info of the demo status of the test module. Only applicable to L47 test module.
1222
+
1223
+ :return: info of the demo status of the test module.
1224
+ :rtype: M_LICENSE_DEMO_INFO.GetDataAttr
1225
+ """
1226
+
1227
+ return Token(self._connection, build_get_request(self, module=self._module))
1228
+
1229
+
1230
+ @register_command
1231
+ @dataclass
1232
+ class M_LICENSE_MAINTENANCE_INFO:
1233
+ """
1234
+ Returns info about the maintenance license status for the module. Only applicable to L47 test module.
1235
+ """
1236
+
1237
+ code: typing.ClassVar[int] = 401
1238
+ pushed: typing.ClassVar[bool] = True
1239
+
1240
+ _connection: 'interfaces.IConnection'
1241
+ _module: int
1242
+
1243
+ class GetDataAttr(ResponseBodyStruct):
1244
+ valid: IsValid = field(XmpByte())
1245
+ """coded byte, specifies if the maintenance license is valid."""
1246
+ permanent: IsPermanent = field(XmpByte())
1247
+ """coded byte, if the maintenance license is valid, specifies if the maintenance license is permanent."""
1248
+ expiration: int = field(XmpLong())
1249
+ """long integer, if the maintenance license is valid and not permanent, specifies the expiration date of the maintenance license - in seconds since Jan 1, 1970."""
1250
+
1251
+ def get(self) -> Token[GetDataAttr]:
1252
+ """Get the info about the maintenance license status for the module. Only applicable to L47 test module.
1253
+
1254
+ :return: the info about the maintenance license status for the test module
1255
+ :rtype: M_LICENSE_MAINTENANCE_INFO.GetDataAttr
1256
+ """
1257
+
1258
+ return Token(self._connection, build_get_request(self, module=self._module))
1259
+
1260
+
1261
+ @register_command
1262
+ @dataclass
1263
+ class M_LICENSE_CWB_DETECTED:
1264
+ """
1265
+ Returns if clock-windback is detected. If clock-windback has been detected the
1266
+ chassis is locked and no reservations of ports can be performed. To recover from
1267
+ clock-windback, set the system time correct (via the M4_SYSTEM_TIME command) and
1268
+ perform a license update (via the M_LICENSE_UPDATE command). Only applicable to L47 test module.
1269
+ """
1270
+
1271
+ code: typing.ClassVar[int] = 402
1272
+ pushed: typing.ClassVar[bool] = False
1273
+
1274
+ _connection: 'interfaces.IConnection'
1275
+ _module: int
1276
+
1277
+ class GetDataAttr(ResponseBodyStruct):
1278
+ detected: YesNo = field(XmpByte())
1279
+ """coded byte, specifies if clock-windback is detected."""
1280
+
1281
+ def get(self) -> Token[GetDataAttr]:
1282
+ """Get whether clock-windback is detected.
1283
+
1284
+ :return: whether clock-windback is detected
1285
+ :rtype: M_LICENSE_CWB_DETECTED.GetDataAttr
1286
+ """
1287
+
1288
+ return Token(self._connection, build_get_request(self, module=self._module))
1289
+
1290
+
1291
+ @register_command
1292
+ @dataclass
1293
+ class M_LICENSE_UPDATE:
1294
+ """
1295
+ This command instructs the chassis to update its local license information. The chassis can be configured in on-line and off-line mode
1296
+ (by the M_LICENSE_ONLINE command). In on-line mode, the chassis sends a
1297
+ capability request and receives a capability response. In
1298
+ offline mode a capability response (bin file) must be downloaded and uploaded to the chassis. The capability response (bin file) is
1299
+ parsed and the license info is stored locally in trusted storage. A capability
1300
+ response (bin file) has a lifetime of one day (24 hours). The result of the
1301
+ license update operation can be retrieved by M_LICENSE_UPDATE_STATUS.
1302
+ """
1303
+
1304
+ code: typing.ClassVar[int] = 403
1305
+ pushed: typing.ClassVar[bool] = False
1306
+
1307
+ _connection: 'interfaces.IConnection'
1308
+ _module: int
1309
+
1310
+ class SetDataAttr(RequestBodyStruct):
1311
+ pass
1312
+
1313
+ def set(self) -> Token[None]:
1314
+ """Start license update
1315
+ """
1316
+
1317
+ return Token(self._connection, build_set_request(self, module=self._module))
1318
+
1319
+
1320
+ @register_command
1321
+ @dataclass
1322
+ class M_LICENSE_UPDATE_STATUS:
1323
+ """
1324
+ Returns the status of the latest license update operations.
1325
+ """
1326
+
1327
+ code: typing.ClassVar[int] = 404
1328
+ pushed: typing.ClassVar[bool] = False
1329
+
1330
+ _connection: 'interfaces.IConnection'
1331
+ _module: int
1332
+
1333
+ class GetDataAttr(ResponseBodyStruct):
1334
+ update_state: UpdateState = field(XmpByte())
1335
+ """coded byte, specifies the state of the license update procedure"""
1336
+ last_update: int = field(XmpLong())
1337
+ """long integer, time for the last update request - in seconds since Jan 1, 1979"""
1338
+ last_success: int = field(XmpLong())
1339
+ """long integer, time for the last successful update - in seconds since Jan 1, 1979"""
1340
+ last_fail: int = field(XmpLong())
1341
+ """long integer, time for the last failed update - in seconds since Jan 1, 1979"""
1342
+ info: str = field(XmpStr())
1343
+ """string, info about the last license update operation - reason for failed update."""
1344
+
1345
+ def get(self) -> Token[GetDataAttr]:
1346
+ """Get the status of the latest license update operation.
1347
+
1348
+ :return: the status of the latest license update operation
1349
+ :rtype: M_LICENSE_UPDATE_STATUS.GetDataAttr
1350
+ """
1351
+
1352
+ return Token(self._connection, build_get_request(self, module=self._module))
1353
+
1354
+
1355
+ @register_command
1356
+ @dataclass
1357
+ class M_LICENSE_LIST_BSON:
1358
+ """
1359
+ Returns a list of locally stored licenses - formatted as a BSON document.
1360
+ """
1361
+
1362
+ code: typing.ClassVar[int] = 405
1363
+ pushed: typing.ClassVar[bool] = False
1364
+
1365
+ _connection: 'interfaces.IConnection'
1366
+ _module: int
1367
+
1368
+ class GetDataAttr(ResponseBodyStruct):
1369
+ bson: Hex = field(XmpHex())
1370
+ """list of hex bytes, bson document containing the list of locally stored licenses"""
1371
+
1372
+ def get(self) -> Token[GetDataAttr]:
1373
+ """Get the a list of locally stored licenses - formatted as a BSON document.
1374
+
1375
+ :return: a list of locally stored licenses - formatted as a BSON document.
1376
+ :rtype: M_LICENSE_LIST_BSON.GetDataAttr
1377
+ """
1378
+
1379
+ return Token(self._connection, build_get_request(self, module=self._module))
1380
+
1381
+
1382
+ @register_command
1383
+ @dataclass
1384
+ class M_LICENSE_ONLINE:
1385
+ """
1386
+ Configures the chassis in online or offline mode. The online mode configuration
1387
+ defines two different license update procedures as described for the
1388
+ M_LICENSE_UPDATE command. In online mode the license update procedure requires
1389
+ access to the Internet. In offline mode the license update procedure can be
1390
+ performed without access to the Internet.
1391
+ """
1392
+
1393
+ code: typing.ClassVar[int] = 406
1394
+ pushed: typing.ClassVar[bool] = False
1395
+
1396
+ _connection: 'interfaces.IConnection'
1397
+ _module: int
1398
+
1399
+ class GetDataAttr(ResponseBodyStruct):
1400
+ mode: IsOnline = field(XmpByte())
1401
+ """coded byte, chassis online/offline mode."""
1402
+
1403
+ class SetDataAttr(RequestBodyStruct):
1404
+ mode: IsOnline = field(XmpByte())
1405
+ """coded byte, chassis online/offline mode."""
1406
+
1407
+ def get(self) -> Token[GetDataAttr]:
1408
+ """Get the current online/offline mode of the L47 tester.
1409
+
1410
+ :return: the current online/offline mode of the L47 tester
1411
+ :rtype: M_LICENSE_ONLINE.GetDataAttr
1412
+ """
1413
+
1414
+ return Token(self._connection, build_get_request(self, module=self._module))
1415
+
1416
+ def set(self, mode: IsOnline) -> Token[None]:
1417
+ """Set the current online/offline mode of the L47 tester.
1418
+
1419
+ :param mode: the current online/offline mode of the L47 tester
1420
+ :type mode: IsOnline
1421
+ """
1422
+
1423
+ return Token(self._connection, build_set_request(self, module=self._module, mode=mode))
1424
+
1425
+ set_offline = functools.partialmethod(set, IsOnline.OFFLINE)
1426
+ """Set the L47 tester to offline mode.
1427
+ """
1428
+
1429
+ set_online = functools.partialmethod(set, IsOnline.ONLINE)
1430
+ """Set the L47 tester to online mode.
1431
+ """
1432
+
1433
+
1434
+ @register_command
1435
+ @dataclass
1436
+ class M_TXCLOCKSOURCE_NEW:
1437
+ """
1438
+ For test modules with advanced timing features, select what clock drives the port TX
1439
+ rates.
1440
+ """
1441
+
1442
+ code: typing.ClassVar[int] = 410
1443
+ pushed: typing.ClassVar[bool] = True
1444
+
1445
+ _connection: 'interfaces.IConnection'
1446
+ _module: int
1447
+
1448
+ class GetDataAttr(ResponseBodyStruct):
1449
+ tx_clock: TXClockSource = field(XmpByte())
1450
+ """coded byte, specifying what drives the port TX rates."""
1451
+
1452
+ class SetDataAttr(RequestBodyStruct):
1453
+ tx_clock: TXClockSource = field(XmpByte())
1454
+ """coded byte, specifying what drives the port TX rates."""
1455
+
1456
+ def get(self) -> Token[GetDataAttr]:
1457
+ """Get the test module's TX clock source settings.
1458
+
1459
+ :return: the test module's TX clock source settings.
1460
+ :rtype: M_TXCLOCKSOURCE_NEW.GetDataAttr
1461
+ """
1462
+
1463
+ return Token(self._connection, build_get_request(self, module=self._module))
1464
+
1465
+ def set(self, tx_clock: TXClockSource) -> Token[None]:
1466
+ """Set the test module's TX clock source settings.
1467
+
1468
+ :param tx_clock: the test module's TX clock source settings
1469
+ :type tx_clock: TXClockSource
1470
+ """
1471
+
1472
+ return Token(self._connection, build_set_request(self, module=self._module, tx_clock=tx_clock))
1473
+
1474
+ set_modulelocalclock = functools.partialmethod(set, TXClockSource.MODULELOCALCLOCK)
1475
+ """Set the test module's TX clock source to Module Local Clock
1476
+ """
1477
+
1478
+ set_smainput = functools.partialmethod(set, TXClockSource.SMAINPUT)
1479
+ """Set the test module's TX clock source to SMA Input
1480
+ """
1481
+
1482
+ set_p0rxclk = functools.partialmethod(set, TXClockSource.P0RXCLK)
1483
+ """Set the test module's TX clock source to Port 0 RX Clock
1484
+ """
1485
+
1486
+ set_p1rxclk = functools.partialmethod(set, TXClockSource.P1RXCLK)
1487
+ """Set the test module's TX clock source to Port 1 RX Clock
1488
+ """
1489
+
1490
+ set_p2rxclk = functools.partialmethod(set, TXClockSource.P2RXCLK)
1491
+ """Set the test module's TX clock source to Port 2 RX Clock
1492
+ """
1493
+
1494
+ set_p3rxclk = functools.partialmethod(set, TXClockSource.P3RXCLK)
1495
+ """Set the test module's TX clock source to Port 3 RX Clock
1496
+ """
1497
+
1498
+ set_p4rxclk = functools.partialmethod(set, TXClockSource.P4RXCLK)
1499
+ """Set the test module's TX clock source to Port 4 RX Clock
1500
+ """
1501
+
1502
+ set_p5rxclk = functools.partialmethod(set, TXClockSource.P5RXCLK)
1503
+ """Set the test module's TX clock source to Port 5 RX Clock
1504
+ """
1505
+
1506
+ set_p6rxclk = functools.partialmethod(set, TXClockSource.P6RXCLK)
1507
+ """Set the test module's TX clock source to Port 6 RX Clock
1508
+ """
1509
+
1510
+ set_p7rxclk = functools.partialmethod(set, TXClockSource.P7RXCLK)
1511
+ """Set the test module's TX clock source to Port 7 RX Clock
1512
+ """
1513
+
1514
+
1515
+ @register_command
1516
+ @dataclass
1517
+ class M_TXCLOCKSTATUS_NEW:
1518
+ """
1519
+ For test modules with advanced timing features, check whether a valid clock is
1520
+ present.
1521
+ """
1522
+
1523
+ code: typing.ClassVar[int] = 411
1524
+ pushed: typing.ClassVar[bool] = True
1525
+
1526
+ _connection: 'interfaces.IConnection'
1527
+ _module: int
1528
+
1529
+ class GetDataAttr(ResponseBodyStruct):
1530
+ status: TXClockStatus = field(XmpByte())
1531
+ """coded byte, specifying the status of the TX clock."""
1532
+
1533
+ def get(self) -> Token[GetDataAttr]:
1534
+ """Get the status of whether a valid clock is present for the test module.
1535
+
1536
+ :return: the status of whether a valid clock is present for the test module.
1537
+ :rtype: M_TXCLOCKSTATUS_NEW.GetDataAttr
1538
+ """
1539
+
1540
+ return Token(self._connection, build_get_request(self, module=self._module))
1541
+
1542
+
1543
+ @register_command
1544
+ @dataclass
1545
+ class M_TXCLOCKFILTER_NEW:
1546
+ """
1547
+ For test modules with advanced timing features, the loop bandwidth on the TX
1548
+ clock filter.
1549
+ """
1550
+
1551
+ code: typing.ClassVar[int] = 412
1552
+ pushed: typing.ClassVar[bool] = True
1553
+
1554
+ _connection: 'interfaces.IConnection'
1555
+ _module: int
1556
+
1557
+ class GetDataAttr(ResponseBodyStruct):
1558
+ filter_bandwidth: LoopBandwidth = field(XmpByte())
1559
+ """coded byte, the loop bandwidth on the TX clock filter."""
1560
+
1561
+ class SetDataAttr(RequestBodyStruct):
1562
+ filter_bandwidth: LoopBandwidth = field(XmpByte())
1563
+ """coded byte, the loop bandwidth on the TX clock filter."""
1564
+
1565
+ def get(self) -> Token[GetDataAttr]:
1566
+ """Get the setting of the loop bandwidth on the TX clock filter.
1567
+
1568
+ :return: the setting of the loop bandwidth on the TX clock filter.
1569
+ :rtype: M_TXCLOCKFILTER_NEW.GetDataAttr
1570
+ """
1571
+
1572
+ return Token(self._connection, build_get_request(self, module=self._module))
1573
+
1574
+ def set(self, filter_bandwidth: LoopBandwidth) -> Token[None]:
1575
+ """Set the setting of the loop bandwidth on the TX clock filter.
1576
+
1577
+ :param filter_bandwidth: the setting of the loop bandwidth on the TX clock filter
1578
+ :type filter_bandwidth: LoopBandwidth
1579
+ """
1580
+
1581
+ return Token(self._connection, build_set_request(self, module=self._module, filter_bandwidth=filter_bandwidth))
1582
+
1583
+ set_bw103hz = functools.partialmethod(set, LoopBandwidth.BW103HZ)
1584
+ """Set the loop bandwidth on the TX clock filter to BW = 103 Hz.
1585
+ """
1586
+
1587
+ set_bw207hz = functools.partialmethod(set, LoopBandwidth.BW207HZ)
1588
+ """Set the loop bandwidth on the TX clock filter to BW = 207 Hz.
1589
+ """
1590
+
1591
+ set_bw416hz = functools.partialmethod(set, LoopBandwidth.BW416HZ)
1592
+ """Set the loop bandwidth on the TX clock filter to BW = 416 Hz.
1593
+ """
1594
+
1595
+ set_bw1683hz = functools.partialmethod(set, LoopBandwidth.BW1683HZ)
1596
+ """Set the loop bandwidth on the TX clock filter to BW = 1683 Hz.
1597
+ """
1598
+
1599
+ set_bw7019hz = functools.partialmethod(set, LoopBandwidth.BW7019HZ)
1600
+ """Set the loop bandwidth on the TX clock filter to BW = 7019 Hz.
1601
+ """
1602
+
1603
+
1604
+ @register_command
1605
+ @dataclass
1606
+ class M_CLOCKPPBSWEEP:
1607
+ """
1608
+ .. versionadded:: 1.1
1609
+
1610
+ Start and stop deviation sweep the local clock of the test module, which drives the TX rate of the test ports.
1611
+
1612
+ Note: The sweep is independent of the :class:`M_CLOCKPPB` parameter, i.e. the sweep uses the deviation set by :class:`M_CLOCKPPB` as its zero point.
1613
+ """
1614
+
1615
+ code: typing.ClassVar[int] = 413
1616
+ pushed: typing.ClassVar[bool] = False
1617
+
1618
+ _connection: 'interfaces.IConnection'
1619
+ _module: int
1620
+
1621
+ class GetDataAttr(ResponseBodyStruct):
1622
+ mode: PPMSweepMode = field(XmpByte())
1623
+ """coded byte, specifying the sweeping function."""
1624
+ ppb_step: int = field(XmpInt())
1625
+ """integer >=0, the numeric clock adjustment in ppb per step of the sweep.
1626
+ If set to 0, the sweep will use as small steps as possible, creating a "linear" sweep of the clock rate.
1627
+ """
1628
+ step_delay: int = field(XmpInt())
1629
+ """integer >0 the delay in µs between each step in the sweep. If ppb_step is 0: The total time in µs to sweep linearly from 0 to max_ppb."""
1630
+ max_ppb: int = field(XmpInt())
1631
+ """integer != 0, the numeric maximum clock adjustment. The sign of max_ppb determines if the sweep will start with positive or negative offsets.
1632
+ When the next step would exceed the limit set by max_ppb, the sweep changes direction. I.e. the deviation will sweep from 0 to max_ppb, to (-max_ppb), and back to 0.
1633
+ """
1634
+ loops: int = field(XmpInt())
1635
+ """integer >=0, the number of full sweeps performed. 0 means "indefinitely"."""
1636
+
1637
+ class SetDataAttr(RequestBodyStruct):
1638
+ mode: PPMSweepMode = field(XmpByte())
1639
+ """coded byte, specifying the sweeping function: OFF or TRIANGLE"""
1640
+ ppb_step: int = field(XmpInt())
1641
+ """integer >=0, the numeric clock adjustment in ppb per step of the sweep.
1642
+ If set to 0, the sweep will use as small steps as possible, creating a "linear" sweep of the clock rate.
1643
+ """
1644
+ step_delay: int = field(XmpInt())
1645
+ """integer >0 the delay in µs between each step in the sweep. If ppb_step is 0: The total time in µs to sweep linearly from 0 to max_ppb."""
1646
+ max_ppb: int = field(XmpInt())
1647
+ """integer != 0, the numeric maximum clock adjustment. The sign of max_ppb determines if the sweep will start with positive or negative offsets.
1648
+ When the next step would exceed the limit set by max_ppb, the sweep changes direction. I.e. the deviation will sweep from 0 to max_ppb, to (-max_ppb), and back to 0.
1649
+ """
1650
+ loops: int = field(XmpInt())
1651
+ """integer >=0, the number of full sweeps performed. 0 means "indefinitely"."""
1652
+
1653
+ def get(self) -> Token[GetDataAttr]:
1654
+ """Get the PPM sweep parameters from the module.
1655
+
1656
+ :return: the PPM sweep parameters from the module.
1657
+ :rtype: M_CLOCKPPBSWEEP.GetDataAttr
1658
+ """
1659
+
1660
+ return Token(self._connection, build_get_request(self, module=self._module))
1661
+
1662
+ def set(self, mode: PPMSweepMode, ppb_step: int, step_delay: int, max_ppb: int, loops: int) -> Token[None]:
1663
+ """Set the PPM sweep parameters of the module.
1664
+
1665
+ :param mode: specifying the sweeping function: OFF or TRIANGLE.
1666
+ :type mode: PPMSweepMode
1667
+ :param ppb_step: >=0, the numeric clock adjustment in ppb per step of the sweep.
1668
+ If set to 0, the sweep will use as small steps as possible, creating a "linear" sweep of the clock rate.
1669
+ :type ppb_step: int
1670
+ :param step_delay: >0 the delay in µs between each step in the sweep. If ppb_step is 0: The total time in µs to sweep linearly from 0 to max_ppb.
1671
+ :type step_delay: int
1672
+ :param max_ppb: != 0, the numeric maximum clock adjustment.
1673
+ The sign of max_ppb determines if the sweep will start with positive or negative offsets.
1674
+ When the next step would exceed the limit set by max_ppb, the sweep changes direction.
1675
+ I.e. the deviation will sweep from 0 to max_ppb, to (-max_ppb), and back to 0.
1676
+ :type max_ppb: int
1677
+ :param loops: >=0, the number of full sweeps performed. 0 means "indefinitely".
1678
+ :type loops: int
1679
+ """
1680
+
1681
+ return Token(self._connection, build_set_request(self, module=self._module, mode=mode, ppb_step=ppb_step, step_delay=step_delay, max_ppb=max_ppb, loops=loops))
1682
+
1683
+
1684
+ @register_command
1685
+ @dataclass
1686
+ class M_CLOCKSWEEPSTATUS:
1687
+ """
1688
+ .. versionadded:: 1.1
1689
+
1690
+ Return the current status of the :class:`M_CLOCKPPBSWEEP` function.
1691
+
1692
+ """
1693
+
1694
+ code: typing.ClassVar[int] = 414
1695
+ pushed: typing.ClassVar[bool] = False
1696
+
1697
+ _connection: 'interfaces.IConnection'
1698
+ _module: int
1699
+
1700
+ class GetDataAttr(ResponseBodyStruct):
1701
+ state: PPMSweepStatus = field(XmpByte())
1702
+ """coded byte, specifying if a sweep is active: OFF or SWEEPING"""
1703
+ curr_sweep: int = field(XmpInt())
1704
+ """integer >=0, the current full sweep number, counting from 0."""
1705
+ curr_step: int = field(XmpInt())
1706
+ """integer >=0 the current step number inside the sweep, counting from 0."""
1707
+ max_steps: int = field(XmpInt())
1708
+ """integer, >0, the total number of steps comprising a full sweep. For "linear" sweeps (ppb_step=0, see M_CLOCKPPBSWEEP)
1709
+ this number is determined by the chassis. In other cases, the number is implicitly given by the M_CLOCKPPBSWEEP parameters.
1710
+ """
1711
+
1712
+ def get(self) -> Token[GetDataAttr]:
1713
+ """Get the current status of the :class:`M_CLOCKPPBSWEEP` function.
1714
+
1715
+ :return: the current status of the :class:`M_CLOCKPPBSWEEP` function.
1716
+ :rtype: M_CLOCKSWEEPSTATUS.GetDataAttr
1717
+ """
1718
+
1719
+ return Token(self._connection, build_get_request(self, module=self._module))
1720
+
1721
+
1722
+ @register_command
1723
+ @dataclass
1724
+ class M_LATENCYMODE:
1725
+ """
1726
+ Configures the latency mode for Chimera module. In extended latency mode, the FPGA allows all latency parameters to be 10 times higher, at the cost of reduced latency precision.
1727
+
1728
+ .. note::
1729
+
1730
+ When change the latency mode, all latency configurations are reset on all ports in chimera module.
1731
+
1732
+ """
1733
+
1734
+ code: typing.ClassVar[int] = 450
1735
+ pushed: typing.ClassVar[bool] = True
1736
+
1737
+ _connection: 'interfaces.IConnection'
1738
+ _module: int
1739
+
1740
+ class GetDataAttr(ResponseBodyStruct):
1741
+ mode: ImpairmentLatencyMode = field(XmpByte())
1742
+ """coded byte, specifying latency mode."""
1743
+
1744
+ class SetDataAttr(RequestBodyStruct):
1745
+ mode: ImpairmentLatencyMode = field(XmpByte())
1746
+ """coded byte, specifying latency mode."""
1747
+
1748
+ def get(self) -> Token[GetDataAttr]:
1749
+ """Get the latency mode of the Chimera module.
1750
+
1751
+ :return: the latency mode of the Chimera module.
1752
+ :rtype: M_LATENCYMODE.GetDataAttr
1753
+ """
1754
+
1755
+ return Token(self._connection, build_get_request(self, module=self._module))
1756
+
1757
+ def set(self, mode: ImpairmentLatencyMode) -> Token[None]:
1758
+ """Set the latency mode of the Chimera module.
1759
+
1760
+ :param mode: the bypass mode of the impairment emulator.
1761
+ :type mode: ImpairmentLatencyMode
1762
+ """
1763
+
1764
+ return Token(self._connection, build_set_request(self, module=self._module, mode=mode))
1765
+
1766
+ set_normal = functools.partialmethod(set, ImpairmentLatencyMode.NORMAL)
1767
+ """Set the latency mode of the Chimera module to NORMAL
1768
+ """
1769
+
1770
+ set_extended = functools.partialmethod(set, ImpairmentLatencyMode.EXTENDED)
1771
+ """Set the latency mode of the Chimera module to EXTENDED
1772
+ """
1773
+
1774
+
1775
+ @register_command
1776
+ @dataclass
1777
+ class M_EMULBYPASS:
1778
+ """
1779
+ Set emulator bypass mode. Emulator bypass mode will bypass the entire emulator
1780
+ for minimum latency.
1781
+ """
1782
+
1783
+ code: typing.ClassVar[int] = 454
1784
+ pushed: typing.ClassVar[bool] = False
1785
+
1786
+ _connection: 'interfaces.IConnection'
1787
+ _module: int
1788
+
1789
+ class GetDataAttr(ResponseBodyStruct):
1790
+ on_off: OnOff = field(XmpByte())
1791
+ """coded byte, whether the emulator bypass is enabled."""
1792
+
1793
+ class SetDataAttr(RequestBodyStruct):
1794
+ on_off: OnOff = field(XmpByte())
1795
+ """coded byte, whether the emulator bypass is enabled."""
1796
+
1797
+ def get(self) -> Token[GetDataAttr]:
1798
+ """Get the status of bypass mode of the impairment emulator.
1799
+
1800
+ :return: the status of bypass mode of the impairment emulator.
1801
+ :rtype: M_EMULBYPASS.GetDataAttr
1802
+ """
1803
+
1804
+ return Token(self._connection, build_get_request(self, module=self._module))
1805
+
1806
+ def set(self, on_off: OnOff) -> Token[None]:
1807
+ """Set the bypass mode of the impairment emulator.
1808
+
1809
+ :param on_off: the bypass mode of the impairment emulator.
1810
+ :type on_off: OnOff
1811
+ """
1812
+
1813
+ return Token(self._connection, build_set_request(self, module=self._module, on_off=on_off))
1814
+
1815
+ set_off = functools.partialmethod(set, OnOff.OFF)
1816
+ """Disable the bypass mode of the impairment emulator.
1817
+ """
1818
+
1819
+ set_on = functools.partialmethod(set, OnOff.ON)
1820
+ """Enable the bypass mode of the impairment emulator.
1821
+ """
1822
+
1823
+
1824
+ @register_command
1825
+ @dataclass
1826
+ class M_HEALTH:
1827
+ """
1828
+ Gets the module health information.
1829
+ """
1830
+
1831
+ code: typing.ClassVar[int] = 456
1832
+ pushed: typing.ClassVar[bool] = False
1833
+
1834
+ _connection: 'interfaces.IConnection'
1835
+ _module: int
1836
+ _sub_indices: typing.List[int]
1837
+
1838
+ class GetDataAttr(ResponseBodyStruct):
1839
+ info: str = field(XmpStr())
1840
+ """Module health information json string"""
1841
+
1842
+ def get(self) -> Token[GetDataAttr]:
1843
+ """Gets the module health information.
1844
+
1845
+ :return: Module health information json string
1846
+ :rtype: M_HEALTH.GetDataAttr
1847
+ """
1848
+
1849
+ return Token(self._connection, build_get_request(self, module=self._module, indices=self._sub_indices))
1850
+
1851
+ @register_command
1852
+ @dataclass
1853
+ class M_MODEL_NAME:
1854
+ """
1855
+ Get the model name of the module.
1856
+ """
1857
+
1858
+ code: typing.ClassVar[int] = 459
1859
+ pushed: typing.ClassVar[bool] = False
1860
+
1861
+ _connection: 'interfaces.IConnection'
1862
+ _module: int
1863
+
1864
+ class GetDataAttr(ResponseBodyStruct):
1865
+ name: ModuleModelName = field(XmpInt())
1866
+ """ModuleModelName, model name of the Xena module."""
1867
+
1868
+ def get(self) -> Token[GetDataAttr]:
1869
+ """Get the Xena chassis model name.
1870
+
1871
+ :return: the model name of the Xena tester
1872
+ :rtype: C_MODEL_NAME.GetDataAttr
1873
+ """
1874
+
1875
+ return Token(self._connection, build_get_request(self, module=self._module))