etsi_its_messages v3.4.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/checks.h>
#include <GeographicLib/UTMUPS.hpp>
#include <cstring>

Go to the source code of this file.

Functions

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.

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

49 {
50 setStationId(header.station_id, station_id);
51 throwIfOutOfRange(message_id, ItsPduHeader::MESSAGE_ID_MIN, ItsPduHeader::MESSAGE_ID_MAX, "MessageID");
52 header.message_id = message_id;
53 throwIfOutOfRange(protocol_version, ItsPduHeader::PROTOCOL_VERSION_MIN, ItsPduHeader::PROTOCOL_VERSION_MAX,
54 "ProtocolVersion");
55 header.protocol_version = protocol_version;
56}
void setStationId(StationId &station_id, const uint32_t id_value)
Set the Station Id object.
void 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.
Definition checks.h:46