8.3.1.13. Transceiver

This module contains the L23 port transceiver classes that deal with access to the register interfaces of the transceiver on a port.


class PX_I2C_CONFIG[source]

Bases: object

Set the get the access speed on a transceiver I2C access in the unit of KHz. Default to 100. When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from P_CAPABILITIES. The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default 100.

class GetDataAttr[source]

Bases: ResponseBodyStruct

frequency

integer, frequency in kHz, default is 100.

class SetDataAttr[source]

Bases: RequestBodyStruct

frequency

integer, frequency in kHz, default is 100.

get()[source]

Get the speed on a transceiver I2C access in the unit of KHz.

Returns:

frequency in kHz.

Return type:

PX_I2C_CONFIG.GetDataAttr

set(frequency)[source]

Set the speed on a transceiver I2C access in the unit of KHz.

Parameters:

frequency (int) – frequency in kHz

class PX_MII[source]

Bases: object

Provides access to the register interface supported by the media-independent interface (MII) transceiver. It is possible to both read and write register values.

class GetDataAttr[source]

Bases: ResponseBodyStruct

value

2 hex bytes, register value of the transceiver

class SetDataAttr[source]

Bases: RequestBodyStruct

value

2 hex bytes, register value of the transceiver

get()[source]

Get the register value of a transceiver.

Returns:

the register value of a transceiver

Return type:

PX_MII.GetDataAttr

set(value)[source]

Set the register value of a transceiver.

Parameters:

value (Hex) – register value of a transceiver

class PX_RW[source]

Bases: object

Provides read and write access to the register interface supported by the port transceiver. It is possible to both read and write register values.

class GetDataAttr[source]

Bases: ResponseBodyStruct

value

4 hex bytes, register value of the port transceiver

class SetDataAttr[source]

Bases: RequestBodyStruct

value

4 hex bytes, register value of the port transceiver

get()[source]

Get the register value of a transceiver.

Returns:

the register value of a transceiver

Return type:

PX_RW.GetDataAttr

set(value)[source]

Set the register value of a transceiver.

Parameters:

value (Hex) – register value of a transceiver

class PX_RW_SEQ[source]

Bases: object

I2C sequential access to a transceiver’s register. When invoked, the <byte_count> number of bytes will be read or written in one I2C transaction, in which the <value> is read or written with only a single register address setup. A subsequent invocation will perform a second I2C transaction in the same manner.

  • <_byte_xcount> number of bytes will be read or written in one I2C transaction

  • <_page_xindex>: the transceiver page address, integer, 0x00 - 0xFF (0-255).

  • <_register_xaddress>: the address within the page, integer, 0x00 - 0xFF (0-255).

If <_register_xaddress> < 128, the page index <_page_xindex> is ignored by the server. The server will read from page 0 without writing 0 into byte 127.

If <_register_xaddress> >=128, the page index <_page_xindex> will be written into byte 127.

class GetDataAttr[source]

Bases: ResponseBodyStruct

value

the bytes to be read or written in one I2C transaction. The number of bytes in the <value> equals <byte_count>.

class SetDataAttr[source]

Bases: RequestBodyStruct

value

the bytes to be read or written in one I2C transaction. The number of bytes in the <value> equals <byte_count>.

get()[source]

Get the register value of a transceiver in one I2C transaction.

Returns:

the register value of a transceiver

Return type:

PX_RW_SEQ.GetDataAttr

set(value)[source]

Set the register value of a transceiver in one I2C transaction.

Parameters:

value (Hex) – register value of a transceiver

class PX_RW_SEQ_BANK[source]

Bases: object

I2C sequential access to a transceiver’s register. When invoked, the <byte_count> number of bytes will be read or written in one I2C transaction, in which the <value> is read or written with only a single register address setup. A subsequent invocation will perform a second I2C transaction in the same manner.

  • <_bank_xindex>: the bank address, integer, 0x00 - 0xFF (0-255).

  • <_page_xindex>: the transceiver page address, integer, 0x00 - 0xFF (0-255).

  • <_register_xaddress>: the address within the page, integer, 0x00 - 0xFF (0-255).

  • <_byte_xcount> number of bytes will be read or written in one I2C transaction

If <_register_xaddress> < 128, the page index <page> and the bank index <_bank_xindex> is ignored by the server. The server will read from page 0 without writing 0 into byte 127.

If <_register_xaddress> >=128, the page index <page> will be written into byte 127, and the bank index <_bank_xindex> will be written into byte 126.

class GetDataAttr[source]

Bases: ResponseBodyStruct

value

the bytes to be read or written in one I2C transaction. The number of bytes in the <value> equals <byte_count>.

class SetDataAttr[source]

Bases: RequestBodyStruct

value

the bytes to be read or written in one I2C transaction. The number of bytes in the <value> equals <byte_count>.

get()[source]

Get the register value of a transceiver in one I2C transaction.

Returns:

the register value of a transceiver

Return type:

PX_RW_SEQ.GetDataAttr

set(value)[source]

Set the register value of a transceiver in one I2C transaction.

Parameters:

value (Hex) – register value of a transceiver

class PX_TEMPERATURE[source]

Bases: object

Transceiver temperature in degrees Celsius.

class GetDataAttr[source]

Bases: ResponseBodyStruct

fractional_part

byte, 1/256th of a degree Celsius after the decimal digit.

integral_part

byte, temperature value before the decimal digit.

get()[source]

Get transceiver temperature in degrees Celsius.

Returns:

temperature value before the decimal digit, and 1/256th of a degree Celsius after the decimal digit.

Return type:

PX_TEMPERATURE.GetDataAttr