Skip to content

phc2sys_instance

PHC2SYS configuration and state parsing.

Classes:

Phc2SysConfig dataclass

Phc2SysConfig()

Bases: LinuxPtpConfig

Configuration for a phc2sys instance.

Attributes:

  • source_clock (ClockId) –

    The source clock being synchronized from.

  • dst_clocks (set[ClockId]) –

    Set of destination clocks being synchronized to.

  • clock_aliases (dict[str, ClockId]) –

    Map of command-line clock names to canonical ClockIds.

Methods:

add_args_app_specific

add_args_app_specific(parser: ArgumentParser) -> None

Add phc2sys-specific arguments to the parser.

override_app_specific

override_app_specific(
    args: Namespace, config: ConfigParser
) -> list[str]

Return list of args that override config file settings.

validate_args_app_specific

validate_args_app_specific(args: Namespace) -> None

Validate phc2sys-specific arguments.

validate_config_app_specific

validate_config_app_specific(config: ConfigParser) -> None

Validate the final configuration.

Phc2SysRunningState dataclass

Phc2SysRunningState(
    config: Phc2SysConfig,
    dst_clock_states: dict[
        ClockId, SlaveClockState
    ] = dict(),
)

Bases: State

Running state for phc2sys log parsing.

Attributes:

Methods:

  • parse

    Parse a journal entry and update state.

parse

parse(entry: JournalEntry) -> Generator[Event, None, State]

Parse a journal entry and update state.