Vanetza
Loading...
Searching...
No Matches
header.hpp
1
#
ifndef
HEADER_HPP_FNKGEM7C
2
#
define
HEADER_HPP_FNKGEM7C
3
4
#
include
<
vanetza
/
common
/
byte_order
.
hpp
>
5
#
include
<
vanetza
/
common
/
serialization
.
hpp
>
6
#
include
<
vanetza
/
net
/
packet_variant
.
hpp
>
7
#
include
<
cstdint
>
8
9
namespace
vanetza
10
{
11
namespace
btp
12
{
13
14
typedef
uint16be_t port_type;
15
16
// interactive packet transport
17
struct
HeaderA
18
{
19
static
constexpr
std::size_t length_bytes = 4;
20
21
port_type destination_port;
22
port_type source_port;
23
};
24
25
static_assert
(
sizeof
(
HeaderA
) ==
HeaderA
::length_bytes,
"Wrong size"
);
26
27
void
serialize(
OutputArchive
&,
const
HeaderA
&);
28
void
deserialize(
InputArchive
&,
HeaderA
&);
29
HeaderA
parse_btp_a(
ChunkPacket
&);
30
HeaderA
parse_btp_a(
CohesivePacket
&);
31
HeaderA
parse_btp_a(PacketVariant&);
32
33
// non-interactive packet transport
34
struct
HeaderB
35
{
36
static
constexpr
std::size_t length_bytes = 4;
37
38
port_type destination_port;
39
uint16be_t destination_port_info;
40
};
41
42
static_assert
(
sizeof
(
HeaderB
) ==
HeaderB
::length_bytes,
"Wrong size"
);
43
44
void
serialize(
OutputArchive
&,
const
HeaderB
&);
45
void
deserialize(
InputArchive
&,
HeaderB
&);
46
HeaderB
parse_btp_b(
ChunkPacket
&);
47
HeaderB
parse_btp_b(
CohesivePacket
&);
48
HeaderB
parse_btp_b(PacketVariant&);
49
50
}
// namepsace btp
51
}
// namespace vanetza
52
53
#
endif
/* HEADER_HPP_FNKGEM7C */
vanetza::ChunkPacket
ChunckPacket is a packet consisting of several memory chunks.
Definition
chunk_packet.hpp:19
vanetza::CohesivePacket
Definition
cohesive_packet.hpp:16
vanetza::InputArchive
Definition
archives.hpp:17
vanetza::OutputArchive
Definition
archives.hpp:62
vanetza::geonet::Lifetime
Definition
lifetime.hpp:16
vanetza::geonet::ShortPositionVector
Definition
position_vector.hpp:61
vanetza::geonet::TrafficClass
Definition
traffic_class.hpp:16
vanetza::btp::DataIndication
Definition
data_indication.hpp:20
vanetza::btp::HeaderA
Definition
header.hpp:18
vanetza::btp::HeaderB
Definition
header.hpp:35
vanetza::geonet::DataIndication
GN-DATA.indication.
Definition
data_indication.hpp:22
vanetza
btp
header.hpp
Generated on
for Vanetza by
1.16.1