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 tcp_layer TLayer< TPort > TLayer< LibItsBtp__TestSystem::BtpPort > TLayer< LibItsCam__TestSystem::CamPort > TLayer< LibItsCam__TestSystem::UpperTesterPort > TLayer< LibItsDenm__TestSystem::DenmPort > TLayer< LibItsDenm__TestSystem::UpperTesterPort > TLayer< LibItsGeoNetworking__TestSystem::GeoNetworkingPort > TLayer< LibItsGeoNetworking__TestSystem::UpperTesterPort > TLayer< LibItsIvim__TestSystem::IvimPort > TLayer< LibItsIvim__TestSystem::UpperTesterPort > TLayer< LibItsMapemSpatem__TestSystem::MapemSpatemPort > TLayer< LibItsMapemSpatem__TestSystem::UpperTesterPort > TLayer< LibItsSremSsem__TestSystem::SremSsemPort > TLayer< LibItsSremSsem__TestSystem::UpperTesterPort > 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 deleteLayer ()
 Delete this layer. More...
 
void addUpperLayer (Layer *p_layer)
 Add a new layer in the list of the upper layer. More...
 
void removeUpperLayer (Layer *p_layer)
 Remove the specified upper layer protocol from the list of the upper layer. More...
 
virtual void sendData (OCTETSTRING &p_data, Params &p_params)
 Send bytes formated data to the lower layers. More...
 
virtual void receiveData (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 toAllLayers (std::vector< Layer *> &layers, OCTETSTRING &data, Params &params)
 
void receiveToAllLayers (OCTETSTRING &data, Params &params)
 
void sendToAllLayers (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

Todo:
Remove logs

◆ 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.

Remarks
This constructor is called by the Layer factory
See also
layer_factory
Todo:
Remove logs

◆ ~Layer()

virtual Layer::~Layer ( )
inlinevirtual

Default destructor.

Todo:
Remove logs

Member Function Documentation

◆ addUpperLayer()

void Layer::addUpperLayer ( Layer p_layer)
inline

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

Parameters
[in]p_layerThe layer protocol to be removed
Todo:
Remove logs

◆ deleteLayer()

void Layer::deleteLayer ( )
inline

Delete this layer.

Todo:
To be done

◆ receiveData()

void Layer::receiveData ( 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.

◆ receiveToAllLayers()

void Layer::receiveToAllLayers ( OCTETSTRING &  data,
Params params 
)
inlineprotected

◆ removeUpperLayer()

void Layer::removeUpperLayer ( 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

◆ sendData()

void Layer::sendData ( 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.

◆ sendToAllLayers()

void Layer::sendToAllLayers ( 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

◆ toAllLayers()

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

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: