etsi_its_messages 1.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)
 
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.
 
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::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.
 
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.

114 {
116}
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 316 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.

175 {
176
178
180
188inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
189 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
190}
191
192} // 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.

156 {
157
159
161
169inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
170 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
171}
172
173} // 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 232 of file cam_ts_setters.h.

267 {
268
270
272
280inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
281 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
282}
283
284} // 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 326 of file cam_ts_setters.h.

361 {
362
364
366
374inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
375 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
376}
377
378} // 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 356 of file cam_ts_setters.h.

391 {
392
394
396
404inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
405 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
406}
407
408} // 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 291 of file cam_ts_setters.h.

326 {
327
329
331
339inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
340 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
341}
342
343} // 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 281 of file cam_ts_setters.h.

316 {
317
319
321
329inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
330 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
331}
332
333} // 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 271 of file cam_ts_setters.h.

306 {
307
309
311
319inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
320 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
321}
322
323} // 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.

243 {
244
246
248
256inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
257 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
258}
259
260} // 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 97 of file cam_ts_setters.h.

132 {
133
135
137
145inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
146 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
147}
148
149} // 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 80 of file cam_ts_setters.h.

115 {
116
118
120
128inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
129 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
130}
131
132} // 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 150 of file cam_ts_setters.h.

185 {
186
188
190
198inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
199 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
200}
201
202} // 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 136 of file cam_ts_setters.h.

171 {
172
174
176
184inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
185 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
186}
187
188} // 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 121 of file cam_ts_setters.h.

156 {
157
159
161
169inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
170 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
171}
172
173} // 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 369 of file cam_ts_setters.h.

404 {
405
407
409
417inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
418 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
419}
420
421} // 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 94 of file cam_ts_setters.h.

129 {
130
132
134
142inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
143 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
144}
145
146} // 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 169 of file cam_ts_setters.h.

204 {
205
207
209
217inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
218 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
219}
220
221} // 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 235 of file cam_ts_setters.h.

270 {
271
273
275
283inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
284 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
285}
286
287} // 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 150 of file cam_ts_setters.h.

185 {
186
188
190
198inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
199 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
200}
201
202} // 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.

132 {
133
135
137
145inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
146 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
147}
148
149} // 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 346 of file cam_ts_setters.h.

381 {
382
384
386
394inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
395 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
396}
397
398} // 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.

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

◆ 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 139 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

◆ 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 223 of file cam_ts_setters.h.

258 {
259
261
263
271inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
272 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
273}
274
275} // 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 120 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

◆ 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 254 of file cam_ts_setters.h.

289 {
290
292
294
302inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
303 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
304}
305
306} // 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.

217 {
218
220
222
230inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
231 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
232}
233
234} // 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 336 of file cam_ts_setters.h.

371 {
372
374
376
384inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
385 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
386}
387
388} // 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 213 of file cam_ts_setters.h.

248 {
249
251
253
261inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
262 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
263}
264
265} // 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.

200 {
201
203
205
213inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
214 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
215}
216
217} // 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.

186 {
187
189
191
199inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
200 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
201}
202
203} // 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 81 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

◆ 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 109 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

◆ 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 109 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

◆ 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.

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

◆ 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 199 of file cam_ts_setters.h.

234 {
235
237
239
247inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
248 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
249}
250
251} // 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 187 of file cam_ts_setters.h.

222 {
223
225
227
235inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
236 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
237}
238
239} // 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 173 of file cam_ts_setters.h.

208 {
209
211
213
221inline void setItsPduHeader(CAM& cam, const uint32_t station_id, const uint8_t protocol_version = 0) {
222 setItsPduHeader(cam.header, MessageId::CAM, station_id, protocol_version);
223}
224
225} // 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 161 of file cam_ts_setters.h.

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

◆ 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 )

Definition at line 37 of file cam_ts_access.h.