Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
uavcan_lpc11c24::SystemClock Class Reference

#include <clock.hpp>

Inheritance diagram for uavcan_lpc11c24::SystemClock:
Inheritance graph
[legend]

Static Public Member Functions

static SystemClockinstance ()
 

Private Member Functions

void adjustUtc (uavcan::UtcDuration adjustment) override
 
uavcan::MonotonicTime getMonotonic () const override
 
uavcan::UtcTime getUtc () const override
 
 SystemClock ()
 
- Private Member Functions inherited from uavcan::Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Static Private Attributes

static SystemClock self
 

Additional Inherited Members

- Public Member Functions inherited from uavcan::ISystemClock
virtual ~ISystemClock ()
 

Detailed Description

Adapter for uavcan::ISystemClock.

Definition at line 48 of file platform_specific_components/lpc11c24/libuavcan/driver/include/uavcan_lpc11c24/clock.hpp.

Constructor & Destructor Documentation

◆ SystemClock()

uavcan_lpc11c24::SystemClock::SystemClock ( )
inlineprivate

Member Function Documentation

◆ adjustUtc()

void uavcan_lpc11c24::SystemClock::adjustUtc ( uavcan::UtcDuration  adjustment)
inlineoverrideprivatevirtual

Adjust the network-synchronized clock. Refer to getUtc() for details.

For POSIX refer to adjtime(), settimeofday().

Parameters
[in]adjustmentAmount of time to add to the clock value.

Implements uavcan::ISystemClock.

Definition at line 56 of file platform_specific_components/lpc11c24/libuavcan/driver/include/uavcan_lpc11c24/clock.hpp.

◆ getMonotonic()

uavcan::MonotonicTime uavcan_lpc11c24::SystemClock::getMonotonic ( ) const
inlineoverrideprivatevirtual

Monototic system clock.

This clock shall never jump or change rate; the base time is irrelevant. This clock is mandatory and must remain functional at all times.

On POSIX systems use clock_gettime() with CLOCK_MONOTONIC.

Implements uavcan::ISystemClock.

Definition at line 54 of file platform_specific_components/lpc11c24/libuavcan/driver/include/uavcan_lpc11c24/clock.hpp.

◆ getUtc()

uavcan::UtcTime uavcan_lpc11c24::SystemClock::getUtc ( ) const
inlineoverrideprivatevirtual

Global network clock. It doesn't have to be UTC, the name is a bit misleading - actual time base doesn't matter.

This clock can be synchronized with other nodes on the bus, hence it can jump and/or change rate occasionally. This clock is optional; if it is not supported, return zero. Also return zero if the UTC time is not available yet (e.g. the device has just started up with no battery clock).

For POSIX refer to clock_gettime(), gettimeofday().

Implements uavcan::ISystemClock.

Definition at line 55 of file platform_specific_components/lpc11c24/libuavcan/driver/include/uavcan_lpc11c24/clock.hpp.

◆ instance()

SystemClock & uavcan_lpc11c24::SystemClock::instance ( )
static

Calls clock::init() as needed.

Definition at line 156 of file clock.cpp.

Member Data Documentation

◆ self

SystemClock uavcan_lpc11c24::SystemClock::self
staticprivate

The documentation for this class was generated from the following files:


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:05