1#ifndef GEONET_ADDRESS_HPP_MB8J1IVQ
2#define GEONET_ADDRESS_HPP_MB8J1IVQ
4#include <vanetza/common/bit_number.hpp>
5#include <vanetza/net/mac_address.hpp>
6#include <vanetza/geonet/serialization.hpp>
7#include <vanetza/geonet/station_type.hpp>
19 static constexpr std::size_t length_bytes = 8;
23 bool is_manually_configured()
const {
return m_manually_configured; }
24 void is_manually_configured(
bool flag) { m_manually_configured = flag; }
25 StationType station_type()
const {
return m_station_type; }
26 void station_type(StationType type) { m_station_type = type; }
27 BitNumber<
unsigned, 10> country_code()
const {
return m_country_code; }
28 void country_code(
BitNumber<
unsigned, 10> country) { m_country_code = country; }
29 const MacAddress& mid()
const {
return m_mid; }
30 void mid(
const MacAddress& mid) { m_mid = mid; }
32 bool operator==(
const Address& other)
const;
33 bool operator!=(
const Address& other)
const;
36 bool m_manually_configured;
37 StationType m_station_type;
52struct hash<vanetza::geonet::
Address>
54 size_t operator()(
const vanetza::geonet::
Address& addr)
const;
ChunckPacket is a packet consisting of several memory chunks.
ByteBufferConvertible & operator[](OsiLayer ol)
ChunkPacket & merge(ChunkPacket &packet, OsiLayer from, OsiLayer to)
const ByteBufferConvertible & layer(OsiLayer ol) const
const ByteBufferConvertible & operator[](OsiLayer ol) const
ByteBufferConvertible & layer(OsiLayer ol)
std::size_t size(OsiLayer from, OsiLayer to) const
ChunkPacket extract(OsiLayer from, OsiLayer to)
std::size_t size(OsiLayer from, OsiLayer to) const
buffer_const_range operator[](OsiLayer layer) const
void set_boundary(OsiLayer, unsigned bytes)
const ByteBuffer & buffer() const
CohesivePacket(const ByteBuffer &buffer, OsiLayer layer)
void trim(OsiLayer from, unsigned bytes)
std::size_t size(OsiLayer single_layer) const
value_type operator[](size_type) const
byte_view_range(ByteBuffer &&)
byte_view_range(const ByteBuffer::const_iterator &, const ByteBuffer::const_iterator &)
ByteBuffer::const_pointer data() const