Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions xoa_driver/internals/commands/m_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ class GetDataAttr(ResponseBodyStruct):
"""coded integer, does this module support Time Sensitive Networking (TSN) ?"""
can_ppm_sweep: YesNo = field(XmpInt())
"""coded integer, does this module support Local Clock Adjustment/Sweep (aka. PPM Sweep) ?"""
monitoring_bitmask: int = field(XmpInt())
"""extended module monitoring capabilities"""

def get(self) -> Token[GetDataAttr]:
"""Get the test module capabilities.
Expand Down Expand Up @@ -1752,3 +1754,30 @@ def set(self, on_off: OnOff) -> Token[None]:
set_on = functools.partialmethod(set, OnOff.ON)
"""Enable the bypass mode of the impairment emulator.
"""


@register_command
@dataclass
class M_HEALTH:
"""
Gets the module health information.
"""

code: typing.ClassVar[int] = 456
pushed: typing.ClassVar[bool] = False

_connection: 'interfaces.IConnection'
_module: int

class GetDataAttr(ResponseBodyStruct):
info: str = field(XmpStr())
"""Module health information json string"""

def get(self) -> Token[GetDataAttr]:
"""Gets the module health information.

:return: Module health information json string
:rtype: M_HEALTH.GetDataAttr
"""

return Token(self._connection, build_get_request(self, module=self._module))
4 changes: 4 additions & 0 deletions xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from xoa_driver.internals.commands import (
M_CLOCKPPBSWEEP,
M_CLOCKSWEEPSTATUS,
M_HEALTH,
)


Expand All @@ -36,6 +37,9 @@ def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -
self.clock_sweep = MClockSweep(conn, self.module_id)
"""Clock ppm sweep control"""

self.health = M_HEALTH(conn, self.module_id)
"""Module health info"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-1S-1P[a]")
Expand Down
4 changes: 4 additions & 0 deletions xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from xoa_driver.internals.commands import (
M_CLOCKPPBSWEEP,
M_CLOCKSWEEPSTATUS,
M_HEALTH,
)


Expand All @@ -36,6 +37,9 @@ def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -
self.clock_sweep = MClockSweep(conn, self.module_id)
"""Clock ppm sweep control"""

self.health = M_HEALTH(conn, self.module_id)
"""Module health info"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-1S-1P[a]")
Expand Down