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

Add RTCMEM encoding

parent 5a2d317a
Loading
Loading
Loading
Loading
+279 −0
Original line number Diff line number Diff line
#include <memory>

#include "LibItsRtcmem_EncdecDeclarations.hh"

#include "RtcmemCodec.hh"
#include "UpperTesterRtcmemCodec.hh"
#include "loggers.hh"

namespace LibItsRtcmem__EncdecDeclarations {
  /****************************************************
   * @desc    External function to encode a RtcmemReq type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  BITSTRING fx__enc__RtcmemReq(const LibItsRtcmem__TestSystem::RtcmemReq& p_rtcmemReq)
  {
    loggers::get_instance().log_msg(">>> fx__enc__RtcmemReq: ", p_rtcmemReq);
    
    RtcmemCodec codec;
    OCTETSTRING os;
    if (codec.encode(p_rtcmemReq.msgOut(), os) == -1) {
      loggers::get_instance().warning("fx__enc__RtcmemReq: -1 result code was returned");
      return int2bit(0, 1);
    }
    
    return oct2bit(os);
  }

  /****************************************************
   * @desc    External function to decode a DenmReq type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__RtcmemReq(BITSTRING& b, LibItsRtcmem__TestSystem::RtcmemReq& p)
  {
    loggers::get_instance().log(">>> fx__dec__RtcmemReq");

    RtcmemCodec codec;
    RTCMEM__PDU__Descriptions::RTCMEM rtcmem;
    OCTETSTRING is = bit2oct(b);

    if (codec.decode(is, rtcmem) == -1) {
      loggers::get_instance().warning("fx__dec__RtcmemReq: -1 result code was returned");
      return -1;
    }
    p.msgOut() = rtcmem;
    
    return 0;
  }

  INTEGER fx__dec__RtcmemInd(BITSTRING& b, LibItsRtcmem__TestSystem::RtcmemInd& p_rtcmemInd)
  {
    loggers::get_instance().log(">>> fx__dec__RtcmemInd");
    
    RtcmemCodec codec;
    RTCMEM__PDU__Descriptions::RTCMEM rtcmem;
    OCTETSTRING is = bit2oct(b);

    // Calculate the size of the lower layers information
    int s = (
	     LibItsRtcmem__TestSystem::RtcmemInd_gnNextHeader_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderType_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderSubtype_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_gnLifetime_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_gnTrafficClass_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_btpDestinationPort_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_btpInfo_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_ssp_raw_.fieldlength +
	     LibItsRtcmem__TestSystem::RtcmemInd_its__aid_raw_.fieldlength
	     ) / 8;
    // Decode CA message
    if (codec.decode(OCTETSTRING(is.lengthof() - s, static_cast<const unsigned char *>(is)), rtcmem) == -1) {
      loggers::get_instance().warning("fx__dec__RtcmemInd: -1 result code was returned");
      return -1;
    }
    p_rtcmemInd.msgIn() = rtcmem;
    // Decode lower layer data
    TTCN_Buffer decoding_buffer(OCTETSTRING(s, static_cast<const unsigned char *>(is) + is.lengthof() - s));
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // gnNextHeader
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_gnNextHeader_raw_.fieldlength / 8)) {
      p_rtcmemInd.gnNextHeader().set_to_omit();
    } else {
      OCTETSTRING os;
      os.decode(LibItsRtcmem__TestSystem::RtcmemInd_gnNextHeader_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.gnNextHeader() = oct2int(os);
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: gnNextHeader=", p_rtcmemInd.gnNextHeader());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // gnHeaderType
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderType_raw_.fieldlength / 8)) {
      p_rtcmemInd.gnHeaderType().set_to_omit();
    } else {
      OCTETSTRING os;
      os.decode(LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderType_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.gnHeaderType() = oct2int(os);
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: gnHeaderType=", p_rtcmemInd.gnHeaderType());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // gnHeaderSubtype
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderSubtype_raw_.fieldlength / 8)) {
      p_rtcmemInd.gnHeaderSubtype().set_to_omit();
    } else {
      OCTETSTRING os;
      os.decode(LibItsRtcmem__TestSystem::RtcmemInd_gnHeaderSubtype_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.gnHeaderSubtype() = oct2int(os);
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: gnHeaderSubtype=", p_rtcmemInd.gnHeaderSubtype());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // gnLifetime
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_gnLifetime_raw_.fieldlength / 8)) {
      p_rtcmemInd.gnLifetime().set_to_omit();
    } else {
      INTEGER i;
      i.decode(LibItsRtcmem__TestSystem::RtcmemInd_gnLifetime_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.gnLifetime() = i;
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: gnLifetime=", p_rtcmemInd.gnLifetime());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // gnTrafficClass
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_gnTrafficClass_raw_.fieldlength / 8)) {
      p_rtcmemInd.gnTrafficClass().set_to_omit();
    } else {
      OCTETSTRING os;
      os.decode(LibItsRtcmem__TestSystem::RtcmemInd_gnTrafficClass_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.gnTrafficClass() = oct2int(os);
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: gnTrafficClass=", p_rtcmemInd.gnTrafficClass());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // btpDestinationPort
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_btpDestinationPort_raw_.fieldlength / 8)) {
      p_rtcmemInd.btpDestinationPort().set_to_omit();
    } else {
      INTEGER i;
      i.decode(LibItsRtcmem__TestSystem::RtcmemInd_btpDestinationPort_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.btpDestinationPort() = i;
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: btpDestinationPort=", p_rtcmemInd.btpDestinationPort());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // btpInfo
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_btpInfo_raw_.fieldlength / 8)) {
      p_rtcmemInd.btpInfo().set_to_omit();
    } else {
      INTEGER i;
      i.decode(LibItsRtcmem__TestSystem::RtcmemInd_btpInfo_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.btpInfo() = i;
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: btpInfo=", p_rtcmemInd.btpInfo());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // ssp
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_ssp_raw_.fieldlength / 8)) {
      p_rtcmemInd.ssp().set_to_omit();
    } else {
      BITSTRING bs;
      bs.decode(LibItsRtcmem__TestSystem::RtcmemInd_ssp_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.ssp() = bs;
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: ssp=", p_rtcmemInd.ssp());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    // its__aid
    if (decoding_buffer.get_read_len() < static_cast<size_t>(LibItsRtcmem__TestSystem::RtcmemInd_its__aid_raw_.fieldlength / 8)) {
      p_rtcmemInd.its__aid().set_to_omit();
    } else {
      INTEGER i;
      i.decode(LibItsRtcmem__TestSystem::RtcmemInd_its__aid_descr_, decoding_buffer, TTCN_EncDec::CT_RAW);
      p_rtcmemInd.its__aid() = i;
    }
    loggers::get_instance().log_msg("fx__dec__RTCMEM: its_aid=", p_rtcmemInd.its__aid());
    loggers::get_instance().log_to_hexa("fx__dec__RTCMEM: ", decoding_buffer);
    
    return 0;
  }

  BITSTRING fx__enc__RTCMEM(const RTCMEM__PDU__Descriptions::RTCMEM& p_rtcmem)
  {
    loggers::get_instance().log_msg(">>> fx__enc__RTCMEM: ", p_rtcmem);
    
    RtcmemCodec codec;
    OCTETSTRING os;
    codec.encode(p_rtcmem, os);
    return oct2bit(os);
  }

  INTEGER fx__dec__RTCMEM(BITSTRING& b, RTCMEM__PDU__Descriptions::RTCMEM& p)
  {
    loggers::get_instance().log(">>> fx__dec__RTCMEM");
    RtcmemCodec codec;
    OCTETSTRING is = bit2oct(b);

    if (codec.decode(OCTETSTRING(is.lengthof(), static_cast<const unsigned char *>(is)), p) == -1) {
      loggers::get_instance().warning("fx__dec__RTCMEM: -1 result code was returned");
      return -1;
    }
    
    return 0;
  }

  BITSTRING fx__enc__UtRtcmemInitialize (const LibItsRtcmem__TypesAndValues::UtRtcmemInitialize& p_utRtcmemInitialize)
  {
    loggers::get_instance().log_msg(">>> fx__enc__UtRtcmemInitialize: ", p_utRtcmemInitialize);
    
    UpperTesterRtcmemCodec codec;
    OCTETSTRING os;
    codec.encode(p_utRtcmemInitialize, os);
    return oct2bit(os);
  }

  BITSTRING fx__enc__UtRtcmemTrigger (const LibItsRtcmem__TypesAndValues::UtRtcmemTrigger& p_utRtcmemTrigger)
  {
    loggers::get_instance().log_msg(">>> fx__enc__UtRtcmemTrigger: ", p_utRtcmemTrigger);
    
    UpperTesterRtcmemCodec codec;
    OCTETSTRING os;
    codec.encode(p_utRtcmemTrigger, os);
    return oct2bit(os);
  }

  BITSTRING fx__enc__UtRtcmemUpdate (const LibItsRtcmem__TypesAndValues::UtRtcmemUpdate& p_utRtcmemUpdate)
  {
    loggers::get_instance().log_msg(">>> fx__enc__UtRtcmemUpdate: ", p_utRtcmemUpdate);
    
    UpperTesterRtcmemCodec codec;
    OCTETSTRING os;
    codec.encode(p_utRtcmemUpdate, os);
    return oct2bit(os);
  }
 
  BITSTRING fx__enc__UtRtcmemTermination (const LibItsRtcmem__TypesAndValues::UtRtcmemTermination& p_utRtcmemTermination)
  {
    loggers::get_instance().log_msg(">>> fx__enc__UtRtcmemTermination: ", p_utRtcmemTermination);
    
    UpperTesterRtcmemCodec codec;
    OCTETSTRING os;
    codec.encode(p_utRtcmemTermination, os);
    return oct2bit(os);
  }
 
 /****************************************************
   * @desc    External function to decode a UtRtcmemResults type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__UtRtcmemResults(BITSTRING& b, LibItsRtcmem__TypesAndValues::UtRtcmemResults& p)
  {
    loggers::get_instance().log(">>> fx__dec__UtRtcmemResults");

    UpperTesterRtcmemCodec codec;
    OCTETSTRING is = bit2oct(b);
    std::unique_ptr<Base_Type> ptr = codec.decode(is);
    if (ptr == nullptr) {
      loggers::get_instance().warning("fx__dec__UtRtcmemResults: -1 result code was returned");
      return -1;
    }
    p = static_cast<LibItsRtcmem__TypesAndValues::UtRtcmemResults&>(*ptr);
    return 0;
  }

  /****************************************************
   * @desc    External function to decode a UtRtcmemEventInd type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__UtRtcmemEventInd(BITSTRING& b, LibItsRtcmem__TypesAndValues::UtRtcmemEventInd& p)
  {
    loggers::get_instance().log(">>> fx__dec__UtRtcmemEventInd");

    UpperTesterRtcmemCodec codec;
    OCTETSTRING is = bit2oct(b);
    std::unique_ptr<Base_Type> ptr = codec.decode(is);
    if (ptr == nullptr) {
      loggers::get_instance().warning("fx__dec__UtRtcmemEventInd: -1 result code was returned");
      return -1;
    }
    p = static_cast<LibItsRtcmem__TypesAndValues::UtRtcmemEventInd&>(*ptr);
    return 0;
  }

} //end namespace
+85 −2
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@ module ItsRSUsSimulator_Functions {
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
    //import from EVCSN_PDU_Descriptions language "ASN.1:1997" all;
    import from RTCMEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SREM_PDU_Descriptions language "ASN.1:1997" all;
    import from SSEM_PDU_Descriptions language "ASN.1:1997" all;
    import from RTCMEM_PDU_Descriptions language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    import from IEEE1609dot2 language "ASN.1:1997" all;
@@ -228,11 +228,14 @@ module ItsRSUsSimulator_Functions {
        var template (omit) SPATEMs v_spatems := omit;
        var template (omit) IVIM v_ivim := omit;
        //var template (omit) EvcsnPdu v_evcsn := omit;
        var template (omit) RTCMEM v_rtcmem := omit;
        var template (omit) SREM v_srem := omit;
        var template (omit) SSEM v_ssem := omit;
        var integer v_counter;

        log(">>> f_setup_rsu: ", vc_cam);
        log(">>> f_setup_rsu: ", vc_denm);
        log(">>> f_setup_rsu: ", vc_rtcmem);
        log(">>> f_setup_rsu: ", p_rsu_id);
        log(">>> f_setup_rsu: ", PX_ETSI_USE_CASE_ID);
        
@@ -299,6 +302,21 @@ module ItsRSUsSimulator_Functions {
        } else {
            vc_ivim := false;
        }
        // RTCMEM
        if (vc_rtcmem == true) {
            // Build the list of the RTCMEM events
            v_rtcmem :=
                m_rtcmemParm(
                             PICS_RSU_PARAMS[p_rsu_id].stationID,
                             m_defaultRtcmem(
                                             123,
                                             -,
                                             { 'AAAAAAAA'O }
                                             )
                             );
        } else {
            vc_rtcmem := false;
        }
        /* // EVCSN, only if PX_ETSI_USE_CASE_ID is set to 8 */
        /* if ((vc_evcsn == true) and (PX_ETSI_USE_CASE_ID == 8)) { */
        /*     // Build the list of the EVCSN events */
@@ -483,6 +501,8 @@ module ItsRSUsSimulator_Functions {
                v_spatems,
                v_ivim,
                //                v_evcsn,
                -,
                -,
                v_ssem
        );
        if (PICS_RSU_PARAMS[p_rsu_id].geoShape == e_geoCircle) {
@@ -711,6 +731,23 @@ module ItsRSUsSimulator_Functions {
        );
    } // End of function f_prepare_ivim
    
    function f_prepare_rtcmem(
                              out template (value) GnRawPayload p_payload
    ) runs on ItsRSUsSimulator {
        
        p_payload := valueof(
            f_adaptPayload(
                bit2oct(
                    encvalue(
                        valueof(
                            vc_rsuMessagesValueList[vc_rsu_id].rtcmem
                ))),
                PICS_RTCMEM_BTP_DESTINATION_PORT,
                PICS_RTCMEM_BTP_SOURCE_PORT
            )
        );
    } // End of function f_prepare_rtcmem
    
    /* function f_prepare_evcsn( */
    /*                          out template (value) GnRawPayload p_payload */
    /* ) runs on ItsRSUsSimulator { */
@@ -898,6 +935,21 @@ module ItsRSUsSimulator_Functions {
                },
                c_hopLimit1
            ));
        } else if (p_its_aid == 140)  { // RTCMEM
            v_geoNetworkingPdu := valueof(m_geoNwPdu( // FIXME Use PIXIT parameter to get a fully configurable template
                m_geoNwTsbPacket_payload(
                    f_incLocalSeqNumber(),
                    vc_longPosVectorRsu,
                    -,
                    -,
                    valueof(p_payload)
                ),
                Lifetime:{
                  multiplier := c_defaultLifetime,
                  ltBase := e_100s
                },
                c_hopLimit1
            ));
        } else { // Beacon
            v_geoNetworkingPdu := valueof(vc_rsuMessagesValueList[vc_rsu_id].beacon);
        }
@@ -1047,6 +1099,9 @@ module ItsRSUsSimulator_Functions {
      var UtDenmTrigger v_utDenmTrigger;
      var UtDenmUpdate v_utDenmUpdate;
      var UtDenmTermination v_utDenmTermination;
      var UtRtcmemTrigger v_utRtcmemTrigger;
      var UtRtcmemUpdate v_utRtcmemUpdate;
      var UtRtcmemTermination v_utRtcmemTermination;
      var UtPkiTrigger v_utPkiTrigger;

        [] cfPort.receive(UtGnInitialize:?) -> value v_utGnInitialize {
@@ -1393,6 +1448,34 @@ module ItsRSUsSimulator_Functions {
          cfPort.send(UtIvimResults: { utIvimInitializeResult := true } );
          repeat;
        }
        [vc_rtcmem == true] cfPort.receive(UtRtcmemInitialize:?) -> value v_utRtcmemInitialize {
          log("a_process_cf_ut_command: v_utRtcmemInitialize = ", v_utRtcmemInitialize);
          if (oct2int(v_utRtcmemInitialize.hashedId8) != 0) {
            var charstring v_certificate_id;
            var EtsiTs103097Certificate v_certificate;
            log("a_process_cf_ut_command: Looking for certificate ", v_utCamInitialize.hashedId8);
            f_getCertificateFromDigest(v_utCamInitialize.hashedId8, v_certificate, v_certificate_id);
            log("a_process_cf_ut_command (pki): Change certificate to ", v_certificate_id);
            f_acTriggerSecEvent(m_acEnableSecurity(v_certificate_id));
          }
          //vc_rsuMessagesValueList[vc_rsu_id].rtcmem.gdd.;
          cfPort.send(UtRtcmemResults: { utRtcmemInitializeResult := true } );
          repeat;
        }
        [vc_rtcmem == true] cfPort.receive(UtRtcmemTrigger:?) -> value v_utRtcmemTrigger {
          log("a_process_cf_ut_command: v_utRtcmemTrigger: ", v_utRtcmemTrigger);
          cfPort.send(UtRtcmemResults: { utRtcmemTriggerResult := true } );
          repeat;
        }
        [vc_rtcmem == true] cfPort.receive(UtRtcmemUpdate:?) -> value v_utRtcmemUpdate {
          cfPort.send(UtRtcmemResults: { utRtcmemUpdateResult := true } );
          repeat;
        }
        [vc_rtcmem == true] cfPort.receive(UtRtcmemTermination:?) -> value v_utRtcmemTermination {
          log("a_process_cf_ut_command: v_utRtcmemTermination: ", v_utRtcmemTermination);
          cfPort.send(UtRtcmemResults: { utRtcmemTerminationResult := true } );
          repeat;
        }
        [vc_pki == true] cfPort.receive(UtPkiInitialize:?) -> value v_utPkiInitialize {
          log("a_process_cf_ut_command: v_utPkiInitialize = ", v_utPkiInitialize);
          if (oct2int(v_utPkiInitialize.hashedId8) != 0) {
+35 −2
Original line number Diff line number Diff line
@@ -5693,6 +5693,20 @@ module ItsRSUsSimulator_Pics {
    
    } // End of group ivimEvents 

    group rtcmemEvent {

        group rtcmemCommonParams {

            modulepar BtpPortId PICS_RTCMEM_BTP_DESTINATION_PORT := 2013;

            modulepar BtpPortId PICS_RTCMEM_BTP_SOURCE_PORT      := 0;

            modulepar UInt32 PICS_RTCMEM_ITS_AID                 := 140;

        } // End of group rtcmemCommonParams

    } // End of group rtcmemEvent

    /* group poimEvents { */
        
    /*     group poimCommonParams { */
@@ -5753,6 +5767,10 @@ module ItsRSUsSimulator_Pics {
      
      modulepar boolean PICS_GENERATE_SPATEM   := false;
      
      modulepar boolean PICS_GENERATE_RTCMEM   := false;
      
      modulepar boolean PICS_GENERATE_SREM     := false;
      
      modulepar boolean PICS_GENERATE_SSEM     := false;
      
      //modulepar boolean PICS_GENERATE_EVCSN    := false;
@@ -5801,7 +5819,7 @@ module ItsRSUsSimulator_Pics {
        modulepar float PICS_MAPEM_FREQUENCY     := 1.0;
    
        /**
         * @desc SPATEMM frequency timer
         * @desc SPATEM frequency timer
         */
        modulepar float PICS_SPATEM_FREQUENCY    := 1.0;
    
@@ -5810,6 +5828,21 @@ module ItsRSUsSimulator_Pics {
         */
        modulepar float PICS_IVIM_FREQUENCY      := 1.0;
        
        /**
         * @desc RTCMEM frequency timer
         */
        modulepar float PICS_RTCMEM_FREQUENCY    := 1.0;
        
        /**
         * @desc SREM frequency timer
         */
        modulepar float PICS_SREM_FREQUENCY      := 1.0;
    
        /**
         * @desc SSEM frequency timer
         */
        modulepar float PICS_SSEM_FREQUENCY      := 1.0;
    
        /**
         * @desc EVCSN frequency timer
         */
+22 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ module ItsRSUsSimulator_Templates {
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
    import from IVI language "ASN.1:1997" all;
    import from RTCMEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SREM_PDU_Descriptions language "ASN.1:1997" all;
    import from SSEM_PDU_Descriptions language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    
@@ -54,6 +56,8 @@ module ItsRSUsSimulator_Templates {
                                                  in template (omit) SPATEMs p_spatems := omit,
                                                  in template (omit) IVIM p_ivim := omit,
                                                  //                                                  in template (omit) EvcsnPdu p_evcsn := omit,
                                                  in template (omit) RTCMEM p_rtcmem := omit,
                                                  in template (omit) SREM p_srem := omit,
                                                  in template (omit) SSEM p_ssem := omit
    ) := {
        beacon     := p_beacon,
@@ -63,6 +67,8 @@ module ItsRSUsSimulator_Templates {
        spatems    := p_spatems,
        ivim       := p_ivim,
        //        evcsn      := p_evcsn,
        rtcmem       := p_rtcmem,
        srem       := p_srem,
        ssem       := p_ssem
    } // End of template RsuMessagesValue

@@ -384,6 +390,22 @@ module ItsRSUsSimulator_Templates {
        
    } // End of ivimTemplates
    
    group rtcmemTemplates {
        
        template (value) RTCMEM m_rtcmemParm(
                                             in template (value) StationID p_stationID,
                                             in template (value) RTCMcorrections p_rtcmc
        ) := {
            header := {
                protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_rtcmem_,
                stationID := p_stationID
            },
            rtcmc := p_rtcmc
        }
        
    } // End of rtcmemTemplates
    
    /* group evcsnTemplates { */
        
    /*     template (value) EvcsnPdu m_evcsnParm( */
+11 −1
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@ module ItsRSUsSimulator_TestCases {
          if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].ivim)) {
            tc_ivim.start;
          }
          if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].rtcmem)) {
            tc_rtcmem.start;
          }
          /* if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].evcsn)) { */
          /*     tc_evcsn.start; */
          /* } */
@@ -164,12 +167,19 @@ module ItsRSUsSimulator_TestCases {
                repeat;
            }
            [vc_ivim == true] tc_ivim.timeout {
                //log("*** " & testcasename() & ": DEBUG: Processing IVIM ***");
                log("*** " & testcasename() & ": DEBUG: Processing IVIM ***");
                f_prepare_ivim(v_payload);
                f_send(v_payload, PICS_IVIM_ITS_AID);
                tc_ivim.start;
                repeat;
            }
            [vc_rtcmem == true] tc_rtcmem.timeout {
                log("*** " & testcasename() & ": DEBUG: Processing RTCMEM ***");
                f_prepare_rtcmem(v_payload);
                f_send(v_payload, PICS_RTCMEM_ITS_AID);
                tc_rtcmem.start;
                repeat;
            }
            /* [vc_evcsn == true] tc_evcsn.timeout { */
            /*     //log("*** " & testcasename() & ": DEBUG: Processing EVCSN ***"); */
            /*     f_prepare_evcsn(v_payload); */
Loading