etsi_its_messages 1.0.0
Loading...
Searching...
No Matches
denm_access.h File Reference

Main DENM access implementation header. More...

#include <cstring>
#include <iostream>
#include <map>
#include <GeographicLib/UTMUPS.hpp>
#include <etsi_its_msgs_utils/impl/denm/denm_getters.h>
#include <etsi_its_msgs_utils/impl/denm/denm_setters.h>
#include <etsi_its_msgs_utils/impl/denm/denm_utils.h>

Go to the source code of this file.

Functions

template<typename T1 , typename T2 >
void etsi_its_denm_msgs::access::throwIfOutOfRange (const T1 &val, const T2 &min, const T2 &max, const std::string val_desc)
 
uint16_t etsi_its_denm_msgs::access::etsi_its_msgs::getLeapSecondInsertionsSince2004 (const uint64_t unix_seconds)
 Get the leap second insertions since 2004 for given unix seconds.
 
uint64_t etsi_its_denm_msgs::access::getUnixNanosecondsFromReferenceTime (const TimestampIts &reference_time)
 Get the Unix-Nanoseconds from a given ReferenceTime object.
 

Variables

const uint64_t etsi_its_denm_msgs::access::etsi_its_msgs::UNIX_SECONDS_2004 = 1072915200
 
const std::map< uint64_t, uint16_t > etsi_its_denm_msgs::access::etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004
 std::map that stores all leap second insertions since 2004 with the corresponding unix-date of the insertion
 

Detailed Description

Main DENM access implementation header.

Definition in file denm_access.h.

Function Documentation

◆ getLeapSecondInsertionsSince2004()

uint16_t etsi_its_denm_msgs::access::etsi_its_msgs::getLeapSecondInsertionsSince2004 ( const uint64_t unix_seconds)
inline

Get the leap second insertions since 2004 for given unix seconds.

Parameters
unix_secondsthe current unix seconds for that the leap second insertions since 2004 shall be provided
Returns
uint16_t the number of leap second insertions since 2004 for unix_seconds

Definition at line 61 of file denm_access.h.

◆ getUnixNanosecondsFromReferenceTime()

uint64_t etsi_its_denm_msgs::access::getUnixNanosecondsFromReferenceTime ( const TimestampIts & reference_time)
inline

Get the Unix-Nanoseconds from a given ReferenceTime object.

Parameters
reference_timethe ReferenceTime object to get the Unix-Nanoseconds from
n_leap_secondsnumber of leap-seconds since 2004. (Default: etsi_its_msgs::N_LEAP_SECONDS)
Returns
uint64_t the corresponding Unix-Nanoseconds

Definition at line 82 of file denm_access.h.

132 {
134}
Utility functions for the ETSI ITS DENM (EN)

◆ throwIfOutOfRange()

template<typename T1 , typename T2 >
void etsi_its_denm_msgs::access::throwIfOutOfRange ( const T1 & val,
const T2 & min,
const T2 & max,
const std::string val_desc )

Definition at line 37 of file denm_access.h.

Variable Documentation

◆ LEAP_SECOND_INSERTIONS_SINCE_2004

const std::map< uint64_t, uint16_t > etsi_its_denm_msgs::access::etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004
Initial value:
{
{UNIX_SECONDS_2004, 0},
{1136073599, 1},
{1230767999, 2},
{1341100799, 3},
{1435708799, 4},
{1483228799, 5}
}

std::map that stores all leap second insertions since 2004 with the corresponding unix-date of the insertion

Definition at line 46 of file denm_access.h.

◆ UNIX_SECONDS_2004

const uint64_t etsi_its_denm_msgs::access::etsi_its_msgs::UNIX_SECONDS_2004 = 1072915200

Definition at line 40 of file denm_access.h.