Function etsi_its_cpm_ts_msgs::access::setReferenceTime

Function Documentation

inline void etsi_its_cpm_ts_msgs::access::setReferenceTime(CollectivePerceptionMessage &cpm, const uint64_t unix_nanosecs, const uint16_t n_leap_seconds = etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.rbegin()->second)

Sets the reference time in a CPM.

This function sets the reference time in a CPM object. The reference time is represented by a Unix timestamp in nanoseconds including the number of leap seconds. The reference time is stored in the payload management container of the CPM.

Parameters:
  • cpm – The CPM object to set the reference time in.

  • unix_nanosecs – The Unix timestamp in nanoseconds representing the reference time.

  • n_leap_seconds – The number of leap seconds to be considered. Defaults to the todays number of leap seconds since 2004.