etsi_its_messages v3.0.0
 
Loading...
Searching...
No Matches
cam_ts_setters.h File Reference

Setter functions for the ETSI ITS CAM (TS) More...

Go to the source code of this file.

Functions

template<typename T1, typename T2>
void etsi_its_cam_ts_msgs::access::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 etsi_its_cam_ts_msgs::access::throwIfNotPresent (const bool is_present, const std::string val_desc)
 Throws an exception if the given value is not present.
 
uint16_t etsi_its_cam_ts_msgs::access::etsi_its_msgs::getLeapSecondInsertionsSince2004 (const uint64_t unix_seconds)
 Get the leap second insertions since 2004 for given unix seconds.
 
void etsi_its_cam_ts_msgs::access::setTimestampITS (TimestampIts &timestamp_its, const uint64_t unix_nanosecs, const uint16_t n_leap_seconds=etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end() ->second)
 Set the TimestampITS object.
 
void etsi_its_cam_ts_msgs::access::setLatitude (Latitude &latitude, const double deg)
 Set the Latitude object.
 
void etsi_its_cam_ts_msgs::access::setLongitude (Longitude &longitude, const double deg)
 Set the Longitude object.
 
void etsi_its_cam_ts_msgs::access::setAltitudeValue (AltitudeValue &altitude, const double value)
 Set the AltitudeValue object.
 
void etsi_its_cam_ts_msgs::access::setAltitude (Altitude &altitude, const double value)
 Set the Altitude object.
 
void etsi_its_cam_ts_msgs::access::setSpeedValue (SpeedValue &speed, const double value)
 Set the SpeedValue object.
 
void etsi_its_cam_ts_msgs::access::setSpeed (Speed &speed, const double value)
 Set the Speed object.
 
template<typename T>
void etsi_its_cam_ts_msgs::access::setReferencePosition (T &ref_position, const double latitude, const double longitude, const double altitude=AltitudeValue::UNAVAILABLE)
 Sets the reference position in the given ReferencePostion object.
 
template<typename T>
void etsi_its_cam_ts_msgs::access::setFromUTMPosition (T &reference_position, const gm::PointStamped &utm_position, const int zone, const bool northp)
 Set the ReferencePosition from a given UTM-Position.
 
void etsi_its_cam_ts_msgs::access::setStationId (StationId &station_id, const uint32_t id_value)
 Set the Station Id object.
 
void etsi_its_cam_ts_msgs::access::setItsPduHeader (ItsPduHeader &header, const uint8_t message_id, const uint32_t station_id, const uint8_t protocol_version=0)
 Set the Its Pdu Header object.
 
void etsi_its_cam_ts_msgs::access::setStationType (TrafficParticipantType &station_type, const uint8_t value)
 Set the Station Type.
 
void etsi_its_cam_ts_msgs::access::setLongitudinalAccelerationValue (AccelerationValue &accel, const double value)
 Set the LongitudinalAccelerationValue object.
 
void etsi_its_cam_ts_msgs::access::setLongitudinalAcceleration (AccelerationComponent &accel, const double value)
 Set the LongitudinalAcceleration object.
 
void etsi_its_cam_ts_msgs::access::setLateralAccelerationValue (AccelerationValue &accel, const double value)
 Set the LateralAccelerationValue object.
 
void etsi_its_cam_ts_msgs::access::setLateralAcceleration (AccelerationComponent &accel, const double value)
 Set the LateralAcceleration object.
 
template<typename T>
void etsi_its_cam_ts_msgs::access::setBitString (T &bitstring, const std::vector< bool > &bits)
 Set a Bit String by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setGenerationDeltaTime (GenerationDeltaTime &generation_delta_time, const uint64_t unix_nanosecs, const uint16_t n_leap_seconds=etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end() ->second)
 Set the GenerationDeltaTime-Value.
 
void etsi_its_cam_ts_msgs::access::setGenerationDeltaTime (CAM &cam, const uint64_t unix_nanosecs, const uint16_t n_leap_seconds=etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end() ->second)
 Set the Generation Delta Time object.
 
void etsi_its_cam_ts_msgs::access::setStationType (CAM &cam, const uint8_t value)
 Set the StationType for a CAM.
 
void etsi_its_cam_ts_msgs::access::setHeadingValue (HeadingValue &heading, const double value)
 Set the HeadingValue object.
 
void etsi_its_cam_ts_msgs::access::setHeading (Heading &heading, const double value)
 Set the Heading object.
 
void etsi_its_cam_ts_msgs::access::setHeading (CAM &cam, const double heading_val)
 Set the Heading for a CAM.
 
void etsi_its_cam_ts_msgs::access::setVehicleWidth (VehicleWidth &vehicle_width, const double value)
 Set the VehicleWidth object.
 
void etsi_its_cam_ts_msgs::access::setVehicleLengthValue (VehicleLengthValue &vehicle_length, const double value)
 Set the VehicleLengthValue object.
 
void etsi_its_cam_ts_msgs::access::setVehicleLength (VehicleLength &vehicle_length, const double value)
 Set the VehicleLength object.
 
void etsi_its_cam_ts_msgs::access::setVehicleDimensions (CAM &cam, const double vehicle_length, const double vehicle_width)
 Set the vehicle dimensions.
 
void etsi_its_cam_ts_msgs::access::setSpeed (CAM &cam, const double speed_val)
 Set the vehicle speed.
 
void etsi_its_cam_ts_msgs::access::setLongitudinalAcceleration (CAM &cam, const double lon_accel)
 Set the longitudinal acceleration.
 
void etsi_its_cam_ts_msgs::access::setLateralAcceleration (CAM &cam, const double lat_accel)
 Set the lateral acceleration.
 
void etsi_its_cam_ts_msgs::access::setReferencePosition (CAM &cam, const double latitude, const double longitude, const double altitude=AltitudeValue::UNAVAILABLE)
 Set the ReferencePosition for a CAM.
 
void etsi_its_cam_ts_msgs::access::setFromUTMPosition (CAM &cam, const gm::PointStamped &utm_position, const int &zone, const bool &northp)
 Set the ReferencePosition of a CAM from a given UTM-Position.
 
void etsi_its_cam_ts_msgs::access::setExteriorLights (ExteriorLights &exterior_lights, const std::vector< bool > &bits)
 Set the Exterior Lights by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setExteriorLights (CAM &cam, const std::vector< bool > &exterior_lights)
 Set the Exterior Lights by using a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setAccelerationControl (AccelerationControl &acceleration_control, const std::vector< bool > &bits)
 Set the Acceleration Control by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setDrivingLaneStatus (DrivingLaneStatus &driving_lane_status, const std::vector< bool > &bits)
 Set the Driving Lane Status by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setSpecialTransportType (SpecialTransportType &special_transport_type, const std::vector< bool > &bits)
 Set the Special Transport Type by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setLightBarSirenInUse (LightBarSirenInUse &light_bar_siren_in_use, const std::vector< bool > &bits)
 Set the Lightbar Siren In Use by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setEmergencyPriority (EmergencyPriority &emergency_priority, const std::vector< bool > &bits)
 Set the Emergency Priority by a vector of bools.
 
void etsi_its_cam_ts_msgs::access::setItsPduHeader (CAM &cam, const uint32_t station_id, const uint8_t protocol_version=0)
 Set the ItsPduHeader-object for a CAM.
 

Detailed Description

Setter functions for the ETSI ITS CAM (TS)

Definition in file cam_ts_setters.h.

Function Documentation

◆ getLeapSecondInsertionsSince2004()

uint16_t etsi_its_cam_ts_msgs::access::etsi_its_msgs::getLeapSecondInsertionsSince2004 ( const uint64_t unix_seconds)
inline

Get the leap second insertions since 2004 for given unix seconds.

Parameters
unix_secondsthe current unix seconds for that the leap second insertions since 2004 shall be provided
Returns
uint16_t the number of leap second insertions since 2004 for unix_seconds

Definition at line 61 of file cam_ts_access.h.

117 {
119}
Utility functions for the ETSI ITS CAM (EN and TS)

◆ setAccelerationControl()

void etsi_its_cam_ts_msgs::access::setAccelerationControl ( AccelerationControl & acceleration_control,
const std::vector< bool > & bits )
inline

Set the Acceleration Control by a vector of bools.

Parameters
acceleration_control
bits

Definition at line 317 of file cam_ts_setters.h.

◆ setAltitude()

void etsi_its_cam_ts_msgs::access::setAltitude ( Altitude & altitude,
const double value )
inline

Set the Altitude object.

AltitudeConfidence is set to UNAVAILABLE

Parameters
altitudeobject to set
valueAltitude value (above the reference ellipsoid surface) in meter as decimal number

Definition at line 140 of file cam_ts_setters.h.

173 {
174
176
178
186inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
187 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
188}
189
190} // namespace etsi_its_cam_ts_msgs::access
Common setter functions for the ETSI ITS CAM (EN and TS)
void setItsPduHeader(ItsPduHeader &header, const uint8_t message_id, const uint32_t station_id, const uint8_t protocol_version=0)
Set the Its Pdu Header object.
Setter functions for the ETSI ITS Common Data Dictionary (CDD) v2.1.1.

◆ setAltitudeValue()

void etsi_its_cam_ts_msgs::access::setAltitudeValue ( AltitudeValue & altitude,
const double value )
inline

Set the AltitudeValue object.

Parameters
altitudeobject to set
valueAltitudeValue value (above the reference ellipsoid surface) in meter as decimal number

Definition at line 121 of file cam_ts_setters.h.

154 {
155
157
159
167inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
168 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
169}
170
171} // namespace etsi_its_cam_ts_msgs::access

◆ setBitString()

template<typename T>
void etsi_its_cam_ts_msgs::access::setBitString ( T & bitstring,
const std::vector< bool > & bits )
inline

Set a Bit String by a vector of bools.

Template Parameters
T
Parameters
bitstringBitString to set
bitsvector of bools

Definition at line 44 of file cam_ts_setters.h.

47 {
48 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
49}
50
51} // namespace etsi_its_cam_ts_msgs::access

◆ setDrivingLaneStatus()

void etsi_its_cam_ts_msgs::access::setDrivingLaneStatus ( DrivingLaneStatus & driving_lane_status,
const std::vector< bool > & bits )
inline

Set the Driving Lane Status by a vector of bools.

Parameters
driving_lane_status
bits

Definition at line 327 of file cam_ts_setters.h.

360 {
361
363
365
373inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
374 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
375}
376
377} // namespace etsi_its_cam_ts_msgs::access

◆ setEmergencyPriority()

void etsi_its_cam_ts_msgs::access::setEmergencyPriority ( EmergencyPriority & emergency_priority,
const std::vector< bool > & bits )
inline

Set the Emergency Priority by a vector of bools.

Parameters
emergency_priority
bits

Definition at line 357 of file cam_ts_setters.h.

390 {
391
393
395
403inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
404 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
405}
406
407} // namespace etsi_its_cam_ts_msgs::access

◆ setExteriorLights() [1/2]

void etsi_its_cam_ts_msgs::access::setExteriorLights ( CAM & cam,
const std::vector< bool > & exterior_lights )
inline

Set the Exterior Lights by using a vector of bools.

Parameters
camCAM to set the exterior lights
exterior_lightsvector of bools to set the exterior lights

Definition at line 292 of file cam_ts_setters.h.

325 {
326
328
330
338inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
339 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
340}
341
342} // namespace etsi_its_cam_ts_msgs::access

◆ setExteriorLights() [2/2]

void etsi_its_cam_ts_msgs::access::setExteriorLights ( ExteriorLights & exterior_lights,
const std::vector< bool > & bits )
inline

Set the Exterior Lights by a vector of bools.

Parameters
exterior_lights
bits

Definition at line 282 of file cam_ts_setters.h.

315 {
316
318
320
328inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
329 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
330}
331
332} // namespace etsi_its_cam_ts_msgs::access

◆ setFromUTMPosition() [1/2]

void etsi_its_cam_ts_msgs::access::setFromUTMPosition ( CAM & cam,
const gm::PointStamped & utm_position,
const int & zone,
const bool & northp )
inline

Set the ReferencePosition of a CAM from a given UTM-Position.

The position is transformed to latitude and longitude by using GeographicLib::UTMUPS The z-Coordinate is directly used as altitude value The frame_id of the given utm_position must be set to 'utm_<zone><N/S>'

Parameters
[out]camCAM for which to set the ReferencePosition
[in]utm_positiongeometry_msgs::PointStamped describing the given utm position
[in]zonethe UTM zone (zero means UPS) of the given position
[in]northphemisphere (true means north, false means south)

Definition at line 272 of file cam_ts_setters.h.

305 {
306
308
310
318inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
319 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
320}
321
322} // namespace etsi_its_cam_ts_msgs::access

◆ setFromUTMPosition() [2/2]

template<typename T>
void etsi_its_cam_ts_msgs::access::setFromUTMPosition ( T & reference_position,
const gm::PointStamped & utm_position,
const int zone,
const bool northp )
inline

Set the ReferencePosition from a given UTM-Position.

The position is transformed to latitude and longitude by using GeographicLib::UTMUPS The z-Coordinate is directly used as altitude value The frame_id of the given utm_position must be set to 'utm_<zone><N/S>'

Parameters
[out]reference_positionReferencePostion or ReferencePositionWithConfidence to set
[in]utm_positiongeometry_msgs::PointStamped describing the given utm position
[in]zonethe UTM zone (zero means UPS) of the given position
[in]northphemisphere (true means north, false means south)

Definition at line 208 of file cam_ts_setters.h.

241 {
242
244
246
254inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
255 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
256}
257
258} // namespace etsi_its_cam_ts_msgs::access

◆ setGenerationDeltaTime() [1/2]

void etsi_its_cam_ts_msgs::access::setGenerationDeltaTime ( CAM & cam,
const uint64_t unix_nanosecs,
const uint16_t n_leap_seconds = etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second )
inline

Set the Generation Delta Time object.

Parameters
camCAM to set the GenerationDeltaTime-Value for
unix_nanosecsTimestamp in unix-nanoseconds to set the GenerationDeltaTime-Value from
n_leap_secondsNumber of leap seconds since 2004 for the given timestamp (Default: etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second)

Definition at line 98 of file cam_ts_setters.h.

131 {
132
134
136
144inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
145 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
146}
147
148} // namespace etsi_its_cam_ts_msgs::access

◆ setGenerationDeltaTime() [2/2]

void etsi_its_cam_ts_msgs::access::setGenerationDeltaTime ( GenerationDeltaTime & generation_delta_time,
const uint64_t unix_nanosecs,
const uint16_t n_leap_seconds = etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second )
inline

Set the GenerationDeltaTime-Value.

Parameters
generation_delta_timeGenerationDeltaTime to set the GenerationDeltaTime-Value for
unix_nanosecsTimestamp in unix-nanoseconds to set the GenerationDeltaTime-Value from
n_leap_secondsNumber of leap seconds since 2004 for the given timestamp (Default: etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second)

Definition at line 81 of file cam_ts_setters.h.

114 {
115
117
119
127inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
128 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
129}
130
131} // namespace etsi_its_cam_ts_msgs::access

◆ setHeading() [1/2]

void etsi_its_cam_ts_msgs::access::setHeading ( CAM & cam,
const double heading_val )
inline

Set the Heading for a CAM.

0.0° equals WGS84 North, 90.0° equals WGS84 East, 180.0° equals WGS84 South and 270.0° equals WGS84 West HeadingConfidence is set to UNAVAILABLE

Parameters
camCAM to set the ReferencePosition
valueHeading value in degree as decimal number

Definition at line 151 of file cam_ts_setters.h.

184 {
185
187
189
197inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
198 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
199}
200
201} // namespace etsi_its_cam_ts_msgs::access

◆ setHeading() [2/2]

void etsi_its_cam_ts_msgs::access::setHeading ( Heading & heading,
const double value )
inline

Set the Heading object.

0.0° equals WGS84 North, 90.0° equals WGS84 East, 180.0° equals WGS84 South and 270.0° equals WGS84 West HeadingConfidence is set to UNAVAILABLE

Parameters
headingobject to set
valueHeading value in degree as decimal number

Definition at line 137 of file cam_ts_setters.h.

170 {
171
173
175
183inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
184 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
185}
186
187} // namespace etsi_its_cam_ts_msgs::access

◆ setHeadingValue()

void etsi_its_cam_ts_msgs::access::setHeadingValue ( HeadingValue & heading,
const double value )
inline

Set the HeadingValue object.

0.0° equals WGS84 North, 90.0° equals WGS84 East, 180.0° equals WGS84 South and 270.0° equals WGS84 West

Parameters
headingobject to set
valueHeading value in degree as decimal number

Definition at line 122 of file cam_ts_setters.h.

155 {
156
158
160
168inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
169 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
170}
171
172} // namespace etsi_its_cam_ts_msgs::access

◆ setItsPduHeader() [1/2]

void etsi_its_cam_ts_msgs::access::setItsPduHeader ( CAM & cam,
const uint32_t station_id,
const uint8_t protocol_version = 0 )
inline

Set the ItsPduHeader-object for a CAM.

Parameters
camCAM-Message to set the ItsPduHeader
station_id
protocol_version

Definition at line 370 of file cam_ts_setters.h.

403 {
404
406
408
416inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
417 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
418}
419
420} // namespace etsi_its_cam_ts_msgs::access

◆ setItsPduHeader() [2/2]

void etsi_its_cam_ts_msgs::access::setItsPduHeader ( ItsPduHeader & header,
const uint8_t message_id,
const uint32_t station_id,
const uint8_t protocol_version = 0 )
inline

Set the Its Pdu Header object.

Parameters
headerItsPduHeader to be set
message_idID of the message
station_id
protocol_version

Definition at line 85 of file cam_ts_setters.h.

118 {
119
121
123
131inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
132 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
133}
134
135} // namespace etsi_its_cam_ts_msgs::access

◆ setLateralAcceleration() [1/2]

void etsi_its_cam_ts_msgs::access::setLateralAcceleration ( AccelerationComponent & accel,
const double value )
inline

Set the LateralAcceleration object.

AccelerationConfidence is set to UNAVAILABLE

Parameters
accelobject to set
valueLaterallAccelerationValue in m/s^2 as decimal number (left is positive)

Definition at line 160 of file cam_ts_setters.h.

193 {
194
196
198
206inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
207 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
208}
209
210} // namespace etsi_its_cam_ts_msgs::access

◆ setLateralAcceleration() [2/2]

void etsi_its_cam_ts_msgs::access::setLateralAcceleration ( CAM & cam,
const double lat_accel )
inline

Set the lateral acceleration.

Parameters
camCAM to set the acceleration value s
lat_accellateral acceleration to set in m/s^2 as decimal number (left is positiv), if not available use 16.1 m/s^2

Definition at line 236 of file cam_ts_setters.h.

269 {
270
272
274
282inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
283 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
284}
285
286} // namespace etsi_its_cam_ts_msgs::access

◆ setLateralAccelerationValue()

void etsi_its_cam_ts_msgs::access::setLateralAccelerationValue ( AccelerationValue & accel,
const double value )
inline

Set the LateralAccelerationValue object.

Parameters
accelobject to set
valueLateralAccelerationValue in m/s^2 as decimal number (left is positive)

Definition at line 141 of file cam_ts_setters.h.

174 {
175
177
179
187inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
188 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
189}
190
191} // namespace etsi_its_cam_ts_msgs::access

◆ setLatitude()

void etsi_its_cam_ts_msgs::access::setLatitude ( Latitude & latitude,
const double deg )
inline

Set the Latitude object.

Parameters
latitudeobject to set
degLatitude value in degree as decimal number

Definition at line 97 of file cam_ts_setters.h.

130 {
131
133
135
143inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
144 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
145}
146
147} // namespace etsi_its_cam_ts_msgs::access

◆ setLightBarSirenInUse()

void etsi_its_cam_ts_msgs::access::setLightBarSirenInUse ( LightBarSirenInUse & light_bar_siren_in_use,
const std::vector< bool > & bits )
inline

Set the Lightbar Siren In Use by a vector of bools.

Parameters
light_bar_siren_in_use
bits

Definition at line 347 of file cam_ts_setters.h.

380 {
381
383
385
393inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
394 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
395}
396
397} // namespace etsi_its_cam_ts_msgs::access

◆ setLongitude()

void etsi_its_cam_ts_msgs::access::setLongitude ( Longitude & longitude,
const double deg )
inline

Set the Longitude object.

Parameters
longitudeobject to set
degLongitude value in degree as decimal number

Definition at line 109 of file cam_ts_setters.h.

142 {
143
145
147
155inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
156 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
157}
158
159} // namespace etsi_its_cam_ts_msgs::access

◆ setLongitudinalAcceleration() [1/2]

void etsi_its_cam_ts_msgs::access::setLongitudinalAcceleration ( AccelerationComponent & accel,
const double value )
inline

Set the LongitudinalAcceleration object.

AccelerationConfidence is set to UNAVAILABLE

Parameters
accelobject to set
valueLongitudinalAccelerationValue in m/s^2 as decimal number (braking is negative)

Definition at line 130 of file cam_ts_setters.h.

163 {
164
166
168
176inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
177 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
178}
179
180} // namespace etsi_its_cam_ts_msgs::access

◆ setLongitudinalAcceleration() [2/2]

void etsi_its_cam_ts_msgs::access::setLongitudinalAcceleration ( CAM & cam,
const double lon_accel )
inline

Set the longitudinal acceleration.

Parameters
camCAM to set the acceleration value s
lon_accellongitudinal acceleration to set in m/s^2 as decimal number (braking is negative), if not available use 16.1 m/s^2

Definition at line 224 of file cam_ts_setters.h.

257 {
258
260
262
270inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
271 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
272}
273
274} // namespace etsi_its_cam_ts_msgs::access

◆ setLongitudinalAccelerationValue()

void etsi_its_cam_ts_msgs::access::setLongitudinalAccelerationValue ( AccelerationValue & accel,
const double value )
inline

Set the LongitudinalAccelerationValue object.

Parameters
accelobject to set
valueLongitudinalAccelerationValue in m/s^2 as decimal number (braking is negative)

Definition at line 111 of file cam_ts_setters.h.

144 {
145
147
149
157inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
158 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
159}
160
161} // namespace etsi_its_cam_ts_msgs::access

◆ setReferencePosition() [1/2]

void etsi_its_cam_ts_msgs::access::setReferencePosition ( CAM & cam,
const double latitude,
const double longitude,
const double altitude = AltitudeValue::UNAVAILABLE )
inline

Set the ReferencePosition for a CAM.

This function sets the latitude, longitude, and altitude of the CAMs reference position. If the altitude is not provided, it is set to AltitudeValue::UNAVAILABLE.

Parameters
camCAM to set the ReferencePosition
latitudeThe latitude value position in degree as decimal number.
longitudeThe longitude value in degree as decimal number.
altitudeThe altitude value (above the reference ellipsoid surface) in meter as decimal number (optional).

Definition at line 255 of file cam_ts_setters.h.

288 {
289
291
293
301inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
302 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
303}
304
305} // namespace etsi_its_cam_ts_msgs::access

◆ setReferencePosition() [2/2]

template<typename T>
void etsi_its_cam_ts_msgs::access::setReferencePosition ( T & ref_position,
const double latitude,
const double longitude,
const double altitude = AltitudeValue::UNAVAILABLE )
inline

Sets the reference position in the given ReferencePostion object.

This function sets the latitude, longitude, and altitude of the reference position. If the altitude is not provided, it is set to AltitudeValue::UNAVAILABLE.

Parameters
ref_positionReferencePostion or ReferencePositionWithConfidence object to set the reference position in.
latitudeThe latitude value position in degree as decimal number.
longitudeThe longitude value in degree as decimal number.
altitudeThe altitude value (above the reference ellipsoid surface) in meter as decimal number (optional).

Definition at line 182 of file cam_ts_setters.h.

215 {
216
218
220
228inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
229 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
230}
231
232} // namespace etsi_its_cam_ts_msgs::access

◆ setSpecialTransportType()

void etsi_its_cam_ts_msgs::access::setSpecialTransportType ( SpecialTransportType & special_transport_type,
const std::vector< bool > & bits )
inline

Set the Special Transport Type by a vector of bools.

Parameters
special_transport_type
bits

Definition at line 337 of file cam_ts_setters.h.

370 {
371
373
375
383inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
384 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
385}
386
387} // namespace etsi_its_cam_ts_msgs::access

◆ setSpeed() [1/2]

void etsi_its_cam_ts_msgs::access::setSpeed ( CAM & cam,
const double speed_val )
inline

Set the vehicle speed.

Parameters
camCAM to set the speed value
speed_valspeed value to set in m/s as decimal number

Definition at line 214 of file cam_ts_setters.h.

247 {
248
250
252
260inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
261 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
262}
263
264} // namespace etsi_its_cam_ts_msgs::access

◆ setSpeed() [2/2]

void etsi_its_cam_ts_msgs::access::setSpeed ( Speed & speed,
const double value )
inline

Set the Speed object.

SpeedConfidence is set to UNAVAILABLE

Parameters
speedobject to set
valueSpeed in in m/s as decimal number

Definition at line 165 of file cam_ts_setters.h.

198 {
199
201
203
211inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
212 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
213}
214
215} // namespace etsi_its_cam_ts_msgs::access

◆ setSpeedValue()

void etsi_its_cam_ts_msgs::access::setSpeedValue ( SpeedValue & speed,
const double value )
inline

Set the SpeedValue object.

Parameters
speedobject to set
valueSpeedValue in m/s as decimal number

Definition at line 151 of file cam_ts_setters.h.

184 {
185
187
189
197inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
198 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
199}
200
201} // namespace etsi_its_cam_ts_msgs::access

◆ setStationId()

void etsi_its_cam_ts_msgs::access::setStationId ( StationId & station_id,
const uint32_t id_value )
inline

Set the Station Id object.

Parameters
station_id
id_value

Definition at line 72 of file cam_ts_setters.h.

105 {
106
108
110
118inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
119 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
120}
121
122} // namespace etsi_its_cam_ts_msgs::access

◆ setStationType() [1/2]

void etsi_its_cam_ts_msgs::access::setStationType ( CAM & cam,
const uint8_t value )
inline

Set the StationType for a CAM.

Parameters
camCAM-Message to set the station_type value
valuestation_type value to set

Definition at line 110 of file cam_ts_setters.h.

143 {
144
146
148
156inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
157 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
158}
159
160} // namespace etsi_its_cam_ts_msgs::access

◆ setStationType() [2/2]

void etsi_its_cam_ts_msgs::access::setStationType ( TrafficParticipantType & station_type,
const uint8_t value )
inline

Set the Station Type.

Parameters
station_type
value

Definition at line 100 of file cam_ts_setters.h.

133 {
134
136
138
146inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
147 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
148}
149
150} // namespace etsi_its_cam_ts_msgs::access

◆ setTimestampITS()

void etsi_its_cam_ts_msgs::access::setTimestampITS ( TimestampIts & timestamp_its,
const uint64_t unix_nanosecs,
const uint16_t n_leap_seconds = etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second )
inline

Set the TimestampITS object.

Parameters
[in]timestamp_itsTimestampITS object to set the timestamp
[in]unix_nanosecsUnix-Nanoseconds to set the timestamp for
[in]n_leap_secondsNumber of leap-seconds since 2004. (Default: etsi_its_msgs::LEAP_SECOND_INSERTIONS_SINCE_2004.end()->second)
[in]epoch_offsetUnix-Timestamp in seconds for the 01.01.2004 at 00:00:00

Definition at line 83 of file cam_ts_setters.h.

116 {
117
119
121
129inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
130 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
131}
132
133} // namespace etsi_its_cam_ts_msgs::access

◆ setVehicleDimensions()

void etsi_its_cam_ts_msgs::access::setVehicleDimensions ( CAM & cam,
const double vehicle_length,
const double vehicle_width )
inline

Set the vehicle dimensions.

Parameters
camCAM to set the vehicle dimensions
vehicle_lengthvehicle length in meter as decimal number
vehicle_widthvehicle width in meter as decimal number

Definition at line 200 of file cam_ts_setters.h.

233 {
234
236
238
246inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
247 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
248}
249
250} // namespace etsi_its_cam_ts_msgs::access

◆ setVehicleLength()

void etsi_its_cam_ts_msgs::access::setVehicleLength ( VehicleLength & vehicle_length,
const double value )
inline

Set the VehicleLength object.

VehicleLengthConfidenceIndication is set to UNAVAILABLE

Parameters
vehicle_lengthobject to set
valueVehicleLengthValue in meter as decimal number

Definition at line 188 of file cam_ts_setters.h.

221 {
222
224
226
234inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
235 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
236}
237
238} // namespace etsi_its_cam_ts_msgs::access

◆ setVehicleLengthValue()

void etsi_its_cam_ts_msgs::access::setVehicleLengthValue ( VehicleLengthValue & vehicle_length,
const double value )
inline

Set the VehicleLengthValue object.

Parameters
vehicle_lengthobject to set
valueVehicleLengthValue in meter as decimal number

Definition at line 174 of file cam_ts_setters.h.

207 {
208
210
212
220inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
221 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
222}
223
224} // namespace etsi_its_cam_ts_msgs::access

◆ setVehicleWidth()

void etsi_its_cam_ts_msgs::access::setVehicleWidth ( VehicleWidth & vehicle_width,
const double value )
inline

Set the VehicleWidth object.

Parameters
vehicle_widthobject to set
valueVehicleWidth in meter as decimal number

Definition at line 162 of file cam_ts_setters.h.

195 {
196
198
200
208inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
209 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
210}
211
212} // namespace etsi_its_cam_ts_msgs::access

◆ throwIfNotPresent()

void etsi_its_cam_ts_msgs::access::throwIfNotPresent ( const bool is_present,
const std::string val_desc )
inline

Throws an exception if the given value is not present.

Parameters
is_presentWhether the value is present.
val_descDescription of the value for the exception message.

Definition at line 58 of file cam_ts_access.h.

◆ throwIfOutOfRange()

template<typename T1, typename T2>
void etsi_its_cam_ts_msgs::access::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.

Template Parameters
T1
T2
Parameters
valThe value to check if it is in the range.
minThe minimum value of the range.
maxThe maximum value of the range.
val_descDescription of the value for the exception message.

Definition at line 47 of file cam_ts_access.h.