9#ifndef ETSI_ITS_MSGS_UTILS_IMPL_DENM_DENM_GETTERS_COMMON_H
10#define ETSI_ITS_MSGS_UTILS_IMPL_DENM_DENM_GETTERS_COMMON_H
12#include <etsi_its_msgs_utils/impl/asn1_primitives/asn1_primitives_getters.h>
28inline TimestampIts
getReferenceTime(
const DENM& denm) {
return denm.denm.management.reference_time; }
44inline uint8_t
getStationType(
const DENM& denm) {
return denm.denm.management.station_type.value; }
77 if (denm.denm.location_is_present) {
78 return denm.denm.location.event_position_heading_is_present;
80 throw std::invalid_argument(
"LocationContainer is not present!");
91 if (denm.denm.location_is_present) {
92 if (denm.denm.location.event_speed_is_present) {
93 return getSpeed(denm.denm.location.event_speed);
95 throw std::invalid_argument(
"Speed is not present!");
98 throw std::invalid_argument(
"LocationContainer is not present!");
109 if (denm.denm.location_is_present) {
110 return denm.denm.location.event_speed_is_present;
112 throw std::invalid_argument(
"LocationContainer is not present!");
124 denm.denm.location.event_speed);
135inline gm::PointStamped
getUTMPosition(
const DENM& denm,
int& zone,
bool& northp) {
136 return getUTMPosition(denm.denm.management.event_position, zone, northp);
148 return getUTMPosition(denm.denm.management.event_position, zone, northp);
158 return getBitString(driving_lane_status.value, driving_lane_status.bits_unused);
168 return getBitString(light_bar_siren_in_use.value, light_bar_siren_in_use.bits_unused);
bool getIsHeadingPresent(const DENM &denm)
Get the IsHeadingPresent object.
uint64_t getReferenceTimeValue(const DENM &denm)
Get the ReferenceTime-Value.
uint32_t getStationID(const DENM &denm)
Get the Station ID object.
std::vector< bool > getLightBarSirenInUse(const LightBarSirenInUse &light_bar_siren_in_use)
Get the Lightbar Siren In Use in form of bool vector.
double getAltitude(const DENM &denm)
Get the Altitude value of DENM.
double getLongitude(const DENM &denm)
Get the Longitude value of DENM.
double getSpeed(const DENM &denm)
Get the vehicle speed.
double getSpeedConfidence(const DENM &denm)
Get the Speed Confidence.
TimestampIts getReferenceTime(const DENM &denm)
Get the Reference Time object.
double getLatitude(const DENM &denm)
Get the Latitude value of DENM.
uint8_t getStationType(const DENM &denm)
Get the stationType object.
std::vector< bool > getDrivingLaneStatus(const DrivingLaneStatus &driving_lane_status)
Get the Driving Lane Status in form of bool vector.
gm::PointStamped getUTMPosition(const DENM &denm, int &zone, bool &northp)
Get the UTM Position defined within the ManagementContainer of the DENM.
bool getIsSpeedPresent(const DENM &denm)
Get the IsSpeedPresent object.