Utility functions for the ETSI ITS SPATEM. More...
#include <ctime>
Go to the source code of this file.
Enumerations | |
enum | time_mark_value_interpretation { normal , undefined , over_an_hour , leap_second } |
Functions | |
uint64_t | etsi_its_spatem_ts_msgs::access::getUnixSecondsOfYear (const uint64_t unixSecond) |
Get the unix seconds of the beginning of a year that corresponds to a given unix timestamp. | |
uint64_t | etsi_its_spatem_ts_msgs::access::getUnixNanosecondsFromMinuteOfTheYear (const MinuteOfTheYear &moy, const uint64_t unix_nanoseconds_estimate) |
Get the unix nanoseconds from MinuteOfTheYear object. | |
float | etsi_its_spatem_ts_msgs::access::interpretTimeIntervalConfidenceAsFloat (const uint16_t encoded_probability) |
Interprets the TimeIntervalConfidence type as a float value (see etsi definition) | |
std::array< float, 4 > | etsi_its_spatem_ts_msgs::access::interpretMovementPhaseStateAsColor (const uint8_t value) |
Interprets the MovementPhaseState type as a color (see etsi definition) | |
time_mark_value_interpretation | etsi_its_spatem_ts_msgs::access::interpretTimeMarkValueType (const uint16_t time) |
Interprets the type of a TimeMark message See etsi ASNI1 - IS TS 103 301 documentation for for the encoding of "TimeMark". | |
float | etsi_its_spatem_ts_msgs::access::interpretTimeMarkValueAsSeconds (const uint16_t time, const int32_t seconds, const uint32_t nanosec) |
Calculate the amount of seconds until the given time is reached. | |
std::string | etsi_its_spatem_ts_msgs::access::parseTimeMarkValueToString (const uint16_t time, const int32_t seconds, const uint32_t nanosec) |
Converts a value from message type TimeMarkValue into a string representation. | |
Variables | |
const std::array< float, 4 > | etsi_its_spatem_ts_msgs::access::color_grey {0.5, 0.5, 0.5, 1.0} |
const std::array< float, 4 > | etsi_its_spatem_ts_msgs::access::color_green {0.18, 0.79, 0.21, 1.0} |
const std::array< float, 4 > | etsi_its_spatem_ts_msgs::access::color_orange {0.9, 0.7, 0.09, 1.0} |
const std::array< float, 4 > | etsi_its_spatem_ts_msgs::access::color_red {0.8, 0.2, 0.2, 1.0} |
Utility functions for the ETSI ITS SPATEM.
Definition in file spatem_ts_utils.h.
enum etsi_its_spatem_ts_msgs::access::time_mark_value_interpretation |
Definition at line 45 of file spatem_ts_utils.h.
|
inline |
Get the unix nanoseconds from MinuteOfTheYear object.
moy | given MinuteOfTheYear object |
unix_nanoseconds_estimate | unix timestamp to derive the current year from in nanoseconds |
Definition at line 78 of file spatem_ts_utils.h.
|
inline |
Get the unix seconds of the beginning of a year that corresponds to a given unix timestamp.
unixSecond | timestamp that defines the year for that the unix seconds for the beginning of the year should be derived |
Definition at line 53 of file spatem_ts_utils.h.
|
inline |
Interprets the MovementPhaseState type as a color (see etsi definition)
value | Encoded color value from msg type MovementPhaseState |
Definition at line 152 of file spatem_ts_utils.h.
|
inline |
Interprets the TimeIntervalConfidence type as a float value (see etsi definition)
encoded_probability | Value from msg type TimeIntervalConfidence |
Definition at line 88 of file spatem_ts_utils.h.
float etsi_its_spatem_ts_msgs::access::interpretTimeMarkValueAsSeconds | ( | const uint16_t | time, |
const int32_t | seconds, | ||
const uint32_t | nanosec ) |
Calculate the amount of seconds until the given time is reached.
time | Encoded time value in the future |
seconds | Elapsed seconds since the start of the last full hour (timestamp) |
nanosec | Elapsed nanoseconds since the start of the last full hour (timestamp) |
Definition at line 230 of file spatem_ts_utils.h.
time_mark_value_interpretation etsi_its_spatem_ts_msgs::access::interpretTimeMarkValueType | ( | const uint16_t | time | ) |
Interprets the type of a TimeMark message See etsi ASNI1 - IS TS 103 301 documentation for for the encoding of "TimeMark".
time | The value inside the TimeMark message |
Definition at line 203 of file spatem_ts_utils.h.
std::string etsi_its_spatem_ts_msgs::access::parseTimeMarkValueToString | ( | const uint16_t | time, |
const int32_t | seconds, | ||
const uint32_t | nanosec ) |
Converts a value from message type TimeMarkValue into a string representation.
time | Time in 0.1 seconds until the next change occours in the future, counting from the last started hour |
seconds | Elapsed seconds since the start of the last full hour (timestamp) |
nanosec | Elapsed nanoseconds since the start of the last full hour (timestamp) |
Definition at line 246 of file spatem_ts_utils.h.
const std::array<float, 4> etsi_its_spatem_ts_msgs::access::color_green {0.18, 0.79, 0.21, 1.0} |
Definition at line 41 of file spatem_ts_utils.h.
const std::array<float, 4> etsi_its_spatem_ts_msgs::access::color_grey {0.5, 0.5, 0.5, 1.0} |
Definition at line 40 of file spatem_ts_utils.h.
const std::array<float, 4> etsi_its_spatem_ts_msgs::access::color_orange {0.9, 0.7, 0.09, 1.0} |
Definition at line 42 of file spatem_ts_utils.h.
const std::array<float, 4> etsi_its_spatem_ts_msgs::access::color_red {0.8, 0.2, 0.2, 1.0} |
Definition at line 43 of file spatem_ts_utils.h.