mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 08:53:33 +08:00
Driver documentation update
This commit is contained in:
@@ -23,23 +23,34 @@ public:
|
||||
|
||||
/**
|
||||
* Monototic system clock.
|
||||
* This shall never jump during UTC timestamp adjustments; the base time is irrelevant.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
virtual MonotonicTime getMonotonic() const = 0;
|
||||
|
||||
/**
|
||||
* UTC clock.
|
||||
* This can jump when the UTC timestamp is being adjusted.
|
||||
* Return 0 if the UTC time is not available yet (e.g. the device just started up with no battery clock).
|
||||
* On POSIX systems use gettimeofday().
|
||||
* 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().
|
||||
*/
|
||||
virtual UtcTime getUtc() const = 0;
|
||||
|
||||
/**
|
||||
* Set the UTC system clock.
|
||||
* @param [in] adjustment Amount of time to add to the clock value.
|
||||
* Adjust the network-synchronized clock.
|
||||
* Refer to @ref getUtc() for details.
|
||||
*
|
||||
* For POSIX refer to adjtime(), settimeofday().
|
||||
*
|
||||
* @param [in] adjustment Amount of time to add to the clock value.
|
||||
*/
|
||||
virtual void adjustUtc(UtcDuration adjustment) = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user