Commit b975074a authored by garciay's avatar garciay
Browse files

Layers ongoing

parent 016a834b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -54,7 +54,10 @@ namespace LibItsCam__EncdecDeclarations {
    OCTETSTRING is = bit2oct(b);

    // Calculate the size of the lower layers information
    int s = (LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength + LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength) / 8;
    int s = (
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength
	     ) / 8;
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), cam) == -1) {
      loggers::get_instance().warning("fx__dec__CamInd: -1 result code was returned");
      return -1;
+19 −2
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
  {
    loggers::get_instance().log_msg(">>> fx__enc__GeoNetworkingReq: ", p_geoNetworkingReq);
    
    float duration;
    std::string tag("fx__enc__GeoNetworkingReq");
    loggers::get_instance().set_start_time(tag);
    GeoNetworkingCodec codec;
    OCTETSTRING os;
    if (codec.encode(p_geoNetworkingReq.msgOut(), os) == -1) {
@@ -29,6 +32,7 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
	p_geoNetworkingReq.get_at(i)->encode(*p_geoNetworkingReq.fld_descr(i), encoding_buffer, TTCN_EncDec::CT_RAW);
      }
    } // End of 'for' statement
    loggers::get_instance().set_stop_time(tag, duration);
    
    return oct2bit(OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()));
  }
@@ -47,7 +51,10 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
    OCTETSTRING is = bit2oct(b);

    // Calculate the size of the lower layers information
    int s = (LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength + LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength) / 8;
    int s = (
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength
	     ) / 8;
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), pdu) == -1) {
      loggers::get_instance().warning("fx__dec__GeoNetworkingReq: -1 result code was returned");
      return -1;
@@ -55,6 +62,7 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
    p.msgOut() = pdu;
    TTCN_Buffer decoding_buffer(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    for (int i = 1; i < p.get_count(); i++) {
      loggers::get_instance().log("fx__dec__GeoNetworkingReq: processing %s/%s/%s", p.fld_name(i), p.fld_descr(i)->name, p.get_at(i)->get_descriptor()->name);
      p.get_at(i)->decode(*p.fld_descr(i), decoding_buffer, TTCN_EncDec::CT_RAW);      
    } // End of 'for' statement
    
@@ -99,12 +107,20 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
  {
    loggers::get_instance().log(">>> fx__dec__GeoNetworkingInd");
    
    float duration;
    std::string tag("fx__dec__GeoNetworkingInd");
    loggers::get_instance().set_start_time(tag);
    
    GeoNetworkingCodec codec;
    LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu pdu;
    OCTETSTRING is = bit2oct(b);

    // Calculate the size of the lower layers information
    int s = (LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength + LibItsGeoNetworking__TestSystem::GeoNetworkingInd_ssp_raw_.fieldlength + LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength) / 8;
    int s = (
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_macDestinationAddress_raw_.fieldlength +
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_ssp_raw_.fieldlength +
	     LibItsGeoNetworking__TestSystem::GeoNetworkingInd_its__aid_raw_.fieldlength
	     ) / 8;
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), pdu) == -1) {
      loggers::get_instance().warning("fx__dec__GeoNetworkingInd: -1 result code was returned");
      return -1;
@@ -146,6 +162,7 @@ namespace LibItsGeoNetworking__EncdecDeclarations {
	  p_geoNetworkingInd.get_at(i)->decode(*p_geoNetworkingInd.fld_descr(i), decoding_buffer, TTCN_EncDec::CT_RAW);
      }
    } // End of 'for' statement
    loggers::get_instance().set_stop_time(tag, duration);

    loggers::get_instance().log_msg("<<< fx__dec__GeoNetworkingInd: ", p_geoNetworkingInd);
    return 0;
+1 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ namespace LibItsBtp__TestSystem {
    if (_layer != NULL) {
      delete _layer;
    }

  }

  void BtpPort::set_parameter(const char * parameter_name, const char * parameter_value) {
@@ -50,7 +49,7 @@ namespace LibItsBtp__TestSystem {
  void BtpPort::user_map(const char * system_port) {
    loggers::get_instance().log(">>> BtpPort::user_map: %s", system_port);
    // Build layer stack
    std::map<std::string, std::string>::iterator it = _cfg_params.find(std::string("params"));
    Params::iterator it = _cfg_params.find(std::string("params"));
    if (it != _cfg_params.end()) {
      loggers::get_instance().log("BtpPort::user_map: %s", it->second.c_str());
      _layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ namespace LibItsCam__TestSystem {
  {
    loggers::get_instance().log(">>> CamPort::user_map: %s", system_port);
    // Build layer stack
    std::map<std::string, std::string>::iterator it = _cfg_params.find(std::string("params"));
    Params::iterator it = _cfg_params.find(std::string("params"));
    if (it != _cfg_params.end()) {
      loggers::get_instance().log("CamPort::user_map: %s", it->second.c_str());
      _layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ namespace LibItsGeoNetworking__TestSystem {
  {
    loggers::get_instance().log(">>> GeoNetworkingPort::user_map: %s", system_port);
    // Build layer stack
    std::map<std::string, std::string>::iterator it = _cfg_params.find(std::string("params"));
    Params::iterator it = _cfg_params.find(std::string("params"));
    if (it != _cfg_params.end()) {
      //loggers::get_instance().log("GeoNetworkingPort::user_map: %s", it->second.c_str());
      _layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
Loading