ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

commsignia_layer.hh
Go to the documentation of this file.
1
11 #pragma once
12
13 #include "t_layer.hh"
14 #include "Params.hh"
15
16 class OCTETSTRING;
17
22 class commsignia_layer : public layer {
23 static constexpr unsigned char LL_ADDR_LENGTH = 6;
24 static constexpr unsigned char LL_ORG_CODE_LENGTH = 3;
25
29 typedef struct {
30 unsigned char version;
31 unsigned int timestamp_sec;
32 unsigned int timestamp_msec;
33 unsigned char primary_channel;
34 unsigned char secondary_channel;
35 unsigned char used_iface;
36 unsigned char data_rate;
37 unsigned char antenna;
38 unsigned int latitude;
39 unsigned int longitude;
40 unsigned short speed;
41 unsigned short heading;
42 unsigned char rssi_ant1;
43 unsigned char rssi_ant2;
44 unsigned char noise_ant1;
45 unsigned char noise_ant2;
46 unsigned short cbr_ant1;
47 unsigned short cbr_ant2;
48 } __attribute__((__packed__)) c2p_recv;
49
53 typedef struct {
54 unsigned short frame_ctrl;
55 unsigned short duration;
56 unsigned char dst_addr[commsignia_layer::LL_ADDR_LENGTH];
57 unsigned char src_addr[commsignia_layer::LL_ADDR_LENGTH];
58 unsigned char bss_id[commsignia_layer::LL_ADDR_LENGTH];
59 unsigned short fragment_seq_num;
60 } __attribute__((__packed__)) c2p_802_11p_hdr;
61
62 typedef unsigned short c2p_qos_ctrl;
63
67 typedef struct {
68 unsigned char dsap;
69 unsigned char ssap;
70 unsigned char ctrl;
71 unsigned char org_code[commsignia_layer::LL_ORG_CODE_LENGTH];
72 unsigned short type;
73 } __attribute__((__packed__)) c2p_llc_hdr;
74
75 Params _params;
76 c2p_recv _c2p_recv;
77 c2p_802_11p_hdr _802_11p_hdr;
78 c2p_llc_hdr _c2p_llc_hdr;
79 std::vector<unsigned char> _mac_src;
80 std::vector<unsigned char> _eth_type;
81
82 public:
84
90 commsignia_layer(const std::string & p_type, const std::string & param);
95 virtual ~commsignia_layer() {};
96
97 virtual void send_data(OCTETSTRING& data, Params& params);
98 virtual void receive_data(OCTETSTRING& data, Params& info);
99 }; // End of class commsignia_layer
commsignia_layer::__attribute__::type
unsigned short type
Definition: commsignia_layer.hh:72
commsignia_layer::__attribute__::version
unsigned char version
Definition: commsignia_layer.hh:30
commsignia_layer::__attribute__::ctrl
unsigned char ctrl
Definition: commsignia_layer.hh:70
commsignia_layer::_eth_type
std::vector< unsigned char > _eth_type
Used to optimize filtering on source mac address in.
Definition: commsignia_layer.hh:80
commsignia_layer::__attribute__
Definition: commsignia_layer.hh:29
layer
Forward declaration of TITAN class.
Definition: layer.hh:29
commsignia_layer::c2p_qos_ctrl
unsigned short c2p_qos_ctrl
Definition: commsignia_layer.hh:62
commsignia_layer::__attribute__::noise_ant1
unsigned char noise_ant1
Definition: commsignia_layer.hh:44
commsignia_layer::_params
Params _params
Definition: commsignia_layer.hh:75
commsignia_layer::__attribute__::cbr_ant1
unsigned short cbr_ant1
Definition: commsignia_layer.hh:46
commsignia_layer::__attribute__::timestamp_msec
unsigned int timestamp_msec
Definition: commsignia_layer.hh:32
commsignia_layer::__attribute__::fragment_seq_num
unsigned short fragment_seq_num
Definition: commsignia_layer.hh:59
Params.hh
Header file for the parameter dictionary.
commsignia_layer::__attribute__::primary_channel
unsigned char primary_channel
Definition: commsignia_layer.hh:33
commsignia_layer::__attribute__::frame_ctrl
unsigned short frame_ctrl
Definition: commsignia_layer.hh:54
commsignia_layer::receive_data
virtual void receive_data(OCTETSTRING &data, Params &info)
Receive bytes formated data from the lower layers.
Definition: commsignia_layer.cc:42
commsignia_layer::__attribute__::antenna
unsigned char antenna
Definition: commsignia_layer.hh:37
commsignia_layer::commsignia_layer
commsignia_layer(const std::string &p_type, const std::string &param)
Used to optimize filtering on ethernet type in.
Definition: commsignia_layer.cc:11
commsignia_layer::__attribute__::ssap
unsigned char ssap
Definition: commsignia_layer.hh:69
commsignia_layer::__attribute__::noise_ant2
unsigned char noise_ant2
Definition: commsignia_layer.hh:45
commsignia_layer::__attribute__::used_iface
unsigned char used_iface
Definition: commsignia_layer.hh:35
commsignia_layer::__attribute__::rssi_ant2
unsigned char rssi_ant2
Definition: commsignia_layer.hh:43
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
commsignia_layer::~commsignia_layer
virtual ~commsignia_layer()
Default destructor.
Definition: commsignia_layer.hh:95
commsignia_layer::__attribute__::duration
unsigned short duration
Definition: commsignia_layer.hh:55
commsignia_layer::__attribute__::dsap
unsigned char dsap
Definition: commsignia_layer.hh:68
commsignia_layer::_802_11p_hdr
c2p_802_11p_hdr _802_11p_hdr
Definition: commsignia_layer.hh:77
commsignia_layer::__attribute__::latitude
unsigned int latitude
Definition: commsignia_layer.hh:38
commsignia_layer::send_data
virtual void send_data(OCTETSTRING &data, Params &params)
Send bytes formated data to the lower layers.
Definition: commsignia_layer.cc:37
commsignia_layer::__attribute__::rssi_ant1
unsigned char rssi_ant1
Definition: commsignia_layer.hh:42
commsignia_layer::_mac_src
std::vector< unsigned char > _mac_src
Definition: commsignia_layer.hh:79
commsignia_layer::LL_ORG_CODE_LENGTH
static constexpr unsigned char LL_ORG_CODE_LENGTH
Definition: commsignia_layer.hh:24
commsignia_layer
Forward declaration of TITAN class.
Definition: commsignia_layer.hh:22
commsignia_layer::_c2p_llc_hdr
c2p_llc_hdr _c2p_llc_hdr
Definition: commsignia_layer.hh:78
commsignia_layer::LL_ADDR_LENGTH
static constexpr unsigned char LL_ADDR_LENGTH
Definition: commsignia_layer.hh:23
commsignia_layer::__attribute__::secondary_channel
unsigned char secondary_channel
Definition: commsignia_layer.hh:34
commsignia_layer::__attribute__::longitude
unsigned int longitude
Definition: commsignia_layer.hh:39
commsignia_layer::__attribute__::speed
unsigned short speed
Definition: commsignia_layer.hh:40
commsignia_layer::__attribute__::data_rate
unsigned char data_rate
Definition: commsignia_layer.hh:36
commsignia_layer::__attribute__::timestamp_sec
unsigned int timestamp_sec
Definition: commsignia_layer.hh:31
commsignia_layer::__attribute__::cbr_ant2
unsigned short cbr_ant2
Definition: commsignia_layer.hh:47
t_layer.hh
Header file for ITS abstract protocol layer definition.
commsignia_layer::__attribute__::heading
unsigned short heading
Definition: commsignia_layer.hh:41
commsignia_layer::_c2p_recv
c2p_recv _c2p_recv
Layer parameters.
Definition: commsignia_layer.hh:76