Commit 0f160499 authored by garciay's avatar garciay
Browse files

STF525: Test AtsCAM, AtsDENM is secured mode

parent bda6dab1
Loading
Loading
Loading
Loading
+24 −14
Original line number Original line Diff line number Diff line
@@ -117,8 +117,6 @@ module ItsRSUsSimulator_Functions {
            //Initialze the Config module
            //Initialze the Config module
            //cfPort.send(CfInitialize:{});
            //cfPort.send(CfInitialize:{});
            
            
            //activate(a_process_ut_command());
            
            // Initialisations
            // Initialisations
            f_setup_rsu(vc_rsu_id);
            f_setup_rsu(vc_rsu_id);
             
             
@@ -419,7 +417,7 @@ module ItsRSUsSimulator_Functions {
        
        
    } // End of function f_setup_rsu
    } // End of function f_setup_rsu
    
    
    /*function f_process_cf_event(
    function f_process_cf_event(
                                in CfEvent p_cfEvent
                                in CfEvent p_cfEvent
    ) runs on ItsRSUsSimulator return boolean {
    ) runs on ItsRSUsSimulator return boolean {
        var template (value) CfResult v_result := true;
        var template (value) CfResult v_result := true;
@@ -450,8 +448,8 @@ module ItsRSUsSimulator_Functions {
        
        
        cfPort.send(v_result);
        cfPort.send(v_result);


        return false;
        return true;
    }*/ // End of function f_process_cf_event
    } // End of function f_process_cf_event
    
    
    function f_prepare_beacon(
    function f_prepare_beacon(
                              out template (value) GnRawPayload p_payload
                              out template (value) GnRawPayload p_payload
@@ -868,15 +866,27 @@ module ItsRSUsSimulator_Functions {
        return v_out
        return v_out
    }
    }
    
    
    /*altstep a_process_ut_command() runs on ItsRSUsSimulator {
    altstep a_process_cf_ut_command() runs on ItsRSUsSimulator {
        [PICS_GENERATE_CAM == true] utPort.receive(UtCamInitialize:?) {
        [vc_cam == true] cfPort.receive(UtCamInitialize:?) {
            utPort.send(UtCamResults: { utCamInitializeResult := true });
          cfPort.send(UtCamResults: { utCamInitializeResult := true } );
          repeat;
        }
        [vc_denm == true] cfPort.receive(UtDenmInitialize:?) {
          cfPort.send(UtDenmResults: { utDenmInitializeResult := true } );
          repeat;
        }
        }
        [PICS_GENERATE_DENM == true] utPort.receive(UtDenmInitialize:?) {
        [vc_beacon == true] cfPort.receive(UtGnInitialize:?) {
            utPort.send(UtDenmResults: { utDenmInitializeResult := true });
          cfPort.send(UtGnResults: { utGnInitializeResult := true } );
          repeat;
        }
        }
        [] utPort.receive {
        /* [PICS_GENERATE_DENM == true] utPort.receive(UtDenmInitialize:?) { */
        /*     utPort.send(UtDenmResults: { utDenmInitializeResult := true }); */
        /* } */
        [] cfPort.receive {
          // Ignore it
          // Ignore it
          log("*** " & testcasename() & ": INFO: Unexpected CF message received ***");
          repeat;
        }
        }
    }*/
    } // End of 'altstep' statement
    
} // End of module ItsRSUsSimulator_Functions
} // End of module ItsRSUsSimulator_Functions
+6 −12
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ module ItsRSUsSimulator_TestCases {
    import from LibItsGeoNetworking_Templates all;
    import from LibItsGeoNetworking_Templates all;
    
    
    // LibItsCam
    // LibItsCam
    import from LibItsCam_TypesAndValues all;
    import from LibItsCam_EncdecDeclarations all;
    import from LibItsCam_EncdecDeclarations all;
    
    
    // LibItsDenm
    // LibItsDenm
@@ -41,7 +42,7 @@ module ItsRSUsSimulator_TestCases {
        // Local variables
        // Local variables
        var template (value) GnRawPayload v_payload;
        var template (value) GnRawPayload v_payload;
        var GeoNetworkingInd v_gnInd;
        var GeoNetworkingInd v_gnInd;
        //var CfEvent v_cfEvent;
        var CfEvent v_cfEvent;
        
        
        // Test control
        // Test control
        
        
@@ -51,6 +52,7 @@ module ItsRSUsSimulator_TestCases {
        // Test adapter configuration
        // Test adapter configuration
        
        
        // Preamble
        // Preamble
        activate(a_process_cf_ut_command());
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
        
        
        // Test Body
        // Test Body
@@ -107,12 +109,12 @@ module ItsRSUsSimulator_TestCases {
                // Nothing to do, just for logging purposes
                // Nothing to do, just for logging purposes
                repeat;
                repeat;
            }
            }
            /*[] cfPort.receive(CfEvent:?) -> value v_cfEvent {
            [] cfPort.receive(CfEvent:?) -> value v_cfEvent {
                //log("*** " & testcasename() & ": DEBUG: Configuration port command:", v_cfEvent, " ***");
                log("*** " & testcasename() & ": DEBUG: Configuration port command:", v_cfEvent, " ***");
                if (f_process_cf_event(v_cfEvent) == true) {
                if (f_process_cf_event(v_cfEvent) == true) {
                    repeat;
                    repeat;
                }
                }
            }*/
            }
            [vc_beacon == true] tc_beacon.timeout {
            [vc_beacon == true] tc_beacon.timeout {
                log("*** " & testcasename() & ": DEBUG: Processing BEACON ***");
                log("*** " & testcasename() & ": DEBUG: Processing BEACON ***");
                f_prepare_beacon(v_payload);
                f_prepare_beacon(v_payload);
@@ -321,10 +323,6 @@ module ItsRSUsSimulator_TestCases {
                tc_ac.start;
                tc_ac.start;
                repeat;
                repeat;
            }
            }
            /*[] cfPort.receive {
                tc_cam.stop;
                all component.stop;
            }*/
            [] tc_ac.timeout {
            [] tc_ac.timeout {
                log("*** " & testcasename() & ": DEBUG: No CAM message received ***");
                log("*** " & testcasename() & ": DEBUG: No CAM message received ***");
                //all component.stop;
                //all component.stop;
@@ -412,10 +410,6 @@ module ItsRSUsSimulator_TestCases {
                        }
                        }
                    }
                    }
                }
                }
                /*[] cfPort.receive {
                    tc_wait.stop;
                    repeat;
                }*/
                [] tc_ac.timeout {
                [] tc_ac.timeout {
                    log("*** " & testcasename() & ": DEBUG: No CAM message received ***");
                    log("*** " & testcasename() & ": DEBUG: No CAM message received ***");
                }
                }
+10 −2
Original line number Original line Diff line number Diff line
@@ -8,6 +8,14 @@ module ItsRSUsSimulator_TestSystem {
  import from LibItsGeoNetworking_TestSystem all;
  import from LibItsGeoNetworking_TestSystem all;
  import from LibItsGeoNetworking_TypesAndValues all;
  import from LibItsGeoNetworking_TypesAndValues all;
    
    
  // LibItsCam
  import from LibItsCam_TestSystem all;
  import from LibItsCam_TypesAndValues all;
    
  // LibItsDenm
  import from LibItsDenm_TestSystem all;
  import from LibItsDenm_TypesAndValues all;
    
  // AtsRSUsSimulator
  // AtsRSUsSimulator
  import from ItsRSUsSimulator_TypesAndValues all;
  import from ItsRSUsSimulator_TypesAndValues all;
  import from ItsRSUsSimulator_Pics all;
  import from ItsRSUsSimulator_Pics all;
@@ -140,9 +148,9 @@ module ItsRSUsSimulator_TestSystem {
     */
     */
    type port ConfigRsuSimulatorPort message {
    type port ConfigRsuSimulatorPort message {
      out 
      out 
      CfInitialize, CfResult, UtGnResults; 
      CfInitialize, CfResult, UtGnResults, UtCamResults, UtDenmResults;
      in 
      in 
      CfEvent, CfEventInd, UtGnInitialize
      CfEvent, CfEventInd, UtGnInitialize, UtCamInitialize, UtDenmInitialize
      } // End of ConfigRsuSimulatorPort
      } // End of ConfigRsuSimulatorPort
        
        
  } // End of group configRsuSimulatorPort 
  } // End of group configRsuSimulatorPort