commsignia_layer.hh
Go to the documentation of this file.
#pragma once
#include "t_layer.hh"
#include "Params.hh"
class OCTETSTRING;
class commsignia_layer : public layer {
static constexpr unsigned char LL_ADDR_LENGTH = 6;
static constexpr unsigned char LL_ORG_CODE_LENGTH = 3;
typedef struct {
unsigned char version;
unsigned int timestamp_sec;
unsigned int timestamp_msec;
unsigned char primary_channel;
unsigned char secondary_channel;
unsigned char used_iface;
unsigned char data_rate;
unsigned char antenna;
unsigned int latitude;
unsigned int longitude;
unsigned short speed;
unsigned short heading;
unsigned char rssi_ant1;
unsigned char rssi_ant2;
unsigned char noise_ant1;
unsigned char noise_ant2;
unsigned short cbr_ant1;
unsigned short cbr_ant2;
} __attribute__((__packed__)) c2p_recv;
typedef struct {
unsigned short frame_ctrl;
unsigned short duration;
unsigned char dst_addr[commsignia_layer::LL_ADDR_LENGTH];
unsigned char src_addr[commsignia_layer::LL_ADDR_LENGTH];
unsigned char bss_id[commsignia_layer::LL_ADDR_LENGTH];
unsigned short fragment_seq_num;
} __attribute__((__packed__)) c2p_802_11p_hdr;
typedef unsigned short c2p_qos_ctrl;
typedef struct {
unsigned char dsap;
unsigned char ssap;
unsigned char ctrl;
unsigned char org_code[commsignia_layer::LL_ORG_CODE_LENGTH];
unsigned short type;
} __attribute__((__packed__)) c2p_llc_hdr;
Params _params;
c2p_recv _c2p_recv;
c2p_802_11p_hdr _802_11p_hdr;
c2p_llc_hdr _c2p_llc_hdr;
std::vector<unsigned char> _mac_src;
std::vector<unsigned char> _eth_type;
public:
commsignia_layer(const std::string & p_type, const std::string & param);
virtual ~commsignia_layer() {};
virtual void send_data(OCTETSTRING& data, Params& params);
virtual void receive_data(OCTETSTRING& data, Params& info);
}; // 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