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
10 changes: 10 additions & 0 deletions docs/source/api_ref/hlapiv1/port/capture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ Statistics

await port.capturer.stats.get()


Read Captured Packets
---------------------

.. code-block:: python

pkts = await port.capturer.obtain_captured()
for i in range(len(pkts)):
resp = await pkts[i].packet.get()
print(f"Packet content # {i}: {resp.hex_data}")
2 changes: 1 addition & 1 deletion xoa_driver/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2.1.4"
__version__ = "2.1.5"
__short_version__ = "2.0"
4 changes: 3 additions & 1 deletion xoa_driver/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
RxEqExtCapMode,
PreCodingMode,
GrayCodingMode,
Endianness
Endianness,
StreamOption
)

__all__ = (
Expand Down Expand Up @@ -334,4 +335,5 @@
"PreCodingMode",
"GrayCodingMode",
"Endianness"
"StreamOption"
)
5 changes: 5 additions & 0 deletions xoa_driver/internals/commands/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,11 @@ class ReconciliationSublayerSupport(IntEnum):
FAULT_SIGNALING = 1
"""Supported, which means P_FAULTSTATUS and P_FAULTSIGNALLING are supported by the port."""

class StreamOption(IntEnum):
"""Stream Options"""

INCPLDFROM0 = 0
"""This flag affects the INC8/DEC8/INC16/DEC16 payload types (refer to the PS_PAYLOAD command): With the flag set, the first payload byte/word after the header will be 0 (INC8/INC16) or -1 (DEC8/DEC16). With the flag unset, the default is used: The first payload byte/word of the payload will be equal to <length of header> (INC8/INC16), or -<length of header> - 1 (DEC8/DEC16)."""

# endregion

Expand Down
4 changes: 4 additions & 0 deletions xoa_driver/internals/commands/p_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ class GetDataAttr(ResponseBodyStruct):
"""integer, Enabled traffic engine on port. 0x01 = TGA, 0x02 = uTGA."""
reconc_sublayer: ReconciliationSublayerSupport = field(XmpInt(), min_version=456)
"""integer, Reconciliation Sublayer support, bitmask, 0 = fault signalling not support; 1 = fault signalling supported (XMP: P_FAULTSTATUS/P_FAULTSIGNALING)"""
max_match_term_pos: int = field(XmpInt(), min_version=457)
"""integer, max match term position in bytes"""
stream_misc: int = field(XmpInt(), min_version=457)
"""integer, bit pattern, what streams on this port can do. [0]: Whether the port supports streams with DEC8/INC16/DEC16 payload. [1]: Whether the port supports INCPLDFROM0 stream option (refer to the PS_OPTIONS command)."""

def get(self) -> Token[GetDataAttr]:
"""Get the internal limits, aka. capabilities, of the port.
Expand Down
152 changes: 146 additions & 6 deletions xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,81 @@ def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -
"""Port Index Manager of Freya-800G-4S-1P[a]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[b]")
class MFreya800G4S1P_b(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[b]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_b] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_b,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[b]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[c]")
class MFreya800G4S1P_c(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[c]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_c] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_c,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[c]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[d]")
class MFreya800G4S1P_d(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[d]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_d] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_d,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[d]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[e]")
class MFreya800G4S1P_e(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[e]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_e] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_e,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[e]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[f]")
class MFreya800G4S1P_f(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[f]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_f] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_f,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[f]"""


@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[a]")
class MFreya800G4S1POSFP_a(ModuleFamilyL1):
Expand All @@ -112,16 +187,81 @@ def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -
"""Port Index Manager of Freya-800G-4S-1P-OSFP[a]"""



@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P[b]")
class MFreya800G4S1P_b(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P[b]"""
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[b]")
class MFreya800G4S1POSFP_b(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P-OSFP[b]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1P_b] = pm.PortsManager(
self.ports: pm.PortsManager[ports.PFreya800G4S1POSFP_b] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1P_b,
ports_type=ports.PFreya800G4S1POSFP_b,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P[b]"""
"""Port Index Manager of Freya-800G-4S-1P-OSFP[b]"""



@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[c]")
class MFreya800G4S1POSFP_c(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P-OSFP[c]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1POSFP_c] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1POSFP_c,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P-OSFP[c]"""



@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[d]")
class MFreya800G4S1POSFP_d(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P-OSFP[d]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1POSFP_d] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1POSFP_d,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P-OSFP[d]"""



@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[e]")
class MFreya800G4S1POSFP_e(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P-OSFP[e]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1POSFP_e] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1POSFP_e,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P-OSFP[e]"""



@typing.final
@revisions.register_valkyrie_module(rev="Freya-800G-4S-1P-OSFP[f]")
class MFreya800G4S1POSFP_f(ModuleFamilyL1):
"""Test module Freya-800G-4S-1P-OSFP[f]"""
def __init__(self, conn: "itf.IConnection", init_data: "m_itf.ModuleInitData") -> None:
super().__init__(conn, init_data)
self.ports: pm.PortsManager[ports.PFreya800G4S1POSFP_f] = pm.PortsManager(
conn=conn,
ports_type=ports.PFreya800G4S1POSFP_f,
module_id=self.module_id,
ports_count=self.ports_count
)
"""Port Index Manager of Freya-800G-4S-1P-OSFP[f]"""
59 changes: 57 additions & 2 deletions xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,74 @@ class PFreya800G1S1POSFP_a(FamilyL1):
...



class PFreya800G4S1P_a(FamilyL1):
"""L23 port on Freya-800G-4S-1P[a] module.
"""
...


class PFreya800G4S1P_b(FamilyL1):
"""L23 port on Freya-800G-4S-1P[b] module.
"""
...


class PFreya800G4S1P_c(FamilyL1):
"""L23 port on Freya-800G-4S-1P[c] module.
"""
...


class PFreya800G4S1P_d(FamilyL1):
"""L23 port on Freya-800G-4S-1P[d] module.
"""
...


class PFreya800G4S1P_e(FamilyL1):
"""L23 port on Freya-800G-4S-1P[e] module.
"""
...


class PFreya800G4S1P_f(FamilyL1):
"""L23 port on Freya-800G-4S-1P[f] module.
"""
...


class PFreya800G4S1POSFP_a(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[a] module.
"""
...


class PFreya800G4S1P_b(FamilyL1):
"""L23 port on Freya-800G-4S-1P[b] module.
class PFreya800G4S1POSFP_b(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[b] module.
"""
...


class PFreya800G4S1POSFP_c(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[c] module.
"""
...


class PFreya800G4S1POSFP_d(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[d] module.
"""
...


class PFreya800G4S1POSFP_e(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[e] module.
"""
...


class PFreya800G4S1POSFP_f(FamilyL1):
"""L23 port on Freya-800G-4S-1P-OSFP[f] module.
"""
...
Loading