Skip to content

ptp_instance

PTP instance and port state classes.

Classes:

  • PtpInstance

    The current state of a PTP instance as reported by PMC.

  • PtpPort

    The current state of a PTP port as reported by PMC.

  • Unsupported

    Marker class for unsupported datasets.

PtpInstance dataclass

PtpInstance(
    is_local_instance: bool,
    identity: str,
    default_ds: DefaultDataSet | None = None,
    current_ds: CurrentDataSet | Unsupported | None = None,
    parent_ds: ParentDataSet | Unsupported | None = None,
    ports: dict[int, PtpPort] = dict(),
)

The current state of a PTP instance as reported by PMC.

Attributes:

  • is_local_instance (bool) –

    Whether this is the PTP instance that PMC is running on.

  • identity (str) –

    The clock identity (e.g., '123456.fffe.111111').

  • default_ds (DefaultDataSet | None) –

    The default dataset, if available.

  • current_ds (CurrentDataSet | Unsupported | None) –

    The current dataset, if available.

  • parent_ds (ParentDataSet | Unsupported | None) –

    The parent dataset, if available.

  • ports (dict[int, PtpPort]) –

    Map of port number to PtpPort.

Methods:

  • id

    Return the clock identity.

id

id()

Return the clock identity.

PtpPort dataclass

PtpPort(port_ds: PortDataSet)

The current state of a PTP port as reported by PMC.

Attributes:

Methods:

  • id

    Return the port identity.

id

id()

Return the port identity.

Unsupported

Marker class for unsupported datasets.