Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.
3 changes: 1 addition & 2 deletions docs/source/api_ref/hlapiv1/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
🚀 High-Level API
========================

.. versionadded:: 1.1

HL-API uses the classes defined in LL-API and lets you quickly develop scripts or program in an **object-oriented** fashion with explicit definition of commands of different *tester*, *module*, *port* types. In addition, the HL-API layer provides functionalities such as:

* :ref:`Auto connection keep-alive <session_label>`
Expand All @@ -23,6 +21,7 @@ The HL-API (V1) are categorized into:

.. toctree::

summary
tester/index
module/index
port/index
Expand Down
13 changes: 12 additions & 1 deletion docs/source/api_ref/hlapiv1/module/capabilities.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Capabilities
=========================
Gets the module capabilities.

Corresponding CLI command: ``M_CAPABILITIES``

.. code-block:: python

await module.capabilities.get()
# Capabilities
resp = await module.capabilities.get()
resp.can_advanced_timing
resp.can_local_time_adjust
resp.can_media_config
resp.can_ppm_sweep
resp.can_tsn
resp.is_chimera
resp.max_clock_ppm
67 changes: 58 additions & 9 deletions docs/source/api_ref/hlapiv1/module/identification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,110 @@ Identification

Name
----------
Gets the name of a module.

Corresponding CLI command: ``M_NAME``

.. code-block:: python

await module.name.get()
# Name
resp = await module.name.get()
resp.name


Description
-----------
Gets the user-defined description string of a module.

Corresponding CLI command: ``M_COMMENT``

.. code-block:: python

# Description
await module.comment.set(comment="description")
await module.comment.get()

resp = await module.comment.get()
resp.comment

Legacy Model
------------
Gets the legacy model P/N name of a Xena test module.

Corresponding CLI command: ``M_MODEL``

.. code-block:: python

await module.mode.get()
# Legacy Model
resp = await module.model.get()
resp.model

Model
-------------
Gets the model P/N name of a Xena test module.

Corresponding CLI command: ``M_REVISION``

.. code-block:: python

await module.revision.get()
# Model
resp = await module.revision.get()
resp.revision


Serial Number
-----------------
Gets the unique serial number of a module.

Corresponding CLI command: ``M_SERIALNO``

.. code-block:: python

await module.serial_number.get()
# Serial Number
resp = await module.serial_number.get()
resp.serial_number


Firmeware Version
Firmware Version
-----------------
Gets the version number of the hardware image installed on a module.

Corresponding CLI command: ``M_VERSIONNO``

.. code-block:: python

await module.version_number.get()
# Firmware Version
resp = await module.version_number.get()
resp.version


Port Count
------------
Gets the maximum number of ports on a module.

.. note::

For a CFP-type module this number refers to the maximum number of ports possible on the module regardless of the media configuration.

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.

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.

Corresponding CLI command: ``M_PORTCOUNT``

.. code-block:: python

await module.port_count.get()
# Port Count
resp = await module.port_count.get()
resp.port_count

Status
------
Get status readings for the test module itself.

Corresponding CLI command: ``M_STATUS``

.. code-block:: python

await module.status.get()
# Status
resp = await module.status.get()
resp.temperature
79 changes: 62 additions & 17 deletions docs/source/api_ref/hlapiv1/module/impairment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,89 @@ Impairment

Bypass Mode
--------------------
Set emulator bypass mode. Emulator bypass mode will bypass the entire emulator
for minimum latency.

Corresponding CLI command: ``M_EMULBYPASS``

.. code-block:: python

await module.emulator_bypass_mode.set_on()
await module.emulator_bypass_mode.set_off()
await module.emulator_bypass_mode.get()
# Chimera - Bypass Mode
if isinstance(module, modules.ModuleChimera):
await module.emulator_bypass_mode.set(on_off=enums.OnOff.ON)
await module.emulator_bypass_mode.set_on()
await module.emulator_bypass_mode.set(on_off=enums.OnOff.OFF)
await module.emulator_bypass_mode.set_off()

resp = await module.emulator_bypass_mode.get()
resp.on_off


Latency Mode
--------------------
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.

.. note::

When change the latency mode, all latency configurations are reset on all ports in chimera module.

Corresponding CLI command: ``M_LATENCYMODE``

.. code-block:: python

await module.latency_mode.set_normal()
await module.latency_mode.set_extended()
await module.latency_mode.get()
# Chimera - Latency Mode
if isinstance(module, modules.ModuleChimera):
await module.latency_mode.set(mode=enums.ImpairmentLatencyMode.NORMAL)
await module.latency_mode.set_normal()
await module.latency_mode.set(mode=enums.ImpairmentLatencyMode.EXTENDED)
await module.latency_mode.set_extended()

resp = await module.latency_mode.get()
resp.mode


TX Clock Source
--------------------
For test modules with advanced timing features, select what clock drives the port TX rates.

Corresponding CLI command: ``M_TXCLOCKSOURCE_NEW``

.. code-block:: python

await module.tx_clock.source.set_modulelocalclock()
await module.tx_clock.source.set_p0rxclk()
await module.tx_clock.source.set_p1rxclk()
await module.tx_clock.source.set_p2rxclk()
await module.tx_clock.source.set_p3rxclk()
await module.tx_clock.source.set_p4rxclk()
await module.tx_clock.source.set_p5rxclk()
await module.tx_clock.source.set_p6rxclk()
await module.tx_clock.source.set_p7rxclk()
await module.tx_clock.source.get()
# Chimera - TX Clock Source
if isinstance(module, modules.ModuleChimera):
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.MODULELOCALCLOCK)
await module.tx_clock.source.set_modulelocalclock()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P0RXCLK)
await module.tx_clock.source.set_p0rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P1RXCLK)
await module.tx_clock.source.set_p1rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P2RXCLK)
await module.tx_clock.source.set_p2rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P3RXCLK)
await module.tx_clock.source.set_p3rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P4RXCLK)
await module.tx_clock.source.set_p4rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P5RXCLK)
await module.tx_clock.source.set_p5rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P6RXCLK)
await module.tx_clock.source.set_p6rxclk()
await module.tx_clock.source.set(tx_clock=enums.TXClockSource.P7RXCLK)
await module.tx_clock.source.set_p7rxclk()

resp = await module.tx_clock.source.get()
resp.tx_clock


TX Clock Status
----------------------------
For test modules with advanced timing features, check whether a valid clock is present.

Corresponding CLI command: ``M_TXCLOCKSTATUS_NEW``

.. code-block:: python

await module.tx_clock.status.get()
# Chimera - TX Clock Status
if isinstance(module, modules.ModuleChimera):
resp = await module.tx_clock.status.get()
resp.status
3 changes: 2 additions & 1 deletion docs/source/api_ref/hlapiv1/module/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Module
.. toctree::
:glob:

*
*
vulcan/index
62 changes: 51 additions & 11 deletions docs/source/api_ref/hlapiv1/module/media.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,75 @@ Media

Media Configuration
-------------------
For the test modules that support media configuration (check M_CAPABILITIES), this command sets the desired media type (front port).

Corresponding CLI command: ``M_MEDIA``

.. code-block:: python

await module.media.set()
await module.media.get()
# Media Configuration
await module.media.set(media_config=enums.MediaConfigurationType.BASE_T1)
await module.media.set(media_config=enums.MediaConfigurationType.BASE_T1S)
await module.media.set(media_config=enums.MediaConfigurationType.CFP)
await module.media.set(media_config=enums.MediaConfigurationType.CFP4)
await module.media.set(media_config=enums.MediaConfigurationType.CXP)
await module.media.set(media_config=enums.MediaConfigurationType.OSFP800)
await module.media.set(media_config=enums.MediaConfigurationType.OSFP800_ANLT)
await module.media.set(media_config=enums.MediaConfigurationType.QSFP112)
await module.media.set(media_config=enums.MediaConfigurationType.QSFP112_ANLT)
await module.media.set(media_config=enums.MediaConfigurationType.QSFP28_NRZ)
await module.media.set(media_config=enums.MediaConfigurationType.QSFP28_PAM4)
await module.media.set(media_config=enums.MediaConfigurationType.QSFP56_PAM4)
await module.media.set(media_config=enums.MediaConfigurationType.QSFPDD_NRZ)
await module.media.set(media_config=enums.MediaConfigurationType.QSFPDD_PAM4)
await module.media.set(media_config=enums.MediaConfigurationType.QSFPDD800)
await module.media.set(media_config=enums.MediaConfigurationType.QSFPDD800_ANLT)
await module.media.set(media_config=enums.MediaConfigurationType.SFP112)
await module.media.set(media_config=enums.MediaConfigurationType.SFP28)
await module.media.set(media_config=enums.MediaConfigurationType.SFP56)
await module.media.set(media_config=enums.MediaConfigurationType.SFPDD)

resp = await module.media.get()
resp.media_config

Supported Media
---------------
Shows the available speeds on a module. The structure of the returned value is
``[ <cage_type> <available_speed_count> [<ports_per_speed> <speed>] ]``.
``[<ports_per_speed> <speed>]`` is repeated until all speeds supported by the ``<cage_type>`` has been listed.
``[<cage_type> <available_speed_count>]`` is repeated for all cage types on the module including the related ``<ports_per_speed> <speed>`` information.

Corresponding CLI command: ``M_MEDIASUPPORT``

.. code-block:: python

await module.available_speeds.get()
resp = await module.available_speeds.get()
resp.media_info_list


Port Configuration
------------------
This property defines the current number of ports and the speed of each of them
on a CFP test module. The following combinations are possible: 2x10G, 4x10G, 8x10G,
2x25G, 4x25G, 8x25G, 1x40G, 2x40G, 2x50G, 4x50G, 8x50G, 1x100G, 2x100G, 4x100G, 2x200G, and 1x400G.

.. note::

``<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.

The number of port speeds equals the value of the number of ports.

For example if the configuration is 4x25G, ``<portspeed_list>`` will be ``[4, 25000, 25000, 25000, 25000]``.

Corresponding CLI command: ``M_CFPCONFIGEXT``

.. code-block:: python

# Port Configuration
await module.cfp.config.set(portspeed_list=[1, 800000])
await module.cfp.config.set(portspeed_list=[2, 400000, 400000])
await module.cfp.config.set(portspeed_list=[4, 200000, 200000, 200000, 200000])
await module.cfp.config.set(portspeed_list=[8, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000])
await module.cfp.config.get()


CFP Type
---------------

.. code-block:: python

await module.cfp.type.get()
resp = await module.cfp.config.get()
resp.portspeed_list
Loading