Commit dd0fa58b authored by garciay's avatar garciay
Browse files

STF538: Start Encryption TPs implementation

        Start Certificate generation script
parent d0757f86
......@@ -248,7 +248,25 @@ namespace LibItsSecurity__Functions
return FALSE;
}
OCTETSTRING fx__encryptWithEciesNistp256WithSha256(const OCTETSTRING& p__toBeEncryptedSecuredMessage, const OCTETSTRING& p__peerPublicKeyX, const OCTETSTRING& p__peerPublicKeyY, OCTETSTRING& p__publicEncKeyX, OCTETSTRING& p__publicEncKeyY, OCTETSTRING& p__ephKey, OCTETSTRING& p__tag, OCTETSTRING& p__nonce) {
OCTETSTRING os;
os = OCTETSTRING();
p__nonce = OCTETSTRING();
p__tag = OCTETSTRING();
return os;
}
OCTETSTRING fx__decryptWithEciesNistp256WithSha256(const OCTETSTRING& p__encryptedSecuredMessage, const OCTETSTRING& p__publicKeyX, const OCTETSTRING& p__publicKeyY, const OCTETSTRING& p__nonce, const OCTETSTRING& p__tag) {
OCTETSTRING os;
os = OCTETSTRING();
return os;
}
/**
* @desc Produce a new public/private key pair based on Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm.
* This function should not be used by the ATS
......@@ -365,14 +383,20 @@ namespace LibItsSecurity__Functions
return TRUE;
}
BOOLEAN fx__store__certificate(const CHARSTRING& p__cert__id, const OCTETSTRING& p__cert, const OCTETSTRING& p__private__key, const OCTETSTRING& p__public__key__x, const OCTETSTRING& p__public__key__y, const OCTETSTRING& p__hashid8, const OCTETSTRING& p__issuer) {
BOOLEAN fx__store__certificate(const CHARSTRING& p__cert__id, const OCTETSTRING& p__cert, const OCTETSTRING& p__private__key, const OCTETSTRING& p__public__key__x, const OCTETSTRING& p__public__key__y, const OCTETSTRING& p__hashid8, const OCTETSTRING& p__issuer, const OCTETSTRING_template& p__private__enc__key, const OCTETSTRING_template& p__public__enc__key__x, const OCTETSTRING_template& p__public__enc__key__y) {
loggers::get_instance().log(">>> fx__store__certificate: '%s'", static_cast<const char*>(p__cert__id));
if (security_services::get_instance().store_certificate(p__cert__id, p__cert, p__private__key, p__public__key__x, p__public__key__y, p__hashid8, p__issuer) == -1) {
return FALSE;
int result;
if (!p__private__enc__key.is_omit()) {
const OCTETSTRING private_enc_key = p__private__enc__key.valueof();
const OCTETSTRING public_enc_key_x = p__public__enc__key__x.valueof();
const OCTETSTRING public_enc_key_y = p__public__enc__key__y.valueof();
result = security_services::get_instance().store_certificate(p__cert__id, p__cert, p__private__key, p__public__key__x, p__public__key__y, p__hashid8, p__issuer, private_enc_key, public_enc_key_x, public_enc_key_y);
} else {
result = security_services::get_instance().store_certificate(p__cert__id, p__cert, p__private__key, p__public__key__x, p__public__key__y, p__hashid8, p__issuer, OCTETSTRING(), OCTETSTRING(), OCTETSTRING());
}
return TRUE;
return (result == 0);
}
/**
......
#ifndef ASN1RECODEPER_H
#define ASN1RECODEPER_H
/*!
* \file asn1_recode_per.hh
* \brief Header file ASN.1 PER codec based on asn1c external tool.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#pragma once
#include "Params.hh"
class OCTETSTRING;
class CHARSTRING;
class BITSTRING;
class TTCN_Buffer;
class TTCN_EncDec;
class TTCN_Typedescriptor_t;
class OCTETSTRING; //! Forward declaration of TITAN class
class CHARSTRING; //! Forward declaration of TITAN class
class BITSTRING; //! Forward declaration of TITAN class
class TTCN_Buffer; //! Forward declaration of TITAN class
class TTCN_EncDec; //! Forward declaration of TITAN class
class TTCN_Typedescriptor_t; //! Forward declaration of TITAN class
struct asn_TYPE_descriptor_s;
struct asn_TYPE_descriptor_s; //! Forward declaration of asn1c class
class ASN1RecodePer // FIXME Move into file ASN1RecodePer.hh
class ASN1RecodePer
{
protected:
int ber2per (const asn_TYPE_descriptor_s & td, TTCN_Buffer & buf);
int per2ber (const asn_TYPE_descriptor_s & td, TTCN_Buffer & buf);
int recode (const asn_TYPE_descriptor_s & td, int from, int to, TTCN_Buffer & buf);
};
}; // End of class ASN1RecodePer
#endif
/*!
* \file Layer.hh
* \file layer.hh
* \brief Header file for ITS abstract protocol layer definition.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
......@@ -17,10 +17,10 @@
#include "Params.hh"
class OCTETSTRING; //! Declare TITAN class
class BITSTRING; //! Declare TITAN class
class CHARSTRING; //! Declare TITAN class
class INTEGER; //! Declare TITAN class
class OCTETSTRING; //! Forward declaration of TITAN class
class BITSTRING; //! Forward declaration of TITAN class
class CHARSTRING; //! Forward declaration of TITAN class
class INTEGER; //! Forward declaration of TITAN class
/*!
* \class Layer
......@@ -64,7 +64,7 @@ public:
/*!
* \fn void deleteLayer();
* \brief Delete this layer
* \todo Remove logs
* \todo To be done
*/
void deleteLayer() { };
......@@ -132,7 +132,7 @@ public: //! \publicsection
*/
inline const std::string& to_string() const { return type; };
protected:
protected: //! \protectedsection
inline void toAllLayers(std::vector<Layer*>&layers, OCTETSTRING& data, Params& params) {
for (std::vector<Layer*>::const_iterator it = layers.cbegin(); it != layers.cend(); ++it) {
Layer * p = *it;
......
/*!
* \file LayerFactory.hh
* \file layer_factory.hh
* \brief Header file for ITS abstract protocol layer definition.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
......@@ -27,11 +27,10 @@ public: //! \publicsection
/*!
* \fn Codec();
* \brief Default constructor
* \todo Remove logs
*/
LayerFactory() {};
/*!
* \fn Layer * createLayer(const std::string & type, const std::string & param);
* \fn Layer * create_layer(const std::string & type, const std::string & param);
* \brief Create the layers stack based on the provided layers stack description (cf. remark)
* \param[in] p_type The provided layers stack description
* \param[in] p_params Optional parameters
......@@ -49,14 +48,24 @@ public: //! \publicsection
* destination port: dst_port
* source port : src_port
* device_mode : Set to 1 if the layer shall encapsulate upper layer PDU
* device_mode : Set to 1 if the layer shall encapsulate upper layer PDU
* GN Layer
* its_aid : ITS AID as defined by ETSI TS 102 965 V1.2.1. Default: 141
* ll_address : GeoNetworking address of the Test System
* latitude : latitude of the Test System
* longitude : longitude of the Test System
* beaconing : Set to 1 if GnLayer shall start beaconing
* Beaconning timer expiry: expiry (ms)
* Beaconing timer expiry : expiry (ms)
* device_mode : Set to 1 if the layer shall encapsulate upper layer PDU
* secured_mode : Set to 1 if message exchanges shall be secured
* certificate : Certificate identifier the Test Adapter shall use
* secure_db_path : Path to the certificates and keys storage location
* hash : Hash algorithm to be used when secured mode is set
* Authorized values are SHA-256 or SHA-384
* Default: SHA-256
* signature : Signature algorithm to be used when secured mode is set
* Authorized values are NISTP-256, BP-256 and BP-384
* Default: NISTP-256
* cypher : Cyphering algorithm to be used when secured mode is set
* Ethernet layer
* mac_src :Source MAC address
* mac_bc :Broadcast address
......@@ -89,15 +98,15 @@ public: //! \publicsection
* time_offset : Time offset, used to skip packets with time offset < time_offset
* save_mode : 1 to save sent packet, 0 otherwise
* Here are some examples:
* Geonetworking multiple component case:
* GeoNetworking multiple component case:
* NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=04e548000001,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))"
NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5791b48,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))"
* NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 04e548000001)"
#NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 70b3d5791b48)"
* UpperTester port based on UDP
* ystem.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)"
* system.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)"
* \pure
*/
virtual Layer * createLayer(const std::string & p_type, const std::string & p_params) = 0;
virtual Layer* create_layer(const std::string & p_type, const std::string & p_params) = 0;
}; // End of class LayerFactory
......@@ -17,18 +17,51 @@
* \brief This class provides a factory class to create Layer class instances
*/
class LayerStackBuilder {
private: //! \privatesection
typedef std::map<std::string, LayerFactory*> LayerFactoryMap;
static LayerStackBuilder * _instance;
std::map<std::string, LayerFactory*> _fs;
private:
static LayerStackBuilder * _instance; //! Smart pointer to the unique instance of the logger framework
std::map<std::string, LayerFactory*> _layer_factories; //! The list of the registered \see TLayer factories
/*!
* \brief Default constructor
* Create a new instance of the LayerStackBuilder class
* \private
*/
LayerStackBuilder(); // can not be created manually
public:
static LayerStackBuilder * GetInstance();
static void RegisterLayerFactory(const std::string & type, LayerFactory * f);
public: //! \publicsection
/*!
* \fn LayerStackBuilder* get_instance();
* \brief Accessor for the unique instance of the logger framework
* \static
*/
static LayerStackBuilder* get_instance();
/*!
* \fn void register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory);
* \brief Add a new layer factory
* \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...)
* \param[in] p_layer_factory A reference to the \see LayerFactory
* \static
*/
static void register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory);
private: //! \privatesection
/*!
* \fn void _register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory);
* \brief Add a new layer factory
* \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...)
* \param[in] p_layer_factory A reference to the \see LayerFactory
*/
void _register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory);
public:
void registerLayerFactory(const std::string & type, LayerFactory * f);
Layer* createLayerStack(const char*);
public: //! \publicsection
/*!
* \fn Layer* create_layer_stack(const char* p_layer_stack_description);
* \brief Add a new layer factory
* \param[in] p_layer_stack_description A textual description of the layer to create
* \return The created layer object on success, nullptr otherwise
*/
Layer* create_layer_stack(const char* p_layer_stack_description);
}; // End of class LayerStackBuilder
#ifndef CODECPER_H
#define CODECPER_H
/*!
* \file per_code.hh
* \brief Header file for TITAN message to ASN.1 PER message codec.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#pragma once
#include "Params.hh"
#include "ASN1RecodePer.hh"
class BITSTRING;
class TTCN_Typedescriptor_t;
class BITSTRING; //! Forward declaration of TITAN class
class TTCN_Typedescriptor_t; //! Forward declaration of TITAN class
struct asn_TYPE_descriptor_s;
struct asn_TYPE_descriptor_s; //! Declare asn1c class
/*!
* \class PERCodec
* \brief This class This class provides the interface for all ASN.1 PER codecs.
* \remark This class uses asn1c external tool
*/
template<typename TPDU>
class PERCodec : public ASN1RecodePer
{
public:
virtual int encode(const TPDU& msg, BITSTRING& bits) = 0;
virtual int decode(const BITSTRING& bits, TPDU& msg) = 0;
public: //! \publicsection
/*!
* \fn int encode(const TPDU& p_message, BITSTRING& p_bitstring);
* \brief Encode TITAN message into ASN.1 PER message
* \param[in] p_message The PDU message to encode
* \param[out] p_bitstring The encoded PDU message in bit string format
* \pure
*/
virtual int encode(const TPDU& p_message, BITSTRING& p_bitstring) = 0;
/*!
* \fn int decode(const BITSTRING& p_bitstring, TPDU& p_message);
* \brief Decode ASN.1 PER message into TITAN message
* \param[in] p_bitstring The network message in bit string format to decode
* \param[out] p_message The PDU message
* \pure
*/
virtual int decode(const BITSTRING& p_bitstring, TPDU& p_message) = 0;
protected:
protected: //! \protectedsection
int _decode (const TTCN_Typedescriptor_t& ttcn, const asn_TYPE_descriptor_s & td, const BITSTRING& p_data, TPDU& msg);
int _encode (const TTCN_Typedescriptor_t& ttcn, const asn_TYPE_descriptor_s & td, const TPDU& msg, BITSTRING& p_data);
}; // End of class PERCodec
#include "PERCodec.t.hh"
#endif
......@@ -19,7 +19,7 @@
* \implements std::map
*/
class Params : public std::map<std::string, std::string> {
public:
public: //! \publicsection
// TODO Use static constexpr (see CommsigniaLayer.hh)
static const std::string& mac_src; //! Source MAC address parameter name
static const std::string& mac_dst; //! Destination MAC address parameter name
......@@ -49,7 +49,8 @@ public:
static const std::string& expiry; //! Test system GeoNetworking Lifetime parameter name (in ms)
static const std::string& device_mode; //! To indicate to the lower layer to act as a standalone device
static const std::string& secured_mode; //! To indicate to the lower layer to apply securty on message exchanges as defined in IEEE 1609.2 & ETSI TS 102 965
static const std::string& secured_mode; //! To indicate to the lower layer to apply signature on message exchanges as defined in IEEE 1609.2 & ETSI TS 102 965
static const std::string& encrypted_mode; //! To indicate to the lower layer to apply encryption on message exchanges as defined in IEEE 1609.2 & ETSI TS 102 965
static const std::string& enable_security_checks;//! To indicates if security check failures shall be treated as error or warning
static const std::string& sec_db_path; //! Path to the folder containing certificates
static const std::string& certificate; //! The certificate identifier the Test System shall use. E.g. CERT_TS_A
......
/*!
* \file TLayer.hh
* \file t_layer.hh
* \brief Header file for ITS abstract protocol layer definition.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
......
/*!
* \file converter.hh
* \brief Helper class for types converter.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#pragma once
#include <iostream>
......@@ -15,7 +25,7 @@
/*!
* \class converter
* \brief This class provide a set of metthods for types convertions
* \brief This class provide a set of methods for types conversions
* \remark Singleton pattern
*/
class converter {
......
......@@ -14,13 +14,13 @@
#include <map>
/**
* @class registration
* @brief This class provides a way to register items and its object reference
* The registered items are accessible from any object (singleton patern)
* @remark There is one limitation: each item is uniquely defined in the process
* \class registration
* \brief This class provides a way to register items and its object reference
* The registered items are accessible from any object (singleton pattern)
* \remark There is one limitation: each item is uniquely defined in the process
*/
template <typename TItem>
class registration { // TODO Refine the naming
class registration { // TODO Refine the naming, derive from std::map<std::string, TItem*>
std::map<std::string, TItem*> _items;
static registration<TItem>* _instance;
......@@ -59,4 +59,4 @@ TItem* registration<TItem>::get_item(const std::string & type)
}
return it->second;
}
} // End of class registration
......@@ -5,17 +5,17 @@
#include "loggers.hh"
LayerStackBuilder * LayerStackBuilder::_instance = NULL;
LayerStackBuilder* LayerStackBuilder::_instance = NULL;
// static functions
LayerStackBuilder * LayerStackBuilder::GetInstance()
LayerStackBuilder * LayerStackBuilder::get_instance()
{
return _instance ? _instance : _instance = new LayerStackBuilder();
}
void LayerStackBuilder::RegisterLayerFactory(const std::string & type, LayerFactory * f)
void LayerStackBuilder::register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory)
{
LayerStackBuilder::GetInstance()->registerLayerFactory(type, f);
LayerStackBuilder::get_instance()->_register_layer_factory(p_type, p_layer_factory);
}
// member functions
......@@ -23,42 +23,42 @@ LayerStackBuilder::LayerStackBuilder()
{
}
void LayerStackBuilder::registerLayerFactory(const std::string & type, LayerFactory * f)
void LayerStackBuilder::_register_layer_factory(const std::string & p_type, LayerFactory* p_layer_factory)
{
_fs[type] = f;
_layer_factories[p_type] = p_layer_factory;
}
Layer* LayerStackBuilder::createLayerStack(const char* s)
Layer* LayerStackBuilder::create_layer_stack(const char* p_layer_stack_description)
{
loggers::get_instance().log(">>> LayerStackBuilder::createLayerStack: %s", s);
loggers::get_instance().log(">>> LayerStackBuilder::create_layer_stack: %s", p_layer_stack_description);
Layer * entry = NULL; // Initial layer (the first declared)
Layer * up = NULL; // Upper layer
// Parse str
// Parse the layer description
try {
std::regex rgx ("(\\w+)(\\((.*?)\\))?(\\/|$)");
std::string str = s;
std::string str = p_layer_stack_description;
std::sregex_iterator begin(str.cbegin(), str.cend(), rgx);
std::sregex_iterator end = std::sregex_iterator();
for (std::sregex_iterator it = begin; it != end; ++it) {
std::smatch m = *it;
loggers::get_instance().log("LayerStackBuilder::createLayerStack: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str());
LayerFactoryMap::iterator i = _fs.find(m[1].str());
if (i == _fs.end()) {
loggers::get_instance().error("LayerStackBuilder::createLayerStack: %s: Unknown layer type", m[1].str().c_str());
loggers::get_instance().log("LayerStackBuilder::create_layer_stack: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str());
LayerFactoryMap::iterator i = _layer_factories.find(m[1].str());
if (i == _layer_factories.end()) {
loggers::get_instance().error("LayerStackBuilder::create_layer_stack: %s: Unknown layer type", m[1].str().c_str());
}
loggers::get_instance().log("LayerStackBuilder::createLayerStack: Create layer %s, %s", m[1].str().c_str(), m[3].str().c_str());
Layer * l = i->second->createLayer(m[1].str(), m[3].str());
loggers::get_instance().log("LayerStackBuilder::create_layer_stack: Create layer %s, %s", m[1].str().c_str(), m[3].str().c_str());
Layer * l = i->second->create_layer(m[1].str(), m[3].str());
if (NULL == l) {
loggers::get_instance().error("LayerStackBuilder::createLayerStack: %s: Layer creation error", m[1].str().c_str());
loggers::get_instance().error("LayerStackBuilder::create_layer_stack: %s: Layer creation error", m[1].str().c_str());
}
loggers::get_instance().log("LayerStackBuilder::createLayerStack: Setup layers for %s", l->to_string().c_str());
loggers::get_instance().log("LayerStackBuilder::create_layer_stack: Setup layers for %s", l->to_string().c_str());
l->addUpperLayer(up);
if (entry == NULL) { // Set the first declared layer
entry = l;
entry = l;
}
up = l; // Build the linjed list of layers
up = l; // Build the linked list of layers
} // End of 'for' statement
}
catch(const std::logic_error& e){
......
......@@ -43,6 +43,7 @@ const std::string& Params::expiry = std::string("expiry");
const std::string& Params::device_mode = std::string("device_mode");
const std::string& Params::secured_mode = std::string("secured_mode");
const std::string& Params::encrypted_mode = std::string("encrypted_mode");
const std::string& Params::enable_security_checks = std::string("enable_security_checks");
const std::string& Params::certificate = std::string("certificate");
const std::string& Params::sec_db_path = std::string("sec_db_path");
......
......@@ -55,7 +55,7 @@ namespace LibItsBtp__TestSystem {
// Setup parameters
Params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless
// Create layer
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<BTPLayer *>(_layer) == NULL) {
loggers::get_instance().error("BtpPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -60,7 +60,7 @@ namespace LibItsCam__TestSystem {
// Setup parameters
Params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless
// Create layer
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<CAMLayer *>(_layer) == NULL) {
loggers::get_instance().error("CamPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -52,7 +52,7 @@ namespace LibItsCam__TestSystem {
Params::iterator it = _cfg_params.find(std::string("params"));
if (it != _cfg_params.end()) {
loggers::get_instance().log("UpperTesterPort_Cam::user_map: %s", it->second.c_str());
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<UpperTesterCamLayer *>(_layer) == NULL) {
loggers::get_instance().error("UpperTesterPort_Cam::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -60,7 +60,7 @@ namespace LibItsDenm__TestSystem {
// Setup parameters
Params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless
// Create layer
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<DENMLayer *>(_layer) == NULL) {
loggers::get_instance().error("DenmPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -52,7 +52,7 @@ namespace LibItsDenm__TestSystem {
Params::iterator it = _cfg_params.find(std::string("params"));
if (it != _cfg_params.end()) {
loggers::get_instance().log("UpperTesterPort_Denm::user_map: %s", it->second.c_str());
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<UpperTesterDenmLayer *>(_layer) == NULL) {
loggers::get_instance().error("UpperTesterPort_Denm::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -63,7 +63,7 @@ namespace LibItsGeoNetworking__TestSystem {
// Setup parameters
Params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless
// Create layer
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<GeoNetworkingLayer *>(_layer) == nullptr) {
loggers::get_instance().error("GeoNetworkingPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -53,7 +53,7 @@ namespace LibItsGeoNetworking__TestSystem {
Params::iterator it = _cfg_params.find(std::string("params"));
if (it != _cfg_params.end()) {
loggers::get_instance().log("UpperTesterPort_Gn::user_map: %s", it->second.c_str());
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<UpperTesterGnLayer *>(_layer) == NULL) {
loggers::get_instance().error("UpperTesterPort_Gn::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
......@@ -57,7 +57,7 @@ namespace LibItsIvim__TestSystem {
Params::iterator it = _cfg_params.find(std::string("params"));
if (it != _cfg_params.end()) {
loggers::get_instance().log("IvimPort::user_map: %s", it->second.c_str());
_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
_layer = LayerStackBuilder::get_instance()->create_layer_stack(it->second.c_str());
if (static_cast<IVIMLayer *>(_layer) == NULL) {
loggers::get_instance().error("IvimPort::user_map: Invalid stack configuration: %s", it->second.c_str());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment