ETSI STF525 / Internal Testing test suite
This project provides an internal testing test suite and its associated Test Adapter/Codec
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
layer Class Reference

Forward declaration of TITAN class. More...

#include <layer.hh>

Inheritance diagram for layer:
commsignia_layer ethernet_layer http_layer pcap_layer raw_socket_layer t_layer< TPort > t_layer< LibItsBtp__TestSystem::BtpPort > t_layer< LibItsCam__TestSystem::CamPort > t_layer< LibItsCam__TestSystem::UpperTesterPort > t_layer< LibItsDenm__TestSystem::DenmPort > t_layer< LibItsDenm__TestSystem::UpperTesterPort > t_layer< LibItsGeoNetworking__TestSystem::GeoNetworkingPort > t_layer< LibItsGeoNetworking__TestSystem::UpperTesterPort > t_layer< LibItsIvim__TestSystem::IvimPort > t_layer< LibItsIvim__TestSystem::UpperTesterPort > t_layer< LibItsMapemSpatem__TestSystem::MapemSpatemPort > t_layer< LibItsMapemSpatem__TestSystem::UpperTesterPort > t_layer< LibItsSremSsem__TestSystem::SremSsemPort > t_layer< LibItsSremSsem__TestSystem::UpperTesterPort > tcp_layer udp_layer

Public Member Functions

 layer ()
 Type description, it indicates the protocol type (e.g. CAM, DENM, GN, ETH, PCAP...) More...
 
 layer (const std::string &p_type)
 Specialized constructor Create a new instance of the layer class with its type description. More...
 
virtual ~layer ()
 Default destructor. More...
 
void delete_layer ()
 Delete this layer. More...
 
void add_upper_layer (layer *p_layer)
 Add a new layer in the list of the upper layer. More...
 
void remove_upper_layer (layer *p_layer)
 Remove the specified upper layer protocol from the list of the upper layer. More...
 
virtual void send_data (OCTETSTRING &p_data, Params &p_params)
 Send bytes formated data to the lower layers. More...
 
virtual void receive_data (OCTETSTRING &p_data, Params &p_params)
 Receive bytes formated data from the lower layers. More...
 
const std::string & to_string () const
 Remove the specified upper layer protocol from the list of the upper layer. More...
 

Protected Member Functions

void to_all_layers (std::vector< layer *> &layers, OCTETSTRING &data, Params &params)
 
void receive_to_all_layers (OCTETSTRING &data, Params &params)
 
void send_to_all_layers (OCTETSTRING &data, Params &params)
 

Protected Attributes

std::string type
 List of the lower protocol layers. More...
 

Private Attributes

std::vector< layer * > upperLayers
 
std::vector< layer * > lowerLayers
 List of the upper protocol layers. More...
 

Detailed Description

Forward declaration of TITAN class.

This class provides basic description of an ITS protocol layer

Constructor & Destructor Documentation

◆ layer() [1/2]

layer::layer ( )
inlineexplicit

Type description, it indicates the protocol type (e.g. CAM, DENM, GN, ETH, PCAP...)

Default constructor Create a new instance of the layer class

◆ layer() [2/2]

layer::layer ( const std::string &  p_type)
inlineexplicit

Specialized constructor Create a new instance of the layer class with its type description.

Parameters
[in]p_typeThe port type name (e.g. GN for the GeoNetworking layer)
Remarks
This constructor is called by the layer factory
See also
layer_factory

◆ ~layer()

virtual layer::~layer ( )
inlinevirtual

Default destructor.

Todo:
Remove logs

Member Function Documentation

◆ add_upper_layer()

void layer::add_upper_layer ( layer p_layer)
inline

Add a new layer in the list of the upper layer.

Parameters
[in]p_layerThe layer protocol to be removed

◆ delete_layer()

void layer::delete_layer ( )
inline

Delete this layer.

Todo:
To be implemented

◆ receive_data()

void layer::receive_data ( OCTETSTRING &  data,
Params params 
)
inlinevirtual

Receive bytes formated data from the lower layers.

Parameters
[in]p_dataThe bytes formated data received
[in]p_paramsSome lower layers parameters values when data was received
Todo:
Remove the logs

Reimplemented in geonetworking_layer, commsignia_layer, udp_layer, raw_socket_layer, cam_layer, denm_layer, http_layer, btp_layer, pcap_layer, tcp_layer, ethernet_layer, UpperTesterDenmLayer, MapemSpatemLayer, SremSsemLayer, IVIMLayer, UpperTesterCamLayer, UpperTesterGnLayer, UpperTesterIvimLayer, UpperTesterSremSsemLayer, and UpperTesterMapemSpatemLayer.

◆ receive_to_all_layers()

void layer::receive_to_all_layers ( OCTETSTRING &  data,
Params params 
)
inlineprotected

◆ remove_upper_layer()

void layer::remove_upper_layer ( layer p_layer)
inline

Remove the specified upper layer protocol from the list of the upper layer.

Parameters
[in]p_layerThe layer protocol to be removed
Todo:
To be implemented

◆ send_data()

void layer::send_data ( OCTETSTRING &  data,
Params params 
)
inlinevirtual

Send bytes formated data to the lower layers.

Parameters
[in]p_dataThe data to be sent
[in]p_paramsSome parameters to overwrite default value of the lower layers parameters
Todo:
Remove the logs

Reimplemented in geonetworking_layer, commsignia_layer, udp_layer, raw_socket_layer, cam_layer, denm_layer, http_layer, btp_layer, pcap_layer, tcp_layer, ethernet_layer, UpperTesterDenmLayer, MapemSpatemLayer, SremSsemLayer, IVIMLayer, UpperTesterCamLayer, UpperTesterGnLayer, UpperTesterIvimLayer, UpperTesterSremSsemLayer, and UpperTesterMapemSpatemLayer.

◆ send_to_all_layers()

void layer::send_to_all_layers ( OCTETSTRING &  data,
Params params 
)
inlineprotected

◆ to_all_layers()

void layer::to_all_layers ( std::vector< layer *> &  layers,
OCTETSTRING &  data,
Params params 
)
inlineprotected

◆ to_string()

const std::string & layer::to_string ( ) const
inline

Remove the specified upper layer protocol from the list of the upper layer.

Parameters
[in]Thelayer protocol to be removed

Member Data Documentation

◆ lowerLayers

std::vector<layer*> layer::lowerLayers
private

List of the upper protocol layers.

◆ type

std::string layer::type
protected

List of the lower protocol layers.

◆ upperLayers

std::vector<layer*> layer::upperLayers
private

The documentation for this class was generated from the following file: