Loading ttcn/CAM/LibItsCam_Functions.ttcn +37 −35 Original line number Diff line number Diff line Loading @@ -76,38 +76,18 @@ module LibItsCam_Functions { } /** * @desc Checks that the event was indicated at the application layer * @param p_event The event to check. * @param p_discard The event should not appear. Default value: FALSE. * @desc Changes the position of the IUT * @param p_position */ function f_utCheckEvent(template (value) UtCamTrigger p_event, boolean p_discard := false) runs on ItsCam { var template (value) UtCheck v_utMsg := { p_event }; function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsCam { utPort.send(v_utMsg); tc_wait.start; utPort.send(p_position); alt { [] utPort.receive(UtCamTriggerResult:true) { tc_wait.stop; if (p_discard == false) { log("*** f_utCheckEvent: INFO: Event correctly indicated at application layer ***"); } else { log("*** f_utCheckEvent: ERROR: Event indicated at application layer where it should be discarded ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } [] utPort.receive(UtCamTriggerResult:false) { [] utPort.receive(UtChangePositionResult:?) { tc_wait.stop; if (p_discard == false) { log("*** f_utCheckEvent: ERROR: Event not correctly indicated at application layer ***"); f_selfOrClientSyncAndVerdict("error", e_error); } else { log("*** f_utCheckEvent: INFO: Event not indicated at application layer***"); } } [] tc_wait.timeout { log("*** f_utCheckEvent: ERROR: Timeout while waiting for event check result ***"); log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [else] { // Shortcut defaults Loading Loading @@ -172,12 +152,35 @@ module LibItsCam_Functions { } }//end altstep a_basicDefault /** * @desc The default for handling upper tester messages. */ altstep a_utDefault() runs on ItsCam { var UtCamEventInd v_event; [] utPort.receive(UtCamEventInd:?) -> value v_event { //store every upper tester indication received vc_utEvents[lengthof(vc_utEvents)] := v_event; repeat; } [] utPort.receive { tc_wait.stop; log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } } // end of defaults group preambles { /** * @desc The default preamble. */ function f_prDefault() runs on ItsCam { vc_default := activate(a_default()); activate(a_utDefault()); } /** * @desc Initialize the IUT * @remark No specific actions specified in the base standard Loading @@ -186,8 +189,7 @@ module LibItsCam_Functions { f_utInitializeIut(m_camInitialize); // basic default altstep activate(a_default()); f_prDefault(); camPort.clear; tc_ac.start; Loading ttcn/CAM/LibItsCam_Templates.ttcn +0 −16 Original line number Diff line number Diff line Loading @@ -118,22 +118,6 @@ module LibItsCam_Templates { setDangerousGoods := p_dangerousGoods } /** * @desc Change the position in the direction of the current heading * @param p_offset Offset to the current position in meter */ template (value) UtCamTrigger m_changePosition(UtChangePosition p_offset) := { changePosition := p_offset } /** * @desc Checks the receive of a message at LDM * @param p_message The CAM message to check */ template (value) UtCamTrigger m_checkLdm(CAM p_message) := { checkLdm := p_message } } // end utPrimitives } // end group Primitives Loading ttcn/CAM/LibItsCam_TestSystem.ttcn +4 −2 Original line number Diff line number Diff line Loading @@ -26,9 +26,9 @@ module LibItsCam_TestSystem { */ type port UpperTesterPort message { out UtInitialize, UtCamTrigger, UtCheck; UtInitialize, UtCamTrigger, UtChangePosition; in UtInitializeResult, UtCamTriggerResult; UtInitializeResult, UtCamTriggerResult, UtChangePositionResult, UtCamEventInd; } // end UpperTesterPort } // end portDefinitions Loading Loading @@ -89,6 +89,8 @@ module LibItsCam_TestSystem { //global variables var boolean vc_camReceived := false; var UtCamEventIndList vc_utEvents := {}; } // End of component ItsCam group facilityPrimitives { Loading ttcn/CAM/LibItsCam_TypesAndValues.ttcn +13 −24 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ module LibItsCam_TypesAndValues { import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsCommon_TypesAndValues { type UtChangePosition }; group camValues { Loading Loading @@ -76,22 +73,6 @@ module LibItsCam_TypesAndValues { group utPrimitives { group utCommonPrimitives { /** * @desc Upper Tester message to check event/status on IUT */ type record UtCheck { /* FIXME: change this as in DENM */ UtCamTrigger utEvent } with { encode (utEvent) "UpperTester" } } with { encode "LibItsCommon" } /** * @desc * @member changeCurvature Changes the curvature. Loading @@ -108,8 +89,6 @@ module LibItsCam_TypesAndValues { * @member setDangerousGoodsExt * @member setLightBarSireneStatus * @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second. * @member changePosition Changes the position in the direction of the current heading in meters. * @member checkLdm Checks that the received CAM was provided at LDM. */ type union UtCamTrigger { CurvatureValue changeCurvature, Loading @@ -125,9 +104,7 @@ module LibItsCam_TypesAndValues { PtActivation setPtActivation, DangerousGoodsBasic setDangerousGoods, DangerousGoodsExtended setDangerousGoodsExt, LightBarSirenInUse setLightBarSirene, UtChangePosition changePosition, /* FIXME: obselete, to be removed */ CAM checkLdm /* FIXME: obselete, to be removed */ LightBarSirenInUse setLightBarSirene } /** Loading @@ -135,6 +112,18 @@ module LibItsCam_TypesAndValues { */ type boolean UtCamTriggerResult; /** * @desc Upper Tester message to check event/status on CAM IUT */ type record UtCamEventInd { CAM camMsg } /** * @desc List of Upper Tester messages to check event/status on CAM IUT */ type record of UtCamEventInd UtCamEventIndList; } with { encode "UpperTester" } // end utPrimitives Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +0 −5 Original line number Diff line number Diff line Loading @@ -77,11 +77,6 @@ module LibItsGeoNetworking_Functions { tc_wait.stop; log("*** f_utChangePosition: INFO: IUT position changed ***"); } [] utPort.receive { tc_wait.stop; log("*** f_utChangePosition: INFO: IUT position not changed ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { log("*** f_utChangePosition: INFO: IUT position not changed in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); Loading Loading
ttcn/CAM/LibItsCam_Functions.ttcn +37 −35 Original line number Diff line number Diff line Loading @@ -76,38 +76,18 @@ module LibItsCam_Functions { } /** * @desc Checks that the event was indicated at the application layer * @param p_event The event to check. * @param p_discard The event should not appear. Default value: FALSE. * @desc Changes the position of the IUT * @param p_position */ function f_utCheckEvent(template (value) UtCamTrigger p_event, boolean p_discard := false) runs on ItsCam { var template (value) UtCheck v_utMsg := { p_event }; function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsCam { utPort.send(v_utMsg); tc_wait.start; utPort.send(p_position); alt { [] utPort.receive(UtCamTriggerResult:true) { tc_wait.stop; if (p_discard == false) { log("*** f_utCheckEvent: INFO: Event correctly indicated at application layer ***"); } else { log("*** f_utCheckEvent: ERROR: Event indicated at application layer where it should be discarded ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } [] utPort.receive(UtCamTriggerResult:false) { [] utPort.receive(UtChangePositionResult:?) { tc_wait.stop; if (p_discard == false) { log("*** f_utCheckEvent: ERROR: Event not correctly indicated at application layer ***"); f_selfOrClientSyncAndVerdict("error", e_error); } else { log("*** f_utCheckEvent: INFO: Event not indicated at application layer***"); } } [] tc_wait.timeout { log("*** f_utCheckEvent: ERROR: Timeout while waiting for event check result ***"); log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [else] { // Shortcut defaults Loading Loading @@ -172,12 +152,35 @@ module LibItsCam_Functions { } }//end altstep a_basicDefault /** * @desc The default for handling upper tester messages. */ altstep a_utDefault() runs on ItsCam { var UtCamEventInd v_event; [] utPort.receive(UtCamEventInd:?) -> value v_event { //store every upper tester indication received vc_utEvents[lengthof(vc_utEvents)] := v_event; repeat; } [] utPort.receive { tc_wait.stop; log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } } // end of defaults group preambles { /** * @desc The default preamble. */ function f_prDefault() runs on ItsCam { vc_default := activate(a_default()); activate(a_utDefault()); } /** * @desc Initialize the IUT * @remark No specific actions specified in the base standard Loading @@ -186,8 +189,7 @@ module LibItsCam_Functions { f_utInitializeIut(m_camInitialize); // basic default altstep activate(a_default()); f_prDefault(); camPort.clear; tc_ac.start; Loading
ttcn/CAM/LibItsCam_Templates.ttcn +0 −16 Original line number Diff line number Diff line Loading @@ -118,22 +118,6 @@ module LibItsCam_Templates { setDangerousGoods := p_dangerousGoods } /** * @desc Change the position in the direction of the current heading * @param p_offset Offset to the current position in meter */ template (value) UtCamTrigger m_changePosition(UtChangePosition p_offset) := { changePosition := p_offset } /** * @desc Checks the receive of a message at LDM * @param p_message The CAM message to check */ template (value) UtCamTrigger m_checkLdm(CAM p_message) := { checkLdm := p_message } } // end utPrimitives } // end group Primitives Loading
ttcn/CAM/LibItsCam_TestSystem.ttcn +4 −2 Original line number Diff line number Diff line Loading @@ -26,9 +26,9 @@ module LibItsCam_TestSystem { */ type port UpperTesterPort message { out UtInitialize, UtCamTrigger, UtCheck; UtInitialize, UtCamTrigger, UtChangePosition; in UtInitializeResult, UtCamTriggerResult; UtInitializeResult, UtCamTriggerResult, UtChangePositionResult, UtCamEventInd; } // end UpperTesterPort } // end portDefinitions Loading Loading @@ -89,6 +89,8 @@ module LibItsCam_TestSystem { //global variables var boolean vc_camReceived := false; var UtCamEventIndList vc_utEvents := {}; } // End of component ItsCam group facilityPrimitives { Loading
ttcn/CAM/LibItsCam_TypesAndValues.ttcn +13 −24 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ module LibItsCam_TypesAndValues { import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsCommon_TypesAndValues { type UtChangePosition }; group camValues { Loading Loading @@ -76,22 +73,6 @@ module LibItsCam_TypesAndValues { group utPrimitives { group utCommonPrimitives { /** * @desc Upper Tester message to check event/status on IUT */ type record UtCheck { /* FIXME: change this as in DENM */ UtCamTrigger utEvent } with { encode (utEvent) "UpperTester" } } with { encode "LibItsCommon" } /** * @desc * @member changeCurvature Changes the curvature. Loading @@ -108,8 +89,6 @@ module LibItsCam_TypesAndValues { * @member setDangerousGoodsExt * @member setLightBarSireneStatus * @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second. * @member changePosition Changes the position in the direction of the current heading in meters. * @member checkLdm Checks that the received CAM was provided at LDM. */ type union UtCamTrigger { CurvatureValue changeCurvature, Loading @@ -125,9 +104,7 @@ module LibItsCam_TypesAndValues { PtActivation setPtActivation, DangerousGoodsBasic setDangerousGoods, DangerousGoodsExtended setDangerousGoodsExt, LightBarSirenInUse setLightBarSirene, UtChangePosition changePosition, /* FIXME: obselete, to be removed */ CAM checkLdm /* FIXME: obselete, to be removed */ LightBarSirenInUse setLightBarSirene } /** Loading @@ -135,6 +112,18 @@ module LibItsCam_TypesAndValues { */ type boolean UtCamTriggerResult; /** * @desc Upper Tester message to check event/status on CAM IUT */ type record UtCamEventInd { CAM camMsg } /** * @desc List of Upper Tester messages to check event/status on CAM IUT */ type record of UtCamEventInd UtCamEventIndList; } with { encode "UpperTester" } // end utPrimitives Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +0 −5 Original line number Diff line number Diff line Loading @@ -77,11 +77,6 @@ module LibItsGeoNetworking_Functions { tc_wait.stop; log("*** f_utChangePosition: INFO: IUT position changed ***"); } [] utPort.receive { tc_wait.stop; log("*** f_utChangePosition: INFO: IUT position not changed ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { log("*** f_utChangePosition: INFO: IUT position not changed in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); Loading