32#ifndef ETSI_ITS_MSGS_UTILS_IMPL_DENM_DENM_GETTERS_COMMON_H
33#define ETSI_ITS_MSGS_UTILS_IMPL_DENM_DENM_GETTERS_COMMON_H
35#include <etsi_its_msgs_utils/impl/asn1_primitives/asn1_primitives_getters.h>
51inline TimestampIts
getReferenceTime(
const DENM& denm) {
return denm.denm.management.reference_time; }
67inline uint8_t
getStationType(
const DENM& denm) {
return denm.denm.management.station_type.value; }
100 if (denm.denm.location_is_present) {
101 return denm.denm.location.event_position_heading_is_present;
103 throw std::invalid_argument(
"LocationContainer is not present!");
114 if (denm.denm.location_is_present) {
115 if (denm.denm.location.event_speed_is_present) {
116 return getSpeed(denm.denm.location.event_speed);
118 throw std::invalid_argument(
"Speed is not present!");
121 throw std::invalid_argument(
"LocationContainer is not present!");
132 if (denm.denm.location_is_present) {
133 return denm.denm.location.event_speed_is_present;
135 throw std::invalid_argument(
"LocationContainer is not present!");
147 denm.denm.location.event_speed);
158inline gm::PointStamped
getUTMPosition(
const DENM& denm,
int& zone,
bool& northp) {
159 return getUTMPosition(denm.denm.management.event_position, zone, northp);
171 return getUTMPosition(denm.denm.management.event_position, zone, northp);
181 return getBitString(driving_lane_status.value, driving_lane_status.bits_unused);
191 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.