Loading ttcn/DENM/LibItsDenm_Functions.ttcn +26 −24 Original line number Diff line number Diff line Loading @@ -126,8 +126,6 @@ module LibItsDenm_Functions { f_utInitializeIut(); f_setVerdictPreOrPostamble(v_ret); return v_ret; } Loading @@ -141,8 +139,6 @@ module LibItsDenm_Functions { function f_poDefault() runs on ItsFa { var FncRetCode v_ret := e_success; //empty f_setVerdictPreOrPostamble(v_ret); } /** Loading @@ -166,7 +162,6 @@ module LibItsDenm_Functions { else { v_ret := f_utTriggerEvent(m_utEventCancellation(p_event, c_dataVersionCancellation)); } f_setVerdictPreOrPostamble(v_ret); f_poDefault(); } Loading Loading @@ -213,30 +208,41 @@ module LibItsDenm_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. * @return */ function f_utCheckEvent(template (value) UtDenmEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; function f_utCheckEvent(template (value) UtDenmEvent p_event, boolean p_discard := false) runs on ItsFa { var template (value) UtDenmCheck v_utMsg := { p_event }; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utCheckEvent: Event correctly indicated at application layer ***"); v_ret := e_success; if (p_discard == false) { log("*** f_utCheckEvent: Event correctly indicated at application layer ***"); } else { f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utCheckEvent: Event indicated at application layer where should not appear ***"); } } [] utPort.receive { setverdict (fail, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); v_ret := e_error; if (p_discard == false) { f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); } else { log("*** f_utCheckEvent: Another event indicated at application layer, repeating check ***"); repeat; } } [] tc_ac.timeout { setverdict (inconc, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); v_ret := e_timeout; if (p_discard == false) { f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); } else { log("*** f_utCheckEvent: Event not indicated at application layer ***"); } } } return v_ret; } } // end group upperTester Loading @@ -262,9 +268,9 @@ module LibItsDenm_Functions { * @param p_rcvMsg The expected message to be received. */ function f_awaitDenMessage(template (present) DenmInd p_rcvMsg) runs on ItsFa return FncRetCode { function f_awaitDenMessage(template (present) DenmInd p_rcvMsg) runs on ItsFa { var DenmInd v_denmInd; return f_awaitDenMessageOut(p_rcvMsg, v_denmInd); f_awaitDenMessageOut(p_rcvMsg, v_denmInd); } /** Loading @@ -273,22 +279,18 @@ module LibItsDenm_Functions { * @param p_rcvdMsg The received message - OUT. * @return */ function f_awaitDenMessageOut(in template (present) DenmInd p_rcvMsg, out DenmInd p_rcvdMsg) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_timeout; function f_awaitDenMessageOut(in template (present) DenmInd p_rcvMsg, out DenmInd p_rcvdMsg) runs on ItsFa { tc_ac.start; alt { [] denmPort.receive(p_rcvMsg) -> value p_rcvdMsg { tc_ac.stop; v_ret := e_success; } [] tc_ac.timeout { log("*** f_awaitDenMessageOut: INFO: Timeout while awaiting the reception of a message ***"); v_ret := e_timeout; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_awaitDenMessageOut: INFO: Timeout while awaiting the reception of a message ***"); } } return v_ret; } } // end receiveFunctions Loading Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +26 −24 Original line number Diff line number Diff line Loading @@ -126,8 +126,6 @@ module LibItsDenm_Functions { f_utInitializeIut(); f_setVerdictPreOrPostamble(v_ret); return v_ret; } Loading @@ -141,8 +139,6 @@ module LibItsDenm_Functions { function f_poDefault() runs on ItsFa { var FncRetCode v_ret := e_success; //empty f_setVerdictPreOrPostamble(v_ret); } /** Loading @@ -166,7 +162,6 @@ module LibItsDenm_Functions { else { v_ret := f_utTriggerEvent(m_utEventCancellation(p_event, c_dataVersionCancellation)); } f_setVerdictPreOrPostamble(v_ret); f_poDefault(); } Loading Loading @@ -213,30 +208,41 @@ module LibItsDenm_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. * @return */ function f_utCheckEvent(template (value) UtDenmEvent p_event) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_success; function f_utCheckEvent(template (value) UtDenmEvent p_event, boolean p_discard := false) runs on ItsFa { var template (value) UtDenmCheck v_utMsg := { p_event }; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utCheckEvent: Event correctly indicated at application layer ***"); v_ret := e_success; if (p_discard == false) { log("*** f_utCheckEvent: Event correctly indicated at application layer ***"); } else { f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utCheckEvent: Event indicated at application layer where should not appear ***"); } } [] utPort.receive { setverdict (fail, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); v_ret := e_error; if (p_discard == false) { f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); } else { log("*** f_utCheckEvent: Another event indicated at application layer, repeating check ***"); repeat; } } [] tc_ac.timeout { setverdict (inconc, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); v_ret := e_timeout; if (p_discard == false) { f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); } else { log("*** f_utCheckEvent: Event not indicated at application layer ***"); } } } return v_ret; } } // end group upperTester Loading @@ -262,9 +268,9 @@ module LibItsDenm_Functions { * @param p_rcvMsg The expected message to be received. */ function f_awaitDenMessage(template (present) DenmInd p_rcvMsg) runs on ItsFa return FncRetCode { function f_awaitDenMessage(template (present) DenmInd p_rcvMsg) runs on ItsFa { var DenmInd v_denmInd; return f_awaitDenMessageOut(p_rcvMsg, v_denmInd); f_awaitDenMessageOut(p_rcvMsg, v_denmInd); } /** Loading @@ -273,22 +279,18 @@ module LibItsDenm_Functions { * @param p_rcvdMsg The received message - OUT. * @return */ function f_awaitDenMessageOut(in template (present) DenmInd p_rcvMsg, out DenmInd p_rcvdMsg) runs on ItsFa return FncRetCode { var FncRetCode v_ret := e_timeout; function f_awaitDenMessageOut(in template (present) DenmInd p_rcvMsg, out DenmInd p_rcvdMsg) runs on ItsFa { tc_ac.start; alt { [] denmPort.receive(p_rcvMsg) -> value p_rcvdMsg { tc_ac.stop; v_ret := e_success; } [] tc_ac.timeout { log("*** f_awaitDenMessageOut: INFO: Timeout while awaiting the reception of a message ***"); v_ret := e_timeout; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_awaitDenMessageOut: INFO: Timeout while awaiting the reception of a message ***"); } } return v_ret; } } // end receiveFunctions Loading