35namespace etsi_its_spatem_ts_msgs {
49 throwIfOutOfRange(
id, IntersectionID::MIN, IntersectionID::MAX,
"IntersectionID");
60 inline void setIntersectionID(IntersectionReferenceID& intsct_ref_id,
const uint16_t
id) {
82 inline void setMinuteOfTheYear(MinuteOfTheYear& moy,
const uint32_t moy_value) {
83 throwIfOutOfRange(moy_value, MinuteOfTheYear::MIN, MinuteOfTheYear::MAX,
"MinuteOfTheYear");
84 moy.value = moy_value;
96 intsct.moy_is_present =
true;
106 inline void setDSecond(DSecond& dsecond,
const uint32_t dsecond_value) {
108 dsecond.value = dsecond_value;
118 inline void setDSecond(DSecond& dsecond,
const double dsecond_value) {
119 uint32_t dsecond_value_ms = (uint32_t)(dsecond_value*1e3);
130 inline void setDSecond(IntersectionState& intsct,
const uint32_t dsecond_value) {
132 intsct.time_stamp_is_present =
true;
142 inline void setDSecond(IntersectionState& intsct,
const double dsecond_value) {
144 intsct.time_stamp_is_present =
true;
154 inline void setSignalGroupID(SignalGroupID& signal_group_id,
const uint8_t
id) {
156 signal_group_id.value = id;
166 inline void setSignalGroupID(MovementState& movement_state,
const uint8_t
id) {
Sanity-check functions etc.
void throwIfOutOfRange(const T1 &val, const T2 &min, const T2 &max, const std::string val_desc)
Throws an exception if a given value is out of a defined range.
void setSignalGroupID(SignalGroupID &signal_group_id, const uint8_t id)
Sets the SignalGroupID value.
void setMinuteOfTheYear(MinuteOfTheYear &moy, const uint32_t moy_value)
Sets the MinuteOfTheYear value.
void setIntersectionID(IntersectionID &intsct_id, const uint16_t id)
Sets the IntersectionID value.
void setDSecond(DSecond &dsecond, const uint32_t dsecond_value)
Sets the DSecond value.