Loading ttcn/CALM/ATSP/LibItsAtsp_Functions.ttcn3 +66 −9 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ module LibItsAtsp_Functions { UserPriority, VCIserialNumber, EUI64, LLserviceAddr, INdata, IN_SAPaddress, CIstatus, Link_ID, MedType, Errors, I_Param, I_ParamNo, MedID I_Param, I_ParamNo, MedID, VirtualCIs }; import from CALMmsap language "ASN.1:1997" { type Loading Loading @@ -348,6 +348,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -377,6 +379,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -407,6 +411,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -475,7 +481,7 @@ module LibItsAtsp_Functions { f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRegistrationCommandRequest( p_linkID, f_getNextCommandRef(), m_regCommand(PX_ITS_SCU_ID, p_medType))); m_regCommand(PX_ITS_SCU_ID, p_medType)), p_discard); } // Check for reception of Status notification (I-Parameter 12 "CIstatus" set to "registered". f_cnAwaitEventNotificationCI(p_linkID, mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusRegistered)), p_discard); Loading @@ -500,7 +506,7 @@ module LibItsAtsp_Functions { [] cfPort.receive(v_cfAtspEventInd) -> value v_result { tc_wait.stop; log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: MI-REQUEST.request received ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_cfAtspEventInd.miRequestRequest, c_ciErrStatusSuccess)); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); } [] cfPort.receive( { miRequestRequest := ? } ) -> value v_result { if (p_discard == false) { Loading @@ -509,7 +515,7 @@ module LibItsAtsp_Functions { f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } else { log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: An unexpected MI-REQUEST.Request was received, repeating check ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_cfAtspEventInd.miRequestRequest, c_ciErrStatusSuccess)); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); repeat; } } Loading Loading @@ -566,13 +572,15 @@ module LibItsAtsp_Functions { /** * @desc Send an MI-COMMAND request and wait for confirmation * @param p_sentMI_Command Command to send wait confirmation for * @param p_discard Unexpected Request messages will be discarded, or cause testcase failure */ function f_cnSendMICOMMAND_RequestCheckSuccessCI( in template(value) MI_Command_request p_sentMI_Command in template(value) MI_Command_request p_sentMI_Command, in boolean p_discard // set to TRUE ) runs on ItsCalm { f_cnSendMICOMMAND_RequestCI(p_sentMI_Command); f_cnAwaitCommandConfirmSuccess(p_sentMI_Command, false); f_cnAwaitCommandConfirmSuccess(p_sentMI_Command, p_discard); } // End of function f_cnSendMICOMMAND_RequestCheckSuccessCI /** Loading Loading @@ -600,12 +608,20 @@ module LibItsAtsp_Functions { ) runs on ItsCalm { var CfAtspEventInd v_result; var template CfAtspEventInd v_cfAtspEventInd; var template CfAtspEventInd v_cfAtspEventReq; v_cfAtspEventInd := mw_cfAtspCommandConfirm( m_miCommandConfirm( p_sentMI_Command.linkID, p_sentMI_Command.commandRef, p_expectedStatus)); v_cfAtspEventReq := mw_cfAtspRequestRequest( mw_miEventsRequest( p_sentMI_Command.linkID, ?, ?)); log("*** f_cnAwaitCommandConfirm: INFO: Expected MI-COMMAND.confirm: ", v_cfAtspEventInd, " ***"); tc_wait.start; alt { Loading @@ -617,6 +633,17 @@ module LibItsAtsp_Functions { tc_wait.stop; log("*** f_cnAwaitCommandConfirm: ERROR: An unexpected MI-COMMAND.confirm was received ***", v_result); f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } [] cfPort.receive( v_cfAtspEventReq ) -> value v_result { if (p_discard == false) { tc_wait.stop; log("*** f_cnAwaitAndConfirmMI_RequestCI: ERROR: An unexpected MI-REQUEST.Request was received ***", v_result); f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } else { log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: An unexpected MI-REQUEST.Request was received, repeating check ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); repeat; } } [] cfPort.receive(CfAtspEventInd : ? ) -> value v_result { if (p_discard == false) { Loading @@ -639,6 +666,21 @@ module LibItsAtsp_Functions { } // End of 'alt' statement } // End of function f_cnAwaitCommandConfirm /** * @desc Return the number of VCIs values in the I-Parameter 33 * @param p_iParam VirtualCis parameter to check */ function f_getVirualCIcount( in I_Param p_iParam ) return integer{ if(p_iParam.paramNo == c_ciIParamNoVirtualCI) { return lengthof(p_iParam.parameter.VirtualCIs); } return 0; } // End of function f_checkNoVirualCIs /** * @desc Force CI to change state, wait for notification of reaching specific state * @param p_linkID Link-ID used by IUT Loading @@ -657,7 +699,7 @@ module LibItsAtsp_Functions { f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miStateChangeCommandRequest( p_linkID, f_getNextCommandRef(), p_newState)); p_newState), true); f_cnAwaitEventNotificationCI(p_linkID, mw_miEvent21218_5( mw_miCIStatusParam(p_expectedStatus)), p_discard); Loading Loading @@ -707,11 +749,12 @@ module LibItsAtsp_Functions { v_cfSetSuccess := mw_cfAtspEventIndSetConf( mw_miSetConfirm(p_linkID, v_commandRef, ?)); log("*** f_cnSetIParameterValueCI: INFO: Expected MI-Get.confirm: ", v_cfSetSuccess, " ***"); log("*** f_cnSetIParameterValueCI: INFO: Expected MI-Set.confirm: ", v_cfSetSuccess, " ***"); tc_wait.start; alt { [] cfPort.receive(v_cfSetSuccess) -> value v_result{ tc_wait.stop; f_selfOrClientSyncAndVerdict("Expected message received", e_success); log("*** f_cnSetIParameterValueCI: INFO: Expected 'MI-Set.confirm' received ***"); v_cfSetErrorList := v_result.miSetConfirm.set_param; } Loading Loading @@ -1190,6 +1233,20 @@ module LibItsAtsp_Functions { } // end /** * @desc Local CIID value part of the IUT itself */ function f_get_CI_Local_CIID() return EUI64{ if(PICS_MAC48) { return PX_LOCAL_CIID; } else { return f_get_EUI64_LegacyCI(0, PX_ITS_SCU_ID, PX_Med_ID, 0); } } // end /** * @desc used to address CI in the Test System itself */ function f_get_TesterCI_LinkID() return Link_ID{ Loading ttcn/CALM/ATSP/LibItsAtsp_Pixits.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ module LibItsAtsp_Pixits { * @see ISO 21218 - Clause 6.3 Link Identifier */ modulepar I_Param PX_CI_NO_SUPPORT_PARAM := {paramNo := PX_CI_NO_SUPPORT_PARAM_NO, parameter := {UserPriority := 0} }; modulepar I_ParamNo PX_CI_NO_SUPPORT_PARAM_NO := c_ciIParamNoMinPrioCrossCI; modulepar I_ParamNo PX_CI_NO_SUPPORT_PARAM_NO := 125; /** * @desc Supported I-Parameter with write or read/write access * @see ISO 21218 - Clause 6.3 Link Identifier */ modulepar I_Param PX_CI_SUPPORT_PARAM_WR := {paramNo := PX_CI_SUPPORT_PARAM_WR_NO, parameter := {DataRate := 125} }; modulepar I_ParamNo PX_CI_SUPPORT_PARAM_WR_NO := 125; modulepar I_ParamNo PX_CI_SUPPORT_PARAM_WR_NO := 39; /** * @desc Supported Read-Only or Notify-Only I-Parameter Loading ttcn/CALM/ATSP/LibItsAtsp_Templates.ttcn3 +17 −4 Original line number Diff line number Diff line Loading @@ -352,7 +352,7 @@ module LibItsAtsp_Templates { ) := { linkID := p_linkID, commandRef := p_commandRef, ref := c_miCmd_ciState, ref := c_miCmd_vciCmd, command_param := {VciCmd := p_vciCmd} } // End of template m_miVCIcmdCommandRequest Loading Loading @@ -615,11 +615,11 @@ module LibItsAtsp_Templates { * @param p_parameter VCI created event data */ template Events21218 mw_miEvent21218_3( in template Link_ID p_parameter in template E21218_3 p_parameter ) := { eventNo := 3, event := { Link_ID := p_parameter E21218_3 := p_parameter } } // End of template mw_miEvent21218_3 Loading @@ -632,7 +632,7 @@ module LibItsAtsp_Templates { ) := { eventNo := 4, event := { Link_ID := p_parameter E21218_4 := p_parameter } } // End of template mw_miEvent21218_4 Loading @@ -649,6 +649,19 @@ module LibItsAtsp_Templates { } } // End of template mw_miCIStatusParam /** * @desc Generic receive template for VCI notifications in MI-REQUEST.request service primitive * @param p_parameter VCI reset event data */ template Events21218 mw_miEvent21218_7( in template E21218_7 p_parameter ) := { eventNo := 7, event := { E21218_7 := p_parameter } } // End of template mw_miEvent21218_3 /** * @desc Generic receive template for event notification in MI-REQUEST.request service primitive * @param p_linkID Link-ID of VCI / CI. Loading Loading
ttcn/CALM/ATSP/LibItsAtsp_Functions.ttcn3 +66 −9 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ module LibItsAtsp_Functions { UserPriority, VCIserialNumber, EUI64, LLserviceAddr, INdata, IN_SAPaddress, CIstatus, Link_ID, MedType, Errors, I_Param, I_ParamNo, MedID I_Param, I_ParamNo, MedID, VirtualCIs }; import from CALMmsap language "ASN.1:1997" { type Loading Loading @@ -348,6 +348,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -377,6 +379,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -407,6 +411,8 @@ module LibItsAtsp_Functions { { // Request operator to switch on the SUT or to activate the IUT action("Switch on SUT or activate IUT"); f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); } // check again CI status after activation of IUT Loading Loading @@ -475,7 +481,7 @@ module LibItsAtsp_Functions { f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRegistrationCommandRequest( p_linkID, f_getNextCommandRef(), m_regCommand(PX_ITS_SCU_ID, p_medType))); m_regCommand(PX_ITS_SCU_ID, p_medType)), p_discard); } // Check for reception of Status notification (I-Parameter 12 "CIstatus" set to "registered". f_cnAwaitEventNotificationCI(p_linkID, mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusRegistered)), p_discard); Loading @@ -500,7 +506,7 @@ module LibItsAtsp_Functions { [] cfPort.receive(v_cfAtspEventInd) -> value v_result { tc_wait.stop; log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: MI-REQUEST.request received ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_cfAtspEventInd.miRequestRequest, c_ciErrStatusSuccess)); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); } [] cfPort.receive( { miRequestRequest := ? } ) -> value v_result { if (p_discard == false) { Loading @@ -509,7 +515,7 @@ module LibItsAtsp_Functions { f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } else { log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: An unexpected MI-REQUEST.Request was received, repeating check ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_cfAtspEventInd.miRequestRequest, c_ciErrStatusSuccess)); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); repeat; } } Loading Loading @@ -566,13 +572,15 @@ module LibItsAtsp_Functions { /** * @desc Send an MI-COMMAND request and wait for confirmation * @param p_sentMI_Command Command to send wait confirmation for * @param p_discard Unexpected Request messages will be discarded, or cause testcase failure */ function f_cnSendMICOMMAND_RequestCheckSuccessCI( in template(value) MI_Command_request p_sentMI_Command in template(value) MI_Command_request p_sentMI_Command, in boolean p_discard // set to TRUE ) runs on ItsCalm { f_cnSendMICOMMAND_RequestCI(p_sentMI_Command); f_cnAwaitCommandConfirmSuccess(p_sentMI_Command, false); f_cnAwaitCommandConfirmSuccess(p_sentMI_Command, p_discard); } // End of function f_cnSendMICOMMAND_RequestCheckSuccessCI /** Loading Loading @@ -600,12 +608,20 @@ module LibItsAtsp_Functions { ) runs on ItsCalm { var CfAtspEventInd v_result; var template CfAtspEventInd v_cfAtspEventInd; var template CfAtspEventInd v_cfAtspEventReq; v_cfAtspEventInd := mw_cfAtspCommandConfirm( m_miCommandConfirm( p_sentMI_Command.linkID, p_sentMI_Command.commandRef, p_expectedStatus)); v_cfAtspEventReq := mw_cfAtspRequestRequest( mw_miEventsRequest( p_sentMI_Command.linkID, ?, ?)); log("*** f_cnAwaitCommandConfirm: INFO: Expected MI-COMMAND.confirm: ", v_cfAtspEventInd, " ***"); tc_wait.start; alt { Loading @@ -617,6 +633,17 @@ module LibItsAtsp_Functions { tc_wait.stop; log("*** f_cnAwaitCommandConfirm: ERROR: An unexpected MI-COMMAND.confirm was received ***", v_result); f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } [] cfPort.receive( v_cfAtspEventReq ) -> value v_result { if (p_discard == false) { tc_wait.stop; log("*** f_cnAwaitAndConfirmMI_RequestCI: ERROR: An unexpected MI-REQUEST.Request was received ***", v_result); f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked } else { log("*** f_cnAwaitAndConfirmMI_RequestCI: INFO: An unexpected MI-REQUEST.Request was received, repeating check ***"); f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); repeat; } } [] cfPort.receive(CfAtspEventInd : ? ) -> value v_result { if (p_discard == false) { Loading @@ -639,6 +666,21 @@ module LibItsAtsp_Functions { } // End of 'alt' statement } // End of function f_cnAwaitCommandConfirm /** * @desc Return the number of VCIs values in the I-Parameter 33 * @param p_iParam VirtualCis parameter to check */ function f_getVirualCIcount( in I_Param p_iParam ) return integer{ if(p_iParam.paramNo == c_ciIParamNoVirtualCI) { return lengthof(p_iParam.parameter.VirtualCIs); } return 0; } // End of function f_checkNoVirualCIs /** * @desc Force CI to change state, wait for notification of reaching specific state * @param p_linkID Link-ID used by IUT Loading @@ -657,7 +699,7 @@ module LibItsAtsp_Functions { f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miStateChangeCommandRequest( p_linkID, f_getNextCommandRef(), p_newState)); p_newState), true); f_cnAwaitEventNotificationCI(p_linkID, mw_miEvent21218_5( mw_miCIStatusParam(p_expectedStatus)), p_discard); Loading Loading @@ -707,11 +749,12 @@ module LibItsAtsp_Functions { v_cfSetSuccess := mw_cfAtspEventIndSetConf( mw_miSetConfirm(p_linkID, v_commandRef, ?)); log("*** f_cnSetIParameterValueCI: INFO: Expected MI-Get.confirm: ", v_cfSetSuccess, " ***"); log("*** f_cnSetIParameterValueCI: INFO: Expected MI-Set.confirm: ", v_cfSetSuccess, " ***"); tc_wait.start; alt { [] cfPort.receive(v_cfSetSuccess) -> value v_result{ tc_wait.stop; f_selfOrClientSyncAndVerdict("Expected message received", e_success); log("*** f_cnSetIParameterValueCI: INFO: Expected 'MI-Set.confirm' received ***"); v_cfSetErrorList := v_result.miSetConfirm.set_param; } Loading Loading @@ -1190,6 +1233,20 @@ module LibItsAtsp_Functions { } // end /** * @desc Local CIID value part of the IUT itself */ function f_get_CI_Local_CIID() return EUI64{ if(PICS_MAC48) { return PX_LOCAL_CIID; } else { return f_get_EUI64_LegacyCI(0, PX_ITS_SCU_ID, PX_Med_ID, 0); } } // end /** * @desc used to address CI in the Test System itself */ function f_get_TesterCI_LinkID() return Link_ID{ Loading
ttcn/CALM/ATSP/LibItsAtsp_Pixits.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -68,14 +68,14 @@ module LibItsAtsp_Pixits { * @see ISO 21218 - Clause 6.3 Link Identifier */ modulepar I_Param PX_CI_NO_SUPPORT_PARAM := {paramNo := PX_CI_NO_SUPPORT_PARAM_NO, parameter := {UserPriority := 0} }; modulepar I_ParamNo PX_CI_NO_SUPPORT_PARAM_NO := c_ciIParamNoMinPrioCrossCI; modulepar I_ParamNo PX_CI_NO_SUPPORT_PARAM_NO := 125; /** * @desc Supported I-Parameter with write or read/write access * @see ISO 21218 - Clause 6.3 Link Identifier */ modulepar I_Param PX_CI_SUPPORT_PARAM_WR := {paramNo := PX_CI_SUPPORT_PARAM_WR_NO, parameter := {DataRate := 125} }; modulepar I_ParamNo PX_CI_SUPPORT_PARAM_WR_NO := 125; modulepar I_ParamNo PX_CI_SUPPORT_PARAM_WR_NO := 39; /** * @desc Supported Read-Only or Notify-Only I-Parameter Loading
ttcn/CALM/ATSP/LibItsAtsp_Templates.ttcn3 +17 −4 Original line number Diff line number Diff line Loading @@ -352,7 +352,7 @@ module LibItsAtsp_Templates { ) := { linkID := p_linkID, commandRef := p_commandRef, ref := c_miCmd_ciState, ref := c_miCmd_vciCmd, command_param := {VciCmd := p_vciCmd} } // End of template m_miVCIcmdCommandRequest Loading Loading @@ -615,11 +615,11 @@ module LibItsAtsp_Templates { * @param p_parameter VCI created event data */ template Events21218 mw_miEvent21218_3( in template Link_ID p_parameter in template E21218_3 p_parameter ) := { eventNo := 3, event := { Link_ID := p_parameter E21218_3 := p_parameter } } // End of template mw_miEvent21218_3 Loading @@ -632,7 +632,7 @@ module LibItsAtsp_Templates { ) := { eventNo := 4, event := { Link_ID := p_parameter E21218_4 := p_parameter } } // End of template mw_miEvent21218_4 Loading @@ -649,6 +649,19 @@ module LibItsAtsp_Templates { } } // End of template mw_miCIStatusParam /** * @desc Generic receive template for VCI notifications in MI-REQUEST.request service primitive * @param p_parameter VCI reset event data */ template Events21218 mw_miEvent21218_7( in template E21218_7 p_parameter ) := { eventNo := 7, event := { E21218_7 := p_parameter } } // End of template mw_miEvent21218_3 /** * @desc Generic receive template for event notification in MI-REQUEST.request service primitive * @param p_linkID Link-ID of VCI / CI. Loading