etsi_its_messages 1.0.0
Loading...
Searching...
No Matches
cdd_v1-3-1_setters.h File Reference

Setter functions for the ETSI ITS Common Data Dictionary (CDD) v1.3.1. More...

#include <etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h>
#include <etsi_its_msgs_utils/impl/cdd/cdd_checks.h>
#include <GeographicLib/UTMUPS.hpp>
#include <cstring>

Go to the source code of this file.

Functions

void setStationId (StationID &station_id, const uint32_t id_value)
 Set the Station Id object.
 
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.
 
void setStationType (StationType &station_type, const uint8_t value)
 Set the Station Type.
 

Detailed Description

Setter functions for the ETSI ITS Common Data Dictionary (CDD) v1.3.1.

Definition in file cdd_v1-3-1_setters.h.

Function Documentation

◆ setItsPduHeader()

void 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 59 of file cdd_v1-3-1_setters.h.

60 {
61 setStationId(header.station_id, station_id);
62 throwIfOutOfRange(message_id, ItsPduHeader::MESSAGE_ID_MIN, ItsPduHeader::MESSAGE_ID_MAX, "MessageID");
63 header.message_id = message_id;
64 throwIfOutOfRange(protocol_version, ItsPduHeader::PROTOCOL_VERSION_MIN, ItsPduHeader::PROTOCOL_VERSION_MAX,
65 "ProtocolVersion");
66 header.protocol_version = protocol_version;
67}
void setStationId(StationID &station_id, const uint32_t id_value)
Set the Station Id object.

◆ setStationId()

void setStationId ( StationID & station_id,
const uint32_t id_value )
inline

Set the Station Id object.

Parameters
station_id
id_value

Definition at line 46 of file cdd_v1-3-1_setters.h.

46 {
47 throwIfOutOfRange(id_value, StationID::MIN, StationID::MAX, "StationID");
48 station_id.value = id_value;
49}

◆ setStationType()

void setStationType ( StationType & station_type,
const uint8_t value )
inline

Set the Station Type.

Parameters
station_type
value

Definition at line 75 of file cdd_v1-3-1_setters.h.

75 {
76 throwIfOutOfRange(value, StationType::MIN, StationType::MAX, "StationType");
77 station_type.value = value;
78}