etsi_its_messages
v3.5.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cdd_v1-3-1_setters.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
3
8
9
#ifndef ETSI_ITS_MSGS_UTILS_IMPL_CDD_CDD_V1_3_1_SETTERS_H
10
#define ETSI_ITS_MSGS_UTILS_IMPL_CDD_CDD_V1_3_1_SETTERS_H
11
12
#include <
etsi_its_msgs_utils/impl/cdd/cdd_setters_common.h
>
13
#include <
etsi_its_msgs_utils/impl/checks.h
>
14
#include <GeographicLib/UTMUPS.hpp>
15
#include <cstring>
16
25
inline
void
setItsPduHeader
(ItsPduHeader& header,
const
uint8_t message_id,
const
uint32_t station_id,
26
const
uint8_t protocol_version = 0) {
27
setStationId
(header.station_id, station_id);
28
throwIfOutOfRange
(message_id, ItsPduHeader::MESSAGE_ID_MIN, ItsPduHeader::MESSAGE_ID_MAX,
"MessageID"
);
29
header.message_id = message_id;
30
throwIfOutOfRange
(protocol_version, ItsPduHeader::PROTOCOL_VERSION_MIN, ItsPduHeader::PROTOCOL_VERSION_MAX,
31
"ProtocolVersion"
);
32
header.protocol_version = protocol_version;
33
}
34
35
#endif
// ETSI_ITS_MSGS_UTILS_IMPL_CDD_CDD_V1_3_1_SETTERS_H
cdd_setters_common.h
Common setter functions for the ETSI ITS Common Data Dictionary (CDD) v1.3.1, v2.1....
setStationId
void setStationId(StationId &station_id, const uint32_t id_value)
Set the Station Id object.
Definition
cdd_setters_common.h:28
setItsPduHeader
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.
Definition
cdd_v1-3-1_setters.h:25
checks.h
Sanity-check functions etc.
throwIfOutOfRange
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:23
etsi_its_msgs_utils
include
etsi_its_msgs_utils
impl
cdd
cdd_v1-3-1_setters.h
Generated by
1.17.0