Loading ttcn/DENM/LibItsDenm_Functions.ttcn +69 −48 Original line number Diff line number Diff line Loading @@ -7,6 +7,10 @@ */ module LibItsDenm_Functions { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all; // LibIts import from LibIts_TestSystem all; import from LibIts_Interface all; Loading @@ -20,6 +24,30 @@ module LibItsDenm_Functions { // LibCommon import from LibCommon_VerdictControl all; group camConfigurationFunctions { /** * @desc Setups default configuration */ function f_cfUp() runs on ItsFa { map(self:utPort, system:utPort); map(self:denmPort, system:denmPort); f_connect4SelfOrClientSync(); } // end f_cfUp /** * @desc Deletes default configuration */ function f_cfDown() runs on ItsFa { unmap(self:utPort, system:utPort); unmap(self:camPort, system:camPort); f_disconnect4SelfOrClientSync(); } // end f_cfDown /** * @desc Create Facility component and connects DENM port * @remark Only used when ItsFa is a PTC Loading Loading @@ -49,8 +77,7 @@ module LibItsDenm_Functions { } [] tc_guard.timeout { log("*** f_ptcDenmDown: ERROR: Timeout while waiting for component ***"); setverdict(inconc); f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcDenmDown: Timeout while waiting for component ***"); } } unmap(p_ptcDenm:denmPort); Loading @@ -58,6 +85,8 @@ module LibItsDenm_Functions { } // end f_ptcDenmDown } //end camConfigurationFunctions group altsteps { /** Loading @@ -65,19 +94,13 @@ module LibItsDenm_Functions { */ altstep a_default() runs on ItsFa { [] denmPort.receive { setverdict (inconc, "*** a_default: 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, "*** a_default: 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, "*** a_default: 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 ***"); } } Loading Loading @@ -161,15 +184,13 @@ module LibItsDenm_Functions { tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utInitializeIut: PASS: IUT initialized ***"); log("*** f_utInitializeIut: PASS: IUT initialized ***"); } [] utPort.receive { setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized ***"); stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utInitializeIut: IUT could not be initialized ***"); } [] tc_ac.timeout { setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized in time ***"); stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utInitializeIut: IUT could not be initialized in time ***"); } } Loading Loading @@ -202,15 +223,15 @@ module LibItsDenm_Functions { tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utCheckEvent: PASS: Event correctly indicated at application layer ***"); setverdict (pass, "*** f_utCheckEvent: Event correctly indicated at application layer ***"); v_ret := e_success; } [] utPort.receive { setverdict (fail, "*** f_utCheckEvent: FAIL: Event not correctly indicated at application layer ***"); setverdict (fail, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); v_ret := e_error; } [] tc_ac.timeout { setverdict (inconc, "*** f_utCheckEvent: INCONC: Timeout while waiting for event check result ***"); setverdict (inconc, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); v_ret := e_timeout; } } Loading Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +69 −48 Original line number Diff line number Diff line Loading @@ -7,6 +7,10 @@ */ module LibItsDenm_Functions { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all; // LibIts import from LibIts_TestSystem all; import from LibIts_Interface all; Loading @@ -20,6 +24,30 @@ module LibItsDenm_Functions { // LibCommon import from LibCommon_VerdictControl all; group camConfigurationFunctions { /** * @desc Setups default configuration */ function f_cfUp() runs on ItsFa { map(self:utPort, system:utPort); map(self:denmPort, system:denmPort); f_connect4SelfOrClientSync(); } // end f_cfUp /** * @desc Deletes default configuration */ function f_cfDown() runs on ItsFa { unmap(self:utPort, system:utPort); unmap(self:camPort, system:camPort); f_disconnect4SelfOrClientSync(); } // end f_cfDown /** * @desc Create Facility component and connects DENM port * @remark Only used when ItsFa is a PTC Loading Loading @@ -49,8 +77,7 @@ module LibItsDenm_Functions { } [] tc_guard.timeout { log("*** f_ptcDenmDown: ERROR: Timeout while waiting for component ***"); setverdict(inconc); f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcDenmDown: Timeout while waiting for component ***"); } } unmap(p_ptcDenm:denmPort); Loading @@ -58,6 +85,8 @@ module LibItsDenm_Functions { } // end f_ptcDenmDown } //end camConfigurationFunctions group altsteps { /** Loading @@ -65,19 +94,13 @@ module LibItsDenm_Functions { */ altstep a_default() runs on ItsFa { [] denmPort.receive { setverdict (inconc, "*** a_default: 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, "*** a_default: 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, "*** a_default: 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 ***"); } } Loading Loading @@ -161,15 +184,13 @@ module LibItsDenm_Functions { tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utInitializeIut: PASS: IUT initialized ***"); log("*** f_utInitializeIut: PASS: IUT initialized ***"); } [] utPort.receive { setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized ***"); stop; f_selfOrClientSyncAndVerdict("error", e_error, "*** f_utInitializeIut: IUT could not be initialized ***"); } [] tc_ac.timeout { setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized in time ***"); stop; f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_utInitializeIut: IUT could not be initialized in time ***"); } } Loading Loading @@ -202,15 +223,15 @@ module LibItsDenm_Functions { tc_ac.start; alt { [] utPort.receive(UtDenmResult:true) { setverdict (pass, "*** f_utCheckEvent: PASS: Event correctly indicated at application layer ***"); setverdict (pass, "*** f_utCheckEvent: Event correctly indicated at application layer ***"); v_ret := e_success; } [] utPort.receive { setverdict (fail, "*** f_utCheckEvent: FAIL: Event not correctly indicated at application layer ***"); setverdict (fail, "*** f_utCheckEvent: Event not correctly indicated at application layer ***"); v_ret := e_error; } [] tc_ac.timeout { setverdict (inconc, "*** f_utCheckEvent: INCONC: Timeout while waiting for event check result ***"); setverdict (inconc, "*** f_utCheckEvent: Timeout while waiting for event check result ***"); v_ret := e_timeout; } } Loading