Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +32 −32 Original line number Diff line number Diff line Loading @@ -49,8 +49,7 @@ module LibItsGeoNetworking_Functions { } [] tc_guard.timeout { log("*** f_ptcGeoNetworkingDown: ERROR: Timeout while waiting for component ***"); setverdict(inconc); f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcGeoNetworkingDown: Timeout while waiting for component ***"); } } unmap(p_ptcGeoNetworking:geoNetworkingPort); Loading Loading @@ -562,19 +561,13 @@ module LibItsGeoNetworking_Functions { repeat; } [] geoNetworkingPort.receive { setverdict (inconc, "*** INCONC: Received an unexpected message ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** a_default: Received an unexpected message ***"); } [] tc_wait.timeout { setverdict (inconc, "*** INCONC: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); } [] tc_ac.timeout { setverdict (inconc, "*** INCONC: Timeout while awaiting the reception of a message ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting the reception of a message ***"); } [] a_shutdown() { f_poDefault(); Loading Loading @@ -849,7 +842,6 @@ module LibItsGeoNetworking_Functions { initComponent.start(f_utInitializeIut()); initComponent.done; setverdict(pass); } function f_handleLocationService( Loading Loading @@ -920,7 +912,7 @@ module LibItsGeoNetworking_Functions { * @desc The default postamble. */ function f_poDefault() runs on ItsNt { setverdict(pass); //empty } function f_poNeighbour() runs on ItsNt { Loading @@ -942,15 +934,13 @@ module LibItsGeoNetworking_Functions { tc_ac.start; alt { [] utPort.receive(UtGNResult:true) { setverdict (pass, "IUT initialized"); log("*** f_utInitializeIut: IUT initialized ***"); } [] utPort.receive { setverdict (inconc, "IUT could not be initialized"); stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utInitializeIut: IUT could not be initialized ***"); } [] tc_ac.timeout { setverdict (inconc, "IUT could not be initialized in time"); stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utInitializeIut: IUT could not be initialized in time ***"); } } Loading @@ -975,28 +965,38 @@ module LibItsGeoNetworking_Functions { * @param p_event The event to check. * @return */ function f_utCheckEvent(template (value) GeoNetworkingPacket p_event) runs on ItsNt return FncRetCode { var FncRetCode v_ret := e_success; function f_utCheckEvent(template (value) GeoNetworkingPacket p_event, boolean p_discard:=false) runs on ItsNt { var template (value) UtGNCheck v_utMsg := { p_event }; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtGNResult:true) { setverdict (pass, "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, "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, "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 upperTester Loading Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +32 −32 Original line number Diff line number Diff line Loading @@ -49,8 +49,7 @@ module LibItsGeoNetworking_Functions { } [] tc_guard.timeout { log("*** f_ptcGeoNetworkingDown: ERROR: Timeout while waiting for component ***"); setverdict(inconc); f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcGeoNetworkingDown: Timeout while waiting for component ***"); } } unmap(p_ptcGeoNetworking:geoNetworkingPort); Loading Loading @@ -562,19 +561,13 @@ module LibItsGeoNetworking_Functions { repeat; } [] geoNetworkingPort.receive { setverdict (inconc, "*** INCONC: Received an unexpected message ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** a_default: Received an unexpected message ***"); } [] tc_wait.timeout { setverdict (inconc, "*** INCONC: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***"); } [] tc_ac.timeout { setverdict (inconc, "*** INCONC: Timeout while awaiting the reception of a message ***"); //TODO shall stop be called here? stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** a_default: Timeout while awaiting the reception of a message ***"); } [] a_shutdown() { f_poDefault(); Loading Loading @@ -849,7 +842,6 @@ module LibItsGeoNetworking_Functions { initComponent.start(f_utInitializeIut()); initComponent.done; setverdict(pass); } function f_handleLocationService( Loading Loading @@ -920,7 +912,7 @@ module LibItsGeoNetworking_Functions { * @desc The default postamble. */ function f_poDefault() runs on ItsNt { setverdict(pass); //empty } function f_poNeighbour() runs on ItsNt { Loading @@ -942,15 +934,13 @@ module LibItsGeoNetworking_Functions { tc_ac.start; alt { [] utPort.receive(UtGNResult:true) { setverdict (pass, "IUT initialized"); log("*** f_utInitializeIut: IUT initialized ***"); } [] utPort.receive { setverdict (inconc, "IUT could not be initialized"); stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utInitializeIut: IUT could not be initialized ***"); } [] tc_ac.timeout { setverdict (inconc, "IUT could not be initialized in time"); stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utInitializeIut: IUT could not be initialized in time ***"); } } Loading @@ -975,28 +965,38 @@ module LibItsGeoNetworking_Functions { * @param p_event The event to check. * @return */ function f_utCheckEvent(template (value) GeoNetworkingPacket p_event) runs on ItsNt return FncRetCode { var FncRetCode v_ret := e_success; function f_utCheckEvent(template (value) GeoNetworkingPacket p_event, boolean p_discard:=false) runs on ItsNt { var template (value) UtGNCheck v_utMsg := { p_event }; utPort.send(v_utMsg); tc_ac.start; alt { [] utPort.receive(UtGNResult:true) { setverdict (pass, "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, "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, "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 upperTester Loading