8 #include <uavcan/driver/system_clock.hpp> 33 void setUtc(uavcan::UtcTime time);
46 void adjustUtc(uavcan::UtcDuration adjustment);
63 , rate_error_corner_freq(0.01F)
64 , max_rate_correction_ppm(300.0F)
65 , lock_thres_rate_ppm(2.0F)
66 , lock_thres_offset(uavcan::UtcDuration::fromMSec(4))
67 , min_jump(uavcan::UtcDuration::fromMSec(10))
103 class SystemClock :
public uavcan::ISystemClock, uavcan::Noncopyable
float getUtcRateCorrectionPPM()
Clock rate error.
virtual void adjustUtc(uavcan::UtcDuration adjustment)
uavcan::UtcDuration lock_thres_offset
uavcan::uint32_t getUtcJumpCount()
Number of non-gradual adjustments performed so far.
uavcan::UtcDuration min_jump
Min error to jump rather than change rate.
float rate_i
PPM per one PPM error for second.
virtual uavcan::MonotonicTime getMonotonic() const
void adjustUtc(uavcan::UtcDuration adjustment)
Performs UTC phase and frequency adjustment.
Adapter for uavcan::ISystemClock.
float rate_error_corner_freq
UtcSyncParams getUtcSyncParams()
UTC sync params get/set.
uavcan::UtcTime getUtc()
Returns UTC time if it has been set, otherwise returns zero time.
float max_rate_correction_ppm
void init()
Starts the clock.
bool isUtcLocked()
Whether UTC is synchronized and locked.
virtual uavcan::UtcTime getUtc() const
uavcan::MonotonicTime getMonotonic()
Returns current monotonic time since the moment when clock::init() was called.
float offset_p
PPM per one usec error.
void setUtcSyncParams(const UtcSyncParams ¶ms)
float lock_thres_rate_ppm
UTC clock synchronization parameters.
void setUtc(uavcan::UtcTime time)
Sets the driver's notion of the system UTC.