Loading ttcn/DENM/LibItsDenm_Functions.ttcn +16 −38 Original line number Diff line number Diff line Loading @@ -16,13 +16,10 @@ module LibItsDenm_Functions { }; // LibIts import from LibItsCommon_Functions all; import from LibItsDenm_TestSystem all; import from LibItsDenm_TypesAndValues all; import from LibItsDenm_Templates all; import from LibItsDenm_Pics all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from ITS_Container language "ASN.1:1997" all; group utFuntions { Loading Loading @@ -172,28 +169,12 @@ module LibItsDenm_Functions { } /** * @desc Default handling the cancellation of an event. * @param p_trigger Indicates if the cancellation have to be raised by the test system(e_ets) * or at the application layer of the IUT(e_iut). * @param p_actionId The action ID of the event to be cancelled */ altstep a_cancelEvent(in template (value) Trigger p_trigger, in template (value) ActionID p_actionId) runs on ItsDenm { [] a_shutdown() { f_poCancelEvent(p_trigger, p_actionId); f_cfDown(); log("*** " & __SCOPE__ & ": INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } /** * TODO * @desc * @desc The default for handling upper tester messages. */ altstep a_utDefault() runs on ItsDenm { var UtEventInd v_event; [] utPort.receive(UtEventInd:?) -> value v_event { //store every upper tester indication received vc_utEvents[sizeof(vc_utEvents)] := v_event; repeat; } Loading Loading @@ -320,29 +301,26 @@ module LibItsDenm_Functions { } // end receiveFunctions group getFunctions { group iutGetFunctions { group miscellaneousFunctions { /** * @desc Gets IUT's default event duration * @return Default expiry time of DENM events * @desc Increases the sequence number and handles the special case where the * sequence number reaches the limit of 65535 and will be reset to 0. * @param p_sequenceNumber The sequence number to increase. * @return The increased sequence number. */ function f_getIutDefaultEventDuration() return TimestampIts { return PICS_DEFAULT_EXPIRY_TIME; } } // end iutGetFunctions } // end group getFunctions group miscellaneousFunctions { function f_increaseSequenceNumber(in SequenceNumber p_sequenceNumber) return SequenceNumber { // if maximum number of 65535 reached, reset it to 0 return ((p_sequenceNumber + 1) mod 65536); } /** * @desc Increases the data version and handles the special case where the * data version reaches the limit of 254(255 is the special cancellation value) * and will be reset to 0. * @param p_dataVersion The data version to increase. * @return The increased data version. */ function f_increaseDataVersion(in DataVersion p_dataVersion) return DataVersion { // if maximum number of 254 reached, reset it to 0 return ((p_dataVersion + 1) mod 255); Loading Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +16 −38 Original line number Diff line number Diff line Loading @@ -16,13 +16,10 @@ module LibItsDenm_Functions { }; // LibIts import from LibItsCommon_Functions all; import from LibItsDenm_TestSystem all; import from LibItsDenm_TypesAndValues all; import from LibItsDenm_Templates all; import from LibItsDenm_Pics all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from ITS_Container language "ASN.1:1997" all; group utFuntions { Loading Loading @@ -172,28 +169,12 @@ module LibItsDenm_Functions { } /** * @desc Default handling the cancellation of an event. * @param p_trigger Indicates if the cancellation have to be raised by the test system(e_ets) * or at the application layer of the IUT(e_iut). * @param p_actionId The action ID of the event to be cancelled */ altstep a_cancelEvent(in template (value) Trigger p_trigger, in template (value) ActionID p_actionId) runs on ItsDenm { [] a_shutdown() { f_poCancelEvent(p_trigger, p_actionId); f_cfDown(); log("*** " & __SCOPE__ & ": INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } /** * TODO * @desc * @desc The default for handling upper tester messages. */ altstep a_utDefault() runs on ItsDenm { var UtEventInd v_event; [] utPort.receive(UtEventInd:?) -> value v_event { //store every upper tester indication received vc_utEvents[sizeof(vc_utEvents)] := v_event; repeat; } Loading Loading @@ -320,29 +301,26 @@ module LibItsDenm_Functions { } // end receiveFunctions group getFunctions { group iutGetFunctions { group miscellaneousFunctions { /** * @desc Gets IUT's default event duration * @return Default expiry time of DENM events * @desc Increases the sequence number and handles the special case where the * sequence number reaches the limit of 65535 and will be reset to 0. * @param p_sequenceNumber The sequence number to increase. * @return The increased sequence number. */ function f_getIutDefaultEventDuration() return TimestampIts { return PICS_DEFAULT_EXPIRY_TIME; } } // end iutGetFunctions } // end group getFunctions group miscellaneousFunctions { function f_increaseSequenceNumber(in SequenceNumber p_sequenceNumber) return SequenceNumber { // if maximum number of 65535 reached, reset it to 0 return ((p_sequenceNumber + 1) mod 65536); } /** * @desc Increases the data version and handles the special case where the * data version reaches the limit of 254(255 is the special cancellation value) * and will be reset to 0. * @param p_dataVersion The data version to increase. * @return The increased data version. */ function f_increaseDataVersion(in DataVersion p_dataVersion) return DataVersion { // if maximum number of 254 reached, reset it to 0 return ((p_dataVersion + 1) mod 255); Loading