Loading ttcn/CALM/FNTP/LibItsFntp_Functions.ttcn3 +19 −16 Original line number Diff line number Diff line Loading @@ -201,10 +201,11 @@ module LibItsFntp_Functions { function f_initializeFntpForwardingTable(in PortNumber p_port) runs on ItsCalm { // Request allocation of a port number associated with the ITS-SP // TODO Consider case of c_portDyn, and use f_utCommandRequestConfirm var template (value) UtCommandRequest p_commandReq; var template (value) UtCommandRequest v_commandReq; var template UtCommandConfirm v_commandConf; if (PX_USE_IICP_REMOTE_COMMAND == true) { p_commandReq := m_fntpNfSapRemoteCommandRequest( v_commandReq := m_fntpNfSapRemoteCommandRequest( f_getNextPduCounter(), f_getNextCommandRef(), m_generateNfFntpPortCreationRequest( Loading @@ -212,15 +213,19 @@ module LibItsFntp_Functions { p_port ).utFntpCommandRequest.nfSapPrimitives ); v_commandConf := mw_fntpNfSapRemoteCommandConfirm( mdw_fntpCommConfirm_success_port(p_port).utFntpCommandConfirm.nfSapPrimitives ); } else { p_commandReq := m_generateNfFntpPortCreationRequest( v_commandReq := m_generateNfFntpPortCreationRequest( f_getIutServiceRef(), p_port ); v_commandConf := mdw_fntpCommConfirm_success_port(p_port); } f_utCommandRequestConfirm( p_commandReq, mdw_fntpCommConfirm_success_port(p_port), v_commandReq, v_commandConf, false, vc_utCommandConf ); Loading @@ -241,10 +246,10 @@ module LibItsFntp_Functions { * @verdict Unchanged */ function f_fntpAwaitFwtUpdate() runs on ItsCalm { var template (value) UtRequestRequest p_requestReq; var template (present) UtRequestRequest p_requestReq; if (PX_USE_IICP_REMOTE_COMMAND == true) { p_requestReq := mw_fntpNnSapRemoteCommand( p_requestReq := mw_fntpMnSapRemoteCommand( mw_awaitFwtUpdate(vc_portNumber).utFntpRequestRequest.mnRequestRequest ); } else { Loading @@ -253,7 +258,7 @@ module LibItsFntp_Functions { f_utAwaitRequestRequest(p_requestReq); } // End of function f_fntpAwaitFwtUpdate() function f_fntpCommandRequestConfirm( function f_fntpCommandRequestWithoutConfirm( in template (value) UtCommandRequest p_generateNfFntpCommandRequest ) runs on ItsCalm { var template (value) UtCommandRequest p_commandReq; Loading @@ -267,13 +272,11 @@ module LibItsFntp_Functions { } else { p_commandReq := p_generateNfFntpCommandRequest; } f_utCommandRequestConfirm( p_commandReq, //Content of the FNTP control field in the FNTP extended header mw_fntpCommConfirm_success, false, vc_utCommandConf); f_utCommandRequestWithoutConfirm( p_commandReq // Content of the FNTP control field in the FNTP extended header ); } // End of function f_fntpCommandRequestConfirm } // End of function f_fntpCommandRequestWithoutConfirm /** * @desc Call this method to remove entry created by f_initializeFntpForwardingTable() in FNTP Forwarding Table Loading ttcn/CALM/FNTP/LibItsFntp_Templates.ttcn3 +83 −7 Original line number Diff line number Diff line Loading @@ -24,9 +24,9 @@ module LibItsFntp_Templates { }; import from CALMmsap language "ASN.1:1997" { type StationID, CommandRef, MN_Command, MN_Request, MN_Request_request StationID, CommandRef, ErrStatus, MN_Command, MN_Command_confirm, MN_CmdConfirm, MN_Request, MN_Request_request }; import from CALMmanagement language "ASN.1:1997" { type ITS_scuId Loading @@ -42,12 +42,12 @@ module LibItsFntp_Templates { }; import from LibItsIicp_Templates { template m_iicRequestRx_mnCommandRequest, m_iicRequestRx_mnCommandRequest, mdw_iicResponseRx_mnCommandConfirm, mdw_iicRequestTx_mnRequestRequest }; import from LibItsMgt_Templates { template m_mnCommandRequest, m_mnCommandRequest, mdw_mnCommandConfirm, mdw_fwtSetNotRequestReq_port }; import from LibItsMgt_Functions { Loading @@ -60,6 +60,27 @@ module LibItsFntp_Templates { group fntpPrimitives { /** * @desc Send template for DEN Message (DenmPort Primitive) * @param p_denMsg DEN Message to be sent */ template (value) FntpReq m_fntpReq( template (value) INsapPrimitivesUp p_inSapPrimitivesUp ) := { msgOut := p_inSapPrimitivesUp } /** * @desc Receive template for DEN Message (DenmPort Primitive) * @param p_denMsg Expected DEN Message */ template FntpInd mw_fntpInd( template (present) INsapPrimitivesDown p_inSapPrimitivesDown ) := { msgIn := p_inSapPrimitivesDown, receptionTime := ? } /** * @desc Primitive on IN-SAP interface * @see ISO/CD 21218 - Clause 8.3 Loading Loading @@ -818,6 +839,21 @@ module LibItsFntp_Templates { } // End of field utFntpCommandRequest } // End of template m_fntpNfSapRemoteCommandRequest template (present) UtCommandConfirm mw_fntpNfSapRemoteCommandConfirm( in template (present) NFsapPrimitivesUp p_nfSapPrimitivesUp ) := { utFntpCommandConfirm := { rcmdNfSapPrimitives := mdw_iicResponseRx_mnCommandConfirm( ?, ?, mdw_mnCommandConfirm_port( 0, mw_mnRemoteCommandConfirm(p_nfSapPrimitivesUp) ) ) // End of field rcmdNfSapPrimitives } // End of field utFntpCommandRequest } // End of template mw_fntpNfSapRemoteCommandConfirm template (value) MN_Command m_mnRemoteCommandRequest( in template (value) NFsapPrimitivesDown p_nfSapPrimitivesDown ) := { Loading @@ -832,6 +868,27 @@ module LibItsFntp_Templates { } // End of field mnCmd } // End of template m_mnRemoteCommandRequest template MN_Command_confirm mdw_mnCommandConfirm_port( in template (present) ErrStatus p_errorStatus, in template (present) MN_CmdConfirm p_cmdConfirm ) modifies mdw_mnCommandConfirm := { cmdConfirm := p_cmdConfirm } // End of template mdw_mnCommandConfirm_port template MN_CmdConfirm mw_mnRemoteCommandConfirm( in template (present) NFsapPrimitivesUp p_nfSapPrimitivesUp ) := { fill := '00000'B, mnCmdConf := { simNFreq := { fill := '0000000'B, simNFreq := { fntp := p_nfSapPrimitivesUp } // End of field simNFcmd } // End of field simNFcmd } // End of field mnCmd } // End of template mdw_mnRemoteCommandConfirm /** * @desc Receive template used by the FNTP to acknowledge a previous NF-FNTP-PORT.request * @param p_serviceRef Contains the same value provided in parameter "serviceRef" in the related NF-FNTP-SOCKET.request Loading Loading @@ -910,6 +967,25 @@ module LibItsFntp_Templates { } // End of field 'utFntpCommandConfirm' } // End of template mw_fntpCommConfirm_success /** * @desc Receive a succesful COMMAND.confirm primitive * @see ISO/CD 29281-2 Clause 8.2.1 NF-FNTP-PORT.request */ template (present) UtCommandConfirm mw_fntpCommConfirm_failure := { utFntpCommandConfirm := { nfSapPrimitives := { fill := PX_NF_SAP_UP_FILL_FIELD_VALUE, primitivesUp := { fntpCommConfirm := { commRef := ?, servicePort := ?, errStatus := complement(0) // FIXME Check why TTwb raises an error using FNTPerrorStatus values } // End of field 'fntpCommConfirm' } // End of field 'primitivesUp' } // End of field 'nfSapPrimitives' } // End of field 'utFntpCommandConfirm' } // End of template mw_fntpCommConfirm_failure /** * @desc Receive a succesful COMMAND.confirm primitive for port creation/delation * @param p_servicePort Contain the Service port number assigned by the FNTP Loading Loading @@ -1147,7 +1223,7 @@ module LibItsFntp_Templates { * @param p_mn_rreq The MN-Request.request message * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU */ template (present) UtRequestRequest mw_fntpNnSapRemoteCommand( template (present) UtRequestRequest mw_fntpMnSapRemoteCommand( in template (present) MN_Request_request p_mnReqReq ) := { utFntpRequestRequest := { Loading @@ -1157,7 +1233,7 @@ module LibItsFntp_Templates { p_mnReqReq ) // End of field rcmdMnRequestRequest } // End of field utFntpRequestRequest } // End of template mw_fntpNnSapRemoteCommand } // End of template mw_fntpMnSapRemoteCommand } // End of group utPrimitives Loading ttcn/CALM/FNTP/LibItsFntp_TypesAndValues.ttcn3 +1 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ module LibItsFntp_TypesAndValues { IICrequestRX rcmdMnRequestRequest } with { encode (mnRequestRequest) "LibItsCalm_asn1"; encode (mnRequestRequest) "LibItsCALMmsap_asn1"; encode (rcmdMnRequestRequest) "LibItsIicp_asn1"; } Loading ttcn/CALM/IICP/LibItsIicp_Templates.ttcn3 +22 −5 Original line number Diff line number Diff line Loading @@ -894,6 +894,23 @@ module LibItsIicp_Templates { group remoteCommands { /** * @desc Unspecified receive template for IICRequestRx service primitive * Used for: * <li>modifying restrictif template</li> */ template IICresponseRX mw_iicResponseRx_any := { sourceITS_scuId := ?, destinationITS_scuId := ?, pduCounter := ?, pduResponse := { fill := ?, responses := ? }, // End of field 'pduResponse' errorStatus := ?, seqRs := ? } // End of template mw_iicResponseRx_any /** * @desc Unspecified receive template for IICRequestTx service primitive * Used for: Loading Loading @@ -1143,7 +1160,7 @@ module LibItsIicp_Templates { /** * @desc TODO */ template (value) IICrequestRX m_iicRequestRx_mnRequestRequest( template (value) IICrequestTX m_iicRequestTx_mnRequestRequest( in template (value) ITS_scuId p_sourceItsScuId, in template (value) ITS_scuId p_destinationItsScuId, in template (value) PduCounter p_pduCounter, Loading @@ -1159,7 +1176,7 @@ module LibItsIicp_Templates { } // End of 'requests' field }, // End of 'pduRequest' field seqRq := ''O // No security } // End of template m_iicRequestRx_mnRequestRequest } // End of template m_iicRequestTx_mnRequestRequest } // End of group mnCommandsSend Loading Loading @@ -1193,11 +1210,11 @@ module LibItsIicp_Templates { * @param p_mn_rcmd The MN-COMMAND.confirm message * @see ISO 24102-4 Clause 8.2.2 IIC-Response PDU */ template IICresponseTX mdw_iicResponseTx_mnCommandRequest( template IICresponseRX mdw_iicResponseRx_mnCommandConfirm( in template (present) ITS_scuId p_sourceItsScuId, in template (present) ITS_scuId p_destinationItsScuId, in template (present) MN_Command_confirm p_mnReqCmd ) modifies mw_iicResponseTx_any := { ) modifies mw_iicResponseRx_any := { sourceITS_scuId := p_sourceItsScuId, destinationITS_scuId := p_destinationItsScuId, pduResponse := { Loading @@ -1206,7 +1223,7 @@ module LibItsIicp_Templates { } // End of 'responses' field }, // End of 'pduResponse' field errorStatus := 0 } // End of template mdw_iicResponseTx_mnCommandRequest } // End of template mdw_iicResponseRx_mnCommandConfirm /** * @desc Receive template for IICrequestTX/remote command message Loading ttcn/CALM/LibItsCalm_Interface.ttcn +84 −33 Original line number Diff line number Diff line /** * @author ETSI / STF405 * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/branches/splitCalm/CALM/LibIts_Interface.ttcn $ * $Id: LibIts_Interface.ttcn 419 2012-03-12 13:17:27Z reinaortega $ * @version $URL$ * $Id$ * @desc Module containing PTCs and interface ports definitions for ITS * */ Loading @@ -24,6 +24,9 @@ module LibItsCalm_Interface { import from CALMfntp language "ASN.1:1997" all; import from LibItsMgt_TypesAndValues all; import from LibItsFntp_TypesAndValues all; import from LibItsFntp_Templates { template mw_fntpCommConfirm_failure }; import from LibItsFsap_TypesAndValues all; import from LibItsIicp_TypesAndValues all; Loading Loading @@ -170,9 +173,10 @@ module LibItsCalm_Interface { * @desc NT3 Fntp Port */ type port FntpPort message { inout INsapPrimitivesUp, INsapPrimitivesDown in FntpInd; out FntpReq } // End of port FntpPort } // End of group nt3Ports Loading @@ -183,7 +187,6 @@ module LibItsCalm_Interface { group interfacePrimitives { group managementPrimitives { group mgt1Primitives { Loading @@ -202,7 +205,8 @@ module LibItsCalm_Interface { * @desc MGT1 IISC Request Primitive */ type record IicpReq { IIC_Request msgInOut IIC_Request msgInOut, TimeStamp receptionTime } with { encode (msgInOut) "LibItsIicp_asn1" Loading Loading @@ -333,11 +337,32 @@ module LibItsCalm_Interface { group networkAndTransportPrimitives { type integer TimeStamp (0 .. 281474976710655); group nt3Primitives { } // end nt3Primitives /** * @desc TODO */ type union FntpReq { INsapPrimitivesUp msgOut } with { encode (msgOut) "LibItsCALMllsap_asn1" } /** * @desc TODO */ type record FntpInd { INsapPrimitivesDown msgIn, TimeStamp receptionTime } with { encode (msgIn) "LibItsCALMllsap_asn1" } } // End of group nt3Primitives } // End of group networkAndTransportPrimitives Loading @@ -353,6 +378,8 @@ module LibItsCalm_Interface { UtFntpInitialize utFntpInitialize, UtFsapInitialize utFsapInitialize, UtIicpInitialize utIicpInitialize } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -360,6 +387,8 @@ module LibItsCalm_Interface { */ type record UtTrigger { UtEvent utEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -367,6 +396,8 @@ module LibItsCalm_Interface { */ type record UtCheck { UtEvent utEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -376,6 +407,8 @@ module LibItsCalm_Interface { // Non IP Protocols UtFntpEvent utFntpEvent, UtFsapEvent utFsapEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -387,6 +420,8 @@ module LibItsCalm_Interface { type union UtCommandRequest { UtFntpCommandRequest utFntpCommandRequest, UtFsapCommandRequest utFsapCommandRequest } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -395,6 +430,8 @@ module LibItsCalm_Interface { type union UtCommandConfirm { UtFntpCommandConfirm utFntpCommandConfirm // FIXME To be removed UtFsapCommandConfirm utFsapCommandConfirm } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -403,20 +440,22 @@ module LibItsCalm_Interface { type union UtCommandIndication { UtFntpCommandIndication utFntpCommandIndication //UtFsapCommandIndication utFsapCommandIndication } with { encode "LibItsCommon_TypesAndValues" } type union UtRequestRequest { UtFntpRequestRequest utFntpRequestRequest } with { encode "LibItsCommon_TypesAndValues" } /** * @desc Upper Tester response message */ type boolean UtResult; type boolean UtResult with { encode "LibItsCommon_TypesAndValues" } } // End of group upperTester with { encode "LibItsCommon_TypesAndValues" } /** * @desc Upper tester functions Loading Loading @@ -524,7 +563,7 @@ module LibItsCalm_Interface { * @param p_result The command/request confirm response * @verdict Unchanged on success, fail otherwise */ function f_utCommandRequestConfirm( function f_utCommandRequestConfirm( // TODO Add discard mechanism - Rename into f_utCommandRequestConfirm in template (value) UtCommandRequest p_commandReq, in template (present) UtCommandConfirm p_commandConf, in boolean p_discard, Loading @@ -532,6 +571,7 @@ module LibItsCalm_Interface { runs on ItsCalm { utPort.send(p_commandReq); log("*** f_utCommandRequestConfirm: INFO: Expected UtCommandConfirm: ", p_commandConf, " ***"); tc_wait.start; alt { [] utPort.receive(p_commandConf) -> value p_result { Loading @@ -540,7 +580,7 @@ module LibItsCalm_Interface { [] utPort.receive { tc_wait.stop; if (p_discard == false) { log("*** f_utCommandRequestConfirm: ERROR: Event not correctly indicated at application layer ***"); log("*** f_utCommandRequestConfirm: ERROR: Event not correctly indicated at application layer ***", p_result); f_selfOrClientSyncAndVerdict("error", e_error); } else { Loading Loading @@ -572,11 +612,18 @@ module LibItsCalm_Interface { utPort.send(p_commandReq); tc_noac.start; alt { [] utPort.receive(mw_fntpCommConfirm_failure) { tc_noac.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandRequestWithoutConfirm: ERROR: Message is confirmed on error only (see ISO/IEC WD 29281-1 Clause 7.6.2 Basic procedure) ***"); } [] utPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandRequestWithoutConfirm: ERROR: Message is confirmed on error only (see ***"); log("*** f_utCommandRequestWithoutConfirm: ERROR: Unexpected message ***"); } [] tc_noac.timeout { log("*** f_utCommandRequestWithoutConfirm: INFO: CommandRequest succeed ***"); } }// End of 'alt' statement } // End of function f_utCommandRequestWithoutConfirm Loading @@ -586,7 +633,7 @@ module LibItsCalm_Interface { * @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( function f_utCommandIndication( // TODO Add discard mechanism in template UtCommandIndication p_event, out UtCommandIndication p_result ) runs on ItsCalm { Loading @@ -597,10 +644,12 @@ module LibItsCalm_Interface { tc_wait.stop; } [] utPort.receive { tc_wait.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandIndication: INFO: Another event indicated at application layer, repeating check ***"); repeat; } [] tc_wait.timeout { f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandIndication: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement Loading @@ -619,8 +668,10 @@ module LibItsCalm_Interface { [] utPort.receive { tc_wait.stop; log("*** f_utSendRequestRequest: INFO: Another event indicated at application layer, repeating check ***"); repeat; } [] tc_wait.timeout { f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utSendRequestRequest: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement Loading Loading
ttcn/CALM/FNTP/LibItsFntp_Functions.ttcn3 +19 −16 Original line number Diff line number Diff line Loading @@ -201,10 +201,11 @@ module LibItsFntp_Functions { function f_initializeFntpForwardingTable(in PortNumber p_port) runs on ItsCalm { // Request allocation of a port number associated with the ITS-SP // TODO Consider case of c_portDyn, and use f_utCommandRequestConfirm var template (value) UtCommandRequest p_commandReq; var template (value) UtCommandRequest v_commandReq; var template UtCommandConfirm v_commandConf; if (PX_USE_IICP_REMOTE_COMMAND == true) { p_commandReq := m_fntpNfSapRemoteCommandRequest( v_commandReq := m_fntpNfSapRemoteCommandRequest( f_getNextPduCounter(), f_getNextCommandRef(), m_generateNfFntpPortCreationRequest( Loading @@ -212,15 +213,19 @@ module LibItsFntp_Functions { p_port ).utFntpCommandRequest.nfSapPrimitives ); v_commandConf := mw_fntpNfSapRemoteCommandConfirm( mdw_fntpCommConfirm_success_port(p_port).utFntpCommandConfirm.nfSapPrimitives ); } else { p_commandReq := m_generateNfFntpPortCreationRequest( v_commandReq := m_generateNfFntpPortCreationRequest( f_getIutServiceRef(), p_port ); v_commandConf := mdw_fntpCommConfirm_success_port(p_port); } f_utCommandRequestConfirm( p_commandReq, mdw_fntpCommConfirm_success_port(p_port), v_commandReq, v_commandConf, false, vc_utCommandConf ); Loading @@ -241,10 +246,10 @@ module LibItsFntp_Functions { * @verdict Unchanged */ function f_fntpAwaitFwtUpdate() runs on ItsCalm { var template (value) UtRequestRequest p_requestReq; var template (present) UtRequestRequest p_requestReq; if (PX_USE_IICP_REMOTE_COMMAND == true) { p_requestReq := mw_fntpNnSapRemoteCommand( p_requestReq := mw_fntpMnSapRemoteCommand( mw_awaitFwtUpdate(vc_portNumber).utFntpRequestRequest.mnRequestRequest ); } else { Loading @@ -253,7 +258,7 @@ module LibItsFntp_Functions { f_utAwaitRequestRequest(p_requestReq); } // End of function f_fntpAwaitFwtUpdate() function f_fntpCommandRequestConfirm( function f_fntpCommandRequestWithoutConfirm( in template (value) UtCommandRequest p_generateNfFntpCommandRequest ) runs on ItsCalm { var template (value) UtCommandRequest p_commandReq; Loading @@ -267,13 +272,11 @@ module LibItsFntp_Functions { } else { p_commandReq := p_generateNfFntpCommandRequest; } f_utCommandRequestConfirm( p_commandReq, //Content of the FNTP control field in the FNTP extended header mw_fntpCommConfirm_success, false, vc_utCommandConf); f_utCommandRequestWithoutConfirm( p_commandReq // Content of the FNTP control field in the FNTP extended header ); } // End of function f_fntpCommandRequestConfirm } // End of function f_fntpCommandRequestWithoutConfirm /** * @desc Call this method to remove entry created by f_initializeFntpForwardingTable() in FNTP Forwarding Table Loading
ttcn/CALM/FNTP/LibItsFntp_Templates.ttcn3 +83 −7 Original line number Diff line number Diff line Loading @@ -24,9 +24,9 @@ module LibItsFntp_Templates { }; import from CALMmsap language "ASN.1:1997" { type StationID, CommandRef, MN_Command, MN_Request, MN_Request_request StationID, CommandRef, ErrStatus, MN_Command, MN_Command_confirm, MN_CmdConfirm, MN_Request, MN_Request_request }; import from CALMmanagement language "ASN.1:1997" { type ITS_scuId Loading @@ -42,12 +42,12 @@ module LibItsFntp_Templates { }; import from LibItsIicp_Templates { template m_iicRequestRx_mnCommandRequest, m_iicRequestRx_mnCommandRequest, mdw_iicResponseRx_mnCommandConfirm, mdw_iicRequestTx_mnRequestRequest }; import from LibItsMgt_Templates { template m_mnCommandRequest, m_mnCommandRequest, mdw_mnCommandConfirm, mdw_fwtSetNotRequestReq_port }; import from LibItsMgt_Functions { Loading @@ -60,6 +60,27 @@ module LibItsFntp_Templates { group fntpPrimitives { /** * @desc Send template for DEN Message (DenmPort Primitive) * @param p_denMsg DEN Message to be sent */ template (value) FntpReq m_fntpReq( template (value) INsapPrimitivesUp p_inSapPrimitivesUp ) := { msgOut := p_inSapPrimitivesUp } /** * @desc Receive template for DEN Message (DenmPort Primitive) * @param p_denMsg Expected DEN Message */ template FntpInd mw_fntpInd( template (present) INsapPrimitivesDown p_inSapPrimitivesDown ) := { msgIn := p_inSapPrimitivesDown, receptionTime := ? } /** * @desc Primitive on IN-SAP interface * @see ISO/CD 21218 - Clause 8.3 Loading Loading @@ -818,6 +839,21 @@ module LibItsFntp_Templates { } // End of field utFntpCommandRequest } // End of template m_fntpNfSapRemoteCommandRequest template (present) UtCommandConfirm mw_fntpNfSapRemoteCommandConfirm( in template (present) NFsapPrimitivesUp p_nfSapPrimitivesUp ) := { utFntpCommandConfirm := { rcmdNfSapPrimitives := mdw_iicResponseRx_mnCommandConfirm( ?, ?, mdw_mnCommandConfirm_port( 0, mw_mnRemoteCommandConfirm(p_nfSapPrimitivesUp) ) ) // End of field rcmdNfSapPrimitives } // End of field utFntpCommandRequest } // End of template mw_fntpNfSapRemoteCommandConfirm template (value) MN_Command m_mnRemoteCommandRequest( in template (value) NFsapPrimitivesDown p_nfSapPrimitivesDown ) := { Loading @@ -832,6 +868,27 @@ module LibItsFntp_Templates { } // End of field mnCmd } // End of template m_mnRemoteCommandRequest template MN_Command_confirm mdw_mnCommandConfirm_port( in template (present) ErrStatus p_errorStatus, in template (present) MN_CmdConfirm p_cmdConfirm ) modifies mdw_mnCommandConfirm := { cmdConfirm := p_cmdConfirm } // End of template mdw_mnCommandConfirm_port template MN_CmdConfirm mw_mnRemoteCommandConfirm( in template (present) NFsapPrimitivesUp p_nfSapPrimitivesUp ) := { fill := '00000'B, mnCmdConf := { simNFreq := { fill := '0000000'B, simNFreq := { fntp := p_nfSapPrimitivesUp } // End of field simNFcmd } // End of field simNFcmd } // End of field mnCmd } // End of template mdw_mnRemoteCommandConfirm /** * @desc Receive template used by the FNTP to acknowledge a previous NF-FNTP-PORT.request * @param p_serviceRef Contains the same value provided in parameter "serviceRef" in the related NF-FNTP-SOCKET.request Loading Loading @@ -910,6 +967,25 @@ module LibItsFntp_Templates { } // End of field 'utFntpCommandConfirm' } // End of template mw_fntpCommConfirm_success /** * @desc Receive a succesful COMMAND.confirm primitive * @see ISO/CD 29281-2 Clause 8.2.1 NF-FNTP-PORT.request */ template (present) UtCommandConfirm mw_fntpCommConfirm_failure := { utFntpCommandConfirm := { nfSapPrimitives := { fill := PX_NF_SAP_UP_FILL_FIELD_VALUE, primitivesUp := { fntpCommConfirm := { commRef := ?, servicePort := ?, errStatus := complement(0) // FIXME Check why TTwb raises an error using FNTPerrorStatus values } // End of field 'fntpCommConfirm' } // End of field 'primitivesUp' } // End of field 'nfSapPrimitives' } // End of field 'utFntpCommandConfirm' } // End of template mw_fntpCommConfirm_failure /** * @desc Receive a succesful COMMAND.confirm primitive for port creation/delation * @param p_servicePort Contain the Service port number assigned by the FNTP Loading Loading @@ -1147,7 +1223,7 @@ module LibItsFntp_Templates { * @param p_mn_rreq The MN-Request.request message * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU */ template (present) UtRequestRequest mw_fntpNnSapRemoteCommand( template (present) UtRequestRequest mw_fntpMnSapRemoteCommand( in template (present) MN_Request_request p_mnReqReq ) := { utFntpRequestRequest := { Loading @@ -1157,7 +1233,7 @@ module LibItsFntp_Templates { p_mnReqReq ) // End of field rcmdMnRequestRequest } // End of field utFntpRequestRequest } // End of template mw_fntpNnSapRemoteCommand } // End of template mw_fntpMnSapRemoteCommand } // End of group utPrimitives Loading
ttcn/CALM/FNTP/LibItsFntp_TypesAndValues.ttcn3 +1 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ module LibItsFntp_TypesAndValues { IICrequestRX rcmdMnRequestRequest } with { encode (mnRequestRequest) "LibItsCalm_asn1"; encode (mnRequestRequest) "LibItsCALMmsap_asn1"; encode (rcmdMnRequestRequest) "LibItsIicp_asn1"; } Loading
ttcn/CALM/IICP/LibItsIicp_Templates.ttcn3 +22 −5 Original line number Diff line number Diff line Loading @@ -894,6 +894,23 @@ module LibItsIicp_Templates { group remoteCommands { /** * @desc Unspecified receive template for IICRequestRx service primitive * Used for: * <li>modifying restrictif template</li> */ template IICresponseRX mw_iicResponseRx_any := { sourceITS_scuId := ?, destinationITS_scuId := ?, pduCounter := ?, pduResponse := { fill := ?, responses := ? }, // End of field 'pduResponse' errorStatus := ?, seqRs := ? } // End of template mw_iicResponseRx_any /** * @desc Unspecified receive template for IICRequestTx service primitive * Used for: Loading Loading @@ -1143,7 +1160,7 @@ module LibItsIicp_Templates { /** * @desc TODO */ template (value) IICrequestRX m_iicRequestRx_mnRequestRequest( template (value) IICrequestTX m_iicRequestTx_mnRequestRequest( in template (value) ITS_scuId p_sourceItsScuId, in template (value) ITS_scuId p_destinationItsScuId, in template (value) PduCounter p_pduCounter, Loading @@ -1159,7 +1176,7 @@ module LibItsIicp_Templates { } // End of 'requests' field }, // End of 'pduRequest' field seqRq := ''O // No security } // End of template m_iicRequestRx_mnRequestRequest } // End of template m_iicRequestTx_mnRequestRequest } // End of group mnCommandsSend Loading Loading @@ -1193,11 +1210,11 @@ module LibItsIicp_Templates { * @param p_mn_rcmd The MN-COMMAND.confirm message * @see ISO 24102-4 Clause 8.2.2 IIC-Response PDU */ template IICresponseTX mdw_iicResponseTx_mnCommandRequest( template IICresponseRX mdw_iicResponseRx_mnCommandConfirm( in template (present) ITS_scuId p_sourceItsScuId, in template (present) ITS_scuId p_destinationItsScuId, in template (present) MN_Command_confirm p_mnReqCmd ) modifies mw_iicResponseTx_any := { ) modifies mw_iicResponseRx_any := { sourceITS_scuId := p_sourceItsScuId, destinationITS_scuId := p_destinationItsScuId, pduResponse := { Loading @@ -1206,7 +1223,7 @@ module LibItsIicp_Templates { } // End of 'responses' field }, // End of 'pduResponse' field errorStatus := 0 } // End of template mdw_iicResponseTx_mnCommandRequest } // End of template mdw_iicResponseRx_mnCommandConfirm /** * @desc Receive template for IICrequestTX/remote command message Loading
ttcn/CALM/LibItsCalm_Interface.ttcn +84 −33 Original line number Diff line number Diff line /** * @author ETSI / STF405 * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/branches/splitCalm/CALM/LibIts_Interface.ttcn $ * $Id: LibIts_Interface.ttcn 419 2012-03-12 13:17:27Z reinaortega $ * @version $URL$ * $Id$ * @desc Module containing PTCs and interface ports definitions for ITS * */ Loading @@ -24,6 +24,9 @@ module LibItsCalm_Interface { import from CALMfntp language "ASN.1:1997" all; import from LibItsMgt_TypesAndValues all; import from LibItsFntp_TypesAndValues all; import from LibItsFntp_Templates { template mw_fntpCommConfirm_failure }; import from LibItsFsap_TypesAndValues all; import from LibItsIicp_TypesAndValues all; Loading Loading @@ -170,9 +173,10 @@ module LibItsCalm_Interface { * @desc NT3 Fntp Port */ type port FntpPort message { inout INsapPrimitivesUp, INsapPrimitivesDown in FntpInd; out FntpReq } // End of port FntpPort } // End of group nt3Ports Loading @@ -183,7 +187,6 @@ module LibItsCalm_Interface { group interfacePrimitives { group managementPrimitives { group mgt1Primitives { Loading @@ -202,7 +205,8 @@ module LibItsCalm_Interface { * @desc MGT1 IISC Request Primitive */ type record IicpReq { IIC_Request msgInOut IIC_Request msgInOut, TimeStamp receptionTime } with { encode (msgInOut) "LibItsIicp_asn1" Loading Loading @@ -333,11 +337,32 @@ module LibItsCalm_Interface { group networkAndTransportPrimitives { type integer TimeStamp (0 .. 281474976710655); group nt3Primitives { } // end nt3Primitives /** * @desc TODO */ type union FntpReq { INsapPrimitivesUp msgOut } with { encode (msgOut) "LibItsCALMllsap_asn1" } /** * @desc TODO */ type record FntpInd { INsapPrimitivesDown msgIn, TimeStamp receptionTime } with { encode (msgIn) "LibItsCALMllsap_asn1" } } // End of group nt3Primitives } // End of group networkAndTransportPrimitives Loading @@ -353,6 +378,8 @@ module LibItsCalm_Interface { UtFntpInitialize utFntpInitialize, UtFsapInitialize utFsapInitialize, UtIicpInitialize utIicpInitialize } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -360,6 +387,8 @@ module LibItsCalm_Interface { */ type record UtTrigger { UtEvent utEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -367,6 +396,8 @@ module LibItsCalm_Interface { */ type record UtCheck { UtEvent utEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -376,6 +407,8 @@ module LibItsCalm_Interface { // Non IP Protocols UtFntpEvent utFntpEvent, UtFsapEvent utFsapEvent } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -387,6 +420,8 @@ module LibItsCalm_Interface { type union UtCommandRequest { UtFntpCommandRequest utFntpCommandRequest, UtFsapCommandRequest utFsapCommandRequest } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -395,6 +430,8 @@ module LibItsCalm_Interface { type union UtCommandConfirm { UtFntpCommandConfirm utFntpCommandConfirm // FIXME To be removed UtFsapCommandConfirm utFsapCommandConfirm } with { encode "LibItsCommon_TypesAndValues" } /** Loading @@ -403,20 +440,22 @@ module LibItsCalm_Interface { type union UtCommandIndication { UtFntpCommandIndication utFntpCommandIndication //UtFsapCommandIndication utFsapCommandIndication } with { encode "LibItsCommon_TypesAndValues" } type union UtRequestRequest { UtFntpRequestRequest utFntpRequestRequest } with { encode "LibItsCommon_TypesAndValues" } /** * @desc Upper Tester response message */ type boolean UtResult; type boolean UtResult with { encode "LibItsCommon_TypesAndValues" } } // End of group upperTester with { encode "LibItsCommon_TypesAndValues" } /** * @desc Upper tester functions Loading Loading @@ -524,7 +563,7 @@ module LibItsCalm_Interface { * @param p_result The command/request confirm response * @verdict Unchanged on success, fail otherwise */ function f_utCommandRequestConfirm( function f_utCommandRequestConfirm( // TODO Add discard mechanism - Rename into f_utCommandRequestConfirm in template (value) UtCommandRequest p_commandReq, in template (present) UtCommandConfirm p_commandConf, in boolean p_discard, Loading @@ -532,6 +571,7 @@ module LibItsCalm_Interface { runs on ItsCalm { utPort.send(p_commandReq); log("*** f_utCommandRequestConfirm: INFO: Expected UtCommandConfirm: ", p_commandConf, " ***"); tc_wait.start; alt { [] utPort.receive(p_commandConf) -> value p_result { Loading @@ -540,7 +580,7 @@ module LibItsCalm_Interface { [] utPort.receive { tc_wait.stop; if (p_discard == false) { log("*** f_utCommandRequestConfirm: ERROR: Event not correctly indicated at application layer ***"); log("*** f_utCommandRequestConfirm: ERROR: Event not correctly indicated at application layer ***", p_result); f_selfOrClientSyncAndVerdict("error", e_error); } else { Loading Loading @@ -572,11 +612,18 @@ module LibItsCalm_Interface { utPort.send(p_commandReq); tc_noac.start; alt { [] utPort.receive(mw_fntpCommConfirm_failure) { tc_noac.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandRequestWithoutConfirm: ERROR: Message is confirmed on error only (see ISO/IEC WD 29281-1 Clause 7.6.2 Basic procedure) ***"); } [] utPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandRequestWithoutConfirm: ERROR: Message is confirmed on error only (see ***"); log("*** f_utCommandRequestWithoutConfirm: ERROR: Unexpected message ***"); } [] tc_noac.timeout { log("*** f_utCommandRequestWithoutConfirm: INFO: CommandRequest succeed ***"); } }// End of 'alt' statement } // End of function f_utCommandRequestWithoutConfirm Loading @@ -586,7 +633,7 @@ module LibItsCalm_Interface { * @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( function f_utCommandIndication( // TODO Add discard mechanism in template UtCommandIndication p_event, out UtCommandIndication p_result ) runs on ItsCalm { Loading @@ -597,10 +644,12 @@ module LibItsCalm_Interface { tc_wait.stop; } [] utPort.receive { tc_wait.stop; f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandIndication: INFO: Another event indicated at application layer, repeating check ***"); repeat; } [] tc_wait.timeout { f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utCommandIndication: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement Loading @@ -619,8 +668,10 @@ module LibItsCalm_Interface { [] utPort.receive { tc_wait.stop; log("*** f_utSendRequestRequest: INFO: Another event indicated at application layer, repeating check ***"); repeat; } [] tc_wait.timeout { f_selfOrClientSyncAndVerdict("error", e_error); log("*** f_utSendRequestRequest: ERROR: Timeout while waiting for event check result ***"); } } // end of 'alt' statement Loading