Loading LibIms_ConfigAndTigger/LibIms_ConfigAndTrigger.ttcn3 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * @author STF 370 * @version $Id:$ * @desc This module provides trigger and configuration functions for IMS. */ module LibIms_ConfigAndTrigger { import from LibIot_TestInterface {type TestCoordinator, TestDriver;} group ue { group ueTypes { group ueCommands { // device controll trigger (1000-1009) const integer c_SWITCH_ON := 1000; const integer c_SWITCH_OFF := 1001; // behvaior trigger (1010-1099) const integer c_REGISTER_UE := 1010; } } group ueFunctions { } } group eut { } } No newline at end of file LibIms_ConfigAndTigger/LibUE.ttcn 0 → 100644 +144 −0 Original line number Diff line number Diff line /** * @author STF370 * @version $ * $Id: $ * @desc Common types, templates and functions for triggering UE actions. */ module LibUE { group LibUEModuleParameters { // TODO } // end group group LibUEMessageTypes { // Requests sent to the UE to trigger a particular action type record UERequest { UECommandType cmd, charstring params optional }; // Confirmation messages received from the UE type record UECnf { UECommandType cmd, UECommandResult result, charstring params optional }; // Indication messages received from the UE type record UEInd { UECommandType cmd, charstring params optional }; type enumerated UECommandType { SWITCH_ON_E, SWITCH_OFF_E, INITIATE_REGISTRATION_E, INITIATE_DEREGISTRATION_E, INITIATE_MO_CALL_E, MT_CALL_IND_E // FFS }; type enumerated UECommandResult { SUCCESS_E, ERROR_E }; } // end group group LibUETemplates { template UERequest m_UtReq(UECommandType p_Cmd) := { cmd := p_Cmd, params := omit } template UECnf m_Ut_ReqOk (UECommandType p_Cmd) := { cmd := p_Cmd, result := SUCCESS_E, params := * } template UERequest m_UtMOCallReq(charstring p_TelNo) := { cmd := INITIATE_MO_CALL_E, params := p_TelNo } template UECnf mw_UtCnfAny := { cmd := ?, result := ?, params := * } } // end group group LibUEInterfaces { // To be moved to the interface module // Upper tester port type port UtPort message { out UERequest; in UECnf, UEInd; }; type component UETestDriver { port UtPort Ut // Upper tester port connected to the UE timer t_UtWait := 10.0; var default vc_UtDefault; } } // end group group LibUEfunctions { /** * @desc Trigger the UE to be switched on */ function f_UESwitchOn ( ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtReq( SWITCH_ON_E ) ); Ut.receive (m_Ut_ReqOk ( SWITCH_ON_E)); t_UtWait.stop; } /** * @desc Trigger the UE to initiate the registration procedure */ function f_UERegister ( ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtReq( INITIATE_REGISTRATION_E ) ); Ut.receive (m_Ut_ReqOk ( INITIATE_REGISTRATION_E)); t_UtWait.stop; } /** * @desc Trigger the UE to initiate an MO call */ function f_UEMOCall ( charstring p_telNo ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtMOCallReq( p_telNo) ); Ut.receive (m_Ut_ReqOk ( INITIATE_MO_CALL_E)); t_UtWait.stop; } /** * @desc Default handler for UETestDriver */ altstep a_UtDefault() runs on UETestDriver { [] Ut.receive(mw_UtCnfAny) {setverdict (inconc);} [] t_UtWait.timeout {setverdict (inconc);} } } // end group } // end module Loading
LibIms_ConfigAndTigger/LibIms_ConfigAndTrigger.ttcn3 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * @author STF 370 * @version $Id:$ * @desc This module provides trigger and configuration functions for IMS. */ module LibIms_ConfigAndTrigger { import from LibIot_TestInterface {type TestCoordinator, TestDriver;} group ue { group ueTypes { group ueCommands { // device controll trigger (1000-1009) const integer c_SWITCH_ON := 1000; const integer c_SWITCH_OFF := 1001; // behvaior trigger (1010-1099) const integer c_REGISTER_UE := 1010; } } group ueFunctions { } } group eut { } } No newline at end of file
LibIms_ConfigAndTigger/LibUE.ttcn 0 → 100644 +144 −0 Original line number Diff line number Diff line /** * @author STF370 * @version $ * $Id: $ * @desc Common types, templates and functions for triggering UE actions. */ module LibUE { group LibUEModuleParameters { // TODO } // end group group LibUEMessageTypes { // Requests sent to the UE to trigger a particular action type record UERequest { UECommandType cmd, charstring params optional }; // Confirmation messages received from the UE type record UECnf { UECommandType cmd, UECommandResult result, charstring params optional }; // Indication messages received from the UE type record UEInd { UECommandType cmd, charstring params optional }; type enumerated UECommandType { SWITCH_ON_E, SWITCH_OFF_E, INITIATE_REGISTRATION_E, INITIATE_DEREGISTRATION_E, INITIATE_MO_CALL_E, MT_CALL_IND_E // FFS }; type enumerated UECommandResult { SUCCESS_E, ERROR_E }; } // end group group LibUETemplates { template UERequest m_UtReq(UECommandType p_Cmd) := { cmd := p_Cmd, params := omit } template UECnf m_Ut_ReqOk (UECommandType p_Cmd) := { cmd := p_Cmd, result := SUCCESS_E, params := * } template UERequest m_UtMOCallReq(charstring p_TelNo) := { cmd := INITIATE_MO_CALL_E, params := p_TelNo } template UECnf mw_UtCnfAny := { cmd := ?, result := ?, params := * } } // end group group LibUEInterfaces { // To be moved to the interface module // Upper tester port type port UtPort message { out UERequest; in UECnf, UEInd; }; type component UETestDriver { port UtPort Ut // Upper tester port connected to the UE timer t_UtWait := 10.0; var default vc_UtDefault; } } // end group group LibUEfunctions { /** * @desc Trigger the UE to be switched on */ function f_UESwitchOn ( ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtReq( SWITCH_ON_E ) ); Ut.receive (m_Ut_ReqOk ( SWITCH_ON_E)); t_UtWait.stop; } /** * @desc Trigger the UE to initiate the registration procedure */ function f_UERegister ( ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtReq( INITIATE_REGISTRATION_E ) ); Ut.receive (m_Ut_ReqOk ( INITIATE_REGISTRATION_E)); t_UtWait.stop; } /** * @desc Trigger the UE to initiate an MO call */ function f_UEMOCall ( charstring p_telNo ) runs on UETestDriver { vc_UtDefault := activate (a_UtDefault()); t_UtWait.start; Ut.send ( m_UtMOCallReq( p_telNo) ); Ut.receive (m_Ut_ReqOk ( INITIATE_MO_CALL_E)); t_UtWait.stop; } /** * @desc Default handler for UETestDriver */ altstep a_UtDefault() runs on UETestDriver { [] Ut.receive(mw_UtCnfAny) {setverdict (inconc);} [] t_UtWait.timeout {setverdict (inconc);} } } // end group } // end module