ara::tsync
Overview
The Time Synchronization Functional Cluster distributes synchronized time bases across
the vehicle network. This page specifies the public API of the ara::tsync namespace —
time base consumers and providers, status and measurement types, validation notification
interfaces, and the associated error domain — organized by header file.
Library · Headers · Linking
- Library:
lib/libpara_tsync.so - CMake:
find_package(para-tsync)→para::tsync - Standard headers:
include/ara/tsync/ - Runtime daemon:
bin/TBM
1 Header: ara/tsync/consumer_time_base_validation_notification.h
1.1 Class: ConsumerTimeBaseValidationNotification
| Kind: | class | |
| Header file: | #include "ara/tsync/consumer_time_base_validation_notification.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | ConsumerTimeBaseValidationNotification | |
| Syntax: | class ConsumerTimeBaseValidationNotification {...}; | |
| Description: | Callback interface to notify Consumer Application about the availability of a new data block recorded for the Time Base. . | |
1.1.1 Public Member Functions
1.1.1.1 Special Member Functions
1.1.1.1.1 Destructor
| Kind: | function | |
| Header file: | #include "ara/tsync/consumer_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ConsumerTimeBaseValidationNotification | |
| Syntax: | virtual ~ConsumerTimeBaseValidationNotification () noexcept=default; | |
| Exception Safety: | exception safe | |
| Description: | Destructor . | |
1.1.1.2 Member Functions
1.1.1.2.1 SetPdelayInitiatorData
| Kind: | function | |
| Header file: | #include "ara/tsync/consumer_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ConsumerTimeBaseValidationNotification | |
| Syntax: | virtual void SetPdelayInitiatorData (const ara::tsync::PdelayInitiatorMeasurementType &measurementData) noexcept=0; | |
| Parameters (in): | measurementData | Detailed timing data for the pDelay Initiator |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Provide the recorded data block for the pPelay Initiator of the Time Base. | |
1.1.1.2.2 SetSlaveTimingData
| Kind: | function | |
| Header file: | #include "ara/tsync/consumer_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ConsumerTimeBaseValidationNotification | |
| Syntax: | virtual void SetSlaveTimingData (const ara::tsync::TimeSlaveMeasurementType &measurementData) noexcept=0; | |
| Parameters (in): | measurementData | Detailed data for validation of the Time Slave |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Provide the recorded data block for the Time Slave of the Time Base. | |
2 Header: ara/tsync/provider_time_base_validation_notification.h
2.1 Class: ProviderTimeBaseValidationNotification
| Kind: | class | |
| Header file: | #include "ara/tsync/provider_time_base_validation_notification.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | ProviderTimeBaseValidationNotification | |
| Syntax: | class ProviderTimeBaseValidationNotification {...}; | |
| Description: | Callback interface to notify (Validator) Application about the availability of a new data block recorded for the Time Base. gfddfgfdg | |
2.1.1 Public Member Functions
2.1.1.1 Special Member Functions
2.1.1.1.1 Destructor
| Kind: | function | |
| Header file: | #include "ara/tsync/provider_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ProviderTimeBaseValidationNotification | |
| Syntax: | virtual ~ProviderTimeBaseValidationNotification () noexcept=default; | |
| Exception Safety: | exception safe | |
| Description: | Destructor . | |
2.1.1.2 Member Functions
2.1.1.2.1 SetMasterTimingData
| Kind: | function | |
| Header file: | #include "ara/tsync/provider_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ProviderTimeBaseValidationNotification | |
| Syntax: | virtual void SetMasterTimingData (const ara::tsync::TimeMasterMeasurementType &measurementData) noexcept=0; | |
| Parameters (in): | measurementData | Detailed data for validation of the Time Master |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Provide the recorded data block for the Time Master of the Time Base. | |
2.1.1.2.2 SetPdelayResponderData
| Kind: | function | |
| Header file: | #include "ara/tsync/provider_time_base_validation_notification.h" | |
| Scope: | ara::tsync::ProviderTimeBaseValidationNotification | |
| Syntax: | virtual void SetPdelayResponderData (const ara::tsync::PdelayResponderMeasurementType &measurementData) noexcept=0; | |
| Parameters (in): | measurementData | Detailed timing data for the pDelay Responder |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Provide the recorded data block for the pPelay Responder of the Time Base. | |
3 Header: ara/tsync/synchronized_time_base_consumer.h
3.1 Non-Member Types
3.1.1 Type Alias: SynchronizationNotifier
| Kind: | type alias | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizationNotifier | |
| Syntax: | using SynchronizationNotifier = std::function<void(const SynchronizationStatus&)>; | |
| Thread Safety: | not thread-safe | |
| Description: | Notifier function . | |
3.1.2 Type Alias: SynchronizedTimeBaseNotifier
| Kind: | type alias | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizedTimeBaseNotifier | |
| Syntax: | using SynchronizedTimeBaseNotifier = std::function<void(const SynchronizedTimeBaseStatus&)>; | |
| Thread Safety: | not thread-safe | |
| Description: | Notifier function . | |
3.1.3 Type Alias: TimePrecisionNotifier
| Kind: | type alias | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TimePrecisionNotifier | |
| Syntax: | using TimePrecisionNotifier = std::function<void(const TimePrecisionMeasurement&)>; | |
| Thread Safety: | not thread-safe | |
| Description: | Notifier function . | |
3.2 Class: SynchronizedTimeBaseConsumer
| Kind: | class | |
| Port Interfaces: | SynchronizedTimeBaseConsumerInterface | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizedTimeBaseConsumer | |
| Syntax: | class SynchronizedTimeBaseConsumer final {...}; | |
| Description: | Class SynchronizedTimeBaseConsumer is the access to the synchronized timebase referenced by the InstanceSpecifier. It allows to get the current time_point, the rate deviation, the current status and the received user data | |
3.2.1 Public Member Functions
3.2.1.1 Special Member Functions
3.2.1.1.1 Copy Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | SynchronizedTimeBaseConsumer (const SynchronizedTimeBaseConsumer &)=delete; | |
| Description: | The copy constructor for SynchronizedTimeBaseConsumer shall not be used. | |
3.2.1.1.2 Move Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | SynchronizedTimeBaseConsumer (SynchronizedTimeBaseConsumer &&stbc) noexcept; | |
| Parameters (in): | stbc | The SynchronizedTimeBaseConsumer object to be moved. |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move constructor for SynchronizedTimeBaseConsumer. | |
3.2.1.1.3 Copy Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | ara::tsync::SynchronizedTimeBaseConsumer & operator= (const ara::tsync::SynchronizedTimeBaseConsumer &)=delete; | |
| Description: | The copy assignment operator for SynchronizedTimeBaseConsumer shall not be used. | |
3.2.1.1.4 Move Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | ara::tsync::SynchronizedTimeBaseConsumer & operator= (ara::tsync::SynchronizedTimeBaseConsumer &&stbc) & noexcept; | |
| Parameters (in): | stbc | The SynchronizedTimeBaseConsumer object to be moved. |
| Return value: | SynchronizedTimeBaseConsumer & | The moved SynchronizedTimeBaseConsumer object. |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move assignment operator for SynchronizedTimeBaseConsumer. | |
3.2.1.1.5 Destructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | ~SynchronizedTimeBaseConsumer () noexcept; | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | SynchronizedTimeBaseConsumer destructor. | |
3.2.1.2 Constructors
3.2.1.2.1 SynchronizedTimeBaseConsumer
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | explicit SynchronizedTimeBaseConsumer (const ara::core::InstanceSpecifier &specifier) noexcept; | |
| Parameters (in): | specifier | InstanceSpecifier to a PortPrototype typed by a SynchronizedTimeBaseConsumerInterface |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Violations: | PortInterfaceMappingViolation | A PortPrototype that is referenced by a TimeSyncPortPrototypeToTimeBaseMapping needs to be typed by a SynchronizedTimeBaseConsumerInterface. |
| Description: | SynchronizedTimeBaseConsumer constructor. | |
3.2.1.3 Member Functions
3.2.1.3.1 GetRateDeviation
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | double GetRateDeviation () const noexcept; | |
| Return value: | double | The current rate deviation. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method to obtain the current rate deviation of the clock. | |
3.2.1.3.2 GetTimeWithStatus
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | ara::tsync::SynchronizedTimeBaseStatus GetTimeWithStatus () const noexcept; | |
| Return value: | SynchronizedTimeBaseStatus | A clock specific TimeBaseStatus that contains all the relevant clock information. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method to obtain a snapshot of the current state of the clock. This includes status flags, clock configuration and the actual time value (local and synchronized) of the created status object. | |
3.2.1.3.3 RegisterStatusChangeNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void RegisterStatusChangeNotifier (ara::tsync::SynchronizedTimeBaseNotifier notifier) noexcept; | |
| Parameters (in): | notifier | The notifier function to be registered. |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Register a notifier function which is called if a StatusFlag is changed (i.e. synchronization state, time leap or userdata). A maximum of one notifier can be registered. Every further registration overwrites the current registration. | |
3.2.1.3.4 RegisterSynchronizationStateChangeNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void RegisterSynchronizationStateChangeNotifier (ara::tsync::SynchronizationNotifier notifier) noexcept; | |
| Parameters (in): | notifier | The function to unregister. |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Register a notifier function which is called if a synchronization state is changed. A maximum of one notifier can be registered. Every further registration overwrites the current registration. | |
3.2.1.3.5 RegisterTimeLeapNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void RegisterTimeLeapNotifier (ara::tsync::SynchronizedTimeBaseNotifier notifier) noexcept; | |
| Parameters (in): | notifier | The function to be called if the TimeBaseStatus has changed. |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Register a notifier function which is called if a time leap happened. A maximum of one notifier can be registered. Every further registration overwrites the current registration. | |
3.2.1.3.6 RegisterTimePrecisionMeasurementNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void RegisterTimePrecisionMeasurementNotifier (ara::tsync::TimePrecisionNotifier notifier) noexcept; | |
| Parameters (in): | notifier | The function to be called. |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Register a notifier function which is called if a new time precision snapshot is available. A maximum of one notifier can be registered. Every further registration overwrites the current registration. The Tsync will not do any queuing. If needed it has to be done within the notifier. | |
3.2.1.3.7 RegisterTimeValidationNotification
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void RegisterTimeValidationNotification (ara::tsync::ConsumerTimeBaseValidationNotification &timeBaseValidationNotification) noexcept; | |
| Parameters (in): | timeBaseValidationNotification | time consumer application notification object that will be notified about the availability of a new data block recorded for the Time Base |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Method that can be used by time consumer applications to receive time sync parameters. A maximum of one notifier can be registered. Every further registration overwrites the current registration. | |
3.2.1.3.8 UnregisterStatusChangeNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void UnregisterStatusChangeNotifier () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Unregister a notifier function which is called if a StatusFlag is changed (i.e. synchronization state, time leap or userdata). . | |
3.2.1.3.9 UnregisterSynchronizationStateChangeNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void UnregisterSynchronizationStateChangeNotifier () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Unregister a notifier function which is called if a synchronization state is changed. . | |
3.2.1.3.10 UnregisterTimeLeapNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void UnregisterTimeLeapNotifier () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Unregister a notifier function which is called if a time leap happened. . | |
3.2.1.3.11 UnregisterTimePrecisionMeasurementNotifier
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void UnregisterTimePrecisionMeasurementNotifier () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Unregister a notifier function which is called if a new time precision snapshot is available. . | |
3.2.1.3.12 UnregisterTimeValidationNotification
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_consumer.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseConsumer | |
| Syntax: | void UnregisterTimeValidationNotification () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Method that can be used by time consumer applications to receive time sync parameters. . | |
4 Header: ara/tsync/synchronized_time_base_provider.h
4.1 Class: SynchronizedTimeBaseProvider
| Kind: | class | |
| Port Interfaces: | SynchronizedTimeBaseProviderInterface | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizedTimeBaseProvider | |
| Syntax: | class SynchronizedTimeBaseProvider final {...}; | |
| Description: | Class SynchronizedTimeBaseProvider is the access to the synchronized timebase referenced by the IntstanceSpecifier. It allows to get the current time_point, the rate deviation, the current status and the received user data | |
4.1.1 Public Member Functions
4.1.1.1 Special Member Functions
4.1.1.1.1 Move Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | SynchronizedTimeBaseProvider (SynchronizedTimeBaseProvider &&stbc) noexcept; | |
| Parameters (in): | stbc | The SynchronizedTimeBaseProvider object to be moved. |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move constructor for SynchronizedTimeBaseProvider. | |
4.1.1.1.2 Copy Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | SynchronizedTimeBaseProvider (const SynchronizedTimeBaseProvider &)=delete; | |
| Description: | The copy constructor for SynchronizedTimeBaseProvider shall not be used. | |
4.1.1.1.3 Copy Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::tsync::SynchronizedTimeBaseProvider & operator= (const ara::tsync::SynchronizedTimeBaseProvider &)=delete; | |
| Description: | The copy assignment operator for SynchronizedTimeBaseProvider shall not be used. | |
4.1.1.1.4 Move Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::tsync::SynchronizedTimeBaseProvider & operator= (ara::tsync::SynchronizedTimeBaseProvider &&stbc) & noexcept; | |
| Parameters (in): | stbc | The SynchronizedTimeBaseProvider object to be moved. |
| Return value: | SynchronizedTimeBaseProvider & | The moved SynchronizedTimeBaseProvider object. |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move assignment operator for SynchronizedTimeBaseProvider. | |
4.1.1.1.5 Destructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ~SynchronizedTimeBaseProvider () noexcept; | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Destructor for SynchronizedTimeBaseProvider. | |
4.1.1.2 Constructors
4.1.1.2.1 SynchronizedTimeBaseProvider
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | explicit SynchronizedTimeBaseProvider (const ara::core::InstanceSpecifier &specifier) noexcept; | |
| Parameters (in): | specifier | InstanceSpecifier to an PortPrototype of a PortPrototype typed by a SynchronizedTimeBaseProviderInterface |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Violations: | PortInterfaceMappingViolation | A PortPrototype that is referenced by a TimeSyncPortPrototypeToTimeBaseMapping needs to be typed by a SynchronizedTimeBaseProviderInterface. |
| Description: | SynchronizedTimeBaseProvider constructor. | |
4.1.1.3 Member Functions
4.1.1.3.1 GetCurrentTime
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::tsync::Timestamp GetCurrentTime () const noexcept; | |
| Return value: | ara::tsync::Timestamp | The current time as clock specific time point. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method to obtain the current time (regardless of the current sync status). | |
4.1.1.3.2 GetRateDeviation
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | double GetRateDeviation () const noexcept; | |
| Return value: | double | The current rate deviation. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method to obtain the current rate deviation of the clock. | |
4.1.1.3.3 GetUserData
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::tsync::UserData GetUserData () const noexcept; | |
| Return value: | UserData | The current user data of the Time Base. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | A method to return the user defined data of the time base. | |
4.1.1.3.4 RegisterTimeValidationNotification
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | void RegisterTimeValidationNotification (ara::tsync::ProviderTimeBaseValidationNotification &timeBaseValidationNotification) noexcept; | |
| Parameters (in): | timeBaseValidationNotification | time provider application notification object that will be notified about the availability of a new data block recorded for the Time Base |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Method that can be used by time provider applications to receive time sync parameters. A maximum of one notifier can be registered. Every further registration overwrites the current registration. | |
4.1.1.3.5 SetRateCorrection
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::core::Result< void > SetRateCorrection (double rateCorrection) noexcept; | |
| Parameters (in): | rateCorrection | Rate correction factor applied to the local clock value. A factor smaller than 1.0 slows down the local clock by that factor, a value greater than 1.0 speeds up the clock. |
| Return value: | ara::core::Result< void > | - |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Errors: | TsyncErrc::kLimitsExceeded | no_rollback_semantics |
| The value exceeds valid value range | ||
| TsyncErrc::kFunctionNotSupported | no_rollback_semantics | |
| The requested function is not supported | ||
| Description: | This method can be used to set the rate correction that will be applied to time values. | |
4.1.1.3.6 SetTime
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::core::Result< void > SetTime (ara::tsync::Timestamp timePoint, const ara::tsync::UserData &userData) noexcept; | |
| Parameters (in): | timePoint | The time information to be set. |
| userData | The user data to be set. | |
| Return value: | ara::core::Result< void > | - |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Errors: | TsyncErrc::kInvalidUserDataSize | no_rollback_semantics |
| The length of the user data exceeded the maximum allowed size, defined by UserData::kMaxUserDataSize (currently 3 bytes). | ||
| TsyncErrc::kDaemonConnectionLost | no_rollback_semantics | |
| The action cannot be executed, because the connection to time sync daemon is currently lost. | ||
| Description: | A method that can be used to set a new time value for the clock. Setting a new time also triggers transmission on the bus. | |
4.1.1.3.7 SetUserData
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::core::Result< void > SetUserData (const ara::tsync::UserData &userData) noexcept; | |
| Parameters (in): | userData | The user data to be set. |
| Return value: | ara::core::Result< void > | - |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Errors: | TsyncErrc::kInvalidUserDataSize | no_rollback_semantics |
| The length of the user data exceeded the maximum allowed size, defined by UserData::kMaxUserDataSize (currently 3 bytes). | ||
| Description: | Method that can be used to set user data. | |
4.1.1.3.8 UnregisterTimeValidationNotification
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | void UnregisterTimeValidationNotification () noexcept; | |
| Return value: | None | |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Method that can be used by time provider applications to receive time sync parameters. | |
4.1.1.3.9 UpdateTime
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_provider.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseProvider | |
| Syntax: | ara::core::Result< void > UpdateTime (ara::tsync::Timestamp timePoint, const ara::tsync::UserData &userData) noexcept; | |
| Template param: | Duration | The duration type of the time point passed as parameter. |
| Parameters (in): | timePoint | The time information to be set. |
| userData | The user data to be set. | |
| Return value: | ara::core::Result< void > | - |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Errors: | TsyncErrc::kInvalidUserDataSize | no_rollback_semantics |
| The length of the user data exceeded the maximum allowed size, defined by UserData::kMaxUserDataSize (currently 3 bytes). | ||
| Description: | A method that can be used to set a new time value for the clock. The clock value is only updated locally, transmission on the bus will happen in the next cycle. | |
5 Header: ara/tsync/synchronized_time_base_status.h
5.1 Non-Member Types
5.1.1 Enumeration: LeapJump
| Kind: | enumeration | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | LeapJump | |
| Underlying type: | std::uint32_t | |
| Syntax: | enum class LeapJump : std::uint32_t {...}; | |
| Values: | kTimeLeapNone | = 0 |
| No adjustment back or greater than a certain threshold has been made. | ||
| kTimeLeapFuture | = 1 | |
| An adjustment greater than a certain threshold has been made. | ||
| kTimeLeapPast | = 2 | |
| An adjustment back in time greater than a certain threshold has been made. | ||
| Description: | Enumeration that is used to express the leap jump of a time base. . | |
5.1.2 Enumeration: SynchronizationStatus
| Kind: | enumeration | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizationStatus | |
| Underlying type: | std::uint32_t | |
| Syntax: | enum class SynchronizationStatus : std::uint32_t {...}; | |
| Values: | kNotSynchronizedUntilStartup | = 0 |
| The TB is not synchronized until startup (inital state) | ||
| kTimeOut | = 0x1 | |
| The TB was not synchronized within a certain time frame. | ||
| kSynchronized | = 0x2 | |
| The TB is in sync with the time master. | ||
| kSynchToGateway | = 0x3 | |
| The TB is in sync with the gateway. | ||
| Description: | Enumeration that is used to express the communication state of a time base. . | |
5.2 Class: SynchronizedTimeBaseStatus
| Kind: | class | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | SynchronizedTimeBaseStatus | |
| Syntax: | class SynchronizedTimeBaseStatus final {...}; | |
| Description: | This class represents a snapshot of a time point including his states. . | |
5.2.1 Public Member Functions
5.2.1.1 Special Member Functions
5.2.1.1.1 Copy Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | SynchronizedTimeBaseStatus (const SynchronizedTimeBaseStatus &) noexcept; | |
| DIRECTION NOT DEFINED: | const SynchronizedTimeBaseStatus & | -- |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Copy constructor of SynchronizedTimeBaseStatus (needed for return by value) | |
5.2.1.1.2 Default Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | SynchronizedTimeBaseStatus ()=delete; | |
| Description: | Constructor of SynchronizedTimeBaseStatus cannot be used. | |
5.2.1.1.3 Move Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | SynchronizedTimeBaseStatus (SynchronizedTimeBaseStatus &&) noexcept; | |
| DIRECTION NOT DEFINED: | SynchronizedTimeBaseStatus && | -- |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move constructor of SynchronizedTimeBaseStatus. | |
5.2.1.1.4 Move Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::SynchronizedTimeBaseStatus & operator= (ara::tsync::SynchronizedTimeBaseStatus &&) & noexcept; | |
| DIRECTION NOT DEFINED: | SynchronizedTimeBaseStatus && | -- |
| Return value: | SynchronizedTimeBaseStatus & | moved object |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Move assignment operator of SynchronizedTimeBaseStatus. | |
5.2.1.1.5 Copy Assignment Operator
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::SynchronizedTimeBaseStatus & operator= (const ara::tsync::SynchronizedTimeBaseStatus &) noexcept; | |
| DIRECTION NOT DEFINED: | const SynchronizedTimeBaseStatus & | -- |
| Return value: | SynchronizedTimeBaseStatus & | copied object |
| Exception Safety: | exception safe | |
| Thread Safety: | non_threadsafe | |
| Description: | Copy assignment operator of SynchronizedTimeBaseStatus. | |
5.2.1.1.6 Destructor
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ~SynchronizedTimeBaseStatus () noexcept=default; | |
| Exception Safety: | exception safe | |
| Description: | Destructor of SynchronizedTimeBaseStatus. | |
5.2.1.2 Member Functions
5.2.1.2.1 GetCreationLocalTime
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::Timestamp GetCreationLocalTime () const noexcept; | |
| Return value: | ara::tsync::Timestamp | The point in time at which this object was created. Time point is expressed in local clock (ara::core::SteadyClock) |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | A method to obtain the local time when this object was created. | |
5.2.1.2.2 GetCreationTime
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::core::Optional< ara::tsync::Timestamp > GetCreationTime () const noexcept; | |
| Return value: | ara::core::Optional< ara::tsync::Timestamp > | The point in time at which this object was created. Time point is expressed in synchronized time. If time was never synchronized (SynchronizationStatus = kNotSynchronizedUntilStartup), the returned optional is empty (i.e., no valid value). |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | A method to obtain the creation time of this object. | |
5.2.1.2.3 GetLeapJump
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::LeapJump GetLeapJump () const noexcept; | |
| Return value: | LeapJump | LeapJump |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method that can be used to determin the direction of a leap jump. Only the jump until the previous object creation is included. | |
5.2.1.2.4 GetRateCorrected
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::core::Result< bool > GetRateCorrected () const noexcept; | |
| Return value: | ara::core::Result< bool > | Whether the rate correction is calculated or not calculated for the synchronized time base. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Errors: | This function does not specify any standardized errors. | |
| Description: | A method to get the value of the rate corrected flag of the time base. | |
5.2.1.2.5 GetRateExceeded
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::core::Result< bool > GetRateExceeded () const noexcept; | |
| Return value: | ara::core::Result< bool > | Whether the calculated rate deviation exceeds the configured value of rateCorrectionThreshold for the synchronized time base. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Errors: | This function does not specify any standardized errors. | |
| Description: | A method to get the value of the rate exceeded flag of the time base. | |
5.2.1.2.6 GetSynchronizationStatus
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::SynchronizationStatus GetSynchronizationStatus () const noexcept; | |
| Return value: | SynchronizationStatus | SynchronizationStatus |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Method that return the synchronization state the object was created. | |
5.2.1.2.7 GetUserData
| Kind: | function | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::SynchronizedTimeBaseStatus | |
| Syntax: | ara::tsync::UserData GetUserData () const noexcept; | |
| Return value: | UserData | The current user data received from Time Master of the Time Base. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | A method to return the user defined data of the time base. | |
5.3 Struct: UserData
| Kind: | struct | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | UserData | |
| Syntax: | struct UserData {...}; | |
| Description: | Structure to define user data. . | |
5.3.1 Public Member Variables
5.3.1.1 data
| Kind: | variable | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::UserData | |
| Symbol: | data | |
| Type: | ara::core::Array< ara::core::Byte, kMaxUserDataSize > | |
| Syntax: | ara::core::Array<ara::core::Byte, kMaxUserDataSize> data; | |
| Description: | User data buffer (maximum size: kMaxUserDataSize). . | |
5.3.1.2 kMaxUserDataSize
| Kind: | variable | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::UserData | |
| Symbol: | kMaxUserDataSize | |
| Type: | std::size_t | |
| Syntax: | static constexpr std::size_t kMaxUserDataSize = 3u; | |
| Description: | Maximum number of user data bytes. . | |
5.3.1.3 size
| Kind: | variable | |
| Header file: | #include "ara/tsync/synchronized_time_base_status.h" | |
| Scope: | ara::tsync::UserData | |
| Symbol: | size | |
| Type: | std::size_t | |
| Syntax: | std::size_t size; | |
| Description: | Number of valid user data bytes in data. . | |
6 Header: ara/tsync/time_precision_measurement_type.h
6.1 Struct: TimePrecisionMeasurement
| Kind: | struct | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TimePrecisionMeasurement | |
| Syntax: | struct TimePrecisionMeasurement final {...}; | |
| Description: | Structure with detailed data for precision measurement of the Time Slave . | |
6.1.1 Public Member Variables
6.1.1.1 glbNanoSeconds
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | glbNanoSeconds | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t glbNanoSeconds; | |
| Description: | Nanoseconds of the Local Time Base directly after synchronization with the Global Time Base. Range: 0..999999999 (4 Byte) | |
6.1.1.2 glbSeconds
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | glbSeconds | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t glbSeconds; | |
| Description: | Seconds of the Local Time Base directly after synchronization with the Global Time Base. Range: 0..4294967295 (4 Byte) | |
6.1.1.3 locNanoSeconds
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | locNanoSeconds | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t locNanoSeconds; | |
| Description: | Nanoseconds of the Local Time Base directly before synchronization with the Global Time Base. Range: 0..999999999 (4 Byte) | |
6.1.1.4 locSeconds
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | locSeconds | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t locSeconds; | |
| Description: | Seconds of the Local Time Base directly before synchronization with the Global Time Base. Range: 0..4294967295 (4 Byte) | |
6.1.1.5 pathDelay
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | pathDelay | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t pathDelay; | |
| Description: | Current propagation delay in nanoseconds. Range: 0..4294967295 (4 Byte) | |
6.1.1.6 rateDeviation
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | rateDeviation | |
| Type: | std::int16_t | |
| Syntax: | std::int16_t rateDeviation; | |
| Description: | Calculated Rate Deviation directly after rate deviation measurement. Range: 0..+-32000 (2 Byte) | |
6.1.1.7 timeBaseStatus
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | timeBaseStatus | |
| Type: | std::uint8_t | |
| Syntax: | std::uint8_t timeBaseStatus; | |
| Description: | TimeBaseStatus. Time Base Status of the Local Time Base directly after synchronization with the Global Time Base TIMEOUT 0x01 Bit 0 (LSB): 0x00: — No Timeout on receiving Synchronisation Messages 0x01: Timeout on receiving Synchronisation Messages SYNC_TO_GATEWAY 0x04 Bit 2 0x00: — Local Time Base is synchronous to Global Time Master 0x04: Local Time Base updates are based on a Time Gateway below the Global Time Master GLOBAL_TIME_BASE 0x08 Bit 3 0x00: — Local Time Base is based on Local Time Base reference clock only (never synchronized with Global Time Base) 0x08: Local Time Base was at least synchronized with Global Time Base one time TIMELEAP_FUTURE 0x10 Bit 4 0x00: — No leap into the future within the received time for Time Base, 0x10: Leap into the future within the received time for Time Base exceeds a configured threshold TIMELEAP_PAST 0x20 Bit 5 0x00: — No leap into the past within the received time for Time Base 0x20: Leap into the past within the received time for Time Base exceeds a configured threshold. Bit 6 RATE_CORRECTED 0x00: — Valid rate correction not calculated for the Synchronized Time Base, 0x40: Valid rate correction calculated for the Synchronized Time Base. Bit 7 RATE_EXCEEDED 0x00: — Calculated rate for Time Base does not exceed limits, 0x80: Calculated rate for Time Base exceeds limits. Description Bit 1 is always 0 (reserved for future usage) Variables of this type are used to express if and how a Local Time Base is synchronized to the Global Time Master. The type is a bitfield of individual status bits, although not every combination is possible, i.e. any of the bits TIMEOUT, TIMELEAP_FUTURE, TIMELEAP_PAST and SYNC_TO_GATEWAY can only be set if the GLOBAL_TIME_BASE bit is set. | |
6.1.1.8 virtualLocalTimeLow
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_precision_measurement_type.h" | |
| Scope: | ara::tsync::TimePrecisionMeasurement | |
| Symbol: | virtualLocalTimeLow | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t virtualLocalTimeLow; | |
| Description: | Least significant 32 bit of the Virtual Local Time directly after synchronization with the Global Time Base. Range: 0..4294967295 (4 Byte) | |
7 Header: ara/tsync/time_validation_measurement_types.h
7.1 Struct: PdelayInitiatorMeasurementType
| Kind: | struct | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | PdelayInitiatorMeasurementType | |
| Syntax: | struct PdelayInitiatorMeasurementType final {...}; | |
| Description: | Structure with detailed timing data for the pDelay Initiator . | |
7.1.1 Public Member Variables
7.1.1.1 pDelay
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | pDelay | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t pDelay; | |
| Description: | currently valid pDelay value | |
7.1.1.2 referenceGlobalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | referenceGlobalTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp referenceGlobalTimestamp; | |
| Description: | value of the local instance of the Global Time of the reference Global Time Tuple | |
7.1.1.3 referenceLocalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | referenceLocalTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t referenceLocalTimestamp; | |
| Description: | value of the Virtual Local Time of the reference Global Time Tuple | |
7.1.1.4 requestOriginTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | requestOriginTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t requestOriginTimestamp; | |
| Description: | egress timestamp of Pdelay_Req in Virtual Local Time | |
7.1.1.5 requestReceiptTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | requestReceiptTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp requestReceiptTimestamp; | |
| Description: | ingress timestamp of Pdelay_Req in Global Time taken from the received Pdelay_Resp | |
7.1.1.6 responseOriginTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | responseOriginTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp responseOriginTimestamp; | |
| Description: | egress timestamp of Pdelay_Resp in Global Time taken from the received Pdelay_Resp_Follow_Up | |
7.1.1.7 responseReceiptTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | responseReceiptTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t responseReceiptTimestamp; | |
| Description: | ingress timestamp of Pdelay_Resp in Virtual Local Time | |
7.1.1.8 sequenceId
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayInitiatorMeasurementType | |
| Symbol: | sequenceId | |
| Type: | std::uint16_t | |
| Syntax: | std::uint16_t sequenceId; | |
| Description: | sequence Id of sent Pdelay_Req frame | |
7.2 Struct: PdelayResponderMeasurementType
| Kind: | struct | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | PdelayResponderMeasurementType | |
| Syntax: | struct PdelayResponderMeasurementType final {...}; | |
| Description: | Structure with detailed timing data for the pDelay Responder . | |
7.2.1 Public Member Variables
7.2.1.1 referenceGlobalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayResponderMeasurementType | |
| Symbol: | referenceGlobalTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp referenceGlobalTimestamp; | |
| Description: | value of the local instance of the Global Time of the reference Global Time Tuple used to convert requestReceiptTimestamp and responseOriginTimestamp into Global Time | |
7.2.1.2 referenceLocalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayResponderMeasurementType | |
| Symbol: | referenceLocalTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t referenceLocalTimestamp; | |
| Description: | value of the Virtual Local Time of the reference Global Time Tuple used to convert requestReceiptTimestamp and responseOriginTimestamp into Global Time | |
7.2.1.3 requestReceiptTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayResponderMeasurementType | |
| Symbol: | requestReceiptTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t requestReceiptTimestamp; | |
| Description: | ingress timestamp of Pdelay_Req converted to Virtual Local Time | |
7.2.1.4 responseOriginTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayResponderMeasurementType | |
| Symbol: | responseOriginTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t responseOriginTimestamp; | |
| Description: | egress timestamp of Pdelay_Resp converted to Virtual Local Time | |
7.2.1.5 sequenceId
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::PdelayResponderMeasurementType | |
| Symbol: | sequenceId | |
| Type: | std::uint16_t | |
| Syntax: | std::uint16_t sequenceId; | |
| Description: | sequence Id of received Pdelay_Req frame | |
7.3 Struct: TimeMasterMeasurementType
| Kind: | struct | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TimeMasterMeasurementType | |
| Syntax: | struct TimeMasterMeasurementType final {...}; | |
| Description: | Structure with detailed data for validation of the Time Master . | |
7.3.1 Public Member Variables
7.3.1.1 preciseOriginTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeMasterMeasurementType | |
| Symbol: | preciseOriginTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp preciseOriginTimestamp; | |
| Description: | egress timestamp of Sync frame in Global Time | |
7.3.1.2 sequenceId
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeMasterMeasurementType | |
| Symbol: | sequenceId | |
| Type: | std::uint16_t | |
| Syntax: | std::uint16_t sequenceId; | |
| Description: | sequence Id of sent Ethernet frame | |
7.3.1.3 syncEgressTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeMasterMeasurementType | |
| Symbol: | syncEgressTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t syncEgressTimestamp; | |
| Description: | egress timestamp of Sync frame | |
7.4 Struct: TimeSlaveMeasurementType
| Kind: | struct | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TimeSlaveMeasurementType | |
| Syntax: | struct TimeSlaveMeasurementType final {...}; | |
| Description: | Structure with detailed data for validation of the Time Slave . | |
7.4.1 Public Member Variables
7.4.1.1 correctionField
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | correctionField | |
| Type: | std::int64_t | |
| Syntax: | std::int64_t correctionField; | |
| Description: | correctionField taken from the received Follow_Up frame | |
7.4.1.2 pDelay
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | pDelay | |
| Type: | std::uint32_t | |
| Syntax: | std::uint32_t pDelay; | |
| Description: | currently valid pDelay value | |
7.4.1.3 preciseOriginTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | preciseOriginTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp preciseOriginTimestamp; | |
| Description: | preciseOriginTimestamp taken from the received Follow_Up frame | |
7.4.1.4 referenceGlobalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | referenceGlobalTimestamp | |
| Type: | ara::tsync::Timestamp | |
| Syntax: | ara::tsync::Timestamp referenceGlobalTimestamp; | |
| Description: | SyncLocal Time Tuple (Global Time part) . | |
7.4.1.5 referenceLocalTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | referenceLocalTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t referenceLocalTimestamp; | |
| Description: | SyncLocal Time Tuple (Virtual Local Time part) . | |
7.4.1.6 sequenceId
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | sequenceId | |
| Type: | std::uint16_t | |
| Syntax: | std::uint16_t sequenceId; | |
| Description: | sequence Id of received Sync frame | |
7.4.1.7 syncIngressTimestamp
| Kind: | variable | |
| Header file: | #include "ara/tsync/time_validation_measurement_types.h" | |
| Scope: | ara::tsync::TimeSlaveMeasurementType | |
| Symbol: | syncIngressTimestamp | |
| Type: | std::uint64_t | |
| Syntax: | std::uint64_t syncIngressTimestamp; | |
| Description: | ingress timestamp of Sync frame converted to Virtual Local Time | |
8 Header: ara/tsync/timestamp.h
8.1 Non-Member Types
8.1.1 Type Alias: Timestamp
| Kind: | type alias | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | Timestamp | |
| Syntax: | using Timestamp = std::chrono::time_point<TimeBase, std::chrono::nanoseconds>; | |
| Description: | Standard timestamp type as alias of a generic time_point . | |
8.2 Struct: TimeBase
| Kind: | struct | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TimeBase | |
| Syntax: | struct TimeBase {...}; | |
| Description: | The class TimeBase is a pseudo-clock. The class TimeBase is a pseudo-clock that is used as the first template argument to std::chrono::time_point to indicate that the time point represents local time with respect of a not-yet-specified timeBaseResource. | |
8.2.1 Public Member Types
8.2.1.1 Type Alias: duration
| Kind: | type alias | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | ara::tsync::TimeBase | |
| Symbol: | duration | |
| Syntax: | using duration = std::chrono::duration<rep, period>; | |
| Description: | required type declaration to fulfill the C++ Clock requirements used to measure the time since epoch | |
8.2.1.2 Type Alias: period
| Kind: | type alias | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | ara::tsync::TimeBase | |
| Symbol: | period | |
| Syntax: | using period = std::nano; | |
| Description: | required type declaration to fulfill the C++ Clock requirements representing the tick period of the duration | |
8.2.1.3 Type Alias: rep
| Kind: | type alias | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | ara::tsync::TimeBase | |
| Symbol: | rep | |
| Syntax: | using rep = std::int64_t; | |
| Description: | required type declaration to fulfill the C++ Clock requirements representing the number of ticks | |
8.2.1.4 Type Alias: time_point
| Kind: | type alias | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | ara::tsync::TimeBase | |
| Symbol: | time_point | |
| Syntax: | using time_point = std::chrono::time_point<TimeBase>; | |
| Description: | represents a point in time | |
8.2.2 Public Member Variables
8.2.2.1 is_steady
| Kind: | variable | |
| Header file: | #include "ara/tsync/timestamp.h" | |
| Scope: | ara::tsync::TimeBase | |
| Symbol: | is_steady | |
| Type: | bool | |
| Syntax: | static constexpr bool is_steady = false; | |
| Description: | required constant to fulfill the C++ Clock requirements as steady clock | |
9 Header: ara/tsync/tsync_error_domain.h
9.1 Non-Member Types
9.1.1 Enumeration: TsyncErrc
| Kind: | enumeration | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TsyncErrc | |
| Underlying type: | ara::core::ErrorDomain::CodeType | |
| Syntax: | enum class TsyncErrc : ara::core::ErrorDomain::CodeType {...}; | |
| Values: | kDaemonConnectionLost | = 1 |
| The action cannot be executed, because the connection to time sync daemon is currently lost. | ||
| kLimitsExceeded | = 2 | |
| The value exceeds valid value range | ||
| kFunctionNotSupported | = 3 | |
| The requested function is not supported | ||
| kInvalidUserDataSize | = 4 | |
| The length of the user data exceeded the maximum allowed size, defined by UserData::kMaxUserDataSize (currently 3 bytes). | ||
| Description: | Defines an enumeration class for the Time Synchronization error codes. | |
9.2 Non-Member Functions
9.2.1 Other
9.2.1.1 GetTsyncErrorDomain
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | namespace ara::tsync | |
| Syntax: | const ara::core::ErrorDomain & GetTsyncErrorDomain () noexcept; | |
| Return value: | const ara::core::ErrorDomain & | Return a reference to the global TsyncErrorDomain object. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Returns a reference to the global TsyncErrorDomain object. | |
9.2.1.2 MakeErrorCode
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | namespace ara::tsync | |
| Syntax: | ara::core::ErrorCode MakeErrorCode (ara::tsync::TsyncErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept; | |
| Parameters (in): | code | Error code number. |
| data | Vendor defined data associated with the error. | |
| Return value: | ara::core::ErrorCode | An ErrorCode object. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Creates an instance of ErrorCode. | |
9.3 Class: TsyncErrorDomain
| Kind: | class | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TsyncErrorDomain | |
| Base class: | ara::core::ErrorDomain | |
| Syntax: | class TsyncErrorDomain final : public ara::core::ErrorDomain {...}; | |
| Description: | Defines a class representing the Time Synchronization error domain. | |
9.3.1 Public Member Types
9.3.1.1 Type Alias: Errc
| Kind: | type alias | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Symbol: | Errc | |
| Syntax: | using Errc = TsyncErrc; | |
| Description: | Alias for the error code value enumeration | |
9.3.1.2 Type Alias: Exception
| Kind: | type alias | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Symbol: | Exception | |
| Syntax: | using Exception = TsyncException; | |
| Description: | Alias for the exception base class | |
9.3.2 Public Member Functions
9.3.2.1 Special Member Functions
9.3.2.1.1 Default Constructor
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Syntax: | TsyncErrorDomain () noexcept; | |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Constructs a new TsyncErrorDomain object. | |
9.3.2.2 Member Functions
9.3.2.2.1 Message
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Syntax: | const char * Message (CodeType errorCode) const noexcept override; | |
| Parameters (in): | errorCode | The error code number. |
| Return value: | const char * | The message associated with the error code. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Returns the message associated with errorCode. | |
9.3.2.2.2 Name
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Syntax: | const char * Name () const noexcept override; | |
| Return value: | const char * | As per ara::tsync::TsyncErrorDomain in SWS_CORE_90023 |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Returns a string constant associated with TsyncErrorDomain. | |
9.3.2.2.3 ThrowAsException
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncErrorDomain | |
| Syntax: | void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) override; | |
| Parameters (in): | errorCode | The error to throw. |
| Return value: | None | |
| Exception Safety: | not exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Creates a new instance of TsyncException from errorCode and throws it as a C++ exception. As per SWS_CORE_10304 this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain. | |
9.4 Class: TsyncException
| Kind: | class | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Forwarding header file: | #include "ara/tsync/tsync_fwd.h" | |
| Scope: | namespace ara::tsync | |
| Symbol: | TsyncException | |
| Base class: | ara::core::Exception | |
| Syntax: | class TsyncException : public ara::core::Exception {...}; | |
| Description: | Defines a class for exceptions to be thrown by the Time Synchronization. | |
9.4.1 Public Member Functions
9.4.1.1 Constructors
9.4.1.1.1 TsyncException
| Kind: | function | |
| Header file: | #include "ara/tsync/tsync_error_domain.h" | |
| Scope: | ara::tsync::TsyncException | |
| Syntax: | explicit TsyncException (ara::core::ErrorCode errorCode) noexcept; | |
| Parameters (in): | errorCode | The error code. |
| Exception Safety: | exception safe | |
| Thread Safety: | thread-safe | |
| Description: | Constructs a new TsyncException object containing an error code. | |
See also
- Time synchronization in the runtime model: PARA Overview
- Time base configuration: SynchronizedTimeBaseConsumerInterface, SynchronizedTimeBaseProviderInterface