Commit a5225a0d authored by Yann Garcia's avatar Yann Garcia
Browse files

Upgrade Test System for TLC

parent eeafb8de
Loading
Loading
Loading
Loading
+88 −40
Original line number Original line Diff line number Diff line
@@ -49,6 +49,30 @@ namespace LibItsSremSsem__EncdecDeclarations {
    return 0;
    return 0;
  }
  }


  /****************************************************
   * @desc    External function to encode a SremInd type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  BITSTRING fx__enc__SremInd(const LibItsSremSsem__TestSystem::SremInd& p_sremInd)
  {
    loggers::get_instance().log_msg(">>> fx__enc__SremInd: ", p_sremInd);
    
    SremCodec codec;
    OCTETSTRING os;
    if (codec.encode(p_sremInd.msgIn(), os) == -1) {
      loggers::get_instance().warning("fx__enc__SremInd: -1 result code was returned");
      return int2bit(0, 1);
    }
    
    return oct2bit(os);
  }

  /****************************************************
   * @desc    External function to decode a SremInd type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__SremInd(BITSTRING& b, LibItsSremSsem__TestSystem::SremInd& p_sremInd)
  INTEGER fx__dec__SremInd(BITSTRING& b, LibItsSremSsem__TestSystem::SremInd& p_sremInd)
  {
  {
    loggers::get_instance().log(">>> fx__dec__SremInd");
    loggers::get_instance().log(">>> fx__dec__SremInd");
@@ -96,8 +120,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnHeaderType_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnHeaderType_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.gnHeaderType() = oct2int(os);
      p_sremInd.gnHeaderType() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: gnHeaderType=", p_sremInd.gnHeaderType());
    loggers::get_instance().log_msg("fx__dec__SremInd: gnHeaderType=", p_sremInd.gnHeaderType());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // gnHeaderSubtype
    // gnHeaderSubtype
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnHeaderSubtype_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnHeaderSubtype_raw_.fieldlength / 8)) {
      p_sremInd.gnHeaderSubtype().set_to_omit();
      p_sremInd.gnHeaderSubtype().set_to_omit();
@@ -106,8 +130,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnHeaderSubtype_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnHeaderSubtype_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.gnHeaderSubtype() = oct2int(os);
      p_sremInd.gnHeaderSubtype() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: gnHeaderSubtype=", p_sremInd.gnHeaderSubtype());
    loggers::get_instance().log_msg("fx__dec__SremInd: gnHeaderSubtype=", p_sremInd.gnHeaderSubtype());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // gnLifetime
    // gnLifetime
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnLifetime_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnLifetime_raw_.fieldlength / 8)) {
      p_sremInd.gnLifetime().set_to_omit();
      p_sremInd.gnLifetime().set_to_omit();
@@ -116,8 +140,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SremInd_gnLifetime_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SremInd_gnLifetime_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.gnLifetime() = i;
      p_sremInd.gnLifetime() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: gnLifetime=", p_sremInd.gnLifetime());
    loggers::get_instance().log_msg("fx__dec__SremInd: gnLifetime=", p_sremInd.gnLifetime());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // gnTrafficClass
    // gnTrafficClass
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnTrafficClass_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_gnTrafficClass_raw_.fieldlength / 8)) {
      p_sremInd.gnTrafficClass().set_to_omit();
      p_sremInd.gnTrafficClass().set_to_omit();
@@ -126,8 +150,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnTrafficClass_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SremInd_gnTrafficClass_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.gnTrafficClass() = oct2int(os);
      p_sremInd.gnTrafficClass() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: gnTrafficClass=", p_sremInd.gnTrafficClass());
    loggers::get_instance().log_msg("fx__dec__SremInd: gnTrafficClass=", p_sremInd.gnTrafficClass());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // btpDestinationPort
    // btpDestinationPort
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_btpDestinationPort_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_btpDestinationPort_raw_.fieldlength / 8)) {
      p_sremInd.btpDestinationPort().set_to_omit();
      p_sremInd.btpDestinationPort().set_to_omit();
@@ -136,8 +160,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SremInd_btpDestinationPort_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SremInd_btpDestinationPort_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.btpDestinationPort() = i;
      p_sremInd.btpDestinationPort() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: btpDestinationPort=", p_sremInd.btpDestinationPort());
    loggers::get_instance().log_msg("fx__dec__SremInd: btpDestinationPort=", p_sremInd.btpDestinationPort());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // btpInfo
    // btpInfo
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_btpInfo_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_btpInfo_raw_.fieldlength / 8)) {
      p_sremInd.btpInfo().set_to_omit();
      p_sremInd.btpInfo().set_to_omit();
@@ -146,8 +170,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SremInd_btpInfo_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SremInd_btpInfo_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.btpInfo() = i;
      p_sremInd.btpInfo() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: btpInfo=", p_sremInd.btpInfo());
    loggers::get_instance().log_msg("fx__dec__SremInd: btpInfo=", p_sremInd.btpInfo());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // ssp
    // ssp
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_ssp_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_ssp_raw_.fieldlength / 8)) {
      p_sremInd.ssp().set_to_omit();
      p_sremInd.ssp().set_to_omit();
@@ -156,8 +180,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      bs.decode(LibItsSremSsem__TestSystem::SremInd_ssp_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      bs.decode(LibItsSremSsem__TestSystem::SremInd_ssp_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.ssp() = bs;
      p_sremInd.ssp() = bs;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: ssp=", p_sremInd.ssp());
    loggers::get_instance().log_msg("fx__dec__SremInd: ssp=", p_sremInd.ssp());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    // its__aid
    // its__aid
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_its__aid_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SremInd_its__aid_raw_.fieldlength / 8)) {
      p_sremInd.its__aid().set_to_omit();
      p_sremInd.its__aid().set_to_omit();
@@ -166,15 +190,15 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SremInd_its__aid_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SremInd_its__aid_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_sremInd.its__aid() = i;
      p_sremInd.its__aid() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Srem: its_aid=", p_sremInd.its__aid());
    loggers::get_instance().log_msg("fx__dec__SremInd: its_aid=", p_sremInd.its__aid());
    loggers::get_instance().log_to_hexa("fx__dec__Srem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SremInd: ", decoding_buffer);
    
    
    return 0;
    return 0;
  }
  }


  BITSTRING fx__enc__Srem(const SREM__PDU__Descriptions::SREM& p_srem)
  BITSTRING fx__enc__SREM(const SREM__PDU__Descriptions::SREM& p_srem)
  {
  {
    loggers::get_instance().log_msg(">>> fx__enc__Srem: ", p_srem);
    loggers::get_instance().log_msg(">>> fx__enc__SREM: ", p_srem);
    
    
    SremCodec codec;
    SremCodec codec;
    OCTETSTRING os;
    OCTETSTRING os;
@@ -182,9 +206,9 @@ namespace LibItsSremSsem__EncdecDeclarations {
    return oct2bit(os);
    return oct2bit(os);
  }
  }


  INTEGER fx__dec__Srem(BITSTRING& b, SREM__PDU__Descriptions::SREM& p)
  INTEGER fx__dec__SREM(BITSTRING& b, SREM__PDU__Descriptions::SREM& p)
  {
  {
    loggers::get_instance().log(">>> fx__dec__Srem");
    loggers::get_instance().log(">>> fx__dec__SREM");
    SremCodec codec;
    SremCodec codec;
    OCTETSTRING is = bit2oct(b);
    OCTETSTRING is = bit2oct(b);


@@ -237,6 +261,30 @@ namespace LibItsSremSsem__EncdecDeclarations {
    return 0;
    return 0;
  }
  }


  /****************************************************
   * @desc    External function to encode a SsemInd type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  BITSTRING fx__enc__SsemInd(const LibItsSremSsem__TestSystem::SsemInd& p_ssemInd)
  {
    loggers::get_instance().log_msg(">>> fx__enc__SsemInd: ", p_ssemInd);
    
    SsemCodec codec;
    OCTETSTRING os;
    if (codec.encode(p_ssemInd.msgIn(), os) == -1) {
      loggers::get_instance().warning("fx__enc__SsemInd: -1 result code was returned");
      return int2bit(0, 1);
    }
    
    return oct2bit(os);
  }

  /****************************************************
   * @desc    External function to decode a SsemInd type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__SsemInd(BITSTRING& b, LibItsSremSsem__TestSystem::SsemInd& p_ssemInd)
  INTEGER fx__dec__SsemInd(BITSTRING& b, LibItsSremSsem__TestSystem::SsemInd& p_ssemInd)
  {
  {
    loggers::get_instance().log(">>> fx__dec__SsemInd");
    loggers::get_instance().log(">>> fx__dec__SsemInd");
@@ -284,8 +332,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnHeaderType_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnHeaderType_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.gnHeaderType() = oct2int(os);
      p_ssemInd.gnHeaderType() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: gnHeaderType=", p_ssemInd.gnHeaderType());
    loggers::get_instance().log_msg("fx__dec__SsemInd: gnHeaderType=", p_ssemInd.gnHeaderType());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // gnHeaderSubtype
    // gnHeaderSubtype
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnHeaderSubtype_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnHeaderSubtype_raw_.fieldlength / 8)) {
      p_ssemInd.gnHeaderSubtype().set_to_omit();
      p_ssemInd.gnHeaderSubtype().set_to_omit();
@@ -294,8 +342,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnHeaderSubtype_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnHeaderSubtype_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.gnHeaderSubtype() = oct2int(os);
      p_ssemInd.gnHeaderSubtype() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: gnHeaderSubtype=", p_ssemInd.gnHeaderSubtype());
    loggers::get_instance().log_msg("fx__dec__SsemInd: gnHeaderSubtype=", p_ssemInd.gnHeaderSubtype());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // gnLifetime
    // gnLifetime
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnLifetime_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnLifetime_raw_.fieldlength / 8)) {
      p_ssemInd.gnLifetime().set_to_omit();
      p_ssemInd.gnLifetime().set_to_omit();
@@ -304,8 +352,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SsemInd_gnLifetime_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SsemInd_gnLifetime_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.gnLifetime() = i;
      p_ssemInd.gnLifetime() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: gnLifetime=", p_ssemInd.gnLifetime());
    loggers::get_instance().log_msg("fx__dec__SsemInd: gnLifetime=", p_ssemInd.gnLifetime());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // gnTrafficClass
    // gnTrafficClass
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnTrafficClass_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_gnTrafficClass_raw_.fieldlength / 8)) {
      p_ssemInd.gnTrafficClass().set_to_omit();
      p_ssemInd.gnTrafficClass().set_to_omit();
@@ -314,8 +362,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnTrafficClass_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      os.decode(LibItsSremSsem__TestSystem::SsemInd_gnTrafficClass_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.gnTrafficClass() = oct2int(os);
      p_ssemInd.gnTrafficClass() = oct2int(os);
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: gnTrafficClass=", p_ssemInd.gnTrafficClass());
    loggers::get_instance().log_msg("fx__dec__SsemInd: gnTrafficClass=", p_ssemInd.gnTrafficClass());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // btpDestinationPort
    // btpDestinationPort
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_btpDestinationPort_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_btpDestinationPort_raw_.fieldlength / 8)) {
      p_ssemInd.btpDestinationPort().set_to_omit();
      p_ssemInd.btpDestinationPort().set_to_omit();
@@ -324,8 +372,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SsemInd_btpDestinationPort_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SsemInd_btpDestinationPort_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.btpDestinationPort() = i;
      p_ssemInd.btpDestinationPort() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: btpDestinationPort=", p_ssemInd.btpDestinationPort());
    loggers::get_instance().log_msg("fx__dec__SsemInd: btpDestinationPort=", p_ssemInd.btpDestinationPort());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // btpInfo
    // btpInfo
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_btpInfo_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_btpInfo_raw_.fieldlength / 8)) {
      p_ssemInd.btpInfo().set_to_omit();
      p_ssemInd.btpInfo().set_to_omit();
@@ -334,8 +382,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SsemInd_btpInfo_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SsemInd_btpInfo_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.btpInfo() = i;
      p_ssemInd.btpInfo() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: btpInfo=", p_ssemInd.btpInfo());
    loggers::get_instance().log_msg("fx__dec__SsemInd: btpInfo=", p_ssemInd.btpInfo());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // ssp
    // ssp
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_ssp_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_ssp_raw_.fieldlength / 8)) {
      p_ssemInd.ssp().set_to_omit();
      p_ssemInd.ssp().set_to_omit();
@@ -344,8 +392,8 @@ namespace LibItsSremSsem__EncdecDeclarations {
      bs.decode(LibItsSremSsem__TestSystem::SsemInd_ssp_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      bs.decode(LibItsSremSsem__TestSystem::SsemInd_ssp_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.ssp() = bs;
      p_ssemInd.ssp() = bs;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: ssp=", p_ssemInd.ssp());
    loggers::get_instance().log_msg("fx__dec__SsemInd: ssp=", p_ssemInd.ssp());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    // its__aid
    // its__aid
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_its__aid_raw_.fieldlength / 8)) {
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsSremSsem__TestSystem::SsemInd_its__aid_raw_.fieldlength / 8)) {
      p_ssemInd.its__aid().set_to_omit();
      p_ssemInd.its__aid().set_to_omit();
@@ -354,15 +402,15 @@ namespace LibItsSremSsem__EncdecDeclarations {
      i.decode(LibItsSremSsem__TestSystem::SsemInd_its__aid_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      i.decode(LibItsSremSsem__TestSystem::SsemInd_its__aid_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_ssemInd.its__aid() = i;
      p_ssemInd.its__aid() = i;
    }
    }
    loggers::get_instance().log_msg("fx__dec__Ssem: its_aid=", p_ssemInd.its__aid());
    loggers::get_instance().log_msg("fx__dec__SsemInd: its_aid=", p_ssemInd.its__aid());
    loggers::get_instance().log_to_hexa("fx__dec__Ssem: ", decoding_buffer);
    loggers::get_instance().log_to_hexa("fx__dec__SsemInd: ", decoding_buffer);
    
    
    return 0;
    return 0;
  }
  }


  BITSTRING fx__enc__Ssem(const SSEM__PDU__Descriptions::SSEM& p_ssem)
  BITSTRING fx__enc__SSEM(const SSEM__PDU__Descriptions::SSEM& p_ssem)
  {
  {
    loggers::get_instance().log_msg(">>> fx__enc__Ssem: ", p_ssem);
    loggers::get_instance().log_msg(">>> fx__enc__SSEM: ", p_ssem);
    
    
    SsemCodec codec;
    SsemCodec codec;
    OCTETSTRING os;
    OCTETSTRING os;
@@ -370,9 +418,9 @@ namespace LibItsSremSsem__EncdecDeclarations {
    return oct2bit(os);
    return oct2bit(os);
  }
  }


  INTEGER fx__dec__Ssem(BITSTRING& b, SSEM__PDU__Descriptions::SSEM& p_ssem)
  INTEGER fx__dec__SSEM(BITSTRING& b, SSEM__PDU__Descriptions::SSEM& p_ssem)
  {
  {
    loggers::get_instance().log(">>> fx__dec__Ssem");
    loggers::get_instance().log(">>> fx__dec__SSEM");
    SsemCodec codec;
    SsemCodec codec;
    OCTETSTRING is = bit2oct(b);
    OCTETSTRING is = bit2oct(b);


+72 −6
Original line number Original line Diff line number Diff line
@@ -12,6 +12,7 @@


#include "LibItsCam_EncdecDeclarations.hh"
#include "LibItsCam_EncdecDeclarations.hh"
#include "LibItsDenm_EncdecDeclarations.hh"
#include "LibItsDenm_EncdecDeclarations.hh"
#include "LibItsSremSsem_EncdecDeclarations.hh"


ConfigRsuSimulatorLayer::ConfigRsuSimulatorLayer(const std::string & p_type, const std::string & param) : t_layer<ItsRSUsSimulator__TestSystem::ConfigRsuSimulatorPort>(p_type), _params(), _codec(), _codec_cam() {
ConfigRsuSimulatorLayer::ConfigRsuSimulatorLayer(const std::string & p_type, const std::string & param) : t_layer<ItsRSUsSimulator__TestSystem::ConfigRsuSimulatorPort>(p_type), _params(), _codec(), _codec_cam() {
  loggers::get_instance().log(">>> ConfigRsuSimulatorLayer::ConfigRsuSimulatorLayer: %s, %s", to_string().c_str(), param.c_str());
  loggers::get_instance().log(">>> ConfigRsuSimulatorLayer::ConfigRsuSimulatorLayer: %s, %s", to_string().c_str(), param.c_str());
@@ -203,6 +204,9 @@ void ConfigRsuSimulatorLayer::sendMsg(const LibItsSremSsem__TypesAndValues::UtSr
  if (send_par.ischosen(LibItsSremSsem__TypesAndValues::UtSremResults::ALT_utSremInitializeResult)) {
  if (send_par.ischosen(LibItsSremSsem__TypesAndValues::UtSremResults::ALT_utSremInitializeResult)) {
    encoding_buffer.put_c(0x01/*static_cast<const unsigned char>(uppertester_pki_codec::c_utSremInitializeResult)*/);
    encoding_buffer.put_c(0x01/*static_cast<const unsigned char>(uppertester_pki_codec::c_utSremInitializeResult)*/);
    encoding_buffer.put_c((unsigned char)static_cast<const boolean>(send_par.utSremInitializeResult()));
    encoding_buffer.put_c((unsigned char)static_cast<const boolean>(send_par.utSremInitializeResult()));
  } else if (send_par.ischosen(LibItsSremSsem__TypesAndValues::UtSremResults::ALT_utSremTriggerResult)) {
    encoding_buffer.put_c(0xa1/*static_cast<const unsigned char>(uppertester_pki_codec::c_utSremTriggerResult)*/);
    encoding_buffer.put_c((unsigned char)static_cast<const boolean>(send_par.utSremTriggerResult()));
  } else {
  } else {
    loggers::get_instance().warning("ConfigRsuSimulatorLayer::sendMsg: Unsupported UtSremResults variant");
    loggers::get_instance().warning("ConfigRsuSimulatorLayer::sendMsg: Unsupported UtSremResults variant");
	return;
	return;
@@ -212,6 +216,34 @@ void ConfigRsuSimulatorLayer::sendMsg(const LibItsSremSsem__TypesAndValues::UtSr
  send_data(os, _params);
  send_data(os, _params);
}
}


void ConfigRsuSimulatorLayer::sendMsg(const LibItsSremSsem__TypesAndValues::UtSremEventInd& send_par, params& params) {
  loggers::get_instance().log_msg(">>> ConfigRsuSimulatorLayer::sendMsg: ", send_par);

  TTCN_Buffer encoding_buffer;
  encoding_buffer.put_c(0xAF/*static_cast<const unsigned char>(uppertester_sremssem_codec::c_utSremEventInd)*/);
  BITSTRING bs = LibItsSremSsem__EncdecDeclarations::fx__enc__SREM(send_par.sreMsg());
  OCTETSTRING os = bit2oct(bs);
  OCTETSTRING l = int2oct(os.lengthof(), 2);
  encoding_buffer.put_s(l.lengthof(), static_cast<const unsigned char*>(l));
  encoding_buffer.put_s(os.lengthof(), static_cast<const unsigned char*>(os));
  OCTETSTRING data(encoding_buffer.get_len(), encoding_buffer.get_data());
  send_data(data, _params);
}

void ConfigRsuSimulatorLayer::sendMsg(const LibItsSremSsem__TypesAndValues::UtSsemEventInd& send_par, params& params) {
  loggers::get_instance().log_msg(">>> ConfigRsuSimulatorLayer::sendMsg: ", send_par);

  TTCN_Buffer encoding_buffer;
  encoding_buffer.put_c(0xB0/*static_cast<const unsigned char>(uppertester_sremssem_codec::c_utSsemEventInd)*/);
  BITSTRING bs = LibItsSremSsem__EncdecDeclarations::fx__enc__SSEM(send_par.sseMsg());
  OCTETSTRING os = bit2oct(bs);
  OCTETSTRING l = int2oct(os.lengthof(), 2);
  encoding_buffer.put_s(l.lengthof(), static_cast<const unsigned char*>(l));
  encoding_buffer.put_s(os.lengthof(), static_cast<const unsigned char*>(os));
  OCTETSTRING data(encoding_buffer.get_len(), encoding_buffer.get_data());
  send_data(data, _params);
}

void ConfigRsuSimulatorLayer::sendMsg(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par, params& params) {
void ConfigRsuSimulatorLayer::sendMsg(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par, params& params) {
  loggers::get_instance().log_msg(">>> ConfigRsuSimulatorLayer::sendMsg: ", send_par);
  loggers::get_instance().log_msg(">>> ConfigRsuSimulatorLayer::sendMsg: ", send_par);


@@ -255,6 +287,8 @@ void ConfigRsuSimulatorLayer::receive_data(OCTETSTRING& data, params& params)
    process_ut_denm_update(data, params);
    process_ut_denm_update(data, params);
  } else if (id == 0x14/*uppertester_denm_codec::c_utDenmTermination*/) {
  } else if (id == 0x14/*uppertester_denm_codec::c_utDenmTermination*/) {
    process_ut_denm_termination(data, params);
    process_ut_denm_termination(data, params);
  } else if (id == 0xa0/*uppertester_sremssem_codec::c_utSremTrigger*/) {
    process_ut_sremm_trigger(data, params);
  } else if ((id >= 0x50) && (id <= 0x54)) { // Receive an UtGnTrigger
  } else if ((id >= 0x50) && (id <= 0x54)) { // Receive an UtGnTrigger
    process_ut_geonetworking_trigger(data, params);
    process_ut_geonetworking_trigger(data, params);
  } else if ((id >= 0xBB) && (id <= 0xBF)) { // Receive an UtPkiTrigger
  } else if ((id >= 0xBB) && (id <= 0xBF)) { // Receive an UtPkiTrigger
@@ -726,4 +760,36 @@ int ConfigRsuSimulatorLayer::process_ut_pki_trigger(const OCTETSTRING& data, par
  return 0;
  return 0;
}
}



int ConfigRsuSimulatorLayer::process_ut_sremm_trigger(const OCTETSTRING& data, params& params) {
  loggers::get_instance().log(">>> ConfigRsuSimulatorLayer::process_ut_sremm_trigger");

  params::const_iterator it = _params.find("ut");
  if (it == _params.cend()) {
    loggers::get_instance().warning("ConfigRsuSimulatorLayer::process_ut_sremm_trigger: CF layer's ut parameter is missing");
    return -1;
  }

  if (_params[std::string("ut")].compare("sremssem") == 0) {
    unsigned char* p = (unsigned char*)static_cast<const unsigned char*>(data);
    unsigned char msg_id = *p++;
    loggers::get_instance().log("ConfigRsuSimulatorLayer::process_ut_geonetworking_trigger: msg_id=%02x", msg_id);
    LibItsSremSsem__TypesAndValues::UtSremTrigger trigger; // See ETSI TR 103 34 099
    // BasicVehicleRole
    trigger.basicVehicleRole() = oct2int(OCTETSTRING(1, p++));
    // Request Importance Level
    trigger.requestImportanceLevel() = oct2int(OCTETSTRING(1, p++));
    // Intersection ID
    trigger.intersectionId() = oct2int(OCTETSTRING(1, p++));

    // Pass it to the ports if any
    to_all_upper_ports(trigger, params);
  } else {
    loggers::get_instance().warning("ConfigRsuSimulatorLayer::process_ut_sremm_trigger: Unsupported protocol");
    return -1;
  }

  return 0;
}

ConfigRsuSimulatorLayerFactory ConfigRsuSimulatorLayerFactory::_f;
ConfigRsuSimulatorLayerFactory ConfigRsuSimulatorLayerFactory::_f;
+3 −1
Original line number Original line Diff line number Diff line
@@ -47,6 +47,8 @@ public:
  void sendMsg(const LibItsIvim__TypesAndValues::UtIvimResults& send_par, params& params);
  void sendMsg(const LibItsIvim__TypesAndValues::UtIvimResults& send_par, params& params);
  void sendMsg(const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemResults& send_par, params& params);
  void sendMsg(const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemResults& send_par, params& params);
  void sendMsg(const LibItsSremSsem__TypesAndValues::UtSremResults& send_par, params& params);
  void sendMsg(const LibItsSremSsem__TypesAndValues::UtSremResults& send_par, params& params);
  void sendMsg(const LibItsSremSsem__TypesAndValues::UtSremEventInd& send_par, params& params);
  void sendMsg(const LibItsSremSsem__TypesAndValues::UtSsemEventInd& send_par, params& params);
  void sendMsg(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par, params& params);
  void sendMsg(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par, params& params);


  virtual void send_data(OCTETSTRING& data, params& params);
  virtual void send_data(OCTETSTRING& data, params& params);
@@ -63,5 +65,5 @@ private:
  int process_ut_denm_termination(const OCTETSTRING& data, params& params);
  int process_ut_denm_termination(const OCTETSTRING& data, params& params);
  int process_ut_geonetworking_trigger(const OCTETSTRING& data, params& params);
  int process_ut_geonetworking_trigger(const OCTETSTRING& data, params& params);
  int process_ut_pki_trigger(const OCTETSTRING& data, params& params);
  int process_ut_pki_trigger(const OCTETSTRING& data, params& params);

  int process_ut_sremm_trigger(const OCTETSTRING& data, params& params);
}; // End of class ConfigRsuSimulatorLayer
}; // End of class ConfigRsuSimulatorLayer
+38 −1
Original line number Original line Diff line number Diff line
@@ -160,7 +160,6 @@ namespace ItsRSUsSimulator__TestSystem {
    loggers::get_instance().set_stop_time(_time_key, duration);
    loggers::get_instance().set_stop_time(_time_key, duration);
  }
  }



  void ConfigRsuSimulatorPort::outgoing_send(const LibItsPki__TypesAndValues::UtPkiResults& send_par) {
  void ConfigRsuSimulatorPort::outgoing_send(const LibItsPki__TypesAndValues::UtPkiResults& send_par) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);
    
    
@@ -197,6 +196,24 @@ namespace ItsRSUsSimulator__TestSystem {
    loggers::get_instance().set_stop_time(_time_key, duration);
    loggers::get_instance().set_stop_time(_time_key, duration);
  }
  }


  void ConfigRsuSimulatorPort::outgoing_send(const LibItsSremSsem__TypesAndValues::UtSremEventInd& send_par) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);
    
    float duration;
    loggers::get_instance().set_start_time(_time_key);
    static_cast<ConfigRsuSimulatorLayer *>(_layer)->sendMsg(send_par, _layer_params);
    loggers::get_instance().set_stop_time(_time_key, duration);
  }

  void ConfigRsuSimulatorPort::outgoing_send(const LibItsSremSsem__TypesAndValues::UtSsemEventInd& send_par) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);
    
    float duration;
    loggers::get_instance().set_start_time(_time_key);
    static_cast<ConfigRsuSimulatorLayer *>(_layer)->sendMsg(send_par, _layer_params);
    loggers::get_instance().set_stop_time(_time_key, duration);
  }

  void ConfigRsuSimulatorPort::outgoing_send(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par) {
  void ConfigRsuSimulatorPort::outgoing_send(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::outgoing_send: payload=", send_par);


@@ -346,6 +363,16 @@ namespace ItsRSUsSimulator__TestSystem {
    incoming_message(p_ind);
    incoming_message(p_ind);
  }
  }


  void ConfigRsuSimulatorPort::receiveMsg (const LibItsSremSsem__TypesAndValues::UtSremTrigger& p_ind, const params& p_params) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::receive_msg: ", p_ind);
    // Sanity check
    if (!p_ind.is_bound()) {
      return;
    }

    incoming_message(p_ind);
  }

  void ConfigRsuSimulatorPort::receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemInitialize& p_ind, const params& p_params) {
  void ConfigRsuSimulatorPort::receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemInitialize& p_ind, const params& p_params) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::receive_msg: ", p_ind);
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::receive_msg: ", p_ind);
    // Sanity check
    // Sanity check
@@ -356,5 +383,15 @@ namespace ItsRSUsSimulator__TestSystem {
    incoming_message(p_ind);
    incoming_message(p_ind);
  }
  }


  void ConfigRsuSimulatorPort::receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemTrigger& p_ind, const params& p_params) {
    loggers::get_instance().log_msg(">>> ConfigRsuSimulatorPort::receive_msg: ", p_ind);
    // Sanity check
    if (!p_ind.is_bound()) {
      return;
    }

    incoming_message(p_ind);
  }

} /* end of namespace */
} /* end of namespace */
+5 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,9 @@ namespace ItsRSUsSimulator__TestSystem {
    void receiveMsg (const LibItsIvim__TypesAndValues::UtIvimInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsIvim__TypesAndValues::UtIvimInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsSremSsem__TypesAndValues::UtSremInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsSremSsem__TypesAndValues::UtSremInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsSremSsem__TypesAndValues::UtSremTrigger& p_ind, const params& p_params);
    void receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemInitialize& p_ind, const params& p_params);
    void receiveMsg (const LibItsRtcmem__TypesAndValues::UtRtcmemTrigger& p_ind, const params& p_params);
  
  
    /*void send(const CfInitialize& send_par, const COMPONENT& destination_component);
    /*void send(const CfInitialize& send_par, const COMPONENT& destination_component);
    void send(const CfInitialize& send_par);
    void send(const CfInitialize& send_par);
@@ -74,6 +76,8 @@ namespace ItsRSUsSimulator__TestSystem {
    void outgoing_send(const LibItsIvim__TypesAndValues::UtIvimResults& send_par);
    void outgoing_send(const LibItsIvim__TypesAndValues::UtIvimResults& send_par);
    void outgoing_send(const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemResults& send_par);
    void outgoing_send(const LibItsMapemSpatem__TypesAndValues::UtMapemSpatemResults& send_par);
    void outgoing_send(const LibItsSremSsem__TypesAndValues::UtSremResults& send_par);
    void outgoing_send(const LibItsSremSsem__TypesAndValues::UtSremResults& send_par);
    void outgoing_send(const LibItsSremSsem__TypesAndValues::UtSremEventInd& send_par);
    void outgoing_send(const LibItsSremSsem__TypesAndValues::UtSsemEventInd& send_par);
     void outgoing_send(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par);
     void outgoing_send(const LibItsRtcmem__TypesAndValues::UtRtcmemResults& send_par);
  }; // End of class ConfigRsuSimulatorPort
  }; // End of class ConfigRsuSimulatorPort


Loading