Loading ttcn/Common/LibItsCommon_Functions.ttcn +172 −80 Original line number Diff line number Diff line Loading @@ -13,13 +13,18 @@ module LibItsCommon_Functions { import from LibCommon_VerdictControl all; // LibIts import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; // TODO LibCommon shall be protocol independant? import from LibItsCommon_Pixits all; import from LibIts_Interface all; import from LibItsCommon_TypesAndValues all; group upperTester { /** * @desc Upper tester functions */ group utFuntions { /** * @desc Requests to bring the IUT in an initial state * @param p_init The initialisation to trigger. Loading Loading @@ -113,7 +118,94 @@ module LibItsCommon_Functions { } } } // end of group upper tester /** * @desc Send a command/request request primitive and wait for the command confirm response * @param p_commandReq The command/request request * @param p_commandConf The command/request confirm response * @param p_discard Set to true if command confirm responses shall be discard, otherwise the function failed * @param p_result The command/request confirm response * @verdict Unchanged on success, fail otherwise */ function f_utCommandRequest( in template (value) UtCommandRequest p_commandReq, in template (present) UtCommandConfirm p_commandConf, in boolean p_discard, out UtCommandConfirm p_result) runs on ItsAdapterComponent { utPort.send(p_commandReq); tc_wait.start; alt { [] utPort.receive(p_commandConf) -> value p_result{ tc_wait.stop; } [] utPort.receive { tc_wait.stop; if (p_discard == false) { log("*** f_utCommandRequest: ERROR: Event not correctly indicated at application layer ***"); f_selfOrClientSyncAndVerdict("error", e_error); } else { log("*** f_utCommandRequest: INFO: Another event indicated at application layer, repeating check ***"); repeat; } } [] tc_wait.timeout { if (p_discard == false) { log("*** f_utCommandRequest: ERROR: Timeout while waiting for event check result ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } else { log("*** f_utCommandRequest: INFO: Event not indicated at application layer ***"); } } } // end of 'alt' statement } // End of function f_utCommandRequest /** * @desc Capture the next event sent to the Upper Tester * @param p_event Receive template of the expected event * @param p_result Return the value of the received event if template matchs */ function f_utCommandIndication( in template UtCommandIndication p_event, out UtCommandIndication p_result ) runs on ItsAdapterComponent { tc_wait.start; alt { [] utPort.receive(p_event) -> value p_result{ tc_wait.stop; } [] utPort.receive { tc_wait.stop; log("*** f_utCommandIndication: INFO: Another event indicated at application layer, repeating check ***"); } [] tc_wait.timeout { log("*** f_utCommandIndication: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement } // End of function f_utCommandIndication } // End of group utFunctions // /** // * @desc Upper tester altsteps // */ // group utAltstep { // // // altstep a_utCommandRequest(in template UtCommandRequest p_commandReq) runs on ItsAdapterComponent { // [] utPort.receive(p_commandReq) { // log("*** a_utCommandRequest: INFO: Receive Command Request message ***"); // } // } // End of altsetp a_utCommandRequest // // } // End of group utAltstep } // End of group upper tester group generalFunctions { Loading ttcn/Common/LibItsCommon_TypesAndValues.ttcn +46 −3 Original line number Diff line number Diff line Loading @@ -7,20 +7,35 @@ */ module LibItsCommon_TypesAndValues { // LibIts // LibIts - IP Protocols import from LibItsBtp_TypesAndValues all; import from LibItsCam_TypesAndValues all; import from LibItsDenm_TypesAndValues all; import from LibItsGeoNetworking_TypesAndValues all; // LibIts - Non IP Protocols import from LibItsNt_TypesAndValues { type utFntpInitialize, utFntpCommandRequest, utFntpCommandConfirm, utFntpCommandInd }; import from LibItsFsap_TypesAndValues { type utFsapInitialize, utFsapCommandRequest, utFsapCommandConfirm, utFsapCommandInd }; /** * @desc Upper Tester message to initialize IUT */ type union UtInitialize { // IP Protocols UtBtpInitialize utBtpInitialize, UtCamInitialize utCamInitialize, UtDenmInitialize utDenmInitialize, UtGNInitialize utGNInitialize UtGNInitialize utGNInitialize, // Non IP Protocols UtFntpInitialize utFntpInitialize, UtFsapInitialize utFsapInitialize } /** Loading @@ -41,10 +56,38 @@ module LibItsCommon_TypesAndValues { * @desc Upper Tester message describing an action/event */ type union UtEvent { // IP Protocols UtBtpEvent utBtpEvent, UtCamEvent utCamEvent, UtDenmEvent utDenmEvent, UtGNEvent utGnEvent UtGNEvent utGnEvent, // Non IP Protocols UtFntpEvent utFntpEvent, UtFsapEvent utFsapEvent } /** * @desc Upper Tester message describing an action/event */ type union UtCommandRequest { UtFntpCommandRequest utFntpCommandRequest, UtFsapCommandRequest utFsapCommandRequest } /** * @desc Upper Tester message describing an action/event */ type union UtCommandConfirm { UtFntpCommandConfirm utFntpCommandConfirm, UtFsapCommandConfirm utFsapCommandConfirm } /** * @desc Upper Tester message describing an action/event */ type union UtCommandIndication { UtFntpCommandIndication utFntpCommandIndication //UtFsapCommandIndication utFsapCommandIndication } /** Loading ttcn/LibIts_Interface.ttcn +244 −136 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/LibIts_TestSystem.ttcn +25 −22 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ */ module LibIts_TestSystem { // LibITS import from LibIts_Interface all; // LibCommon import from LibCommon_Time {modulepar all}; import from LibCommon_Sync all; // LibIts import from LibIts_Interface all; group componentDefinitions { /** Loading Loading @@ -49,6 +49,8 @@ module LibIts_TestSystem { // MGT1 ports port IiscPort iiscPort; port MgtMFSapPort mgtMFSapPort; port MgtMNSapPort mgtMNSapPort; // NT1 ports port BtpPort btpPort; Loading @@ -58,10 +60,11 @@ module LibIts_TestSystem { port IPv6OverGeoNetworkingPort ipv6OverGeoNetworkingPort; // NT3 ports port FastPort fastPort; port FntpPort fntpPort; // Fast Network & Transport layer Protocol and Fast Service Advertisement Protocol // FIXME To be removed at the end port FastPort fastPort; } // end ItsAdapter } // end component ItsAdapter } // end componentDefinitions } // End of group componentDefinitions } // end LibIts_TestSystem No newline at end of file } // End of module LibIts_TestSystem No newline at end of file Loading
ttcn/Common/LibItsCommon_Functions.ttcn +172 −80 Original line number Diff line number Diff line Loading @@ -13,13 +13,18 @@ module LibItsCommon_Functions { import from LibCommon_VerdictControl all; // LibIts import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; // TODO LibCommon shall be protocol independant? import from LibItsCommon_Pixits all; import from LibIts_Interface all; import from LibItsCommon_TypesAndValues all; group upperTester { /** * @desc Upper tester functions */ group utFuntions { /** * @desc Requests to bring the IUT in an initial state * @param p_init The initialisation to trigger. Loading Loading @@ -113,7 +118,94 @@ module LibItsCommon_Functions { } } } // end of group upper tester /** * @desc Send a command/request request primitive and wait for the command confirm response * @param p_commandReq The command/request request * @param p_commandConf The command/request confirm response * @param p_discard Set to true if command confirm responses shall be discard, otherwise the function failed * @param p_result The command/request confirm response * @verdict Unchanged on success, fail otherwise */ function f_utCommandRequest( in template (value) UtCommandRequest p_commandReq, in template (present) UtCommandConfirm p_commandConf, in boolean p_discard, out UtCommandConfirm p_result) runs on ItsAdapterComponent { utPort.send(p_commandReq); tc_wait.start; alt { [] utPort.receive(p_commandConf) -> value p_result{ tc_wait.stop; } [] utPort.receive { tc_wait.stop; if (p_discard == false) { log("*** f_utCommandRequest: ERROR: Event not correctly indicated at application layer ***"); f_selfOrClientSyncAndVerdict("error", e_error); } else { log("*** f_utCommandRequest: INFO: Another event indicated at application layer, repeating check ***"); repeat; } } [] tc_wait.timeout { if (p_discard == false) { log("*** f_utCommandRequest: ERROR: Timeout while waiting for event check result ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } else { log("*** f_utCommandRequest: INFO: Event not indicated at application layer ***"); } } } // end of 'alt' statement } // End of function f_utCommandRequest /** * @desc Capture the next event sent to the Upper Tester * @param p_event Receive template of the expected event * @param p_result Return the value of the received event if template matchs */ function f_utCommandIndication( in template UtCommandIndication p_event, out UtCommandIndication p_result ) runs on ItsAdapterComponent { tc_wait.start; alt { [] utPort.receive(p_event) -> value p_result{ tc_wait.stop; } [] utPort.receive { tc_wait.stop; log("*** f_utCommandIndication: INFO: Another event indicated at application layer, repeating check ***"); } [] tc_wait.timeout { log("*** f_utCommandIndication: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement } // End of function f_utCommandIndication } // End of group utFunctions // /** // * @desc Upper tester altsteps // */ // group utAltstep { // // // altstep a_utCommandRequest(in template UtCommandRequest p_commandReq) runs on ItsAdapterComponent { // [] utPort.receive(p_commandReq) { // log("*** a_utCommandRequest: INFO: Receive Command Request message ***"); // } // } // End of altsetp a_utCommandRequest // // } // End of group utAltstep } // End of group upper tester group generalFunctions { Loading
ttcn/Common/LibItsCommon_TypesAndValues.ttcn +46 −3 Original line number Diff line number Diff line Loading @@ -7,20 +7,35 @@ */ module LibItsCommon_TypesAndValues { // LibIts // LibIts - IP Protocols import from LibItsBtp_TypesAndValues all; import from LibItsCam_TypesAndValues all; import from LibItsDenm_TypesAndValues all; import from LibItsGeoNetworking_TypesAndValues all; // LibIts - Non IP Protocols import from LibItsNt_TypesAndValues { type utFntpInitialize, utFntpCommandRequest, utFntpCommandConfirm, utFntpCommandInd }; import from LibItsFsap_TypesAndValues { type utFsapInitialize, utFsapCommandRequest, utFsapCommandConfirm, utFsapCommandInd }; /** * @desc Upper Tester message to initialize IUT */ type union UtInitialize { // IP Protocols UtBtpInitialize utBtpInitialize, UtCamInitialize utCamInitialize, UtDenmInitialize utDenmInitialize, UtGNInitialize utGNInitialize UtGNInitialize utGNInitialize, // Non IP Protocols UtFntpInitialize utFntpInitialize, UtFsapInitialize utFsapInitialize } /** Loading @@ -41,10 +56,38 @@ module LibItsCommon_TypesAndValues { * @desc Upper Tester message describing an action/event */ type union UtEvent { // IP Protocols UtBtpEvent utBtpEvent, UtCamEvent utCamEvent, UtDenmEvent utDenmEvent, UtGNEvent utGnEvent UtGNEvent utGnEvent, // Non IP Protocols UtFntpEvent utFntpEvent, UtFsapEvent utFsapEvent } /** * @desc Upper Tester message describing an action/event */ type union UtCommandRequest { UtFntpCommandRequest utFntpCommandRequest, UtFsapCommandRequest utFsapCommandRequest } /** * @desc Upper Tester message describing an action/event */ type union UtCommandConfirm { UtFntpCommandConfirm utFntpCommandConfirm, UtFsapCommandConfirm utFsapCommandConfirm } /** * @desc Upper Tester message describing an action/event */ type union UtCommandIndication { UtFntpCommandIndication utFntpCommandIndication //UtFsapCommandIndication utFsapCommandIndication } /** Loading
ttcn/LibIts_Interface.ttcn +244 −136 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/LibIts_TestSystem.ttcn +25 −22 Original line number Diff line number Diff line Loading @@ -7,13 +7,13 @@ */ module LibIts_TestSystem { // LibITS import from LibIts_Interface all; // LibCommon import from LibCommon_Time {modulepar all}; import from LibCommon_Sync all; // LibIts import from LibIts_Interface all; group componentDefinitions { /** Loading Loading @@ -49,6 +49,8 @@ module LibIts_TestSystem { // MGT1 ports port IiscPort iiscPort; port MgtMFSapPort mgtMFSapPort; port MgtMNSapPort mgtMNSapPort; // NT1 ports port BtpPort btpPort; Loading @@ -58,10 +60,11 @@ module LibIts_TestSystem { port IPv6OverGeoNetworkingPort ipv6OverGeoNetworkingPort; // NT3 ports port FastPort fastPort; port FntpPort fntpPort; // Fast Network & Transport layer Protocol and Fast Service Advertisement Protocol // FIXME To be removed at the end port FastPort fastPort; } // end ItsAdapter } // end component ItsAdapter } // end componentDefinitions } // End of group componentDefinitions } // end LibIts_TestSystem No newline at end of file } // End of module LibIts_TestSystem No newline at end of file