M_TCVR_PRESENCE

code: 408

# get
<module-index> M_TCVR_PRESENCE [<tcvr_cage_index>] ?

Description

This command retrieves the presence status of the transceiver module in the specified cage. If the cage has a transceiver module inserted, either from a DAC cable or from an optical transceiver, the command will return a value of PRESENT (1). If the cage is empty, the command will return a value of NOT_PRESENT (0).

Important

The binary version of this command supports push notifications for transceiver presence changes. When a transceiver module is inserted or removed from a cage, the system will automatically send a notification to the connected clients with the updated presence status. This allows for real-time monitoring of transceiver presence without the need for continuous polling.

Actions

get

Indices

  1. tcvr_cage_index: integer, the index of the transceiver cage on the test module, starting from 0. The index must be within the range of available cages on the module, which can be obtained using the M_TCVR_INDICES command.

Parameters

  1. tcvr_presence: byte, the presence status of the transceiver module in the specified cage.

  • NOT_PRESENT (0): The transceiver module is not present in the cage.

  • PRESENT (1): The transceiver module is present in the cage.

  • DETECTING (2): A transceiver module has been inserted and is currently being detected.

  • DETECTION_FAILURE (3): A transceiver module has been inserted, but detection failed.

  1. data: json, Transceiver/cage metadata in JSON format. For internal use at this time, contents/layout subject to change without notice.

Example

# get
input:  0 M_TCVR_PRESENCE [0] ?
output: 0 M_TCVR_PRESENCE [0] PRESENT {'insert_count': 0, 'port_list': [0], 'data': [[0, 0, 3], [0, 1, 4], [0, 2, 33], [1, 142, 0]]}