Vanetza
 
Loading...
Searching...
No Matches
dcc_field.hpp
1#ifndef DCC_FIELD_HPP_EPTBYHAU
2#define DCC_FIELD_HPP_EPTBYHAU
3
4#include <vanetza/geonet/dcc_mco_field.hpp>
5#include <vanetza/geonet/serialization.hpp>
6#include <boost/optional/optional.hpp>
7#include <boost/variant/variant.hpp>
8#include <cstdint>
9
10namespace vanetza
11{
12namespace geonet
13{
14
15/**
16 * DccField represents the supported variants for the DCC field in SHB headers.
17 *
18 * \note Enclosed types are using "host byte order".
19 * Byte order conversion is handled by serialize and deserialize functions.
20 */
21using DccField = boost::variant<DccMcoField, uint32_t>;
22
23boost::optional<DccMcoField> get_dcc_mco(const DccField&);
24
25void serialize(const DccField&, OutputArchive&);
26void deserialize(DccField&, InputArchive&);
27
28} // namespace geonet
29} // namespace vanetza
30
31#endif /* DCC_FIELD_HPP_EPTBYHAU */
32