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,123 @@
1
+ from __future__ import annotations
2
+
3
+ import ctypes as c
4
+ from typing import (
5
+ Type,
6
+ ClassVar,
7
+ TypeVar
8
+ )
9
+ from . import _constants as const
10
+
11
+
12
+ class ProtocolHeader(c.BigEndianStructure):
13
+ """The structure for the header data of a packet in the protocol."""
14
+ __slots__ = (
15
+ "magic_word",
16
+ "number_of_indices",
17
+ "number_of_value_bytes",
18
+ "command_parameter",
19
+ "module_index",
20
+ "port_index",
21
+ "request_identifier",
22
+ )
23
+
24
+ _fields_ = [
25
+ ("magic_word", c.c_char * 4),
26
+ ("number_of_indices", c.c_ushort),
27
+ ("number_of_value_bytes", c.c_ushort),
28
+ ("command_parameter", c.c_ushort),
29
+ ("module_index", c.c_ubyte),
30
+ ("port_index", c.c_ubyte),
31
+ ("request_identifier", c.c_uint32),
32
+ ]
33
+
34
+ @property
35
+ def cmd_type(self) -> int:
36
+ """Get command type.
37
+
38
+ Returns:
39
+ int: Command type
40
+ """
41
+ return (self.command_parameter & 0x0F00) >> 8
42
+
43
+ @cmd_type.setter
44
+ def cmd_type(self, val: int) -> None:
45
+ """Set command type.
46
+
47
+ Args:
48
+ val (int): Command type
49
+ """
50
+ assert 0 <= val < 4
51
+ self.command_parameter |= val << 8
52
+
53
+ @property
54
+ def cmd_code(self) -> int:
55
+ """Get command code.
56
+
57
+ Returns:
58
+ int: Command code
59
+ """
60
+ last = (self.command_parameter & 0xF000) >> 4
61
+ first = self.command_parameter & 0x00FF
62
+ return first | last
63
+
64
+ @cmd_code.setter
65
+ def cmd_code(self, val: int) -> None:
66
+ """Set command code.
67
+
68
+ Args:
69
+ val (int): Command code
70
+ """
71
+ first = (val & 0x0F00) << 4
72
+ last = val & 0x00FF
73
+ self.command_parameter |= first | last
74
+
75
+ @property
76
+ def body_size(self) -> int:
77
+ """Calculate packet body size
78
+
79
+ Returns:
80
+ int: Packet body size
81
+ """
82
+ if self.magic_word != const.MAGIC_WORD:
83
+ return 4
84
+ body_size = self.number_of_value_bytes + (self.number_of_indices * 4)
85
+ body_size += (4 - body_size % 4) % 4
86
+ return body_size
87
+
88
+
89
+ Self = TypeVar("Self", bound="ResponseHeader")
90
+
91
+
92
+ class ResponseHeader(ProtocolHeader):
93
+ """The structure for the response header data of a packet in the protocol."""
94
+ size: ClassVar[int] = c.sizeof(ProtocolHeader)
95
+
96
+ @property
97
+ def is_pushed(self) -> bool:
98
+ """Check if response is pushed."""
99
+ return self.request_identifier == 0
100
+
101
+ @classmethod
102
+ def from_bytes(cls: Type[Self], buff: bytes) -> Self | None:
103
+ """Create ResponseHeader object from bytes."""
104
+ header_bytes = memoryview(buff)
105
+ if not cls._header_bytes_is_valid(header_bytes, cls.size, const.MAGIC_WORD):
106
+ return None
107
+ return cls.from_buffer_copy(header_bytes)
108
+
109
+ @staticmethod
110
+ def _header_bytes_is_valid(header_bytes: memoryview, expected_size: int, magic_wrd: bytes) -> bool:
111
+ """Check whether the header bytes are valid.
112
+
113
+ Args:
114
+ header_bytes (memoryview): Header bytes
115
+ expected_size (int): Expected header size
116
+ magic_wrd (bytes): Magic word bytes
117
+
118
+ Returns:
119
+ bool: True if the header bytes are valid, False otherwise
120
+ """
121
+ is_correct_size = len(header_bytes) == expected_size
122
+ start_with_mw = header_bytes[:len(magic_wrd)] == magic_wrd
123
+ return is_correct_size and start_with_mw
@@ -0,0 +1,65 @@
1
+ from __future__ import annotations
2
+ import struct
3
+
4
+ from . import _constants as const
5
+ from . import _utils
6
+ from .struct_header import ProtocolHeader
7
+ from .payload import RequestBodyStruct
8
+
9
+ NOT_SET_IDENTIFIER = 0
10
+
11
+
12
+ class Request:
13
+ __slots__ = (
14
+ "class_name",
15
+ "header",
16
+ "index_values",
17
+ "values"
18
+ )
19
+
20
+ def __init__(
21
+ self,
22
+ class_name: str,
23
+ cmd_type: const.CommandType,
24
+ cmd_code: int,
25
+ module_index: int | None,
26
+ port_index: int | None,
27
+ indices: list[int],
28
+ values: RequestBodyStruct | None = None,
29
+ ) -> None:
30
+ self.class_name = class_name
31
+ self.header = ProtocolHeader(
32
+ magic_word=const.MAGIC_WORD,
33
+ number_of_indices=len(indices),
34
+ number_of_value_bytes=values.nbytes() if values else 0,
35
+ cmd_code=cmd_code,
36
+ cmd_type=cmd_type.value,
37
+ module_index=const.NOTHING if module_index is None else module_index,
38
+ port_index=const.NOTHING if port_index is None else port_index,
39
+ request_identifier=NOT_SET_IDENTIFIER,
40
+ )
41
+ self.index_values = indices
42
+ self.values = values
43
+
44
+ def __str__(self) -> str:
45
+ return _utils.format_str(self)
46
+
47
+ def __repr__(self) -> str:
48
+ return _utils.format_repr(self)
49
+
50
+ def __bytes__(self) -> bytes:
51
+ idx_format = const.indices_format(self.header.number_of_indices)
52
+ return bytes().join(
53
+ (
54
+ self.header,
55
+ struct.pack(idx_format, *self.index_values),
56
+ self.values.to_bytes() if self.values else b""
57
+ )
58
+ )
59
+
60
+ def update_identifier(self, request_id: int) -> None:
61
+ self.header.request_identifier = request_id
62
+
63
+ @property
64
+ def cmd_code(self) -> int:
65
+ return self.header.cmd_code
@@ -0,0 +1,89 @@
1
+ from __future__ import annotations
2
+ import struct
3
+ from typing import Any
4
+ from . import _constants as const
5
+ from . import _utils
6
+ from .struct_header import ResponseHeader
7
+ from .payload import ResponseBodyStruct
8
+ from .exceptions import get_status_error, XmpStatusException
9
+
10
+
11
+ class Response:
12
+ """
13
+ Response serializer
14
+ """
15
+
16
+ __slots__ = (
17
+ "class_name",
18
+ "header",
19
+ "index_values",
20
+ "values",
21
+ "__buffer",
22
+ )
23
+
24
+ def __init__(self, class_name: str, header: ResponseHeader, buffer: bytes, response_struct: type[ResponseBodyStruct] | None) -> None:
25
+ self.class_name = class_name
26
+ self.header = header
27
+ idces_fmt_ = const.indices_format(header.number_of_indices)
28
+ idx_count_ = struct.calcsize(idces_fmt_)
29
+ self.__buffer = memoryview(buffer)
30
+ self.index_values = self.__parse_indices(idces_fmt_, self.__buffer[:idx_count_])
31
+ payload_position = slice(idx_count_, idx_count_ + header.number_of_value_bytes)
32
+ self.values: Any = self.__parse_values(self.__buffer[payload_position], response_struct)
33
+
34
+ def __str__(self) -> str:
35
+ return _utils.format_str(self)
36
+
37
+ def __repr__(self) -> str:
38
+ return _utils.format_repr(self)
39
+
40
+ def __bytes__(self) -> bytes:
41
+ return bytes().join((self.header, self.__buffer))
42
+
43
+ def __parse_indices(self, fmt: str, buffer: memoryview) -> list[int]:
44
+ return list(struct.unpack_from(fmt, buffer, 0))
45
+
46
+ def __parse_values(self, buffer: memoryview, struct_type: type[ResponseBodyStruct] | None) -> ResponseBodyStruct | None:
47
+ if self.header.cmd_type == const.CommandType.COMMAND_VALUE:
48
+ return struct_type(buffer) if struct_type else None
49
+ return None
50
+
51
+ def get_error(self) -> XmpStatusException | None:
52
+ if self.is_ok:
53
+ return None
54
+ exception = get_status_error(self.command_status)
55
+ return exception(self.class_name)
56
+
57
+ @property
58
+ def is_pushed(self) -> bool:
59
+ return self.header.is_pushed
60
+
61
+ @property
62
+ def request_identifier(self) -> int:
63
+ return self.header.request_identifier
64
+
65
+ @property
66
+ def cmd_code(self) -> int:
67
+ return self.header.cmd_code
68
+
69
+ @property
70
+ def command_status(self) -> const.CommandStatus | None:
71
+ if self.header.cmd_type == const.CommandType.COMMAND_STATUS:
72
+ return const.CommandStatus(self.header.cmd_code)
73
+ return None
74
+
75
+ @property
76
+ def is_ok(self) -> bool:
77
+ return self.get_return_ok or self.set_return_ok
78
+
79
+ @property
80
+ def set_return_ok(self) -> bool:
81
+ is_status_resp = self.header.cmd_type == const.CommandType.COMMAND_STATUS
82
+ is_succesful = self.header.cmd_code == const.CommandStatus.OK
83
+ return is_status_resp and is_succesful
84
+
85
+ @property
86
+ def get_return_ok(self) -> bool:
87
+ is_payload_resp = self.header.cmd_type == const.CommandType.COMMAND_VALUE
88
+ contain_values = self.values is not None
89
+ return is_payload_resp and contain_values
@@ -0,0 +1,43 @@
1
+ from __future__ import annotations
2
+ from typing import Type
3
+ from ._typings import XoaCommandType
4
+
5
+
6
+ class XmpRegistryException(Exception):
7
+ ...
8
+
9
+
10
+ class XmpCmdDuplicatedDefenitionError(XmpRegistryException):
11
+ def __init__(self, xmc_cls: Type[XoaCommandType]) -> None:
12
+ self.cmd_type = xmc_cls
13
+ self.msg = f"The defenition of <{self.cmd_type.__name__}> is duplicated."
14
+ super().__init__(self.msg)
15
+
16
+
17
+ class XmpCmdNotImplemented(XmpRegistryException):
18
+ def __init__(self, cmd_idx: int) -> None:
19
+ self.cmd_idx = cmd_idx
20
+ self.msg = f"The command of the code: [{cmd_idx}], is not implemented or not registered as a XMP command."
21
+ super().__init__(self.msg)
22
+
23
+
24
+ COMMANDS_REGISTRY: dict[int, Type[XoaCommandType]] = dict()
25
+ """A global registry of which map command id to its class implementation."""
26
+
27
+
28
+ def register_command(xmc_cls: Type[XoaCommandType]) -> Type:
29
+ """A decorator used for register commands descriptors in to global registry"""
30
+ global COMMANDS_REGISTRY
31
+ if xmc_cls.code in COMMANDS_REGISTRY:
32
+ raise XmpCmdDuplicatedDefenitionError(xmc_cls)
33
+ COMMANDS_REGISTRY[xmc_cls.code] = xmc_cls
34
+ return xmc_cls
35
+
36
+
37
+ def get_command(command_idx: int) -> Type[XoaCommandType]:
38
+ """Method allows to get a command class by the command code"""
39
+ global COMMANDS_REGISTRY
40
+ xmc_type = COMMANDS_REGISTRY.get(command_idx, None)
41
+ if not xmc_type:
42
+ raise XmpCmdNotImplemented(command_idx)
43
+ return xmc_type
@@ -0,0 +1,9 @@
1
+ from .modules import * # noqa: F403
2
+ from .testers import * # noqa: F403
3
+
4
+
5
+ __all__ = ( # noqa: F405
6
+ "WrongModuleError",
7
+ "WrongTesterError",
8
+ "WrongTesterPasswordError",
9
+ )
@@ -0,0 +1,13 @@
1
+ from typing import Set
2
+
3
+
4
+ class WrongModuleError(Exception):
5
+ """Module can not be assign to the current tester"""
6
+ def __init__(self, module_revision: str, allowed_revisions: Set[str]) -> None:
7
+ self.module_revision = module_revision
8
+ self.allowed_revisions = allowed_revisions
9
+ self.msg = (
10
+ f"Module of revision <{self.module_revision}> can not be assign to the current tester,\n"
11
+ f"Permitted only modules of next revisions {allowed_revisions}"
12
+ )
13
+ super().__init__(self.msg)
@@ -0,0 +1,21 @@
1
+ class WrongTesterError(Exception):
2
+ """Tester you are trying to connect is of a different type"""
3
+ def __init__(self) -> None:
4
+ self.msg = "Tester you are trying to connect is of a different type."
5
+ super().__init__(self.msg)
6
+
7
+
8
+ class WrongTesterPasswordError(Exception):
9
+ """Cannot create session on the tester because the password is incorrect"""
10
+ def __init__(self, password: str) -> None:
11
+ self.password = password
12
+ self.msg = "Can't create session on the tester because the password is incorrect."
13
+ super().__init__(self.msg)
14
+
15
+
16
+ class UnsupportedFirmwareError(Exception):
17
+ """Testers firmware version is too old"""
18
+ def __init__(self, version: float) -> None:
19
+ self.version = version
20
+ self.msg = f"Testers firmware version is too old, current: {self.version}. Minimum required: 446.5"
21
+ super().__init__(self.msg)
File without changes
File without changes
@@ -0,0 +1,39 @@
1
+ import abc
2
+ from typing import (
3
+ List,
4
+ TypeVar,
5
+ Type,
6
+ TYPE_CHECKING,
7
+ )
8
+ if TYPE_CHECKING:
9
+ from xoa_driver.internals.core import interfaces as itf
10
+ from xoa_driver.internals.utils import kind
11
+ from xoa_driver.internals.utils.indices import observer
12
+
13
+
14
+ CT = TypeVar("CT")
15
+
16
+
17
+ class BaseIndex(abc.ABC):
18
+ def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "observer.IndicesObserver") -> None:
19
+ self._observer = observer
20
+ self._conn = conn
21
+ self.kind = kind
22
+
23
+ @property
24
+ def idx(self) -> int:
25
+ return self.kind.index_id
26
+
27
+ @abc.abstractmethod
28
+ async def delete(self) -> None:
29
+ raise NotImplementedError()
30
+
31
+ @classmethod
32
+ @abc.abstractmethod
33
+ async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
34
+ raise NotImplementedError()
35
+
36
+ @classmethod
37
+ @abc.abstractmethod
38
+ async def _new(cls: Type[CT], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "observer.IndicesObserver") -> CT:
39
+ raise NotImplementedError()
@@ -0,0 +1,186 @@
1
+ from typing import (
2
+ final,
3
+ List,
4
+ Type,
5
+ TypeVar,
6
+ TYPE_CHECKING,
7
+ )
8
+
9
+ from xoa_driver.internals.commands import (
10
+ P4G_INDICES,
11
+ P4G_CREATE,
12
+ P4G_DELETE,
13
+ P4G_ENABLE,
14
+ P4G_COMMENT,
15
+ P4G_CLEAR_COUNTERS,
16
+ P4G_ROLE,
17
+ P4G_LP_TIME_SCALE,
18
+ P4G_LP_SHAPE,
19
+ P4G_TEST_APPLICATION,
20
+ P4G_L4_PROTOCOL,
21
+ )
22
+ if TYPE_CHECKING:
23
+ from xoa_driver.internals.core import interfaces as itf
24
+ from xoa_driver.internals.utils import kind
25
+ from xoa_driver.internals.utils.indices import observer as idx_obs
26
+ from .tls import GTls
27
+ from .l2 import GL2
28
+ from .raw import GRaw
29
+ from .tcp import GTcp
30
+ from .udp import GUdp
31
+ from .replay import GReplay
32
+ from .l3 import GL3
33
+ from .user_state import GUserState
34
+ from .histogram import GHistogram
35
+
36
+ from ..base_index import BaseIndex
37
+
38
+
39
+ class GCounters:
40
+ """Connection Group's counters
41
+ """
42
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, group_idx: int) -> None:
43
+ self.clear = P4G_CLEAR_COUNTERS(conn, module_id, port_id, group_idx)
44
+ """Clear the counters
45
+
46
+ :type: P4G_CLEAR_COUNTERS
47
+ """
48
+
49
+
50
+ class GLoadProfile:
51
+ """Connection Group's load profile.
52
+ """
53
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, group_idx: int) -> None:
54
+ self.time_scale = P4G_LP_TIME_SCALE(conn, module_id, port_id, group_idx)
55
+ """Time scale of the load profile
56
+
57
+ :type: P4G_LP_TIME_SCALE
58
+ """
59
+
60
+ self.shape = P4G_LP_SHAPE(conn, module_id, port_id, group_idx)
61
+ """Shape of the load profile.
62
+
63
+ :type: P4G_LP_SHAPE
64
+ """
65
+
66
+
67
+ CG = TypeVar("CG")
68
+
69
+
70
+ @final
71
+ class ConnectionGroupIdx(BaseIndex):
72
+ """L47 Connection Group Index Manager"""
73
+ def __init__(self, conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> None:
74
+ super().__init__(conn, kind, observer)
75
+
76
+ self.comment = P4G_COMMENT(self._conn, *kind)
77
+ """Description of the connection group
78
+
79
+ :type: P4G_COMMENT
80
+ """
81
+
82
+ self.status = P4G_ENABLE(self._conn, *kind)
83
+ """Enable/disable/suppress a previously created connection group
84
+
85
+ :type: P4G_ENABLE
86
+ """
87
+
88
+ self.role = P4G_ROLE(self._conn, *kind)
89
+ """Specifies the client or server role for this Connection Group.
90
+
91
+ :type: P4G_ROLE
92
+ """
93
+
94
+ self.layer4_protocol = P4G_L4_PROTOCOL(self._conn, *kind)
95
+ """Specifies either TCP or UDP as Layer 4 protocol.
96
+
97
+ :type: P4G_L4_PROTOCOL
98
+ """
99
+
100
+ self.test_application = P4G_TEST_APPLICATION(self._conn, *kind)
101
+ """Configure the application layer mode.
102
+
103
+ :type: P4G_TEST_APPLICATION
104
+ """
105
+
106
+ self.tls = GTls(self._conn, *kind)
107
+ """TLS configurations.
108
+
109
+ :type: GTls
110
+ """
111
+
112
+ self.l2 = GL2(self._conn, *kind)
113
+ """L2 configurations.
114
+
115
+ :type: GL2
116
+ """
117
+
118
+ self.raw = GRaw(self._conn, *kind)
119
+ """Raw configurations.
120
+
121
+ :type: GRaw
122
+ """
123
+
124
+ self.tcp = GTcp(self._conn, *kind)
125
+ """TCP configurations.
126
+
127
+ :type: GTcp
128
+ """
129
+
130
+ self.udp = GUdp(self._conn, *kind)
131
+ """UDP configurations.
132
+
133
+ :type: GUdp
134
+ """
135
+
136
+ self.replay = GReplay(self._conn, *kind)
137
+ """Replay configurations.
138
+
139
+ :type: GReplay
140
+ """
141
+
142
+ self.l3 = GL3(self._conn, *kind)
143
+ """L3 configurations.
144
+
145
+ :type: GL3
146
+ """
147
+
148
+ self.user_state = GUserState(self._conn, *kind)
149
+ """User state configurations.
150
+
151
+ ;type: GUserState
152
+ """
153
+
154
+ self.histogram = GHistogram(self._conn, *kind)
155
+ """Histogram configurations.
156
+
157
+ :type: GHistogram
158
+ """
159
+
160
+ self.counters = GCounters(self._conn, *kind)
161
+ """Counters.
162
+
163
+ :type: GCounters
164
+ """
165
+
166
+ self.load_profile = GLoadProfile(self._conn, *kind)
167
+ """Load Profile configurations.
168
+
169
+ :type: GLoadProfile
170
+ """
171
+
172
+ async def delete(self):
173
+ """Delete the Connection Group.
174
+ """
175
+ await P4G_DELETE(self._conn, *self.kind).set()
176
+ self._observer.notify(idx_obs.IndexEvents.DEL, self)
177
+
178
+ @classmethod
179
+ async def _fetch(cls, conn: "itf.IConnection", module_id: int, port_id: int) -> List[int]:
180
+ resp = await P4G_INDICES(conn, module_id, port_id).get()
181
+ return list(resp.group_identifiers)
182
+
183
+ @classmethod
184
+ async def _new(cls: Type[CG], conn: "itf.IConnection", kind: "kind.IndicesKind", observer: "idx_obs.IndicesObserver") -> CG:
185
+ await P4G_CREATE(conn, *kind).set()
186
+ return cls(conn, kind, observer)
@@ -0,0 +1,78 @@
1
+ from typing import TYPE_CHECKING
2
+ if TYPE_CHECKING:
3
+ from xoa_driver.internals.core import interfaces as itf
4
+ from xoa_driver.internals.commands import (
5
+ P4G_TIME_HIST_CONF,
6
+ P4G_PAYLOAD_HIST_CONF,
7
+ P4G_TRANSACTION_HIST_CONF,
8
+ P4G_APP_TRANSACTION_HIST,
9
+ P4G_RECALC_TIME_HIST,
10
+ P4G_RECALC_PAYLOAD_HIST,
11
+ P4G_RECALC_TRANSACTION_HIST,
12
+ )
13
+
14
+
15
+ class GConfigHistogram:
16
+ """L47 Histogram Config"""
17
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, group_idx: int) -> None:
18
+ self.time = P4G_TIME_HIST_CONF(conn, module_id, port_id, group_idx)
19
+ """Sets the start value and the interval size for the time histograms
20
+
21
+ :type: P4G_TIME_HIST_CONF
22
+ """
23
+
24
+ self.payload = P4G_PAYLOAD_HIST_CONF(conn, module_id, port_id, group_idx)
25
+ """Sets the start value and the interval size for the payload histograms.
26
+
27
+ :type: P4G_PAYLOAD_HIST_CONF
28
+ """
29
+
30
+ self.transaction = P4G_TRANSACTION_HIST_CONF(conn, module_id, port_id, group_idx)
31
+ """Sets the start value and the interval size for the transaction histogram.
32
+
33
+ :type: P4G_TRANSACTION_HIST_CONF
34
+ """
35
+
36
+
37
+ class GRecalculatesHistogram:
38
+ """L47 Histogram Recalculation."""
39
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, group_idx: int) -> None:
40
+ self.time = P4G_RECALC_TIME_HIST(conn, module_id, port_id, group_idx)
41
+ """Recalculates connection time histograms
42
+
43
+ :type: P4G_RECALC_TIME_HIST
44
+ """
45
+
46
+ self.payload = P4G_RECALC_PAYLOAD_HIST(conn, module_id, port_id, group_idx)
47
+ """Recalculates connection payload histograms
48
+
49
+ :type: P4G_RECALC_PAYLOAD_HIST
50
+ """
51
+
52
+ self.transaction = P4G_RECALC_TRANSACTION_HIST(conn, module_id, port_id, group_idx)
53
+ """Recalculates transaction histograms
54
+
55
+ :type: P4G_RECALC_TRANSACTION_HIST
56
+ """
57
+
58
+
59
+ class GHistogram:
60
+ """L47 Histogram."""
61
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, group_idx: int) -> None:
62
+ self.transaction = P4G_APP_TRANSACTION_HIST(conn, module_id, port_id, group_idx)
63
+ """Returns a histogram over completed request/response transactions per connection.
64
+
65
+ :type: P4G_APP_TRANSACTION_HIST
66
+ """
67
+
68
+ self.recalculates = GRecalculatesHistogram(conn, module_id, port_id, group_idx)
69
+ """L47 Histogram Recalculation.
70
+
71
+ :type: GRecalculatesHistogram
72
+ """
73
+
74
+ self.config = GConfigHistogram(conn, module_id, port_id, group_idx)
75
+ """L47 Histogram Config
76
+
77
+ :type: GConfigHistogram
78
+ """