27 class GeoNetworkingPort;
28 class GeoNetworkingReq;
29 class GeoNetworkingInd;
33 class GeoNetworkingPdu;
47 LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu*
_beacon;
48 LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu*
_gbc_packet;
49 LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu*
_shb_packet;
50 LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu*
_tsb_packet;
51 LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu*
_ls_reply;
61 struct itimerspec _its;
76 void fill_beacon(
const OCTETSTRING& p_ll_address,
const INTEGER p_station_type = 5,
const INTEGER p_country = 0,
const INTEGER type_of_address = 1);
84 void fill_gbc_packet(
const OCTETSTRING& p_ll_address,
const INTEGER& p_geoAreaPosLatitude,
const INTEGER& p_geoAreaPosLongitude,
const INTEGER& p_distanceA,
const INTEGER& p_distanceB,
const INTEGER& p_angle);
92 void fill_shb_packet(
const OCTETSTRING& p_ll_address);
102 void fill_tsb_packet(
const OCTETSTRING& p_ll_address,
const int p_hop_number = 3,
const int p_max_hop_limit = 5);
110 void fill_ls_reply(
const OCTETSTRING& p_ll_address);
112 static void timer_irq_sigalrm_handler(
int p_signal, siginfo_t *p_signal_info,
void *p_uc);
114 const int _signal_id = SIGTERM;
117 explicit geonetworking_layer() :
t_layer<
LibItsGeoNetworking__TestSystem::GeoNetworkingPort>(), _params(), _codec(), _beacon(NULL), _gbc_packet(NULL), _shb_packet(nullptr), _ls_reply(nullptr), _location_table(), _pass_beacon_table(), _device_mode{
false}, _sendData(), _timerid{0}, _sev{0}, _its{0}, _freq_nanosecs(0), _mask{0}, _sa{0}, _sequence_number{0} { };
127 void sendMsg(
const LibItsGeoNetworking__TestSystem::GeoNetworkingReq& p_gn_req,
Params& p_param);
136 virtual void send_data(OCTETSTRING& data,
Params& params);
144 virtual void receive_data(OCTETSTRING& data,
Params& info);
153 virtual OCTETSTRING trigger_ac_event(OCTETSTRING& data,
Params& params);
155 const LibItsGeoNetworking__TypesAndValues::LongPosVector* get_lpv(
const LibItsGeoNetworking__TypesAndValues::GN__Address& p_gn_address);
156 void start_beaconing();
157 void start_beaconing(
const LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu& p_beacon);
158 void stop_beaconing();
159 void start_pass_beaconing(
const LibItsGeoNetworking__TypesAndValues::BeaconHeader& p_beacon);
160 void stop_pass_beaconing();
162 int enable_secured_mode(
const std::string& p_certificate_id,
const boolean p_enforce_security =
false);
163 int disable_secured_mode();
167 int build_geonetworking_pdu(OCTETSTRING& data,
Params& params);
168 int build_secured_pdu(OCTETSTRING& data,
Params& params);
169 int decode_basic_header(
const OCTETSTRING& p_data, LibItsGeoNetworking__TypesAndValues::BasicHeader& p_basic_header);
170 int setup_secured_mode();
timer_t _timerid
Definition: geonetworking_layer.hh:59
This class provides basic description of an ITS port protocol layer. A port protocol layer is the fin...
Definition: t_layer.hh:21
bool _enable_security_checks
Definition: geonetworking_layer.hh:57
LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu * _beacon
Definition: geonetworking_layer.hh:47
Definition: geonetworking_layer.hh:32
This class provides description of GeoNetworking table.
Definition: location_table.hh:28
bool _encrypted_mode
Definition: geonetworking_layer.hh:56
LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu * _gbc_packet
Definition: geonetworking_layer.hh:48
GeoNetworkingCodec _codec
Definition: geonetworking_layer.hh:46
bool _secured_mode
Definition: geonetworking_layer.hh:55
unsigned int _sequence_number
Definition: geonetworking_layer.hh:65
location_table _location_table
Definition: geonetworking_layer.hh:52
sigset_t _mask
Definition: geonetworking_layer.hh:63
long long _freq_nanosecs
Definition: geonetworking_layer.hh:62
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
std::mutex _sendData
Definition: geonetworking_layer.hh:58
bool _device_mode
Definition: geonetworking_layer.hh:54
This class provides description of ITS GeoNetworking protocol layer.
Definition: geonetworking_layer.hh:44
Forward declaration of TITAN class.
Definition: GeoNetworkingPort.cc:14
Definition: GeoNetworkingCodec.hh:46
Header file for GeoNetworking location table definition.
LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu * _ls_reply
Definition: geonetworking_layer.hh:51
geonetworking_layer()
Definition: geonetworking_layer.hh:117
int _longitude
Definition: geonetworking_layer.hh:67
int _latitude
Definition: geonetworking_layer.hh:66
LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu * _tsb_packet
Definition: geonetworking_layer.hh:50
LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu * _shb_packet
Definition: geonetworking_layer.hh:49
Params _params
Definition: geonetworking_layer.hh:45
location_table _pass_beacon_table
Definition: geonetworking_layer.hh:53
Header file for ITS abstract protocol layer definition.