34namespace etsi_its_spatem_ts_msgs {
47 return intsct_id.value;
56 inline uint16_t getIntersectionID(
const IntersectionReferenceID& intsct_ref_id) {
57 return getIntersectionID(intsct_ref_id.id);
66 inline uint16_t getIntersectionID(
const IntersectionState& intsct) {
67 return getIntersectionID(intsct.id);
87 inline DSecond
getDSecond(
const IntersectionState& intsct) {
89 return intsct.time_stamp;
98 inline double getDSecondValue(
const DSecond& dsecond) {
99 return ((
double)dsecond.value)*1e-3;
108 inline double getDSecondValue(
const IntersectionState& intsct) {
109 return getDSecondValue(getDSecond(intsct));
119 return signal_group_id.value;
139 if(mvmt_state.state_time_speed.array.size()<=0) {
140 throw std::runtime_error(
"MovementEventList is empty.");
142 return mvmt_state.state_time_speed.array[0];
151 inline MovementPhaseState getCurrentMovementPhaseState(
const MovementState& mvmt_state) {
161 inline uint8_t getCurrentMovementPhaseStateValue(
const MovementState& mvmt_state) {
Sanity-check functions etc.
uint16_t getIntersectionID(const IntersectionID &intsct_id)
Get the intersection-id.
uint8_t getSignalGroupID(const SignalGroupID &signal_group_id)
Get the Signal Group-ID of an SignalGroupID object.
DSecond getDSecond(const IntersectionState &intsct)
Get the DSecond object from a given IntersectionState object.
MovementEvent getCurrentMovementEvent(const MovementState &mvmt_state)
Get the current MovementEvent of a given MovementState object.
void throwIfNotPresent(const bool is_present, const std::string val_desc)
Throws an exception if the given value is not present.
MovementPhaseState getCurrentMovementPhaseState(const MovementState &mvmt_state)
Get the Current MovementPhaseState object of a given MovementState object.
MinuteOfTheYear getMinuteOfTheYear(const IntersectionState &intsct)
Get the MinuteOfTheYear object from a given IntersectionState object.