phoenix6.all_timestamps

Module Contents

class phoenix6.all_timestamps.AllTimestamps

A collection of timestamps for a received signal.

update(system_timestamp_seconds: phoenix6.units.second, system_timestamp_source: phoenix6.timestamp.TimestampSource, system_timestamp_valid: bool, canivore_timestamp_seconds: phoenix6.units.second, canivore_timestamp_source: phoenix6.timestamp.TimestampSource, canivore_timestamp_valid: bool, device_timestamp_seconds: phoenix6.units.second, device_timestamp_source: phoenix6.timestamp.TimestampSource, device_timestamp_valid: bool)

Update this timestamp with the new timestamps

Parameters:
  • system_timestamp_seconds (second) – New system timestamp seconds

  • system_timestamp_source (TimestampSource) – New System timestamp source

  • system_timestamp_valid (bool) – Whether new System timestamp is valid

  • canivore_timestamp_seconds (second) – New CANivore timestamp seconds

  • canivore_timestamp_source (TimestampSource) – New CANivore timestamp source

  • canivore_timestamp_valid (bool) – Whether new CANivore timestamp is valid

  • device_timestamp_seconds (second) – New Device timestamp seconds

  • device_timestamp_source (TimestampSource) – New Device timestamp source

  • device_timestamp_valid (bool) – Whether new Device timestamp is valid

get_best_timestamp() phoenix6.timestamp.Timestamp

Gets the most accurate timestamp available.

The timestamp sources from most to least accurate are:

  • TimestampSource.Device

  • TimestampSource.CANivore

  • TimestampSource.System

Note that some of these sources may not be available.

Returns:

The most accurate timestamp available

Return type:

Timestamp

get_system_timestamp() phoenix6.timestamp.Timestamp

Get the timestamp as reported by the TimestampSource.System source.

Returns:

Timestamp as reported by system

Return type:

Timestamp

get_canivore_timestamp() phoenix6.timestamp.Timestamp

Get the timestamp as reported by the TimestampSource.CANivore source.

Returns:

Timestamp as reported by the CANivore

Return type:

Timestamp

get_device_timestamp() phoenix6.timestamp.Timestamp

Get the timestamp as reported by the TimestampSource.Device source.

Returns:

Timestamp as reported by the device

Return type:

Timestamp