Common getter functions for the ETSI ITS DENM (EN and TS).
More...
#include <etsi_its_msgs_utils/impl/asn1_primitives/asn1_primitives_getters.h>
Go to the source code of this file.
|
| uint32_t | getStationID (const DENM &denm) |
| | Get the Station ID object.
|
| TimestampIts | getReferenceTime (const DENM &denm) |
| | Get the Reference Time object.
|
| uint64_t | getReferenceTimeValue (const DENM &denm) |
| | Get the ReferenceTime-Value.
|
| uint8_t | getStationType (const DENM &denm) |
| | Get the stationType object.
|
| double | getLatitude (const DENM &denm) |
| | Get the Latitude value of DENM.
|
| double | getLongitude (const DENM &denm) |
| | Get the Longitude value of DENM.
|
| double | getAltitude (const DENM &denm) |
| | Get the Altitude value of DENM.
|
| bool | getIsHeadingPresent (const DENM &denm) |
| | Get the IsHeadingPresent object.
|
| double | getSpeed (const DENM &denm) |
| | Get the vehicle speed.
|
| bool | getIsSpeedPresent (const DENM &denm) |
| | Get the IsSpeedPresent object.
|
| double | getSpeedConfidence (const DENM &denm) |
| | Get the Speed Confidence.
|
| gm::PointStamped | getUTMPosition (const DENM &denm, int &zone, bool &northp) |
| | Get the UTM Position defined within the ManagementContainer of the DENM.
|
| gm::PointStamped | getUTMPosition (const DENM &denm) |
| | Get the UTM Position defined within the ManagementContainer of the DENM.
|
| std::vector< bool > | getDrivingLaneStatus (const DrivingLaneStatus &driving_lane_status) |
| | Get the Driving Lane Status in form of bool vector.
|
| std::vector< bool > | getLightBarSirenInUse (const LightBarSirenInUse &light_bar_siren_in_use) |
| | Get the Lightbar Siren In Use in form of bool vector.
|
Common getter functions for the ETSI ITS DENM (EN and TS).
Definition in file denm_getters_common.h.
◆ getAltitude()
| double getAltitude |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Altitude value of DENM.
- Parameters
-
| denm | DENM to get the Altitude value from |
- Returns
- Altitude value (above the reference ellipsoid surface) in meter as decimal number
Definition at line 68 of file denm_getters_common.h.
68{
return getAltitude(denm.denm.management.event_position.altitude); }
double getAltitude(const DENM &denm)
Get the Altitude value of DENM.
◆ getDrivingLaneStatus()
| std::vector< bool > getDrivingLaneStatus |
( |
const DrivingLaneStatus & | driving_lane_status | ) |
|
|
inline |
Get the Driving Lane Status in form of bool vector.
- Parameters
-
- Returns
- std::vector<bool>
Definition at line 157 of file denm_getters_common.h.
157 {
158 return getBitString(driving_lane_status.value, driving_lane_status.bits_unused);
159}
◆ getIsHeadingPresent()
| bool getIsHeadingPresent |
( |
const DENM & | denm | ) |
|
|
inline |
Get the IsHeadingPresent object.
- Parameters
-
| denm | DENM to get the IsHeadingPresent-Value from |
- Returns
- IsHeadingPresent-Value (true or false)
Definition at line 76 of file denm_getters_common.h.
76 {
77 if (denm.denm.location_is_present) {
78 return denm.denm.location.event_position_heading_is_present;
79 } else {
80 throw std::invalid_argument("LocationContainer is not present!");
81 }
82}
◆ getIsSpeedPresent()
| bool getIsSpeedPresent |
( |
const DENM & | denm | ) |
|
|
inline |
Get the IsSpeedPresent object.
- Parameters
-
| denm | DENM to get the IsSpeedPresent-Value from |
- Returns
- IsSpeedPresent-Value (true or false)
Definition at line 108 of file denm_getters_common.h.
108 {
109 if (denm.denm.location_is_present) {
110 return denm.denm.location.event_speed_is_present;
111 } else {
112 throw std::invalid_argument("LocationContainer is not present!");
113 }
114}
◆ getLatitude()
| double getLatitude |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Latitude value of DENM.
- Parameters
-
| denm | DENM to get the Latitude value from |
- Returns
- Latitude value in degree as decimal number
Definition at line 52 of file denm_getters_common.h.
52{
return getLatitude(denm.denm.management.event_position.latitude); }
double getLatitude(const DENM &denm)
Get the Latitude value of DENM.
◆ getLightBarSirenInUse()
| std::vector< bool > getLightBarSirenInUse |
( |
const LightBarSirenInUse & | light_bar_siren_in_use | ) |
|
|
inline |
Get the Lightbar Siren In Use in form of bool vector.
- Parameters
-
- Returns
- std::vector<bool>
Definition at line 167 of file denm_getters_common.h.
167 {
168 return getBitString(light_bar_siren_in_use.value, light_bar_siren_in_use.bits_unused);
169}
◆ getLongitude()
| double getLongitude |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Longitude value of DENM.
- Parameters
-
| denm | DENM to get the Longitude value from |
- Returns
- Longitude value in degree as decimal number
Definition at line 60 of file denm_getters_common.h.
60{
return getLongitude(denm.denm.management.event_position.longitude); }
double getLongitude(const DENM &denm)
Get the Longitude value of DENM.
◆ getReferenceTime()
| TimestampIts getReferenceTime |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Reference Time object.
- Parameters
-
| denm | DENM to get the ReferenceTime-Value from |
- Returns
- TimestampIts
Definition at line 28 of file denm_getters_common.h.
28{ return denm.denm.management.reference_time; }
◆ getReferenceTimeValue()
| uint64_t getReferenceTimeValue |
( |
const DENM & | denm | ) |
|
|
inline |
Get the ReferenceTime-Value.
- Parameters
-
| denm | DENM to get the ReferenceTime-Value from |
- Returns
- uint64_t the ReferenceTime-Value
Definition at line 36 of file denm_getters_common.h.
TimestampIts getReferenceTime(const DENM &denm)
Get the Reference Time object.
◆ getSpeed()
| double getSpeed |
( |
const DENM & | denm | ) |
|
|
inline |
Get the vehicle speed.
- Parameters
-
| denm | DENM to get the speed value from |
- Returns
- speed value in m/s as decimal number
Definition at line 90 of file denm_getters_common.h.
90 {
91 if (denm.denm.location_is_present) {
92 if (denm.denm.location.event_speed_is_present) {
93 return getSpeed(denm.denm.location.event_speed);
94 } else {
95 throw std::invalid_argument("Speed is not present!");
96 }
97 } else {
98 throw std::invalid_argument("LocationContainer is not present!");
99 }
100}
double getSpeed(const DENM &denm)
Get the vehicle speed.
◆ getSpeedConfidence()
| double getSpeedConfidence |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Speed Confidence.
- Parameters
-
| denm | DENM to get the Speed Confidence from |
- Returns
- double standard deviation of the speed in m/s as decimal number
Definition at line 122 of file denm_getters_common.h.
122 {
124 denm.denm.location.event_speed);
125}
double getSpeedConfidence(const DENM &denm)
Get the Speed Confidence.
◆ getStationID()
| uint32_t getStationID |
( |
const DENM & | denm | ) |
|
|
inline |
Get the Station ID object.
- Parameters
-
| denm | DENM to get the StationID value from |
- Returns
- stationID value
Definition at line 20 of file denm_getters_common.h.
uint32_t getStationID(const DENM &denm)
Get the Station ID object.
◆ getStationType()
| uint8_t getStationType |
( |
const DENM & | denm | ) |
|
|
inline |
Get the stationType object.
- Parameters
-
| denm | DENM to get the stationType value from |
- Returns
- stationType value
Definition at line 44 of file denm_getters_common.h.
44{ return denm.denm.management.station_type.value; }
◆ getUTMPosition() [1/2]
| gm::PointStamped getUTMPosition |
( |
const DENM & | denm | ) |
|
|
inline |
Get the UTM Position defined within the ManagementContainer of the DENM.
- Parameters
-
| denm | DENM to get the UTM Position from |
- Returns
- gm::PointStamped geometry_msgs::PointStamped of the given position
Definition at line 145 of file denm_getters_common.h.
145 {
146 int zone;
147 bool northp;
148 return getUTMPosition(denm.denm.management.event_position, zone, northp);
149}
gm::PointStamped getUTMPosition(const DENM &denm, int &zone, bool &northp)
Get the UTM Position defined within the ManagementContainer of the DENM.
◆ getUTMPosition() [2/2]
| gm::PointStamped getUTMPosition |
( |
const DENM & | denm, |
|
|
int & | zone, |
|
|
bool & | northp ) |
|
inline |
Get the UTM Position defined within the ManagementContainer of the DENM.
- Parameters
-
| denm | DENM to get the UTM Position from |
| zone | the UTM zone (zero means UPS) |
| northp | hemisphere (true means north, false means south) |
- Returns
- gm::PointStamped geometry_msgs::PointStamped of the given position
Definition at line 135 of file denm_getters_common.h.
135 {
136 return getUTMPosition(denm.denm.management.event_position, zone, northp);
137}