Skip to content

port_id

Utility functions for port IDs.

Functions:

readable_port_id

readable_port_id(
    port_id: PortId, include_domain: bool = True
) -> str

Return a human-readable string for the given port ID.

See readable_clock_id for the format of clock IDs.

Examples:

  • PortId(SystemClockId("host"), port_number=1, ptp_domain=0) -> "0:host.sys-1"

Parameters:

  • port_id (PortId) –

    The port ID to convert to a string

  • include_domain (bool, default: True ) –

    Whether to include the PTP domain in the string. Defaults to True.

Returns:

  • str

    The human-readable port ID