32#ifndef ETSI_ITS_MSGS_UTILS_IMPL_CDD_CDD_V1_3_1_SETTERS_H
33#define ETSI_ITS_MSGS_UTILS_IMPL_CDD_CDD_V1_3_1_SETTERS_H
37#include <GeographicLib/UTMUPS.hpp>
46inline void setStationId(StationID& station_id,
const uint32_t id_value) {
48 station_id.value = id_value;
59inline void setItsPduHeader(ItsPduHeader& header,
const uint8_t message_id,
const uint32_t station_id,
60 const uint8_t protocol_version = 0) {
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,
66 header.protocol_version = protocol_version;
77 station_type.value = value;
Common setter functions for the ETSI ITS Common Data Dictionary (CDD) v1.3.1 and v2....
void setStationId(StationID &station_id, const uint32_t id_value)
Set the Station Id object.
void setStationType(StationType &station_type, const uint8_t value)
Set the Station Type.
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.
Sanity-check functions etc.
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.