├── COMMON ├── sM_LTE_CellBarring.cpp ├── sM_LTE_CellBarring.h ├── sM_LTE_DlNasMsgHandler.cpp ├── sM_LTE_DlNasMsgHandler.h ├── sM_LTE_MocProcedure.cpp ├── sM_LTE_MocProcedure.h ├── sM_LTE_MtcProcedure.cpp ├── sM_LTE_MtcProcedure.h ├── sM_LTE_TauProcedure.cpp ├── sM_LTE_TauProcedure.h ├── sM_LTE_UeRegistration.cpp ├── sM_LTE_UeRegistration.h ├── sM_LTE_UlNasMsgHandler.cpp └── sM_LTE_UlNasMsgHandler.h ├── ERRC ├── sM_LTE_AsSecurity.cpp ├── sM_LTE_AsSecurity.h ├── sM_LTE_CounterCheck.cpp ├── sM_LTE_CounterCheck.h ├── sM_LTE_MeasurementReport.cpp ├── sM_LTE_MeasurementReport.h ├── sM_LTE_Paging.cpp ├── sM_LTE_Paging.h ├── sM_LTE_RrcConnectionEstablishment.cpp ├── sM_LTE_RrcConnectionEstablishment.h ├── sM_LTE_RrcConnectionReconfiguration.cpp ├── sM_LTE_RrcConnectionReconfiguration.h ├── sM_LTE_RrcConnectionReconfiguration_ho.cpp ├── sM_LTE_RrcConnectionReconfiguration_ho.h ├── sM_LTE_RrcConnectionReconfiguration_meas.cpp ├── sM_LTE_RrcConnectionReconfiguration_meas.h ├── sM_LTE_RrcConnectionReestablishment.cpp ├── sM_LTE_RrcConnectionReestablishment.h ├── sM_LTE_RrcConnectionRelease.cpp ├── sM_LTE_RrcConnectionRelease.h ├── sM_LTE_RrcConnectionRequest.cpp ├── sM_LTE_RrcConnectionRequest.h ├── sM_LTE_UeRadioAccessCapability.cpp └── sM_LTE_UeRadioAccessCapability.h ├── ETC ├── sM_LTE_CloseLoopbackActivation.cpp ├── sM_LTE_CloseLoopbackActivation.h ├── sM_LTE_OpenLoopbackActivation.cpp ├── sM_LTE_OpenLoopbackActivation.h ├── sM_LTE_TestModeActivation.cpp ├── sM_LTE_TestModeActivation.h ├── sM_LTE_TestModeDeactivation.cpp └── sM_LTE_TestModeDeactivation.h ├── LIB ├── LTE_Basic.lib ├── LTE_Basic_common.lib ├── LTE_EPS_Bearer.lib ├── LTE_EPS_Bearer_common.lib ├── LTE_Mobility.lib ├── LTE_Mobility_common.lib ├── mlapilte.lib ├── mlapirt1.lib └── rsltecommon.lib ├── LICENSE.txt └── README.md /COMMON/sM_LTE_CellBarring.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L3 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_CellBarring.cpp 28 | 29 | Version: 0.2 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2012. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 0.1 26.11.2010 / Dennis M Senyonjo Logs fix 41 | 0.1 09.09.2010 / Dennis M Senyonjo Original 42 | 43 | */ 44 | 45 | /* INCLUDE FILES **************************************************************/ 46 | 47 | #include "lte_common.h" 48 | #include 49 | 50 | /* PUBLIC *********************************************************************/ 51 | 52 | void sM_LTE_CellBarringInitializedByUE::start(void) 53 | { 54 | sM_LteMlDefault::start(); 55 | 56 | PE_PRINT(" TC: Waiting barring timeout" ); 57 | 58 | if ( WaitTimer == 0 ) 59 | { 60 | rsDefaultTimer->set(300000); //default 300s 61 | } 62 | else 63 | { 64 | rsDefaultTimer->set(WaitTimer); 65 | } 66 | 67 | NEXT_STATE ( RRCConnectionRequest ); 68 | } 69 | 70 | ON_TIMER( sM_LTE_CellBarringInitializedByUE, RRCConnectionRequest, RS_Default_Timer) 71 | { 72 | PE_PRINT(" TC: Barring timeout" ); 73 | notifyCompletion(EV_OK); 74 | } 75 | 76 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_CellBarringInitializedByUE, RRCConnectionRequest, RRCConnectionRequest ) 77 | { 78 | rsDefaultTimer->reset(); 79 | 80 | GCO_DUMP(pdu); 81 | PE_PRINT(" UE -> SS RRC: RRCConnectionRequest " ); 82 | 83 | // Check CellHandle 84 | 85 | if ( asp->RrcCellHandle()->get() != CellHandle ) 86 | { 87 | /// @todo There might be some todo: 88 | /// *now Received RRCR with non barred cell 89 | /// *State is PASS ? 90 | /* 91 | if ( xmlRRCConnectionRequest != "" ) 92 | { 93 | if ( GCO_MATCHF(root, xmlRRCConnectionRequest.c_str()) ) 94 | { 95 | PE_PRINT(####### Message is OK #######" ); 96 | } 97 | else 98 | { 99 | PE_ERR("####### Message is NOK #######" ); 100 | NOTIFY_COMPLETION_FAILURE(); 101 | } 102 | } 103 | */ 104 | 105 | PE_ERR("####### Message received in wrong cell #######" ); 106 | notifyCompletion(EV_OK); 107 | } 108 | else 109 | { 110 | notifyCompletion(EV_OK); 111 | } 112 | 113 | 114 | } 115 | 116 | /******************************************************************************/ 117 | /* END OF FILE */ 118 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_CellBarring.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_CELL_BARRING_H_ 6 | #define _SM_LTE_CELL_BARRING_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_CellBarred**********************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_CellBarringInitializedByUE, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | int CellHandle; 21 | int WaitTimer; 22 | 23 | public: 24 | 25 | sM_LTE_CellBarringInitializedByUE( 26 | int _CellHandle, 27 | int _WaitTimer = 300000 28 | ) 29 | { 30 | CellHandle = _CellHandle; 31 | WaitTimer = _WaitTimer; 32 | } 33 | 34 | // Destructor 35 | 36 | ~sM_LTE_CellBarringInitializedByUE() 37 | { 38 | } 39 | 40 | void start(void); 41 | }; 42 | 43 | #endif // _SM_LTE_CELL_BARRING_H_ 44 | 45 | /******************************************************************************/ 46 | /* END OF FILE */ 47 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_DlNasMsgHandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L3 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_DlNasMsgHandler.cpp 29 | 30 | Version: 0.3 31 | 32 | Author: V-A 33 | 34 | 35 | Copyright (c) 2011. 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 0.3 21.02.2011 / V-A Added messages: 42 | -ESM_BEARER_RESOURCE_ALLOCATION_REJECT 43 | -ESM_BEARER_RESOURCE_MODIFICATION_REJECT 44 | 45 | 0.2 10.02.2011 / V-A Added messages: 46 | -ESM_PDN_CONNECTIVITY_REJECT 47 | -ESM_PDN_DISCONNECT_REJECT 48 | 0.1 02.02.2011 / V-A Original 49 | 50 | */ 51 | 52 | /* INCLUDE FILES **************************************************************/ 53 | 54 | #include "lte_common.h" 55 | #include 56 | 57 | /* PUBLIC *********************************************************************/ 58 | 59 | void sM_LTE_DlNasMsgHandler::start(void) 60 | { 61 | sM_LteMlDefault::start(); 62 | 63 | if ( DlMessageId == MDDB::Eps::Nas::ESM_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST ) 64 | { 65 | DECL_NEW_EPS_NAS_PDU( dlmsg, PdEpsSessionManagement, EsmActivateDedicatedEpsBearerContextRequest, xmlMessage.c_str() ); 66 | 67 | GCO_DUMP(dlmsg.pdu); 68 | 69 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( dlmsg ) ); 70 | delete &dlmsg; 71 | 72 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 73 | PE_PRINT(" NAS: Activate Dedicated Eps Bearer Request"); 74 | 75 | notifyCompletion(EV_OK); 76 | } 77 | else if( DlMessageId == MDDB::Eps::Nas::EMM_STATUS ) 78 | { 79 | DECL_NEW_EPS_NAS_PDU( statusMsg, PdEpsMobilityManagement, EmmMsgStatus, xmlMessage.c_str()); 80 | 81 | GCO_DUMP(statusMsg.pdu); 82 | 83 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( statusMsg ) ); 84 | delete &statusMsg; 85 | 86 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 87 | PE_PRINT(" NAS: EMM STATUS"); 88 | 89 | notifyCompletion(EV_OK); 90 | } 91 | else if( DlMessageId == MDDB::Eps::Nas::ESM_PDN_CONNECTIVITY_REJECT ) 92 | { 93 | DECL_NEW_EPS_NAS_PDU( msg, PdEpsSessionManagement, EsmPdnConnectivityReject, xmlMessage.c_str()); 94 | 95 | GCO_DUMP(msg.pdu); 96 | 97 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( globaldata_lte->getPTI() ); 98 | 99 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( msg ) ); 100 | delete &msg; 101 | 102 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 103 | PE_PRINT(" NAS: ESM PDN CONNECTIVITY REJECT"); 104 | 105 | notifyCompletion(EV_OK); 106 | } 107 | else if( DlMessageId == MDDB::Eps::Nas::ESM_PDN_DISCONNECT_REJECT ) 108 | { 109 | DECL_NEW_EPS_NAS_PDU( msg, PdEpsSessionManagement, EsmPdnDisconnectReject, xmlMessage.c_str()); 110 | 111 | GCO_DUMP(msg.pdu); 112 | 113 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( globaldata_lte->getPTI() ); 114 | 115 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( msg ) ); 116 | delete &msg; 117 | 118 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 119 | PE_PRINT(" NAS: ESM PDN DISCONNECT REJECT"); 120 | 121 | notifyCompletion(EV_OK); 122 | } 123 | else if( DlMessageId == MDDB::Eps::Nas::ESM_BEARER_RESOURCE_ALLOCATION_REJECT ) 124 | { 125 | DECL_NEW_EPS_NAS_PDU( msg, PdEpsSessionManagement, EsmBearerResourceAllocationReject, xmlMessage.c_str()); 126 | 127 | GCO_DUMP(msg.pdu); 128 | 129 | if( m_argslist != 0 ) 130 | { 131 | int pti = va_arg(m_argslist, int);// [0]: PTI 132 | // if pti == -1 -> use last stored pti value from globaldata_lte 133 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( ((pti==-1)?globaldata_lte->getPTI():pti) ); 134 | 135 | int EBI = va_arg(m_argslist, int);// [1]: EBI 136 | if( EBI != -1 ) 137 | msg.root->Choice()->PdEpsSessionManagement()->EpsBearerIdentity()->set( EBI ); 138 | 139 | int cause = va_arg(m_argslist, int);// [1]: Reject cause 140 | if( cause != -1 ) 141 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->Choice()->EsmBearerResourceAllocationReject()->EsmCauseV()->EsmCause()->set( cause ); 142 | } 143 | else msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( globaldata_lte->getPTI() ); 144 | 145 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( msg ) ); 146 | delete &msg; 147 | 148 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 149 | PE_PRINT(" NAS: ESM BEARER RESOURCE ALLOCATION REJECT"); 150 | 151 | notifyCompletion(EV_OK); 152 | } 153 | else if( DlMessageId == MDDB::Eps::Nas::ESM_BEARER_RESOURCE_MODIFICATION_REJECT ) 154 | { 155 | DECL_NEW_EPS_NAS_PDU( msg, PdEpsSessionManagement, EsmBearerResourceModificationReject, xmlMessage.c_str()); 156 | 157 | GCO_DUMP(msg.pdu); 158 | 159 | if( m_argslist != 0 ) 160 | { 161 | int pti = va_arg(m_argslist, int);// [0]: PTI 162 | // if pti == -1 -> use last stored pti value from globaldata_lte 163 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( ((pti==-1)?globaldata_lte->getPTI():pti) ); 164 | 165 | int EBI = va_arg(m_argslist, int);// [1]: EBI 166 | if( EBI != -1 ) 167 | msg.root->Choice()->PdEpsSessionManagement()->EpsBearerIdentity()->set( EBI ); 168 | 169 | int cause = va_arg(m_argslist, int);// [1]: Reject cause 170 | if( cause != -1 ) 171 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->Choice()->EsmBearerResourceModificationReject()->EsmCauseV()->EsmCause()->set( cause ); 172 | } 173 | else{ 174 | msg.root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->set( globaldata_lte->getPTI() ); 175 | } 176 | 177 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( msg ) ); 178 | delete &msg; 179 | 180 | PE_PRINT(" SS -> UE RRC: DlInformationTransfer"); 181 | PE_PRINT(" NAS: ESM BEARER RESOURCE MODIFICATION REJECT"); 182 | 183 | notifyCompletion(EV_OK); 184 | } 185 | else 186 | { 187 | RUN_NEWP_STATEMACHINE( sM_ResultPane, null, 188 | ( 189 | "####### Selected MessageId parameter is not supported #######", 190 | TC_MESSAGE_ERROR 191 | ) 192 | ); 193 | NOTIFY_COMPLETION_FAILURE(); 194 | } 195 | } 196 | 197 | /******************************************************************************/ 198 | /* END OF FILE */ 199 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_DlNasMsgHandler.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_DLNASMESSAGEHANDLER_H_ 6 | #define _SM_LTE_DLNASMESSAGEHANDLER_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | #include 10 | 11 | #include "lte_common.h" 12 | 13 | /* CLASS DECLARATION *********************************************************/ 14 | 15 | /* sM_LTE_DlNasMsgHandler ***********************************************************/ 16 | // use MDDB::Eps::Nas:: instead of above enumerator !! 17 | enum DlMessageId_e 18 | { 19 | ESM_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST, 20 | EMM_STATUS, 21 | ESM_PDN_CONNECTIVITY_REJECT, 22 | ESM_PDN_DISCONNECT_REJECT 23 | }; 24 | 25 | 26 | DERIVED_STATEMACHINE_DLL( sM_LTE_DlNasMsgHandler, sM_LteMlDefault, DLLLTECOMMON ) 27 | { 28 | protected: 29 | 30 | DlMessageId_e DlMessageId; 31 | std::string xmlMessage; 32 | va_list m_argslist; 33 | 34 | public: 35 | 36 | sM_LTE_DlNasMsgHandler ( 37 | DlMessageId_e _DlMessageId, 38 | std::string _xmlMessage 39 | ) 40 | { 41 | DlMessageId = _DlMessageId; 42 | xmlMessage = _xmlMessage; 43 | m_argslist = 0; 44 | } 45 | 46 | // Constructer with va_list 47 | sM_LTE_DlNasMsgHandler ( 48 | DlMessageId_e _DlMessageId, 49 | std::string _xmlMessage, 50 | va_list _args 51 | ) 52 | { 53 | DlMessageId = _DlMessageId; 54 | xmlMessage = _xmlMessage; 55 | m_argslist = _args; 56 | } 57 | // Constructer with variable arguments 58 | sM_LTE_DlNasMsgHandler ( 59 | DlMessageId_e _DlMessageId, 60 | std::string _xmlMessage, 61 | void *_args, ... 62 | ) 63 | { 64 | DlMessageId = _DlMessageId; 65 | xmlMessage = _xmlMessage; 66 | 67 | va_start(m_argslist, _args); 68 | } 69 | 70 | // Destructor 71 | 72 | ~sM_LTE_DlNasMsgHandler() 73 | { 74 | if( m_argslist != 0) va_end(m_argslist); 75 | } 76 | 77 | void start(void); 78 | 79 | }; 80 | 81 | #endif // _SM_LTE_DLNASMESSAGEHANDLER_H_ 82 | 83 | /******************************************************************************/ 84 | /* END OF FILE */ 85 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_MocProcedure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_MocProcedure.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011/Dennis M S Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | #include 49 | #include 50 | 51 | using namespace std; 52 | 53 | /* PUBLIC *********************************************************************/ 54 | 55 | void sM_LTE_MocProcedure::start(void) 56 | { 57 | sM_LteMlDefault::start(); 58 | 59 | /******************************************************************************/ 60 | /* UE->SS RRC: RRCConnectionRequest */ 61 | /* SS->UE RRC: RRCConnectionSetup */ 62 | /* UE->SS RRC: RRCConnectionSetupComplete */ 63 | /******************************************************************************/ 64 | 65 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionEstablishment, null, 66 | ( 67 | CellNumber, // CellNumber 68 | xmlRRCConnectionRequest, // RRCConnectionRequest 69 | xmlRRCConnectionSetup, // RRCConnectionSetup 70 | xmlRRCConnectionSetupComplete, // RRCConnectionSetupComplete 71 | 10000 // WaitTimer 72 | ) 73 | ); 74 | 75 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 76 | 77 | /******************************************************************************/ 78 | /* UE->SS RRC: UlInformationTransfer */ 79 | /* NAS: SERVICE REQUEST */ 80 | /******************************************************************************/ 81 | 82 | if( EV_OK == retcode ) 83 | { 84 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 85 | ( 86 | "ServiceRequest", // MessageId 87 | xmlServiceRequest // ServiceRequest 88 | ) 89 | ); 90 | 91 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 92 | } 93 | 94 | /******************************************************************************/ 95 | /* SS->UE RRC: SecurityModeCommand */ 96 | /* UE->SS RRC: SecurityModeComplete */ 97 | /******************************************************************************/ 98 | 99 | if( EV_OK == retcode ) 100 | { 101 | RUN_NEWP_STATEMACHINE ( sM_LTE_AsSecurity, null, 102 | ( 103 | xmlSecurityModeCommand, // SecurityModeCommand 104 | LteReferenceTestConditions->getDefAsCiphProtAlg(), // cipheringAlgorithm 105 | LteReferenceTestConditions->getDefAsIntProtAlg(), // integrityProtAlgorithm 106 | xmlSecurityModeComplete // SecurityModeComplete 107 | ) 108 | ); 109 | 110 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 111 | } 112 | 113 | if( DedicatedContext == false ) 114 | { 115 | /******************************************************************************/ 116 | /* SS->UE RRC: RRCConnectionReconfiguration */ 117 | /******************************************************************************/ 118 | 119 | if( EV_OK == retcode ) 120 | { 121 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionReconfiguration, null, 122 | ( 123 | xmlRRCConnectionReconfiguration, // RRCConnectionReconfiguration 124 | std::string(""), // AttachAccept 125 | std::string(""), // ActivateDefaultEpsBearerContextRequest 126 | xmlRRCConnectionReconfigurationComplete, // RRCConnectionReconfigurationComplete 127 | DataGenerator // Datagenerator 128 | ) 129 | ); 130 | 131 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 132 | 133 | notifyCompletion(retcode); 134 | } 135 | else 136 | { 137 | notifyCompletion(EV_FAIL); 138 | } 139 | } 140 | else 141 | { 142 | /******************************************************************************/ 143 | /* SS->UE RRC: RRCConnectionReconfiguration */ 144 | /* NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST */ 145 | /******************************************************************************/ 146 | 147 | if( EV_OK == retcode ) 148 | { 149 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionReconfiguration, null, 150 | ( 151 | xmlRRCConnectionReconfiguration, // RRCConnectionReconfiguration 152 | xmlNASActivateDedicatedEpsBearerContextRequest, // NASActivateDedicatedEpsBearerContextRequest 153 | xmlRRCConnectionReconfigurationComplete, // RRCConnectionReconfigurationComplete 154 | DataGenerator // DataGenerator 155 | ) 156 | ); 157 | 158 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 159 | } 160 | 161 | /******************************************************************************/ 162 | /* UE->SS RRC: UlInformationTransfer */ 163 | /* NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT */ 164 | /******************************************************************************/ 165 | 166 | if( EV_OK == retcode ) 167 | { 168 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 169 | ( 170 | "ActivateDedicatedEpsBearerContextAccept", // MessageId 171 | xmlNASActivateDedicatedEpsBearerContextAccept // ActivateDedicatedEpsBearerContextAccept 172 | ) 173 | ); 174 | 175 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 176 | 177 | notifyCompletion(retcode); 178 | } 179 | else 180 | { 181 | notifyCompletion(EV_FAIL); 182 | } 183 | } 184 | } 185 | 186 | /******************************************************************************/ 187 | /* END OF FILE */ 188 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_MocProcedure.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo v0.3 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_MOCPROCEDURE_H_ 6 | #define _SM_LTE_MOCPROCEDURE_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_MocProcedure *******************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_MocProcedure, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionRequest; 21 | std::string xmlRRCConnectionSetup; 22 | std::string xmlRRCConnectionSetupComplete; 23 | std::string xmlServiceRequest; 24 | std::string xmlSecurityModeCommand; 25 | std::string xmlSecurityModeComplete; 26 | std::string xmlRRCConnectionReconfiguration; 27 | std::string xmlNASActivateDedicatedEpsBearerContextRequest; 28 | std::string xmlRRCConnectionReconfigurationComplete; 29 | std::string xmlNASActivateDedicatedEpsBearerContextAccept; 30 | 31 | int CellNumber; 32 | int UEid; 33 | int retcode; 34 | bool DataGenerator; 35 | bool DedicatedContext; 36 | 37 | public: 38 | 39 | sM_LTE_MocProcedure ( 40 | int _CellNumber, 41 | std::string& _xmlRRCConnectionRequest, 42 | std::string& _xmlRRCConnectionSetup, 43 | std::string& _xmlRRCConnectionSetupComplete, 44 | std::string& _xmlServiceRequest, 45 | std::string& _xmlSecurityModeCommand, 46 | std::string& _xmlSecurityModeComplete, 47 | std::string& _xmlRRCConnectionReconfiguration, 48 | std::string& _xmlRRCConnectionReconfigurationComplete, 49 | bool _DataGenerator 50 | ) 51 | { 52 | CellNumber = _CellNumber; 53 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 54 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 55 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 56 | xmlServiceRequest = _xmlServiceRequest; 57 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 58 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 59 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 60 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 61 | DataGenerator = _DataGenerator; 62 | DedicatedContext = false; 63 | UEid = 0; 64 | } 65 | 66 | sM_LTE_MocProcedure ( 67 | int _CellNumber, 68 | std::string& _xmlRRCConnectionRequest, 69 | std::string& _xmlRRCConnectionSetup, 70 | std::string& _xmlRRCConnectionSetupComplete, 71 | std::string& _xmlServiceRequest, 72 | std::string& _xmlSecurityModeCommand, 73 | std::string& _xmlSecurityModeComplete, 74 | std::string& _xmlRRCConnectionReconfiguration, 75 | std::string& _xmlNASActivateDedicatedEpsBearerContextRequest, 76 | std::string& _xmlRRCConnectionReconfigurationComplete, 77 | bool _DataGenerator, 78 | std::string& _xmlNASActivateDedicatedEpsBearerContextAccept 79 | ) 80 | { 81 | CellNumber = _CellNumber; 82 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 83 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 84 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 85 | xmlServiceRequest = _xmlServiceRequest; 86 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 87 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 88 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 89 | xmlNASActivateDedicatedEpsBearerContextRequest = _xmlNASActivateDedicatedEpsBearerContextRequest; 90 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 91 | xmlNASActivateDedicatedEpsBearerContextAccept = _xmlNASActivateDedicatedEpsBearerContextAccept; 92 | DataGenerator = _DataGenerator; 93 | DedicatedContext = true; 94 | UEid = 0; 95 | } 96 | 97 | // Destructor 98 | 99 | ~sM_LTE_MocProcedure() 100 | { 101 | } 102 | 103 | void start(void); 104 | 105 | }; 106 | 107 | #endif // _SM_LTE_MOCPROCEDURE_H_ 108 | 109 | /******************************************************************************/ 110 | /* END OF FILE */ 111 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_MtcProcedure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_MtcProcedure.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M S Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | #include 49 | #include 50 | 51 | using namespace std; 52 | 53 | /* PUBLIC *********************************************************************/ 54 | 55 | void sM_LTE_MtcProcedure::start(void) 56 | { 57 | sM_LteMlDefault::start(); 58 | 59 | /******************************************************************************/ 60 | /* SS->UE RRC: Paging */ 61 | /******************************************************************************/ 62 | 63 | RUN_NEWP_STATEMACHINE ( sM_LTE_Paging, null, 64 | ( 65 | xmlPaging, // Paging 66 | CellNumber // CellNumber 67 | ) 68 | ); 69 | 70 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 71 | 72 | /******************************************************************************/ 73 | /* UE->SS RRC: RRCConnectionRequest */ 74 | /* SS->UE RRC: RRCConnectionSetup */ 75 | /* UE->SS RRC: RRCConnectionSetupComplete */ 76 | /******************************************************************************/ 77 | 78 | if( EV_OK == retcode) 79 | { 80 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionEstablishment, null, 81 | ( 82 | CellNumber, // Cell Number 83 | xmlRRCConnectionRequest, // RRCConnectionRequest 84 | xmlRRCConnectionSetup, // RRCConnectionSetup 85 | xmlRRCConnectionSetupComplete, // RRCConnectionSetupComplete 86 | 10000 // WaitTimer 87 | ) 88 | ); 89 | 90 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 91 | } 92 | 93 | /******************************************************************************/ 94 | /* UE->SS RRC: UlInformationTransfer */ 95 | /* NAS: SERVICE REQUEST */ 96 | /******************************************************************************/ 97 | 98 | if( EV_OK == retcode ) 99 | { 100 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 101 | ( 102 | "ServiceRequest", // MessageId 103 | xmlServiceRequest // ServiceRequest 104 | ) 105 | ); 106 | 107 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 108 | } 109 | 110 | /******************************************************************************/ 111 | /* SS->UE RRC: SecurityModeCommand */ 112 | /* UE->SS RRC: SecurityModeComplete */ 113 | /******************************************************************************/ 114 | 115 | if( EV_OK == retcode ) 116 | { 117 | RUN_NEWP_STATEMACHINE ( sM_LTE_AsSecurity, null, 118 | ( 119 | xmlSecurityModeCommand, // SecurityModeCommand 120 | LteReferenceTestConditions->getDefAsCiphProtAlg(), // cipheringAlgorithm 121 | LteReferenceTestConditions->getDefAsIntProtAlg(), // integrityProtAlgorithm 122 | xmlSecurityModeComplete // SecurityModeComplete 123 | ) 124 | ); 125 | 126 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 127 | } 128 | 129 | if( DedicatedContext == false ) 130 | { 131 | /******************************************************************************/ 132 | /* SS->UE RRC: RRCConnectionReconfiguration */ 133 | /******************************************************************************/ 134 | 135 | if( EV_OK == retcode ) 136 | { 137 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionReconfiguration, null, 138 | ( 139 | xmlRRCConnectionReconfiguration, // RRCConnectionReconfiguration 140 | std::string(""), // AttachAccept 141 | std::string(""), // ActivateDefaultEpsBearerContextRequest 142 | xmlRRCConnectionReconfigurationComplete, // RRCConnectionReconfigurationComplete 143 | DataGenerator // Datagenerator 144 | ) 145 | ); 146 | 147 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 148 | 149 | notifyCompletion(retcode); 150 | } 151 | else 152 | { 153 | notifyCompletion(EV_FAIL); 154 | } 155 | } 156 | else 157 | { 158 | /******************************************************************************/ 159 | /* SS->UE RRC: RRCConnectionReconfiguration */ 160 | /* NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST */ 161 | /******************************************************************************/ 162 | 163 | if( EV_OK == retcode ) 164 | { 165 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionReconfiguration, null, 166 | ( 167 | xmlRRCConnectionReconfiguration, // RRCConnectionReconfiguration 168 | xmlNASActivateDedicatedEpsBearerContextRequest, // NASActivateDedicatedEpsBearerContextRequest 169 | xmlRRCConnectionReconfigurationComplete, // RRCConnectionReconfigurationComplete 170 | DataGenerator // DataGenerator 171 | ) 172 | ); 173 | 174 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 175 | } 176 | 177 | /******************************************************************************/ 178 | /* UE->SS RRC: UlInformationTransfer */ 179 | /* NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT */ 180 | /******************************************************************************/ 181 | 182 | if( EV_OK == retcode ) 183 | { 184 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 185 | ( 186 | "ActivateDedicatedEpsBearerContextAccept", // MessageId 187 | xmlNASActivateDedicatedEpsBearerContextAccept // ActivateDedicatedEpsBearerContextAccept 188 | ) 189 | ); 190 | 191 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 192 | 193 | notifyCompletion(retcode); 194 | } 195 | else 196 | { 197 | notifyCompletion(EV_FAIL); 198 | } 199 | } 200 | } 201 | 202 | /******************************************************************************/ 203 | /* END OF FILE */ 204 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_MtcProcedure.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo v0.4 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_MTCPROCEDURE_H_ 6 | #define _SM_LTE_MTCPROCEDURE_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_MtcProcedure *******************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_MtcProcedure, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlPaging; 21 | std::string xmlRRCConnectionRequest; 22 | std::string xmlRRCConnectionSetup; 23 | std::string xmlRRCConnectionSetupComplete; 24 | std::string xmlServiceRequest; 25 | std::string xmlSecurityModeCommand; 26 | std::string xmlSecurityModeComplete; 27 | std::string xmlRRCConnectionReconfiguration; 28 | std::string xmlNASActivateDedicatedEpsBearerContextRequest; 29 | std::string xmlRRCConnectionReconfigurationComplete; 30 | std::string xmlNASActivateDedicatedEpsBearerContextAccept; 31 | 32 | int CellNumber; 33 | int UEid; 34 | int retcode; 35 | bool DataGenerator; 36 | bool DedicatedContext; 37 | 38 | public: 39 | 40 | sM_LTE_MtcProcedure ( 41 | int _CellNumber, 42 | std::string& _xmlPaging, 43 | std::string& _xmlRRCConnectionRequest, 44 | std::string& _xmlRRCConnectionSetup, 45 | std::string& _xmlRRCConnectionSetupComplete, 46 | std::string& _xmlServiceRequest, 47 | std::string& _xmlSecurityModeCommand, 48 | std::string& _xmlSecurityModeComplete, 49 | std::string& _xmlRRCConnectionReconfiguration, 50 | std::string& _xmlRRCConnectionReconfigurationComplete, 51 | bool _DataGenerator 52 | ) 53 | { 54 | CellNumber = _CellNumber; 55 | xmlPaging = _xmlPaging; 56 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 57 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 58 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 59 | xmlServiceRequest = _xmlServiceRequest; 60 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 61 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 62 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 63 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 64 | DataGenerator = _DataGenerator; 65 | DedicatedContext = false; 66 | UEid = 0; 67 | } 68 | 69 | sM_LTE_MtcProcedure ( 70 | int _CellNumber, 71 | std::string& _xmlPaging, 72 | std::string& _xmlRRCConnectionRequest, 73 | std::string& _xmlRRCConnectionSetup, 74 | std::string& _xmlRRCConnectionSetupComplete, 75 | std::string& _xmlServiceRequest, 76 | std::string& _xmlSecurityModeCommand, 77 | std::string& _xmlSecurityModeComplete, 78 | std::string& _xmlRRCConnectionReconfiguration, 79 | std::string& _xmlNASActivateDedicatedEpsBearerContextRequest, 80 | std::string& _xmlRRCConnectionReconfigurationComplete, 81 | std::string& _xmlNASActivateDedicatedEpsBearerContextAccept, 82 | bool _DataGenerator 83 | ) 84 | { 85 | xmlPaging = _xmlPaging; 86 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 87 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 88 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 89 | xmlServiceRequest = _xmlServiceRequest; 90 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 91 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 92 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 93 | xmlNASActivateDedicatedEpsBearerContextRequest = _xmlNASActivateDedicatedEpsBearerContextRequest; 94 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 95 | xmlNASActivateDedicatedEpsBearerContextAccept = _xmlNASActivateDedicatedEpsBearerContextAccept; 96 | DataGenerator = _DataGenerator; 97 | DedicatedContext = true; 98 | UEid = 0; 99 | } 100 | 101 | // Destructor 102 | 103 | ~sM_LTE_MtcProcedure() 104 | { 105 | } 106 | 107 | void start(void); 108 | 109 | }; 110 | 111 | #endif // _SM_LTE_MTCPROCEDURE_H_ 112 | 113 | /******************************************************************************/ 114 | /* END OF FILE */ 115 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_TauProcedure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_TauProcedure.cpp 29 | 30 | Version: 1.0 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. 36 | 37 | 38 | 39 | */ 40 | 41 | /* INCLUDE FILES **************************************************************/ 42 | 43 | #include "lte_common.h" 44 | 45 | /* PUBLIC *********************************************************************/ 46 | 47 | void sM_LTE_TauProcedure::start(void) 48 | { 49 | sM_LteMlDefault::start(); 50 | 51 | /******************************************************************************/ 52 | /* UE->SS RRC: RRCConnectionRequest */ 53 | /* SS->UE RRC: RRCConnectionSetup */ 54 | /* UE->SS RRC: RRCConnectionSetupComplete */ 55 | /******************************************************************************/ 56 | 57 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionEstablishment, null, 58 | ( 59 | CellHandle, // CellHandle 60 | xmlRRCConnectionRequest, // RRCConnectionRequest 61 | xmlRRCConnectionSetup, // RRCConnectionSetup 62 | xmlRRCConnectionSetupComplete // RRCConnectionSetupComplete 63 | ) 64 | ); 65 | 66 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 67 | 68 | /******************************************************************************/ 69 | /* NAS: TRACKING AREA UPDATE REQUEST */ 70 | /******************************************************************************/ 71 | 72 | if( EV_OK == retcode ) 73 | { 74 | RUN_NEWP_STATEMACHINE ( sM_LTE_TrackingAreaUpdateRequest, null, 75 | ( 76 | xmlTrackingAreaUpdateRequest // TrackingAreaUpdateRequest 77 | ) 78 | ); 79 | 80 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 81 | } 82 | 83 | /******************************************************************************/ 84 | /* SS->UE RRC: DlInformationTransfer */ 85 | /* NAS: TRACKING AREA UPDATE ACCEPT */ 86 | /******************************************************************************/ 87 | 88 | if( EV_OK == retcode ) 89 | { 90 | DECL_NEW_EPS_NAS_PDU( sendpdu, PdEpsMobilityManagement, EmmMsgTrackingAreaUpdateAccept, xmlTrackingAreaUpdateAccept.c_str() ); 91 | 92 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( sendpdu, globaldata_lte->getUEIdentity(UEid)->getUEHandle() ) ); 93 | 94 | GCO_DUMP(sendpdu.pdu); 95 | 96 | delete &sendpdu; 97 | 98 | /******************************************************************************/ 99 | /* UE->SS RRC: UlInformationTransfer */ 100 | /* NAS: TRACKING AREA UPDATE COMPLETE */ 101 | /******************************************************************************/ 102 | 103 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 104 | ( 105 | "TrackingAreaUpdateComplete", // MessageId 106 | xmlTrackingAreaUpdateComplete // TrackingAreaUpdateComplete 107 | ) 108 | ); 109 | 110 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 111 | } 112 | 113 | if( EV_OK == retcode ) 114 | { 115 | if ( xmlRRCConnectionRelease != "" ) 116 | { 117 | /******************************************************************************/ 118 | /* SS->UE RRC: RRCConnectionRelease */ 119 | /******************************************************************************/ 120 | 121 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionRelease, null, 122 | ( 123 | xmlRRCConnectionRelease // RRCConnectionRelease 124 | ) 125 | ); 126 | 127 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 128 | 129 | notifyCompletion(retcode); 130 | } 131 | else 132 | { 133 | notifyCompletion(EV_OK); 134 | } 135 | } 136 | else 137 | { 138 | notifyCompletion(EV_FAIL); 139 | } 140 | } 141 | 142 | /******************************************************************************/ 143 | /* END OF FILE */ 144 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_TauProcedure.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_TAUPROCEDURE_H_ 6 | #define _SM_LTE_TAUPROCEDURE_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_TauProcedure *******************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_TauProcedure, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionRequest; 21 | std::string xmlRRCConnectionSetup; 22 | std::string xmlRRCConnectionSetupComplete; 23 | std::string xmlTrackingAreaUpdateRequest; 24 | std::string xmlTrackingAreaUpdateAccept; 25 | std::string xmlTrackingAreaUpdateComplete; 26 | std::string xmlRRCConnectionRelease; 27 | 28 | int UEid; 29 | int CellHandle; 30 | int retcode; 31 | 32 | public: 33 | 34 | sM_LTE_TauProcedure ( 35 | int _CellHandle, 36 | std::string& _xmlRRCConnectionRequest, 37 | std::string& _xmlRRCConnectionSetup, 38 | std::string& _xmlRRCConnectionSetupComplete, 39 | std::string& _xmlTrackingAreaUpdateRequest, 40 | std::string& _xmlTrackingAreaUpdateAccept, 41 | std::string& _xmlTrackingAreaUpdateComplete, 42 | std::string& _xmlRRCConnectionRelease 43 | ) 44 | { 45 | CellHandle = _CellHandle; 46 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 47 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 48 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 49 | xmlTrackingAreaUpdateRequest = _xmlTrackingAreaUpdateRequest; 50 | xmlTrackingAreaUpdateAccept = _xmlTrackingAreaUpdateAccept; 51 | xmlTrackingAreaUpdateComplete = _xmlTrackingAreaUpdateComplete; 52 | xmlRRCConnectionRelease = _xmlRRCConnectionRelease; 53 | UEid = 0; 54 | } 55 | 56 | // Destructor 57 | 58 | ~sM_LTE_TauProcedure() 59 | { 60 | } 61 | 62 | void start(void); 63 | 64 | }; 65 | 66 | #endif // _SM_LTE_TAUPROCEDURE_H_ 67 | 68 | /******************************************************************************/ 69 | /* END OF FILE */ 70 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_UeRegistration.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_UeRegistration.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | 38 | */ 39 | 40 | /* INCLUDE FILES **************************************************************/ 41 | 42 | #include "lte_common.h" 43 | #include 44 | #include 45 | #include 46 | 47 | using namespace std; 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_UeRegistration::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | #pragma region sM_LTE_RrcConnectionEstablishment 56 | 57 | /******************************************************************************/ 58 | /* UE->SS RRC: RRCConnectionRequest */ 59 | /* SS->UE RRC: RRCConnectionSetup */ 60 | /* UE->SS RRC: RRCConnectionSetupComplete */ 61 | /******************************************************************************/ 62 | 63 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionEstablishment, null, 64 | ( 65 | Cell, // Cell handle 66 | xmlRRCConnectionRequest, // RRCConnectionRequest 67 | xmlRRCConnectionSetup, // RRCConnectionSetup 68 | xmlRRCConnectionSetupComplete // RRCConnectionSetupComplete 69 | ) 70 | ); 71 | 72 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 73 | 74 | #pragma endregion 75 | #pragma region sM_LTE_AttachRequest 76 | 77 | if( EV_OK == retcode ) 78 | { 79 | /******************************************************************************/ 80 | /* NAS: ATTACH REQUEST */ 81 | /* NAS: PDN CONNECTIVITY REQUEST */ 82 | /******************************************************************************/ 83 | 84 | RUN_NEWP_STATEMACHINE( sM_LTE_AttachRequest, null, 85 | ( 86 | xmlNASAttachRequest, // AttachRequest 87 | xmlNASPdnConnectivityRequest // PdnConnectivityRequest 88 | ) 89 | ); 90 | 91 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 92 | } 93 | 94 | #pragma endregion 95 | #pragma region sM_LTE_Identification 96 | 97 | if( EV_OK == retcode ) 98 | { 99 | if ( LteReferenceTestConditions->getAttachRequest()->EPSMobileIdentityLV()->Choice()->isActive_ImsiValue() != true ) 100 | { 101 | /******************************************************************************/ 102 | /* SS->UE RRC: DlInformationTransfer */ 103 | /* NAS: IDENTITY REQUEST */ 104 | /* UE->SS RRC: UlInformationTransfer */ 105 | /* NAS: IDENTITY RESPONSE */ 106 | /******************************************************************************/ 107 | 108 | RUN_NEWP_STATEMACHINE( sM_LTE_Identification, null, 109 | ( 110 | std::string("EmmIdentityRequest.xml"), // IdentityRequest 111 | 1, // IMSI 112 | std::string("") // IdentityResponse 113 | ) 114 | ); 115 | 116 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 117 | } 118 | } 119 | 120 | #pragma endregion 121 | #pragma region sM_LTE_Authentication 122 | 123 | /******************************************************************************/ 124 | /* SS->UE RRC: DlInformationTransfer */ 125 | /* NAS: AUTHENTICATION REQUEST */ 126 | /* UE->SS RRC: UlInformationTransfer */ 127 | /* NAS: AUTHENTICATION RESPONSE */ 128 | /******************************************************************************/ 129 | 130 | if( EV_OK == retcode ) 131 | { 132 | RUN_NEWP_STATEMACHINE ( sM_LTE_Authentication, null, 133 | ( 134 | xmlNASAuthenticationRequest, // AuthenticationRequest 135 | xmlNASAuthenticationResponse // AuthenticationResponse 136 | ) 137 | ); 138 | 139 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 140 | } 141 | 142 | #pragma endregion 143 | #pragma region sM_LTE_NasSecurity 144 | 145 | /******************************************************************************/ 146 | /* SS->UE RRC: DlInformationTransfer */ 147 | /* NAS: SECURITY MODE COMMAND */ 148 | /* UE->SS RRC: UlInformationTransfer */ 149 | /* NAS: SECURITY MODE COMPLETE */ 150 | /******************************************************************************/ 151 | 152 | if( EV_OK == retcode ) 153 | { 154 | // 3 possible ways to set ciphering and integrity algorithm 155 | // 1. LteReferenceTestConditions xml : -1 156 | // 2. Local xml : -2 157 | // 3. SM parameter : >= 0 158 | 159 | RUN_NEWP_STATEMACHINE ( sM_LTE_NasSecurity, null, 160 | ( 161 | xmlNASSecurityModeCommand, // SecurityModeCommand 162 | (CipheringAlgorithm == -1 ? LteReferenceTestConditions->getDefNasCiphProtAlg() : CipheringAlgorithm), // cipheringAlgorithm 163 | (IntegrityProtection == -1 ? LteReferenceTestConditions->getDefNasIntProtAlg() : IntegrityProtection), // integrityProtAlgorithm 164 | xmlNASSecurityModeComplete // SecurityModeComplete 165 | ) 166 | ); 167 | 168 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 169 | } 170 | 171 | #pragma endregion 172 | #pragma region sM_LTE_AsSecurity 173 | 174 | /******************************************************************************/ 175 | /* SS->UE RRC: SecurityModeCommand */ 176 | /* UE->SS RRC: SecurityModeComplete */ 177 | /******************************************************************************/ 178 | 179 | if( EV_OK == retcode ) 180 | { 181 | RUN_NEWP_STATEMACHINE ( sM_LTE_AsSecurity, null, 182 | ( 183 | xmlSecurityModeCommand, // SecurityModeCommand 184 | LteReferenceTestConditions->getDefAsCiphProtAlg(), // cipheringAlgorithm 185 | LteReferenceTestConditions->getDefAsIntProtAlg(), // integrityProtAlgorithm 186 | xmlSecurityModeComplete // SecurityModeComplete 187 | ) 188 | ); 189 | 190 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 191 | } 192 | 193 | #pragma endregion 194 | #pragma region sM_LTE_EsmInformationTransfer 195 | 196 | /******************************************************************************/ 197 | /* SS->UE RRC: DlInformationTransfer */ 198 | /* NAS: ESM INFORMATION REQUEST */ 199 | /* UE->SS RRC: UlInformationTransfer */ 200 | /* NAS: ESM INFORMATION RESPONSE */ 201 | /******************************************************************************/ 202 | 203 | if( EV_OK == retcode ) 204 | { 205 | if ( LteReferenceTestConditions->getPdnConnRequest()->isActive_EsmInformationTransferFlagTV() ) 206 | { 207 | RUN_NEWP_STATEMACHINE ( sM_LTE_EsmInformationTransfer, null, 208 | ( 209 | xmlNASEsmInformationRequest, // EsmInformationRequest 210 | xmlNASEsmInformationResponse // EsmInformationResponse 211 | ) 212 | ); 213 | 214 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 215 | } 216 | } 217 | 218 | #pragma endregion 219 | #pragma region sM_LTE_TestModeActivation 220 | 221 | /******************************************************************************/ 222 | /* SS->UE RRC: DlInformationTransfer */ 223 | /* NAS: ACTIVATE TEST MODE */ 224 | /* UE->SS RRC: UlInformationTransfer */ 225 | /* NAS: ACTIVATE TEST MODE COMPLETE */ 226 | /******************************************************************************/ 227 | 228 | if( (EV_OK == retcode) && (LteReferenceTestConditions->getTestModeActDuringReg() == 1) ) 229 | { 230 | RUN_NEWP_STATEMACHINE ( sM_LTE_TestModeActivation, null, 231 | ( 232 | std::string("Lte_EtcActivateTestMode.xml"), // ActivateTestMode 233 | std::string("") // ActivateTestModeComplete 234 | ) 235 | ); 236 | 237 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 238 | } 239 | 240 | #pragma endregion 241 | #pragma region sM_LTE_UeRadioAccessCapability 242 | 243 | /******************************************************************************/ 244 | /* SS->UE RRC: UECapabilityEnquiry */ 245 | /* UE->SS RRC: UECapabilityInformation */ 246 | /******************************************************************************/ 247 | 248 | // Message checking via PIXIT parameter 249 | 250 | if( EV_OK == retcode ) 251 | { 252 | RUN_NEWP_STATEMACHINE ( sM_LTE_UeRadioAccessCapability, null, 253 | ( 254 | xmlUECapabilityEnquiry, // UECapabilityEnquiry 255 | xmlUECapabilityInformation // UECapabilityInformation 256 | ) 257 | ); 258 | 259 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 260 | } 261 | 262 | #pragma endregion 263 | #pragma region sM_LTE_RrcConnectionReconfiguration 264 | 265 | /******************************************************************************/ 266 | /* SS->UE RRC: RRCConnectionReconfiguration */ 267 | /* NAS: ATTACH ACCEPT */ 268 | /* NAS: ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST */ 269 | /******************************************************************************/ 270 | 271 | if( EV_OK == retcode ) 272 | { 273 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionReconfiguration, null, 274 | ( 275 | xmlRRCConnectionReconfiguration, // RRCConnectionReconfiguration 276 | xmlNASAttachAccept, // AttachAccept 277 | xmlNASActivateDefaultEpsBearerContextRequest, // ActivateDefaultEpsBearerContextRequest 278 | xmlRRCConnectionReconfigurationComplete, // RRCConnectionReconfigurationComplete 279 | DataGenerator // Datagenerator 280 | ) 281 | ); 282 | 283 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 284 | } 285 | 286 | /******************************************************************************/ 287 | /* UE->SS RRC: UlInformationTransfer */ 288 | /* NAS: ATTACH COMPLETE */ 289 | /* NAS: ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT */ 290 | /******************************************************************************/ 291 | 292 | if( EV_OK == retcode ) 293 | { 294 | RUN_NEWP_STATEMACHINE ( sM_LTE_UlNasMsgHandler, null, 295 | ( 296 | "AttachComplete", // MessageId 297 | xmlNASAttachComplete, // AttachComplete 298 | xmlNASActivateDefaultEpsBearerContextAccept // ActivateDefaultEpsBearerContextAccept 299 | ) 300 | ); 301 | 302 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 303 | } 304 | 305 | if( EV_OK == retcode ) 306 | { 307 | if ( xmlRRCConnectionRelease != "" ) 308 | { 309 | /******************************************************************************/ 310 | /* SS->UE RRC: RRCConnectionRelease */ 311 | /******************************************************************************/ 312 | 313 | RUN_NEWP_STATEMACHINE ( sM_LTE_RrcConnectionRelease, null, 314 | ( 315 | xmlRRCConnectionRelease // RRCConnectionRelease 316 | ) 317 | ); 318 | 319 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 320 | 321 | notifyCompletion(retcode); 322 | } 323 | else 324 | { 325 | notifyCompletion(EV_OK); 326 | } 327 | } 328 | else 329 | { 330 | notifyCompletion(EV_FAIL); 331 | } 332 | } 333 | 334 | /******************************************************************************/ 335 | /* END OF FILE */ 336 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_UeRegistration.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_UEREGISTRATION_H_ 6 | #define _SM_LTE_UEREGISTRATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_UeRegistration *****************************************************/ 15 | 16 | #define RUN_DEFAULT_REGISTRATION_PROCEDURES(cell) RUN_NEWP_STATEMACHINE( sM_LTE_UeRegistration, null,( \ 17 | std::string(""), \ 18 | std::string("RrcConnectionSetup.xml"), \ 19 | std::string(""), \ 20 | std::string(""), \ 21 | std::string(""), \ 22 | std::string("EmmAuthenticationRequest.xml"), \ 23 | std::string(""), \ 24 | std::string("EmmSecurityModeCommand.xml"), \ 25 | std::string(""), \ 26 | std::string("SecurityModeCommand.xml"), \ 27 | std::string(""), \ 28 | std::string("UECapabilityEnquiry.xml"), \ 29 | std::string(""), \ 30 | std::string("EsmInformationRequest.xml"), \ 31 | std::string(""), \ 32 | std::string("RrcConnectionReconfiguration_SRB2_DRB_1_0.xml"), \ 33 | std::string("EmmAttachAccept.xml"), \ 34 | std::string("EsmActivateDefaultEpsBearerContextRequest.xml"), \ 35 | std::string(""), \ 36 | std::string(""), \ 37 | std::string(""), \ 38 | std::string("RrcConnectionRelease.xml"), \ 39 | false, \ 40 | -1, \ 41 | -1, \ 42 | cell)) 43 | 44 | DERIVED_STATEMACHINE_DLL( sM_LTE_UeRegistration, sM_LteMlDefault, DLLLTECOMMON ) 45 | { 46 | protected: 47 | 48 | std::string xmlRRCConnectionRequest; 49 | std::string xmlRRCConnectionSetup; 50 | std::string xmlRRCConnectionSetupComplete; 51 | std::string xmlNASAttachRequest; 52 | std::string xmlNASPdnConnectivityRequest; 53 | 54 | std::string xmlNASAuthenticationRequest; 55 | std::string xmlNASAuthenticationResponse; 56 | 57 | std::string xmlNASSecurityModeCommand; 58 | std::string xmlNASSecurityModeComplete; 59 | 60 | std::string xmlSecurityModeCommand; 61 | std::string xmlSecurityModeComplete; 62 | 63 | std::string xmlUECapabilityEnquiry; 64 | std::string xmlUECapabilityInformation; 65 | 66 | std::string xmlNASEsmInformationRequest; 67 | std::string xmlNASEsmInformationResponse; 68 | 69 | std::string xmlRRCConnectionReconfiguration; 70 | std::string xmlNASAttachAccept; 71 | std::string xmlNASActivateDefaultEpsBearerContextRequest; 72 | std::string xmlRRCConnectionReconfigurationComplete; 73 | 74 | std::string xmlNASAttachComplete; 75 | std::string xmlNASActivateDefaultEpsBearerContextAccept; 76 | 77 | std::string xmlRRCConnectionRelease; 78 | 79 | int UEid; 80 | int retcode; 81 | bool DataGenerator; 82 | int EsmInformationTransfer; 83 | 84 | int CipheringAlgorithm; 85 | int IntegrityProtection; 86 | int Cell; 87 | 88 | public: 89 | 90 | sM_LTE_UeRegistration ( 91 | int _Cell, 92 | std::string& _xmlRRCConnectionRequest, 93 | std::string& _xmlRRCConnectionSetup, 94 | std::string& _xmlRRCConnectionSetupComplete, 95 | std::string& _xmlNASAttachRequest, 96 | std::string& _xmlNASPdnConnectivityRequest, 97 | std::string& _xmlNASAuthenticationRequest, 98 | std::string& _xmlNASAuthenticationResponse, 99 | std::string& _xmlNASSecurityModeCommand, 100 | std::string& _xmlNASSecurityModeComplete, 101 | std::string& _xmlSecurityModeCommand, 102 | std::string& _xmlSecurityModeComplete, 103 | std::string& _xmlUECapabilityEnquiry, 104 | std::string& _xmlUECapabilityInformation, 105 | std::string& _xmlNASEsmInformationRequest, 106 | std::string& _xmlNASEsmInformationResponse, 107 | std::string& _xmlRRCConnectionReconfiguration, 108 | std::string& _xmlNASAttachAccept, 109 | std::string& _xmlNASActivateDefaultEpsBearerContextRequest, 110 | std::string& _xmlRRCConnectionReconfigurationComplete, 111 | std::string& _xmlNASAttachComplete, 112 | std::string& _xmlNASActivateDefaultEpsBearerContextAccept, 113 | std::string& _xmlRRCConnectionRelease, 114 | bool _DataGenerator = false, 115 | int _CipheringAlgorithm = -1, 116 | int _IntegrityProtection = -1 117 | ) 118 | { 119 | Cell = _Cell; 120 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 121 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 122 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 123 | xmlNASAttachRequest = _xmlNASAttachRequest; 124 | xmlNASPdnConnectivityRequest = _xmlNASPdnConnectivityRequest; 125 | xmlNASAuthenticationRequest = _xmlNASAuthenticationRequest; 126 | xmlNASAuthenticationResponse = _xmlNASAuthenticationResponse; 127 | xmlNASSecurityModeCommand = _xmlNASSecurityModeCommand; 128 | xmlNASSecurityModeComplete = _xmlNASSecurityModeComplete; 129 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 130 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 131 | xmlUECapabilityEnquiry = _xmlUECapabilityEnquiry; 132 | xmlUECapabilityInformation = _xmlUECapabilityInformation; 133 | xmlNASEsmInformationRequest = _xmlNASEsmInformationRequest; 134 | xmlNASEsmInformationResponse = _xmlNASEsmInformationResponse; 135 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 136 | xmlNASAttachAccept = _xmlNASAttachAccept; 137 | xmlNASActivateDefaultEpsBearerContextRequest = _xmlNASActivateDefaultEpsBearerContextRequest; 138 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 139 | xmlNASAttachComplete = _xmlNASAttachComplete; 140 | xmlNASActivateDefaultEpsBearerContextAccept = _xmlNASActivateDefaultEpsBearerContextAccept; 141 | xmlRRCConnectionRelease = _xmlRRCConnectionRelease; 142 | DataGenerator = _DataGenerator; 143 | UEid = 0; 144 | EsmInformationTransfer = 0; 145 | CipheringAlgorithm = _CipheringAlgorithm; 146 | IntegrityProtection = _IntegrityProtection; 147 | } 148 | 149 | // Destructor 150 | 151 | ~sM_LTE_UeRegistration() 152 | { 153 | } 154 | 155 | void start(void); 156 | 157 | }; 158 | 159 | #endif // _SM_LTE_UEREGISTRATION_H_ 160 | 161 | /******************************************************************************/ 162 | /* END OF FILE */ 163 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_UlNasMsgHandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_UlNasMsgHandler.cpp 29 | 30 | Version: 2.2 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 2.2 01.04.2011 / V-A Log print tweaks 42 | 2.1 21.02.2011 / V-A Support separated EsmPdnConnectivityRequest + 43 | -EsmActivateDedicatedEpsBearerContextReject 44 | -EsmActivateDefaultEpsBearerContextAccept 45 | -Support EsmPdnDisconnectRequest 46 | 2.0 11.02.2011 / Dennis M Senyonjo KSI update 47 | 1.0 18.01.2011 / Dennis M Senyonjo Original 48 | 49 | */ 50 | 51 | /* INCLUDE FILES **************************************************************/ 52 | 53 | #include "lte_common.h" 54 | #include 55 | 56 | /* PUBLIC *********************************************************************/ 57 | 58 | void sM_LTE_UlNasMsgHandler::start(void) 59 | { 60 | sM_LteMlDefault::start(); 61 | 62 | if ( (strcmp (MessageId, "AttachRequest")) == 0 ) 63 | { 64 | rsDefaultTimer->set(GEN_EMM_TIMER); 65 | NEXT_STATE ( AttachRequest ); 66 | PE_PRINT(" TC: Waiting for Attach Request" ); 67 | } 68 | else if ( (strcmp (MessageId, "AttachComplete")) == 0 ) 69 | { 70 | rsDefaultTimer->set(GEN_EMM_TIMER); 71 | NEXT_STATE ( AttachComplete ); 72 | PE_PRINT(" TC: Waiting for Attach Complete" ); 73 | } 74 | else if ( (strcmp (MessageId, "ServiceRequest")) == 0 ) 75 | { 76 | rsDefaultTimer->set(GEN_EMM_TIMER); 77 | PE_PRINT(" TC: Waiting for Service Request" ); 78 | NEXT_STATE ( ServiceRequest ); 79 | } 80 | else if ( (strcmp (MessageId, "TrackingAreaUpdateRequest")) == 0 ) 81 | { 82 | rsDefaultTimer->set(GEN_EMM_TIMER); 83 | NEXT_STATE ( TrackingAreaUpdateRequest ); 84 | PE_PRINT(" TC: Waiting for Tracking Area Update Request" ); 85 | } 86 | else if ( (strcmp (MessageId, "TrackingAreaUpdateComplete")) == 0 ) 87 | { 88 | rsDefaultTimer->set(GEN_EMM_TIMER); 89 | NEXT_STATE ( TrackingAreaUpdateComplete ); 90 | PE_PRINT(" TC: Waiting for Tracking Area Update Complete" ); 91 | } 92 | else if ( (strcmp (MessageId, "ActivateDedicatedEpsBearerContextAccept")) == 0 ) 93 | { 94 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 95 | NEXT_STATE ( ActivateDedicatedEpsBearerContextAccept ); 96 | PE_PRINT(" TC: Waiting for Activate Dedicated Eps Bearer Context Accept" ); 97 | } 98 | else if ( (strcmp (MessageId, "DetachRequest")) == 0 ) 99 | { 100 | rsDefaultTimer->set(20000); 101 | NEXT_STATE ( DetachRequest ); 102 | PE_PRINT(" TC: Waiting for Detach Request" ); 103 | } 104 | else if ( (strcmp (MessageId, "EsmPdnDisconnectRequest")) == 0 ) 105 | { 106 | rsDefaultTimer->set(20000); 107 | NEXT_STATE ( PdnDisconnectRequest ); 108 | PE_PRINT( " TC: Waiting for Pdn Disconnect Request"); 109 | } 110 | else if ( (strcmp (MessageId, "EsmActivateDefaultEpsBearerContextAccept")) == 0 ) 111 | { 112 | rsDefaultTimer->set(5000); 113 | NEXT_STATE ( ActivateDefaultEpsBearerContextAccept ); 114 | PE_PRINT( " TC: Waiting for Esm Activate Default Eps Bearer Context Accept"); 115 | } 116 | else if ( (strcmp (MessageId, "EsmActivateDefaultEpsBearerContextReject")) == 0 ) 117 | { 118 | rsDefaultTimer->set(20000); 119 | NEXT_STATE ( EsmActivateDefaultEpsBearerContextReject ); 120 | PE_PRINT(" TC: Waiting for Esm Activate Default Eps Bearer Context Reject"); 121 | } 122 | else if ( (strcmp (MessageId, "EsmActivateDedicatedEpsBearerContextReject")) == 0 ) 123 | { 124 | rsDefaultTimer->set(20000); 125 | NEXT_STATE ( EsmActivateDedicatedEpsBearerContextReject ); 126 | PE_PRINT(" TC: Waiting for Esm Activate Dedicated Eps Bearer Context Reject"); 127 | } 128 | else if ( (strcmp (MessageId, "EsmPdnConnectivityRequest")) == 0 ) 129 | { 130 | rsDefaultTimer->set(5000); 131 | NEXT_STATE ( PdnConnectivityRequest ); 132 | PE_PRINT(" TC: Waiting for Esm Pdn Connectivity Request"); 133 | } 134 | else 135 | { 136 | string msg = cmw_Utils("####### Selected MessageId (%s) parameter is not supported #######", MessageId); 137 | PE_ERR( msg.c_str() ); 138 | NOTIFY_COMPLETION_FAILURE(); 139 | } 140 | } 141 | 142 | /******************************************************************************/ 143 | /* NAS: ATTACH REQUEST */ 144 | /******************************************************************************/ 145 | 146 | ON_TIMER( sM_LTE_UlNasMsgHandler, AttachRequest, RS_Default_Timer ) 147 | { 148 | PE_ERR(" TC: Attach Request timeout" ); 149 | NOTIFY_COMPLETION_FAILURE(); 150 | } 151 | 152 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, AttachRequest, PdEpsMobilityManagement, EmmMsgAttachRequest ) 153 | { 154 | rsDefaultTimer->reset(); 155 | GCO_DUMP(pdu); 156 | PE_PRINT(" NAS: ATTACH REQUEST" ); 157 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 158 | NEXT_STATE ( PdnConnectivityRequest ); 159 | } 160 | 161 | /******************************************************************************/ 162 | /* NAS: PDN CONNECTIVITY REQUEST */ 163 | /******************************************************************************/ 164 | 165 | ON_TIMER( sM_LTE_UlNasMsgHandler, PdnConnectivityRequest, RS_Default_Timer) 166 | { 167 | PE_ERR(" TC: Pdn Connectivity Request timeout" ); 168 | NOTIFY_COMPLETION_FAILURE(); 169 | } 170 | 171 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, PdnConnectivityRequest, PdEpsSessionManagement, EsmPdnConnectivityRequest ) 172 | { 173 | rsDefaultTimer->reset(); 174 | GCO_DUMP(pdu); 175 | PE_PRINT(" NAS: PDN CONNECTIVITY REQUEST" ); 176 | LteReferenceTestConditions->setPdnConnRequest(pdu); 177 | notifyCompletion(EV_OK); 178 | } 179 | 180 | /******************************************************************************/ 181 | /* UE->SS RRC: UlInformationTransfer */ 182 | /* NAS: ATTACH COMPLETE */ 183 | /******************************************************************************/ 184 | 185 | ON_TIMER( sM_LTE_UlNasMsgHandler, AttachComplete, RS_Default_Timer) 186 | { 187 | PE_ERR(" TC: Attach Complete timeout" ); 188 | NOTIFY_COMPLETION_FAILURE(); 189 | } 190 | 191 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, AttachComplete, PdEpsMobilityManagement, EmmMsgDetachRequest ) 192 | { 193 | rsDefaultTimer->reset(); 194 | GCO_DUMP(pdu); 195 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 196 | PE_PRINT(" NAS: DETACH REQUEST" ); 197 | NOTIFY_COMPLETION_FAILURE(); 198 | } 199 | 200 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, AttachComplete, PdEpsMobilityManagement, EmmMsgAttachComplete ) 201 | { 202 | rsDefaultTimer->reset(); 203 | GCO_DUMP(pdu); 204 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 205 | PE_PRINT(" NAS: ATTACH COMPLETE" ); 206 | 207 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 208 | 209 | NEXT_STATE ( ActivateDefaultEpsBearerContextAccept ); 210 | } 211 | 212 | /******************************************************************************/ 213 | /* NAS: ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT */ 214 | /******************************************************************************/ 215 | 216 | ON_TIMER( sM_LTE_UlNasMsgHandler, ActivateDefaultEpsBearerContextAccept, RS_Default_Timer) 217 | { 218 | PE_ERR(" TC: Activate Default Eps Bearer Context Accept timeout" ); 219 | NOTIFY_COMPLETION_FAILURE(); 220 | } 221 | 222 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, ActivateDefaultEpsBearerContextAccept, PdEpsSessionManagement, EsmActivateDefaultEpsBearerContextReject ) 223 | { 224 | rsDefaultTimer->reset(); 225 | GCO_DUMP(pdu); 226 | PE_ERR(" NAS: ACTIVATE DEFAULT EPS BEARER CONTEXT REJECT" ); 227 | NOTIFY_COMPLETION_FAILURE(); 228 | } 229 | 230 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, ActivateDefaultEpsBearerContextAccept, PdEpsSessionManagement, EsmActivateDefaultEpsBearerContextAccept ) 231 | { 232 | rsDefaultTimer->reset(); 233 | GCO_DUMP(pdu); 234 | PE_PRINT(" NAS: ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT" ); 235 | notifyCompletion(EV_OK); 236 | } 237 | 238 | /******************************************************************************/ 239 | /* NAS: SERVICE REQUEST */ 240 | /******************************************************************************/ 241 | 242 | ON_TIMER( sM_LTE_UlNasMsgHandler, ServiceRequest, RS_Default_Timer) 243 | { 244 | PE_ERR(" TC: Service Request timeout" ); 245 | NOTIFY_COMPLETION_FAILURE(); 246 | } 247 | 248 | ON_EMM_SERVICE_REQUEST_PDU( sM_LTE_UlNasMsgHandler, ServiceRequest ) 249 | { 250 | rsDefaultTimer->reset(); 251 | 252 | globaldata->ExtractServiceReq( pdu, root ); 253 | int eksi = pdu->KsiAndSequenceNumberV()->KsiASME()->get(); 254 | globaldata_lte->getUEIdentity(0)->seteKSI(eksi); 255 | 256 | globaldata_lte->getUEIdentity(0)->getSecurityParamsContainer()->setLatestNASUlCount( 257 | StateMachineLTE::getNasCount(true, 0), 258 | globaldata_lte->getUEIdentity(0)->geteKSI() 259 | ); 260 | 261 | GCO_DUMP(pdu); 262 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 263 | PE_PRINT(" NAS: SERVICE REQUEST" ); 264 | 265 | notifyCompletion(EV_OK); 266 | } 267 | 268 | /******************************************************************************/ 269 | /* NAS: TRACKING AREA UPDATE REQUEST */ 270 | /******************************************************************************/ 271 | 272 | ON_TIMER( sM_LTE_UlNasMsgHandler, TrackingAreaUpdateRequest, RS_Default_Timer) 273 | { 274 | PE_ERR(" TC: Tracking Area Update Request timeout" ); 275 | NOTIFY_COMPLETION_FAILURE(); 276 | } 277 | 278 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, TrackingAreaUpdateRequest, PdEpsMobilityManagement, EmmMsgTrackingAreaUpdateRequest ) 279 | { 280 | rsDefaultTimer->reset(); 281 | 282 | int eksi = pdu->NasKeySetIdentifierASME()->EPSNasKeySetIdentifierV()->KeySetIdentifier()->get(); 283 | globaldata_lte->getUEIdentity(0)->seteKSI(eksi); 284 | 285 | GCO_DUMP(pdu); 286 | PE_PRINT(" NAS: TRACKING AREA UPDATE REQUEST" ); 287 | 288 | notifyCompletion(EV_OK); 289 | } 290 | 291 | /******************************************************************************/ 292 | /* UE->SS RRC: UlInformationTransfer */ 293 | /* NAS: TRACKING AREA UPDATE COMPLETE */ 294 | /******************************************************************************/ 295 | 296 | ON_TIMER( sM_LTE_UlNasMsgHandler, TrackingAreaUpdateComplete, RS_Default_Timer) 297 | { 298 | PE_ERR(" TC: Tracking Area Update Complete timeout" ); 299 | NOTIFY_COMPLETION_FAILURE(); 300 | } 301 | 302 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, TrackingAreaUpdateComplete, PdEpsMobilityManagement, EmmMsgTrackingAreaUpdateComplete ) 303 | { 304 | rsDefaultTimer->reset(); 305 | GCO_DUMP(pdu); 306 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 307 | PE_PRINT(" NAS: TRACKING AREA UPDATE COMPLETE" ); 308 | 309 | notifyCompletion(EV_OK); 310 | } 311 | 312 | /******************************************************************************/ 313 | /* UE->SS RRC: UlInformationTransfer */ 314 | /* NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT */ 315 | /******************************************************************************/ 316 | 317 | ON_TIMER( sM_LTE_UlNasMsgHandler, ActivateDedicatedEpsBearerContextAccept, RS_Default_Timer) 318 | { 319 | PE_ERR(" TC: Activate Dedicated Eps Bearer Context Accept timeout" ); 320 | NOTIFY_COMPLETION_FAILURE(); 321 | } 322 | 323 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, ActivateDedicatedEpsBearerContextAccept, PdEpsSessionManagement, EsmActivateDefaultEpsBearerContextReject ) 324 | { 325 | rsDefaultTimer->reset(); 326 | GCO_DUMP(pdu); 327 | PE_ERR(" NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT REJECT" ); 328 | NOTIFY_COMPLETION_FAILURE(); 329 | } 330 | 331 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, ActivateDedicatedEpsBearerContextAccept, PdEpsSessionManagement, EsmActivateDedicatedEpsBearerContextAccept ) 332 | { 333 | rsDefaultTimer->reset(); 334 | GCO_DUMP(pdu); 335 | PE_PRINT(" NAS: ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT" ); 336 | notifyCompletion(EV_OK); 337 | } 338 | 339 | /******************************************************************************/ 340 | /* NAS: DETACH REQUEST */ 341 | /******************************************************************************/ 342 | 343 | ON_TIMER( sM_LTE_UlNasMsgHandler, DetachRequest, RS_Default_Timer) 344 | { 345 | PE_ERR(" TC: Detach Request timeout" ); 346 | NOTIFY_COMPLETION_FAILURE(); 347 | } 348 | 349 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, DetachRequest, PdEpsMobilityManagement, EmmMsgDetachRequest ) 350 | { 351 | rsDefaultTimer->reset(); 352 | GCO_DUMP(pdu); 353 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 354 | PE_PRINT(" NAS: DETACH REQUEST" ); 355 | 356 | notifyCompletion(EV_OK); 357 | } 358 | 359 | /******************************************************************************/ 360 | /* NAS: PDN DISCONNECT REQUEST */ 361 | /******************************************************************************/ 362 | 363 | ON_TIMER( sM_LTE_UlNasMsgHandler, PdnDisconnectRequest, RS_Default_Timer) 364 | { 365 | PE_ERR(" TC: Pdn Disconnect Request timeOut"); 366 | NOTIFY_COMPLETION_FAILURE(); 367 | } 368 | 369 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, PdnDisconnectRequest, PdEpsSessionManagement, EsmPdnDisconnectRequest ) 370 | { 371 | rsDefaultTimer->reset(); 372 | GCO_DUMP(pdu); 373 | 374 | globaldata_lte->setPTI( root->Choice()->PdEpsSessionManagement()->Header()->Default()->EsmProcedureTransactionIdentity()->get() ); 375 | 376 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer"); 377 | PE_PRINT(" NAS: PDN Disconnect Request"); 378 | 379 | notifyCompletion(EV_OK); 380 | } 381 | 382 | /******************************************************************************/ 383 | /* NAS: ESM ACTIVATE DEFAULT EPS BEARER CONTEXT REJECT */ 384 | /******************************************************************************/ 385 | ON_TIMER( sM_LTE_UlNasMsgHandler, EsmActivateDefaultEpsBearerContextReject, RS_Default_Timer) 386 | { 387 | PE_ERR(" TC: Esm Activate Default Eps Bearer Context Reject - Timeout"); 388 | NOTIFY_COMPLETION_FAILURE(); 389 | } 390 | 391 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, EsmActivateDefaultEpsBearerContextReject, PdEpsSessionManagement, EsmActivateDefaultEpsBearerContextReject ) 392 | { 393 | rsDefaultTimer->reset(); 394 | GCO_DUMP(pdu); 395 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer"); 396 | PE_PRINT(" NAS: Esm Activate Default Eps Bearer Context Reject"); 397 | 398 | notifyCompletion(EV_OK); 399 | } 400 | 401 | /******************************************************************************/ 402 | /* NAS: ESM ACTIVATE DEDICATED EPS BEARER CONTEXT REJECT */ 403 | /******************************************************************************/ 404 | 405 | ON_TIMER( sM_LTE_UlNasMsgHandler, EsmActivateDedicatedEpsBearerContextReject, RS_Default_Timer) 406 | { 407 | PE_ERR(" TC: Esm Activate Dedicated Eps Bearer Context Reject - Timeout" ); 408 | NOTIFY_COMPLETION_FAILURE(); 409 | } 410 | 411 | ON_EPS_NAS_PDU( sM_LTE_UlNasMsgHandler, EsmActivateDedicatedEpsBearerContextReject, PdEpsSessionManagement, EsmActivateDedicatedEpsBearerContextReject ) 412 | { 413 | rsDefaultTimer->reset(); 414 | GCO_DUMP(pdu); 415 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer"); 416 | PE_PRINT(" NAS: Esm Activate Dedicated Eps Bearer Context Reject"); 417 | 418 | notifyCompletion(EV_OK); 419 | } 420 | 421 | 422 | /******************************************************************************/ 423 | /* END OF FILE */ 424 | /******************************************************************************/ -------------------------------------------------------------------------------- /COMMON/sM_LTE_UlNasMsgHandler.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_ULNASMESSAGEHANDLER_H_ 6 | #define _SM_LTE_ULNASMESSAGEHANDLER_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_UlNasMsgHandler ****************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_UlNasMsgHandler, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | const char * MessageId; 21 | 22 | std::string xmlEmmMessage; 23 | std::string xmlEsmMessage; 24 | std::string xmlEmmEsmMessage; 25 | 26 | public: 27 | 28 | sM_LTE_UlNasMsgHandler ( 29 | const char * _MessageId, 30 | std::string& _xmlEmmMessage, 31 | std::string& _xmlEsmMessage 32 | ) 33 | { 34 | MessageId = _MessageId; 35 | xmlEmmMessage = _xmlEmmMessage; 36 | xmlEsmMessage = _xmlEsmMessage; 37 | } 38 | 39 | sM_LTE_UlNasMsgHandler ( 40 | const char * _MessageId, 41 | std::string& _xmlEmmEsmMessage 42 | ) 43 | { 44 | MessageId = _MessageId; 45 | xmlEmmEsmMessage = _xmlEmmEsmMessage; 46 | } 47 | 48 | // Destructor 49 | 50 | ~sM_LTE_UlNasMsgHandler() 51 | { 52 | } 53 | 54 | void start(void); 55 | 56 | }; 57 | 58 | #endif // _SM_LTE_ULNASMESSAGEHANDLER_H_ 59 | 60 | /******************************************************************************/ 61 | /* END OF FILE */ 62 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_AsSecurity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_AsSecurity.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. Dennis M Senyonjo. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 /Dennis M S Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | 48 | /* PUBLIC *********************************************************************/ 49 | 50 | void sM_LTE_AsSecurity::start(void) 51 | { 52 | sM_LteMlDefault::start(); 53 | 54 | RUN_NEWP_STATEMACHINE ( sM_LTE_CrrcSecurityConfigReq, null, 55 | ( 56 | 0, // CorruptKenb 57 | false, // ReestablishmentOrHandover 58 | 0 // CellId 59 | ) 60 | ); 61 | 62 | DECL_NEW_LTE_RRC_PDU ( sendpdu, DL_DCCH, SecurityModeCommand, xmlSecurityModeCommand.c_str()); 63 | 64 | sendpdu.pdu->criticalExtensions()->c1()->securityModeCommand_r8()->securityConfigSMC() 65 | ->securityAlgorithmConfig()->cipheringAlgorithm()->set(cipheringAlgorithm); 66 | 67 | sendpdu.pdu->criticalExtensions()->c1()->securityModeCommand_r8()->securityConfigSMC() 68 | ->securityAlgorithmConfig()->integrityProtAlgorithm()->set(integrityProtAlgorithm); 69 | 70 | GCO_DUMP(sendpdu.pdu); 71 | 72 | _CrrcAsp* pCrrcAsp = NEW_ASP_WITH_DL_DCCH_RRC_PDU (sendpdu); 73 | pCrrcAsp->Choice()->CrrcDlDcchMessageReq()->SupervisionDuration()->set(WAIT_SMC_COMP); 74 | 75 | OUTPUT ( SAP_LTE_NET_CRRC, pCrrcAsp ); 76 | delete &sendpdu; 77 | 78 | PE_PRINT(" UE <- SS RRC: SecurityModeCommand" ); 79 | PE_PRINT(" TC: Waiting for Security Mode Complete" ); 80 | 81 | NEXT_STATE ( SecurityModeComplete ); 82 | } 83 | 84 | ON_ASPX( sM_LTE_AsSecurity, SecurityModeComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 85 | { 86 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_SECURITY_MODE_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 87 | { 88 | PE_ERR("####### Security Mode Complete timeout #######" ); 89 | NOTIFY_COMPLETION_FAILURE(); 90 | } 91 | } 92 | 93 | ON_LTE_UL_DCCH_RRC_PDU_ASSERT_EVENT( sM_LTE_AsSecurity, SecurityModeComplete, SecurityModeFailure ) 94 | { 95 | GCO_DUMP(pdu); 96 | 97 | PE_ERR(" UE -> SS RRC: SecurityModeFailure" ); 98 | NOTIFY_COMPLETION_FAILURE(); 99 | } 100 | 101 | ON_LTE_UL_DCCH_RRC_PDU_ASSERT_EVENT( sM_LTE_AsSecurity, SecurityModeComplete, SecurityModeComplete ) 102 | { 103 | GCO_DUMP(pdu); 104 | 105 | PE_PRINT(" UE -> SS RRC: SecurityModeComplete" ); 106 | 107 | if ( xmlSecurityModeComplete != "" ) 108 | { 109 | if ( GCO_MATCHF(root, xmlSecurityModeComplete.c_str()) ) 110 | { 111 | PE_PRINT("####### Message is OK #######" ); 112 | } 113 | else 114 | { 115 | PE_ERR("####### Message is NOK #######" ); 116 | NOTIFY_COMPLETION_FAILURE(); 117 | } 118 | } 119 | 120 | PE_PRINT(" TC: AS security procedure completed" ); 121 | 122 | notifyCompletion(EV_OK); 123 | } 124 | 125 | /******************************************************************************/ 126 | /* END OF FILE */ 127 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_AsSecurity.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2012 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_ASSECURITY_H_ 6 | #define _SM_LTE_ASSECURITY_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_AsSecurity *********************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_AsSecurity, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | int cipheringAlgorithm; 21 | int integrityProtAlgorithm; 22 | std::string xmlSecurityModeCommand; 23 | std::string xmlSecurityModeComplete; 24 | int UEid; 25 | 26 | public: 27 | 28 | sM_LTE_AsSecurity ( 29 | std::string& _xmlSecurityModeCommand, 30 | int _cipheringAlgorithm, 31 | int _integrityProtAlgorithm, 32 | std::string& _xmlSecurityModeComplete 33 | ) 34 | { 35 | xmlSecurityModeCommand = _xmlSecurityModeCommand; 36 | cipheringAlgorithm = _cipheringAlgorithm; 37 | integrityProtAlgorithm = _integrityProtAlgorithm; 38 | xmlSecurityModeComplete = _xmlSecurityModeComplete; 39 | UEid = 0; 40 | } 41 | 42 | // Destructor 43 | 44 | ~sM_LTE_AsSecurity() 45 | { 46 | } 47 | 48 | void start(void); 49 | 50 | }; 51 | 52 | #endif // _SM_LTE_ASSECURITY_H_ 53 | 54 | /******************************************************************************/ 55 | /* END OF FILE */ 56 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_CounterCheck.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Dennis M Senyonjo 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_CounterCheck.cpp 29 | 30 | Version: 2.0 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. Dennis M Senyonjo. 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 2.0 15.02.2011 / Dennis M S Updated Counter Check response message handling 42 | 0.1 18.01.2011 / Dennis M S Original 43 | 44 | */ 45 | 46 | /* INCLUDE FILES **************************************************************/ 47 | 48 | #include "lte_common.h" 49 | 50 | /* PUBLIC *********************************************************************/ 51 | 52 | void sM_LTE_CounterCheck::start(void) 53 | { 54 | sM_LteMlDefault::start(); 55 | 56 | /******************************************************************************/ 57 | /* SS->UE RRC: CounterCheck */ 58 | /******************************************************************************/ 59 | 60 | DECL_NEW_LTE_RRC_PDU( counterCheck, DL_DCCH, CounterCheck, "Lte_CounterCheck.xml" ); 61 | 62 | CodecContext *cc = counterCheck.root->code(); 63 | 64 | if( element_count_req != 0 ) 65 | { 66 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->setElementCount(cc, element_count_req); 67 | } 68 | 69 | if ( drb_1_req != -1 ) 70 | { 71 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(0)->drb_Identity()->set(cc, drb_1_req); 72 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(0)->countMSB_Uplink()->set(cc, count_UL_1_req); 73 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(0)->countMSB_Downlink()->set(cc, count_DL_1_req); 74 | } 75 | 76 | if ( drb_2_req != -1 ) 77 | { 78 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(1)->drb_Identity()->set(cc, drb_2_req); 79 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(1)->countMSB_Uplink()->set(cc, count_UL_2_req); 80 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(1)->countMSB_Downlink()->set(cc, count_DL_2_req); 81 | } 82 | 83 | if ( drb_3_req != -1 ) 84 | { 85 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(2)->drb_Identity()->set(cc, drb_3_req); 86 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(2)->countMSB_Uplink()->set(cc, count_UL_3_req); 87 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(2)->countMSB_Downlink()->set(cc, count_DL_3_req); 88 | } 89 | 90 | if ( drb_4_req != -1 ) 91 | { 92 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(3)->drb_Identity()->set(cc, drb_4_req); 93 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(3)->countMSB_Uplink()->set(cc, count_UL_4_req); 94 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(3)->countMSB_Downlink()->set(cc, count_DL_4_req); 95 | } 96 | 97 | if ( drb_5_req != -1 ) 98 | { 99 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(4)->drb_Identity()->set(cc, drb_5_req); 100 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(4)->countMSB_Uplink()->set(cc, count_UL_5_req); 101 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(4)->countMSB_Downlink()->set(cc, count_DL_5_req); 102 | } 103 | 104 | if ( drb_6_req != -1 ) 105 | { 106 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(5)->drb_Identity()->set(cc, drb_6_req); 107 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(5)->countMSB_Uplink()->set(cc, count_UL_6_req); 108 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(5)->countMSB_Downlink()->set(cc, count_DL_6_req); 109 | } 110 | 111 | if ( drb_7_req != -1 ) 112 | { 113 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(6)->drb_Identity()->set(cc, drb_7_req); 114 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(6)->countMSB_Uplink()->set(cc, count_UL_7_req); 115 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(6)->countMSB_Downlink()->set(cc, count_DL_7_req); 116 | } 117 | 118 | if ( drb_8_req != -1 ) 119 | { 120 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(7)->drb_Identity()->set(cc, drb_8_req); 121 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(7)->countMSB_Uplink()->set(cc, count_UL_8_req); 122 | counterCheck.pdu->criticalExtensions()->c1()->counterCheck_r8()->drb_CountMSB_InfoList()->value(7)->countMSB_Downlink()->set(cc, count_DL_8_req); 123 | } 124 | 125 | _CrrcAsp* pCrrcAsp = NEW_ASP_WITH_DL_DCCH_RRC_PDU( counterCheck, globaldata_lte->getUEIdentity(0)->getUEHandle() ); 126 | pCrrcAsp->Choice()->CrrcDlDcchMessageReq()->SupervisionDuration()->set(WAIT_RRC_RECONF); 127 | 128 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp); 129 | 130 | GCO_DUMP(counterCheck.pdu); 131 | 132 | delete &counterCheck; 133 | 134 | PE_PRINT(" SS -> UE RRC: CounterCheck " ); 135 | 136 | PE_PRINT(" TC: Waiting for CounterCheckResponse " ); 137 | 138 | NEXT_STATE ( CounterCheckResponse ); 139 | } 140 | 141 | /******************************************************************************/ 142 | /* UE->SS RRC: CounterCheckResponse */ 143 | /******************************************************************************/ 144 | 145 | ON_ASPX( sM_LTE_CounterCheck, CounterCheckResponse, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 146 | { 147 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_RECONFIGURATION_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 148 | { 149 | PE_ERR("####### Counter Check Response timeout #######" ); 150 | NOTIFY_COMPLETION_FAILURE(); 151 | } 152 | } 153 | 154 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_CounterCheck, CounterCheckResponse, CounterCheckResponse ) 155 | { 156 | PE_PRINT(" UE -> SS RRC: CounterCheckResponse " ); 157 | 158 | GCO_DUMP(pdu); 159 | 160 | if ( element_count_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->getElementCount() ) 161 | { 162 | PE_ERR("####### Missmatch in the element count #######"); 163 | NOTIFY_COMPLETION_FAILURE(); 164 | retcode = EV_FAIL; 165 | } 166 | 167 | if ( drb_1_resp != -1 ) 168 | { 169 | if ( ( drb_1_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(0)->drb_Identity()->get() ) || 170 | ( count_UL_1_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(0)->count_Uplink()->get() ) || 171 | ( count_DL_1_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(0)->count_Downlink()->get() ) 172 | ) 173 | { 174 | PE_ERR("####### Missmatch in the 1st IE #######" ); 175 | NOTIFY_COMPLETION_FAILURE(); 176 | retcode = EV_FAIL; 177 | } 178 | } 179 | 180 | if ( drb_2_resp != -1 ) 181 | { 182 | if ( ( drb_2_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(1)->drb_Identity()->get() ) || 183 | ( count_UL_2_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(1)->count_Uplink()->get() ) || 184 | ( count_DL_2_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(1)->count_Downlink()->get() ) 185 | ) 186 | { 187 | PE_ERR("####### Missmatch in the 2nd IE #######" ); 188 | NOTIFY_COMPLETION_FAILURE(); 189 | retcode = EV_FAIL; 190 | } 191 | } 192 | 193 | if ( drb_3_resp != -1 ) 194 | { 195 | if ( ( drb_3_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(2)->drb_Identity()->get() ) || 196 | ( count_UL_3_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(2)->count_Uplink()->get() ) || 197 | ( count_DL_3_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(2)->count_Downlink()->get() ) 198 | ) 199 | { 200 | PE_ERR("####### Missmatch in the 3rd IE #######" ); 201 | NOTIFY_COMPLETION_FAILURE(); 202 | retcode = EV_FAIL; 203 | } 204 | } 205 | 206 | if ( drb_4_resp != -1 ) 207 | { 208 | if ( ( drb_4_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(3)->drb_Identity()->get() ) || 209 | ( count_UL_4_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(3)->count_Uplink()->get() ) || 210 | ( count_DL_4_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(3)->count_Downlink()->get() ) 211 | ) 212 | { 213 | PE_ERR("####### Missmatch in the 4th IE #######" ); 214 | NOTIFY_COMPLETION_FAILURE(); 215 | retcode = EV_FAIL; 216 | } 217 | } 218 | 219 | if ( drb_5_resp != -1 ) 220 | { 221 | if ( ( drb_5_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(4)->drb_Identity()->get() ) || 222 | ( count_UL_5_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(4)->count_Uplink()->get() ) || 223 | ( count_DL_5_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(4)->count_Downlink()->get() ) 224 | ) 225 | { 226 | PE_ERR("####### Missmatch in the 5th IE #######" ); 227 | NOTIFY_COMPLETION_FAILURE(); 228 | retcode = EV_FAIL; 229 | } 230 | } 231 | 232 | if ( drb_6_resp != -1 ) 233 | { 234 | if ( ( drb_6_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(5)->drb_Identity()->get() ) || 235 | ( count_UL_6_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(5)->count_Uplink()->get() ) || 236 | ( count_DL_6_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(5)->count_Downlink()->get() ) 237 | ) 238 | { 239 | PE_ERR("####### Missmatch in the 6th IE #######" ); 240 | NOTIFY_COMPLETION_FAILURE(); 241 | retcode = EV_FAIL; 242 | } 243 | } 244 | 245 | if ( drb_7_resp != -1 ) 246 | { 247 | if ( ( drb_7_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(6)->drb_Identity()->get() ) || 248 | ( count_UL_7_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(6)->count_Uplink()->get() ) || 249 | ( count_DL_7_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(6)->count_Downlink()->get() ) 250 | ) 251 | { 252 | PE_ERR("####### Missmatch in the 7th IE #######" ); 253 | NOTIFY_COMPLETION_FAILURE(); 254 | retcode = EV_FAIL; 255 | } 256 | } 257 | 258 | if ( drb_8_resp != -1 ) 259 | { 260 | if ( ( drb_8_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(7)->drb_Identity()->get() ) || 261 | ( count_UL_8_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(7)->count_Uplink()->get() ) || 262 | ( count_DL_8_resp != pdu->criticalExtensions()->counterCheckResponse_r8()->drb_CountInfoList()->DRB_CountInfo(7)->count_Downlink()->get() ) 263 | ) 264 | { 265 | PE_ERR("####### Missmatch in the 8th IE #######" ); 266 | NOTIFY_COMPLETION_FAILURE(); 267 | retcode = EV_FAIL; 268 | } 269 | } 270 | 271 | PE_PRINT(" TC: Counter Check procedure completed" ); 272 | 273 | notifyCompletion(retcode); 274 | } 275 | 276 | /******************************************************************************/ 277 | /* END OF FILE */ 278 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_CounterCheck.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_COUNTERCHECK_H_ 6 | #define _SM_LTE_COUNTERCHECK_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_CounterCheck *******************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_CounterCheck, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | int element_count_req; 21 | int drb_1_req, drb_2_req, drb_3_req, drb_4_req; 22 | int drb_5_req, drb_6_req, drb_7_req, drb_8_req; 23 | int count_UL_1_req, count_UL_2_req, count_UL_3_req, count_UL_4_req; 24 | int count_UL_5_req, count_UL_6_req, count_UL_7_req, count_UL_8_req; 25 | int count_DL_1_req, count_DL_2_req, count_DL_3_req, count_DL_4_req; 26 | int count_DL_5_req, count_DL_6_req, count_DL_7_req, count_DL_8_req; 27 | 28 | int element_count_resp; 29 | int drb_1_resp, drb_2_resp, drb_3_resp, drb_4_resp; 30 | int drb_5_resp, drb_6_resp, drb_7_resp, drb_8_resp; 31 | int count_UL_1_resp, count_UL_2_resp, count_UL_3_resp, count_UL_4_resp; 32 | int count_UL_5_resp, count_UL_6_resp, count_UL_7_resp, count_UL_8_resp; 33 | int count_DL_1_resp, count_DL_2_resp, count_DL_3_resp, count_DL_4_resp; 34 | int count_DL_5_resp, count_DL_6_resp, count_DL_7_resp, count_DL_8_resp; 35 | 36 | int retcode; 37 | 38 | public: 39 | 40 | sM_LTE_CounterCheck ( 41 | int _element_count_req, 42 | int _element_count_resp, 43 | int _drb_1_req, 44 | int _count_UL_1_req, 45 | int _count_DL_1_req, 46 | int _drb_1_resp = -1, 47 | int _count_UL_1_resp = -1, 48 | int _count_DL_1_resp = -1, 49 | 50 | int _drb_2_req = -1, 51 | int _count_UL_2_req = -1, 52 | int _count_DL_2_req = -1, 53 | int _drb_2_resp = -1, 54 | int _count_UL_2_resp = -1, 55 | int _count_DL_2_resp = -1, 56 | 57 | int _drb_3_req = -1, 58 | int _count_UL_3_req = -1, 59 | int _count_DL_3_req = -1, 60 | int _drb_3_resp = -1, 61 | int _count_UL_3_resp = -1, 62 | int _count_DL_3_resp = -1, 63 | 64 | int _drb_4_req = -1, 65 | int _count_UL_4_req = -1, 66 | int _count_DL_4_req = -1, 67 | int _drb_4_resp = -1, 68 | int _count_UL_4_resp = -1, 69 | int _count_DL_4_resp = -1, 70 | 71 | int _drb_5_req = -1, 72 | int _count_UL_5_req = -1, 73 | int _count_DL_5_req = -1, 74 | int _drb_5_resp = -1, 75 | int _count_UL_5_resp = -1, 76 | int _count_DL_5_resp = -1, 77 | 78 | int _drb_6_req = -1, 79 | int _count_UL_6_req = -1, 80 | int _count_DL_6_req = -1, 81 | int _drb_6_resp = -1, 82 | int _count_UL_6_resp = -1, 83 | int _count_DL_6_resp = -1, 84 | 85 | int _drb_7_req = -1, 86 | int _count_UL_7_req = -1, 87 | int _count_DL_7_req = -1, 88 | int _drb_7_resp = -1, 89 | int _count_UL_7_resp = -1, 90 | int _count_DL_7_resp = -1, 91 | 92 | int _drb_8_req = -1, 93 | int _count_UL_8_req = -1, 94 | int _count_DL_8_req = -1, 95 | int _drb_8_resp = -1, 96 | int _count_UL_8_resp = -1, 97 | int _count_DL_8_resp = -1 98 | ) 99 | { 100 | element_count_req = _element_count_req; 101 | element_count_resp = _element_count_resp; 102 | drb_1_req = _drb_1_req; 103 | count_UL_1_req = _count_UL_1_req; 104 | count_DL_1_req = _count_DL_1_req; 105 | drb_1_resp = _drb_1_resp; 106 | count_UL_1_resp = _count_UL_1_resp; 107 | count_DL_1_resp = _count_DL_1_resp; 108 | 109 | drb_2_req = _drb_2_req; 110 | count_UL_2_req = _count_UL_2_req; 111 | count_DL_2_req = _count_DL_2_req; 112 | drb_2_resp = _drb_2_resp; 113 | count_UL_2_resp = _count_UL_2_resp; 114 | count_DL_2_resp = _count_DL_2_resp; 115 | 116 | drb_3_req = _drb_3_req; 117 | count_UL_3_req = _count_UL_3_req; 118 | count_DL_3_req = _count_DL_3_req; 119 | drb_3_resp = _drb_3_resp; 120 | count_UL_3_resp = _count_UL_3_resp; 121 | count_DL_3_resp = _count_DL_3_resp; 122 | 123 | drb_4_req = _drb_4_req; 124 | count_UL_4_req = _count_UL_4_req; 125 | count_DL_4_req = _count_DL_4_req; 126 | drb_4_resp = _drb_4_resp; 127 | count_UL_4_resp = _count_UL_4_resp; 128 | count_DL_4_resp = _count_DL_4_resp; 129 | 130 | drb_5_req = _drb_5_req; 131 | count_UL_5_req = _count_UL_5_req; 132 | count_DL_5_req = _count_DL_5_req; 133 | drb_5_resp = _drb_5_resp; 134 | count_UL_5_resp = _count_UL_5_resp; 135 | count_DL_5_resp = _count_DL_5_resp; 136 | 137 | drb_6_req = _drb_6_req; 138 | count_UL_6_req = _count_UL_6_req; 139 | count_DL_6_req = _count_DL_6_req; 140 | drb_6_resp = _drb_6_resp; 141 | count_UL_6_resp = _count_UL_6_resp; 142 | count_DL_6_resp = _count_DL_6_resp; 143 | 144 | drb_7_req = _drb_7_req; 145 | count_UL_7_req = _count_UL_7_req; 146 | count_DL_7_req = _count_DL_7_req; 147 | drb_7_resp = _drb_7_resp; 148 | count_UL_7_resp = _count_UL_7_resp; 149 | count_DL_7_resp = _count_DL_7_resp; 150 | 151 | drb_8_req = _drb_8_req; 152 | count_UL_8_req = _count_UL_8_req; 153 | count_DL_8_req = _count_DL_8_req; 154 | drb_8_resp = _drb_8_resp; 155 | count_UL_8_resp = _count_UL_8_resp; 156 | count_DL_8_resp = _count_DL_8_resp; 157 | 158 | retcode = EV_OK; 159 | } 160 | 161 | // Destructor 162 | 163 | ~sM_LTE_CounterCheck() 164 | { 165 | } 166 | 167 | void start(void); 168 | 169 | }; 170 | 171 | #endif // _SM_LTE_COUNTERCHECK_H_ 172 | 173 | /******************************************************************************/ 174 | /* END OF FILE */ 175 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_MeasurementReport.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_MeasurementReport.cpp 29 | 30 | Version: 1.2 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. Dennis M Senyonjo. 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 1.2 05.04.2011 / Dennis M Senyonjo Minor updates 42 | 1.1 04.04.2011 / Dennis M Senyonjo Minor updates 43 | 1.0 18.01.2011 / Dennis M Senyonjo Original 44 | 45 | */ 46 | 47 | /* INCLUDE FILES **************************************************************/ 48 | 49 | #include "lte_common.h" 50 | 51 | /* PUBLIC *********************************************************************/ 52 | 53 | void sM_LTE_MeasurementReport::start(void) 54 | { 55 | sM_LteMlDefault::start(); 56 | 57 | rsDefaultTimer->set(MaxWaitTime); 58 | 59 | NEXT_STATE ( MeasurementReport ); 60 | } 61 | 62 | ON_TIMER( sM_LTE_MeasurementReport, MeasurementReport, RS_Default_Timer ) 63 | { 64 | if ( MaxReportAmount == -1 ) 65 | { 66 | PE_PRINT(" TC: MeasurementReport procedure completed" ); 67 | notifyCompletion(EV_OK); 68 | } 69 | else 70 | { 71 | if ( MeasReportCount < MaxReportAmount ) 72 | { 73 | PE_ERR(" TC: MeasReportCount < MaxReportAmount " ); 74 | notifyCompletion(EV_FAIL); 75 | } 76 | else if ( MeasReportCount == MaxReportAmount ) 77 | { 78 | PE_PRINT(" TC: MeasurementReport procedure completed" ); 79 | notifyCompletion(EV_OK); 80 | } 81 | else 82 | { 83 | PE_ERR(" TC: MeasReportCount > MaxReportAmount " ); 84 | notifyCompletion(EV_FAIL); 85 | } 86 | } 87 | } 88 | 89 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_MeasurementReport, MeasurementReport, MeasurementReport ) 90 | { 91 | PE_PRINT(" UE -> SS RRC: MeasurementReport " ); 92 | 93 | bool NeighReport = false; 94 | 95 | MeasId = pdu->criticalExtensions()->c1()->measurementReport_r8()->measResults()->measId()->get();; 96 | RsrpResult = pdu->criticalExtensions()->c1()->measurementReport_r8()->measResults()->measResultServCell()->rsrpResult()->get(); 97 | RsrqResult = pdu->criticalExtensions()->c1()->measurementReport_r8()->measResults()->measResultServCell()->rsrqResult()->get(); 98 | 99 | LteReferenceTestConditions->setServingCellMeasurement_RSRP(RsrpResult - 140); 100 | LteReferenceTestConditions->setServingCellMeasurement_RSRQ(RsrqResult); 101 | 102 | if ( pdu->criticalExtensions()->c1()->measurementReport_r8()->measResults()->isActive_measResultNeighCells() ) 103 | { 104 | RsrpResult2 = pdu->criticalExtensions()->c1()->measurementReport_r8()->measResults()->measResultNeighCells()->measResultListEUTRA()->MeasResultEUTRA(0)->measResult()->rsrpResult()->get(); 105 | LteReferenceTestConditions->setNeighbourCellMeasurement_RSRP(RsrpResult2 - 140); 106 | NeighReport = true; 107 | } 108 | 109 | std::ostringstream ossInfo; 110 | ossInfo << " TC: measId = " << MeasId << ", measResultServCell: rsrpResult = " << RsrpResult - 140 << "dBm, rsrqResult = " << RsrqResult; 111 | PE_WARN(ossInfo.str()); 112 | 113 | if ( NeighReport == true ) 114 | { 115 | std::ostringstream ossInfo2; 116 | ossInfo2 << " TC: measResultNeighCell: rsrpResult = " << RsrpResult2 - 140 << "dBm"; 117 | PE_WARN(ossInfo2.str()); 118 | } 119 | 120 | GCO_DUMP(pdu); 121 | 122 | MeasReportCount++; 123 | 124 | NEXT_STATE ( MeasurementReport ); 125 | } 126 | 127 | /******************************************************************************/ 128 | /* END OF FILE */ 129 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_MeasurementReport.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_MEASUREMENTREPORT_H_ 6 | #define _SM_LTE_MEASUREMENTREPORT_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_MeasurementReport **************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_MeasurementReport, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | int MeasId; 21 | int RsrpResult, RsrpResult2; 22 | int RsrqResult, RsrqResult2; 23 | bool NeighReport; 24 | int MaxReportAmount; 25 | int MaxWaitTime; 26 | int MeasReportCount; 27 | 28 | public: 29 | 30 | sM_LTE_MeasurementReport ( 31 | int _MaxReportAmount, 32 | int _MaxWaitTime 33 | ) 34 | { 35 | MaxReportAmount = _MaxReportAmount; 36 | MaxWaitTime = _MaxWaitTime; 37 | MeasReportCount = 0; 38 | } 39 | 40 | // Destructor 41 | 42 | ~sM_LTE_MeasurementReport() 43 | { 44 | } 45 | 46 | void start(void); 47 | 48 | }; 49 | 50 | #endif // _SM_LTE_MEASUREMENTREPORT_H_ 51 | 52 | /******************************************************************************/ 53 | /* END OF FILE */ 54 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_Paging.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_Paging.cpp 28 | 29 | Version: 3.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. Dennis M Senyonjo 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 3.0 31.03.2011 / Dennis M S Failure handling to 27.30.4 level 41 | 0.2 24.11.2010 / Dennis M S Support for failure 42 | 0.1 18.01.2011 / Dennis M S Original 43 | 44 | */ 45 | 46 | /* INCLUDE FILES **************************************************************/ 47 | 48 | #include "lte_common.h" 49 | 50 | /* PUBLIC *********************************************************************/ 51 | 52 | void sM_LTE_Paging::start(void) 53 | { 54 | sM_LteMlDefault::start(); 55 | 56 | if( globaldata_base->getUEIdentity(UEIdentity)->IsIMSIpresent() ) 57 | { 58 | imsi_digits = globaldata_base->getUEIdentity(UEIdentity)->getIMSI(); 59 | } 60 | else 61 | { 62 | imsi_digits = null; 63 | } 64 | 65 | imsiLength = strlen(imsi_digits); 66 | 67 | DECL_NEW_LTE_RRC_PDU( pagingmsg, PCCH, Paging, xmlPaging.c_str() ); 68 | 69 | _CrrcAsp* pagingasp = NEW_ASP_WITH_PCCH_RRC_PDU( pagingmsg, globaldata_lte->getCellConfig(CellNumber)->getCellHandle()); 70 | pagingasp->Choice()->CrrcPcchMessageReq()->RrcCellHandle()->set( globaldata_lte->getCellConfig(CellNumber)->getCellHandle()); 71 | 72 | if( imsi_digits != null ) 73 | { 74 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInfoPresence()->set(MDDB::Lte::Rrc::Crrc::_UeSpecificInfoPresence::UE_SPECIFIC_INFO_PRESENT); 75 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->setActive_UeSpecificInfo(); 76 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->PageInfoUeSpecificIdle()->IMSI()->NumImsiDigits()->set(imsiLength); 77 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->PageInfoUeSpecificIdle()->IMSI()->Imsi()->setElementCount( pagingasp, imsiLength); 78 | 79 | for( int i=0; iChoice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->PageInfoUeSpecificIdle()->IMSI()->Imsi()->BcdDigit(i)->set((imsi_digits[i]-'0')); 82 | PRINTERR(("%d",(imsi_digits[i]-'0'))); 83 | } 84 | PRINTERR(("\n")); 85 | } 86 | 87 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->PageInfoUeSpecificIdle()->PageRepetitions()->set(NUM_OF_PAGEING_REPTITIONS); 88 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->PageInfoUeSpecificIdle()->UeSpecificIdleDrxCycleLength()->set(DRX_CYCLE_LENGTH); 89 | pagingasp->Choice()->CrrcPcchMessageReq()->UeSpecificInformation()->UeSpecificInfo()->ResponseSupervisionDuration()->set(PAGE_RESPONSE_TIMER); 90 | 91 | OUTPUT( SAP_LTE_NET_CRRC, pagingasp ); 92 | PE_PRINT(" UE <- SS RRC: Paging" ); 93 | 94 | GCO_DUMP(pagingasp); 95 | 96 | if (Failure == false ) 97 | notifyCompletion(EV_OK); 98 | else 99 | NEXT_STATE ( ReplyState ); 100 | } 101 | 102 | // Reporting the CRRC Error indications 103 | ON_ASPX(sM_LTE_Paging, ReplyState, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc,_CrrcAsp, CrrcCellTimeoutInd) 104 | { 105 | PE_PRINT("####### CRRC_Timeout_Ind Occured ####### " ); 106 | notifyCompletion(EV_OK); 107 | } 108 | 109 | /******************************************************************************/ 110 | /* END OF FILE */ 111 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_Paging.h: -------------------------------------------------------------------------------- 1 | //* *************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo v0.3 3 | // ***************************************************************************/ 4 | 5 | #ifndef _SM_LTE_PAGING_H_ 6 | #define _SM_LTE_PAGING_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_Paging**************************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_Paging, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlPaging; 21 | 22 | int CellNumber; 23 | int UEIdentity; 24 | int imsiLength; 25 | const char* imsi_digits; 26 | bool Failure; 27 | 28 | public: 29 | 30 | sM_LTE_Paging ( 31 | std::string& _xmlPaging, 32 | int _CellNumber, 33 | bool _Failure = false 34 | ) 35 | { 36 | xmlPaging = _xmlPaging; 37 | CellNumber = _CellNumber; 38 | UEIdentity = 0; 39 | Failure = _Failure; 40 | } 41 | 42 | // Destructor 43 | 44 | ~sM_LTE_Paging() 45 | { 46 | } 47 | 48 | void start(void); 49 | 50 | }; 51 | 52 | #endif // _SM_LTE_PAGING_H_ 53 | 54 | /******************************************************************************/ 55 | /* END OF FILE */ 56 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionEstablishment.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_RrcConnectionEstablishment.cpp 28 | 29 | Version: 2.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. Dennis M Senyonjo 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 2.0 06.04.2011 / Dennis M S Failure scenario 41 | 1.0 18.01.2011 / Dennis M S Original 42 | 43 | */ 44 | 45 | /* INCLUDE FILES **************************************************************/ 46 | 47 | #include "lte_common.h" 48 | #include 49 | 50 | /* PUBLIC *********************************************************************/ 51 | 52 | void sM_LTE_RrcConnectionEstablishment::start(void) 53 | { 54 | sM_LteMlDefault::start(); 55 | 56 | PE_PRINT(" TC: Waiting for RRCConnectionRequest"); 57 | 58 | if ( WaitTimer == 0 ) 59 | { 60 | rsDefaultTimer->set(WAIT_RRC_REQ); 61 | } 62 | else 63 | { 64 | rsDefaultTimer->set(WaitTimer); 65 | } 66 | 67 | NEW_LTE_RRC_PDU( rrcConnectionSetup, DL_CCCH, RRCConnectionSetup, xmlRRCConnectionSetup.c_str() ); 68 | 69 | // Temporary hardcoding 70 | 71 | if ( rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->isActive_mac_MainConfig() ) 72 | { 73 | if ( LteReferenceTestConditions->getDRX_support() == 0 ) 74 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_drx_Config(false); 75 | if ( LteReferenceTestConditions->getPHR_support() == 0 ) 76 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_phr_Config(false); 77 | if ( LteReferenceTestConditions->getTAT_support() == 0 ) 78 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->timeAlignmentTimerDedicated()->set(7); 79 | } 80 | 81 | if ( rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->isActive_physicalConfigDedicated() ) 82 | { 83 | if ( LteReferenceTestConditions->getTargetPowerSupport() == 0 ) 84 | { 85 | if ( rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->isActive_uplinkPowerControlDedicated() ) 86 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->uplinkPowerControlDedicated()->accumulationEnabled()->set(0); 87 | } 88 | 89 | if ( LteReferenceTestConditions->getSRS_support() == 0 ) 90 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->soundingRS_UL_ConfigDedicated()->setActive_release(); 91 | if ( LteReferenceTestConditions->getCQI_support() == 0 ) 92 | rrcConnectionSetup.pdu->criticalExtensions()->c1()->rrcConnectionSetup_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->setActive_cqi_ReportConfig(false); 93 | } 94 | 95 | NEXT_STATE ( RRCConnectionRequest ); 96 | } 97 | 98 | ON_TIMER( sM_LTE_RrcConnectionEstablishment, RRCConnectionRequest, RS_Default_Timer) 99 | { 100 | PE_ERR("####### RRCConnectionRequest timeout #######" ); 101 | NOTIFY_COMPLETION_FAILURE(); 102 | } 103 | 104 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_RrcConnectionEstablishment, RRCConnectionRequest, RRCConnectionRequest ) 105 | { 106 | rsDefaultTimer->reset(); 107 | 108 | GCO_DUMP(pdu); 109 | 110 | Rnti = asp->Rnti()->get(); 111 | std::string tmp = cmw_Utils(" UE -> SS RRC: RRCConnectionRequest (Cell #%i)", asp->RrcCellHandle()->get() ); 112 | PE_PRINT(tmp.c_str()); 113 | 114 | if ( xmlRRCConnectionRequest != "" ) 115 | { 116 | if ( GCO_MATCHF(root, xmlRRCConnectionRequest.c_str()) ) 117 | { 118 | PE_PRINT("####### Message is OK #######" ); 119 | } 120 | else 121 | { 122 | PE_ERR("####### Message is NOK #######" ); 123 | NOTIFY_COMPLETION_FAILURE(); 124 | } 125 | } 126 | 127 | if ( CellHandle != -1 ) 128 | { 129 | if ( asp->RrcCellHandle()->get() != CellHandle ) 130 | { 131 | std::string tmp = cmw_Utils("####### Message received in wrong cell (%i), valid cell is %i #######", asp->RrcCellHandle()->get(), CellHandle ); 132 | PE_ERR(tmp.c_str()); 133 | NOTIFY_COMPLETION_FAILURE(); 134 | retcode = EV_FAIL; 135 | } 136 | } 137 | 138 | NEXT_STATE ( GetMacUeId ); 139 | } 140 | 141 | ON_ASPX( sM_LTE_RrcConnectionEstablishment, GetMacUeId, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcUpdateUeConfigInd ) 142 | { 143 | globaldata_lte->getUEIdentity()->setUEHandle(asp->RrcUeHandle()->get()); 144 | globaldata_lte->getUEIdentity()->setMacUeId(asp->MacUeId()->get()); 145 | globaldata_lte->getUEIdentity()->setCRNTI(asp->Crnti()->get()); 146 | 147 | UeId = asp->MacUeId()->get(); 148 | 149 | if ( LteReferenceTestConditions->getPx_TimingAdvance() != -1 ) 150 | { 151 | RUN_NEWP_STATEMACHINE ( sM_LTE_TimingAdvance, null, 152 | ( 153 | std::string("Lte_CmacTimingControlConfigReq.xml"), // CmacTimingControlConfigReq 154 | UeId // UeId 155 | ) 156 | ); 157 | 158 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 159 | } 160 | 161 | if ( LteReferenceTestConditions->getTargetPowerSupport() == 1 ) 162 | { 163 | RUN_NEWP_STATEMACHINE ( sM_LTE_TxPowerControl, null, 164 | ( 165 | std::string("Lte_CmacPowerControlConfigReq.xml"), // CmacPowerControlConfigReq 166 | LteReferenceTestConditions->getTargetPowerPusch(), // TargetPowerPusch 167 | LteReferenceTestConditions->getTargetPowerPucch(), // TargetPowerPucch 168 | UeId // UeId 169 | ) 170 | ); 171 | 172 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 173 | } 174 | 175 | if( EV_OK == retcode ) 176 | { 177 | pCrrcAsp = NEW_ASP_WITH_DL_CCCH_RRC_PDU ( rrcConnectionSetup, asp->RrcUeHandle()->get(), Rnti ); 178 | pCrrcAsp->Choice()->CrrcDlCcchMessageReq()->SupervisionDuration()->set(GEN_RRC_TIMER); 179 | 180 | GCO_DUMP(rrcConnectionSetup.pdu); 181 | 182 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp ); 183 | 184 | PE_PRINT(" UE <- SS RRC: RRCConnectionSetup " ); 185 | PE_PRINT(" TC: Waiting for RRCConnectionSetupComplete" ); 186 | 187 | NEXT_STATE( RRCConnectionSetupComplete ); 188 | } 189 | else 190 | { 191 | PE_ERR("####### Timing advance setting failed #######"); 192 | NOTIFY_COMPLETION_FAILURE(); 193 | } 194 | } 195 | 196 | ON_ASPX( sM_LTE_RrcConnectionEstablishment, RRCConnectionSetupComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 197 | { 198 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_SETUP_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 199 | { 200 | PE_ERR("####### RRCConnectionSetupComplete timeout #######" ); 201 | NOTIFY_COMPLETION_FAILURE(); 202 | } 203 | } 204 | 205 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_RrcConnectionEstablishment, RRCConnectionSetupComplete, RRCConnectionSetupComplete ) 206 | { 207 | rsDefaultTimer->reset(); 208 | 209 | GCO_DUMP(pdu); 210 | 211 | globaldata_lte->getUEIdentity(0)->setUEHandle(asp->RrcUeHandle()->get()); 212 | 213 | DELAY_ALL_EPS_NAS_PDU_TRANSITIONS(); 214 | 215 | PE_PRINT(" UE -> SS RRC: RRCConnectionSetupComplete " ); 216 | 217 | if ( xmlRRCConnectionSetupComplete != "" ) 218 | { 219 | if ( GCO_MATCHF(root, xmlRRCConnectionSetupComplete.c_str()) ) 220 | { 221 | PE_PRINT("####### Message is OK #######" ); 222 | } 223 | else 224 | { 225 | PE_ERR("####### Message is NOK #######" ); 226 | NOTIFY_COMPLETION_FAILURE(); 227 | } 228 | } 229 | 230 | PE_PRINT(" TC: RRC Connection Establishment procedure completed" ); 231 | 232 | notifyCompletion(EV_OK); 233 | } 234 | 235 | void sM_LTE_RrcConnectionReject::start(void) 236 | { 237 | sM_LteMlDefault::start(); 238 | 239 | PE_PRINT(" TC: Waiting for RRCConnectionRequest"); 240 | 241 | if ( WaitTimer == 0 ) 242 | { 243 | rsDefaultTimer->set(WAIT_RRC_REQ); 244 | } 245 | else 246 | { 247 | rsDefaultTimer->set(WaitTimer); 248 | } 249 | 250 | NEW_LTE_RRC_PDU( rrcConnectionReject, DL_CCCH, RRCConnectionReject, xmlRRCConnectionReject.c_str() ); 251 | NEXT_STATE ( RRCConnectionRequest ); 252 | } 253 | 254 | ON_TIMER( sM_LTE_RrcConnectionReject, RRCConnectionRequest, RS_Default_Timer) 255 | { 256 | PE_ERR("####### RRCConnectionRequest timeout #######" ); 257 | NOTIFY_COMPLETION_FAILURE(); 258 | } 259 | 260 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_RrcConnectionReject, RRCConnectionRequest, RRCConnectionRequest ) 261 | { 262 | rsDefaultTimer->reset(); 263 | 264 | GCO_DUMP(pdu); 265 | 266 | Rnti = asp->Rnti()->get(); 267 | std::string tmp = cmw_Utils(" UE -> SS RRC: RRCConnectionRequest (Cell #%i)", asp->RrcCellHandle()->get() ); 268 | PE_PRINT(tmp.c_str()); 269 | 270 | if ( xmlRRCConnectionRequest != "" ) 271 | { 272 | if ( GCO_MATCHF(root, xmlRRCConnectionRequest.c_str()) ) 273 | { 274 | PE_PRINT("####### Message is OK #######" ); 275 | } 276 | else 277 | { 278 | PE_ERR("####### Message is NOK #######" ); 279 | NOTIFY_COMPLETION_FAILURE(); 280 | } 281 | } 282 | 283 | if ( asp->RrcCellHandle()->get() != CellHandle ) 284 | { 285 | std::string tmp = cmw_Utils("####### Message received in wrong cell (%i), valid cell is %i #######", asp->RrcCellHandle()->get(), CellHandle ); 286 | PE_ERR(tmp.c_str()); 287 | NOTIFY_COMPLETION_FAILURE(); 288 | retcode = EV_FAIL; 289 | } 290 | 291 | if ( retcode == EV_OK ) 292 | { 293 | 294 | 295 | rrcConnectionReject.pdu->criticalExtensions()->c1()->rrcConnectionReject_r8()->waitTime()->set(WaitTime); 296 | 297 | pCrrcAsp = NEW_ASP_WITH_DL_CCCH_RRC_PDU ( rrcConnectionReject, asp->RrcUeHandle()->get(), Rnti ); 298 | pCrrcAsp->Choice()->CrrcDlCcchMessageReq()->SupervisionDuration()->set(GEN_RRC_TIMER); 299 | 300 | GCO_DUMP(rrcConnectionReject.pdu); 301 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp ); 302 | PE_PRINT(" UE <- SS RRC: RRCConnectionReject " ); 303 | 304 | delete &rrcConnectionReject; 305 | } 306 | 307 | notifyCompletion(retcode); 308 | } 309 | 310 | /******************************************************************************/ 311 | /* END OF FILE */ 312 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionEstablishment.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONESTABLISHMENT_H_ 6 | #define _SM_LTE_RRCCONNECTIONESTABLISHMENT_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionEstablishment *****************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionEstablishment, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionRequest; 21 | std::string xmlRRCConnectionSetup; 22 | std::string xmlRRCConnectionSetupComplete; 23 | int CellHandle; 24 | int retcode; 25 | int WaitTimer; 26 | int UeId; 27 | int Rnti; 28 | 29 | _CrrcAsp* pCrrcAsp; 30 | DECL_LTE_RRC_PDU( rrcConnectionSetup, DL_CCCH, RRCConnectionSetup ); 31 | 32 | public: 33 | 34 | sM_LTE_RrcConnectionEstablishment ( 35 | int _CellHandle, 36 | std::string& _xmlRRCConnectionRequest, 37 | std::string& _xmlRRCConnectionSetup, 38 | std::string& _xmlRRCConnectionSetupComplete, 39 | int _WaitTimer = WAIT_RRC_REQ 40 | ) 41 | { 42 | CellHandle = _CellHandle; 43 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 44 | xmlRRCConnectionSetup = _xmlRRCConnectionSetup; 45 | xmlRRCConnectionSetupComplete = _xmlRRCConnectionSetupComplete; 46 | WaitTimer = _WaitTimer; 47 | retcode = EV_OK; 48 | } 49 | 50 | // Destructor 51 | 52 | ~sM_LTE_RrcConnectionEstablishment() 53 | { 54 | } 55 | 56 | void start(void); 57 | }; 58 | 59 | /* sM_LTE_RrcConnectionReject *****************************************/ 60 | 61 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReject, sM_LteMlDefault, DLLLTECOMMON ) 62 | { 63 | protected: 64 | 65 | int CellHandle; 66 | std::string xmlRRCConnectionRequest; 67 | int WaitTimer; 68 | std::string xmlRRCConnectionReject; 69 | int WaitTime; 70 | int retcode; 71 | int Rnti; 72 | 73 | _CrrcAsp* pCrrcAsp; 74 | DECL_LTE_RRC_PDU( rrcConnectionReject, DL_CCCH, RRCConnectionReject ); 75 | 76 | public: 77 | 78 | sM_LTE_RrcConnectionReject ( 79 | int _CellHandle, 80 | std::string& _xmlRRCConnectionRequest, 81 | int _WaitTimer, 82 | std::string& _xmlRRCConnectionReject, 83 | int _WaitTime 84 | ) 85 | { 86 | CellHandle = _CellHandle; 87 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 88 | WaitTimer = _WaitTimer; 89 | xmlRRCConnectionReject = _xmlRRCConnectionReject; 90 | WaitTime = _WaitTime; 91 | retcode = EV_OK; 92 | } 93 | 94 | // Destructor 95 | 96 | ~sM_LTE_RrcConnectionReject() 97 | { 98 | } 99 | 100 | void start(void); 101 | }; 102 | 103 | #endif // _SM_LTE_RRCCONNECTIONESTABLISHMENT_H_ 104 | 105 | /******************************************************************************/ 106 | /* END OF FILE */ 107 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReconfiguration.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONRECONFIGURATION_H_ 6 | #define _SM_LTE_RRCCONNECTIONRECONFIGURATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionReconfiguration ***************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReconfiguration, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionReconfiguration; 21 | std::string xmlNASAttachAccept; 22 | std::string xmlNASActivateDefaultEpsBearerContextRequest; 23 | std::string xmlNASActivateDedicatedEpsBearerContextRequest; 24 | std::string xmlRRCConnectionReconfigurationComplete; 25 | 26 | int UEid; 27 | int retcode; 28 | bool DataGenerator; 29 | bool DedicatedContext; 30 | bool AdditionalDefaultContext; 31 | 32 | public: 33 | 34 | sM_LTE_RrcConnectionReconfiguration ( 35 | std::string& _xmlRRCConnectionReconfiguration, 36 | std::string& _xmlNASAttachAccept, 37 | std::string& _xmlNASActivateDefaultEpsBearerContextRequest, 38 | std::string& _xmlRRCConnectionReconfigurationComplete, 39 | bool _DataGenerator 40 | ) 41 | { 42 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 43 | xmlNASAttachAccept = _xmlNASAttachAccept; 44 | xmlNASActivateDefaultEpsBearerContextRequest = _xmlNASActivateDefaultEpsBearerContextRequest; 45 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 46 | DataGenerator = _DataGenerator; 47 | UEid = 0; 48 | DedicatedContext = false; 49 | } 50 | 51 | sM_LTE_RrcConnectionReconfiguration ( 52 | std::string& _xmlRRCConnectionReconfiguration, 53 | std::string& _xmlNASActivateDedicatedEpsBearerContextRequest, 54 | std::string& _xmlRRCConnectionReconfigurationComplete, 55 | bool _DataGenerator, 56 | bool _Additional = false 57 | ) 58 | { 59 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 60 | xmlNASActivateDedicatedEpsBearerContextRequest = _xmlNASActivateDedicatedEpsBearerContextRequest; 61 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 62 | DataGenerator = _DataGenerator; 63 | UEid = 0; 64 | DedicatedContext = !_Additional; 65 | AdditionalDefaultContext = _Additional; 66 | } 67 | 68 | // Destructor 69 | 70 | ~sM_LTE_RrcConnectionReconfiguration() 71 | { 72 | } 73 | 74 | void start(void); 75 | 76 | }; 77 | 78 | #endif // _SM_LTE_RRCCONNECTIONRECONFIGURATION_H_ 79 | 80 | /******************************************************************************/ 81 | /* END OF FILE */ 82 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReconfiguration_ho.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_RrcConnectionReconfiguration_ho.cpp 29 | 30 | Version: 1.0 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 0.1 25.03.2011 / Dennis M S Original 42 | 43 | */ 44 | 45 | /* INCLUDE FILES **************************************************************/ 46 | 47 | #include "lte_common.h" 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_RrcConnectionReconfiguration_ho::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | /******************************************************************************/ 56 | /* SS->UE RRC: RRCConnectionReconfiguration */ 57 | /******************************************************************************/ 58 | 59 | DECL_NEW_LTE_RRC_PDU( rrcConnectionReconfiguration, DL_DCCH, RRCConnectionReconfiguration, xmlRRCConnectionReconfiguration.c_str() ); 60 | 61 | CodecContext *cc = rrcConnectionReconfiguration.root->code(); 62 | Lte::Std::_RRCConnectionReconfiguration_r8_IEs * rrcConnectionReconf = rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8(); 63 | 64 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->targetPhysCellId()->set(globaldata_lte->getCellConfig(cellHandleTarget)->getPhyCellId()); 65 | 66 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->newUE_Identity()->set(cc, newUE_Identity ); 67 | 68 | // Temporary hardcoding 69 | if ( rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->isActive_mac_MainConfig() ) 70 | { 71 | if ( LteReferenceTestConditions->getDRX_support() == 0 ) 72 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_drx_Config(false); 73 | if ( LteReferenceTestConditions->getPHR_support() == 0 ) 74 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_phr_Config(false); 75 | if ( LteReferenceTestConditions->getTAT_support() == 0 ) 76 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->timeAlignmentTimerDedicated()->set(7); 77 | } 78 | 79 | if ( rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->isActive_physicalConfigDedicated() ) 80 | { 81 | if ( LteReferenceTestConditions->getTargetPowerSupport() == 0 ) 82 | { 83 | if ( rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->isActive_uplinkPowerControlDedicated() ) 84 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->uplinkPowerControlDedicated()->accumulationEnabled()->set(0); 85 | } 86 | if ( LteReferenceTestConditions->getSRS_support() == 0 ) 87 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->setActive_soundingRS_UL_ConfigDedicated(false); 88 | if ( LteReferenceTestConditions->getCQI_support() == 0 ) 89 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->setActive_cqi_ReportConfig(false); 90 | } 91 | 92 | if ( ( dl_CarrierFreq != -1 ) || ( ul_CarrierFreq != -1 ) ) 93 | { 94 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->setActive_carrierFreq(true); 95 | 96 | if ( dl_CarrierFreq != -1 ) 97 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->carrierFreq()->dl_CarrierFreq()->set(dl_CarrierFreq); 98 | 99 | if ( ul_CarrierFreq != -1 ) 100 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->carrierFreq()->ul_CarrierFreq()->set(ul_CarrierFreq); 101 | } 102 | 103 | if ( ( dl_Bandwidth != -1 ) || ( ul_Bandwidth != -1 ) ) 104 | { 105 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->setActive_carrierBandwidth(true); 106 | 107 | if ( dl_Bandwidth != -1 ) 108 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->carrierBandwidth()->dl_Bandwidth()->set(dl_Bandwidth); 109 | 110 | if ( ul_Bandwidth != -1 ) 111 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->mobilityControlInfo()->carrierBandwidth()->ul_Bandwidth()->set(ul_Bandwidth); 112 | } 113 | 114 | globaldata_lte->getUEIdentity(0)->setncc( rrcConnectionReconf->securityConfigHO()->handoverType()->intraLTE()->nextHopChainingCount()->get() ); 115 | 116 | PE_PRINT(" TC: Security input parameters"); 117 | PE_PRINT(" TC: PhyCellId = " << globaldata_lte->getCellConfig(cellHandleTarget)->getPhyCellId() ); 118 | PE_PRINT(" TC: DLEARFCN = " << globaldata_lte->getCellConfig(cellHandleTarget)->getDLEARFCN() ); 119 | PE_PRINT(" TC: NCC = " << globaldata_lte->getUEIdentity(0)->getncc() ); 120 | 121 | RUN_NEWP_STATEMACHINE( sM_LteMl_RRC_SecurityConfig, null, 122 | ( 123 | 0, 124 | true, 125 | cellHandleTarget 126 | ) 127 | ); 128 | 129 | _CrrcAsp* pCrrcAsp = NEW_ASP_WITH_DL_DCCH_RRC_PDU( rrcConnectionReconfiguration, globaldata_lte->getUEIdentity(0)->getUEHandle() ); 130 | pCrrcAsp->Choice()->CrrcDlDcchMessageReq()->SupervisionDuration()->set(WAIT_RRC_RECONF); 131 | 132 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp); 133 | 134 | GCO_DUMP(rrcConnectionReconfiguration.pdu); 135 | 136 | delete &rrcConnectionReconfiguration; 137 | 138 | PE_PRINT(" SS -> UE RRC: RRCConnectionReconfiguration " ); 139 | 140 | PE_PRINT(" TC: Waiting for RRCConnectionReconfigurationComplete" ); 141 | 142 | NEXT_STATE ( RRCConnectionReconfigurationComplete ); 143 | } 144 | 145 | /******************************************************************************/ 146 | /* UE->SS RRC: RRCConnectionReconfigurationComplete */ 147 | /******************************************************************************/ 148 | 149 | ON_ASPX( sM_LTE_RrcConnectionReconfiguration_ho, RRCConnectionReconfigurationComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 150 | { 151 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_RECONFIGURATION_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 152 | { 153 | PE_ERR("####### RRC Connection Reconfiguration Complete timeout #######" ); 154 | NOTIFY_COMPLETION_FAILURE(); 155 | } 156 | } 157 | 158 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_RrcConnectionReconfiguration_ho, RRCConnectionReconfigurationComplete, RRCConnectionReconfigurationComplete ) 159 | { 160 | PE_PRINT(" UE -> SS RRC: RRCConnectionReconfigurationComplete " ); 161 | 162 | GCO_DUMP(pdu); 163 | 164 | if ( xmlRRCConnectionReconfigurationComplete != "" ) 165 | { 166 | if ( GCO_MATCHF(root, xmlRRCConnectionReconfigurationComplete.c_str()) ) 167 | { 168 | PE_PRINT("####### Message is OK #######" ); 169 | } 170 | else 171 | { 172 | PE_ERR("####### Message is NOK #######" ); 173 | NOTIFY_COMPLETION_FAILURE(); 174 | } 175 | } 176 | 177 | PE_PRINT(" TC: RRC Connection Reconfigure procedure completed" ); 178 | 179 | notifyCompletion(EV_OK); 180 | } 181 | 182 | /******************************************************************************/ 183 | /* END OF FILE */ 184 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReconfiguration_ho.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONRECONFIGURATION_HO_H_ 6 | #define _SM_LTE_RRCCONNECTIONRECONFIGURATION_HO_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionReconfiguration_ho **********************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReconfiguration_ho, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | int cellHandleTarget; 21 | std::string xmlRRCConnectionReconfiguration; 22 | const char* newUE_Identity; 23 | int dl_CarrierFreq; 24 | int ul_CarrierFreq; 25 | int dl_Bandwidth; 26 | int ul_Bandwidth; 27 | std::string xmlRRCConnectionReconfigurationComplete; 28 | 29 | public: 30 | 31 | sM_LTE_RrcConnectionReconfiguration_ho ( 32 | int _cellHandleTarget, 33 | std::string& _xmlRRCConnectionReconfiguration, 34 | const char* _newUE_Identity, 35 | int _dl_CarrierFreq, 36 | int _ul_CarrierFreq, 37 | int _dl_Bandwidth, 38 | int _ul_Bandwidth, 39 | std::string& _xmlRRCConnectionReconfigurationComplete 40 | ) 41 | { 42 | cellHandleTarget = _cellHandleTarget; 43 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 44 | newUE_Identity = _newUE_Identity; 45 | dl_CarrierFreq = _dl_CarrierFreq; 46 | ul_CarrierFreq = _ul_CarrierFreq; 47 | dl_Bandwidth = _dl_Bandwidth; 48 | ul_Bandwidth = _ul_Bandwidth; 49 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 50 | } 51 | 52 | // Destructor 53 | 54 | ~sM_LTE_RrcConnectionReconfiguration_ho() 55 | { 56 | } 57 | 58 | void start(void); 59 | 60 | }; 61 | 62 | #endif // _SM_LTE_RRCCONNECTIONRECONFIGURATION_HO_H_ 63 | 64 | /******************************************************************************/ 65 | /* END OF FILE */ 66 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReconfiguration_meas.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Test Step for CMW-500 20 | --------------------- 21 | 22 | SW module 23 | 24 | 25 | 26 | 27 | 28 | Filename: sM_LTE_RrcConnectionReconfiguration_meas.cpp 29 | 30 | Version: 1.2 31 | 32 | Author: Dennis M Senyonjo 33 | 34 | 35 | Copyright (c) 2011. Dennis M Senyonjo 36 | 37 | 38 | Change history: 39 | 40 | VERSION DATE/AUTHOR COMMENT 41 | 2.0 08.04.2011 / Niko Tumelius Update 42 | 1.2 05.04.2011 / Dennis M S Update 43 | 1.1 04.03.2011 / Dennis M S Update 44 | 1.0 18.01.2011 / Dennis M S Original 45 | 46 | */ 47 | 48 | /* INCLUDE FILES **************************************************************/ 49 | 50 | #include "lte_common.h" 51 | 52 | /* PUBLIC *********************************************************************/ 53 | 54 | void sM_LTE_RrcConnectionReconfiguration_meas::start(void) 55 | { 56 | sM_LteMlDefault::start(); 57 | 58 | /******************************************************************************/ 59 | /* SS->UE RRC: RRCConnectionReconfiguration */ 60 | /******************************************************************************/ 61 | 62 | DECL_NEW_LTE_RRC_PDU( rrcConnectionReconfiguration, DL_DCCH, RRCConnectionReconfiguration, xmlRRCConnectionReconfiguration.c_str() ); 63 | 64 | CodecContext *cc = rrcConnectionReconfiguration.root->code(); 65 | 66 | // Serving cell 67 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(0)->measObject()->measObjectEUTRA()->carrierFreq()->set(cc, CarrierFreq); 68 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(0)->measObject()->measObjectEUTRA()->allowedMeasBandwidth()->set(cc, AllowedMeasBandwidth); 69 | 70 | // EventA1 71 | if ( rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->isActive_eventA1() ) 72 | { 73 | if ( RsrpOrRsrq == false ) 74 | { 75 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA1()->a1_Threshold()->setActive_threshold_RSRP(); 76 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA1()->a1_Threshold()->threshold_RSRP()->set(cc, Threshold); 77 | } 78 | else 79 | { 80 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA1()->a1_Threshold()->setActive_threshold_RSRQ(); 81 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA1()->a1_Threshold()->threshold_RSRQ()->set(cc, Threshold); 82 | } 83 | } 84 | 85 | // EventA2 86 | if ( rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->isActive_eventA2() ) 87 | { 88 | if ( RsrpOrRsrq == false ) 89 | { 90 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA2()->a2_Threshold()->setActive_threshold_RSRP(); 91 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA2()->a2_Threshold()->threshold_RSRP()->set(cc, Threshold); 92 | } 93 | else 94 | { 95 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA2()->a2_Threshold()->setActive_threshold_RSRQ(); 96 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->eventId()->eventA2()->a2_Threshold()->threshold_RSRQ()->set(cc, Threshold); 97 | } 98 | } 99 | 100 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->reportConfigToAddModList()->value(0)->reportConfig()->reportConfigEUTRA()->triggerType()->event()->hysteresis()->set(cc, Hysteresis); 101 | 102 | _CrrcAsp* pCrrcAsp = NEW_ASP_WITH_DL_DCCH_RRC_PDU( rrcConnectionReconfiguration, globaldata_lte->getUEIdentity(0)->getUEHandle() ); 103 | pCrrcAsp->Choice()->CrrcDlDcchMessageReq()->SupervisionDuration()->set(WAIT_RRC_RECONF); 104 | 105 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp); 106 | 107 | GCO_DUMP(rrcConnectionReconfiguration.pdu); 108 | 109 | delete &rrcConnectionReconfiguration; 110 | 111 | PE_PRINT(" SS -> UE RRC: RRCConnectionReconfiguration " ); 112 | 113 | PE_PRINT(" TC: Waiting for RRCConnectionReconfigurationComplete" ); 114 | 115 | NEXT_STATE ( RRCConnectionReconfigurationComplete ); 116 | } 117 | 118 | /******************************************************************************/ 119 | /* UE->SS RRC: RRCConnectionReconfigurationComplete */ 120 | /******************************************************************************/ 121 | 122 | ON_ASPX( sM_LTE_RrcConnectionReconfiguration_meas, RRCConnectionReconfigurationComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 123 | { 124 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_RECONFIGURATION_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 125 | { 126 | PE_ERR("####### RRC Connection Reconfiguration Complete timeout #######" ); 127 | NOTIFY_COMPLETION_FAILURE(); 128 | } 129 | } 130 | 131 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_RrcConnectionReconfiguration_meas, RRCConnectionReconfigurationComplete, RRCConnectionReconfigurationComplete ) 132 | { 133 | PE_PRINT(" UE -> SS RRC: RRCConnectionReconfigurationComplete " ); 134 | 135 | GCO_DUMP(pdu); 136 | 137 | if ( xmlRRCConnectionReconfigurationComplete != "" ) 138 | { 139 | if ( GCO_MATCHF(root, xmlRRCConnectionReconfigurationComplete.c_str()) ) 140 | { 141 | PE_PRINT("####### Message is OK #######" ); 142 | } 143 | else 144 | { 145 | PE_ERR("####### Message is NOK #######" ); 146 | NOTIFY_COMPLETION_FAILURE(); 147 | } 148 | } 149 | 150 | PE_PRINT(" TC: RRC Connection Reconfigure procedure completed" ); 151 | 152 | notifyCompletion(EV_OK); 153 | } 154 | 155 | /* PUBLIC *********************************************************************/ 156 | 157 | void sM_LTE_RrcConnectionReconfiguration_meas_xml::start(void) 158 | { 159 | sM_LteMlDefault::start(); 160 | 161 | /******************************************************************************/ 162 | /* SS->UE RRC: RRCConnectionReconfiguration */ 163 | /******************************************************************************/ 164 | 165 | DECL_NEW_LTE_RRC_PDU( rrcConnectionReconfiguration, DL_DCCH, RRCConnectionReconfiguration, xmlRRCConnectionReconfiguration.c_str() ); 166 | 167 | CodecContext *cc = rrcConnectionReconfiguration.root->code(); 168 | 169 | // Serving cell and intra-freq neigbours 170 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(0)->measObject()->measObjectEUTRA()->carrierFreq()->set(cc, CarrierFreq_cell0); 171 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(0)->measObject()->measObjectEUTRA()->allowedMeasBandwidth()->set(cc, AllowedMeasBandwidth_cell0); 172 | 173 | if ( MeasType == 1 ) 174 | { 175 | // Inter-freq neigbour 176 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(1)->measObject()->measObjectEUTRA()->carrierFreq()->set(cc, CarrierFreq_cell1); 177 | rrcConnectionReconfiguration.pdu->criticalExtensions()->c1()->rrcConnectionReconfiguration_r8()->measConfig()->measObjectToAddModList()->value(1)->measObject()->measObjectEUTRA()->allowedMeasBandwidth()->set(cc, AllowedMeasBandwidth_cell1); 178 | } 179 | 180 | _CrrcAsp* pCrrcAsp = NEW_ASP_WITH_DL_DCCH_RRC_PDU( rrcConnectionReconfiguration, globaldata_lte->getUEIdentity(0)->getUEHandle() ); 181 | pCrrcAsp->Choice()->CrrcDlDcchMessageReq()->SupervisionDuration()->set(WAIT_RRC_RECONF); 182 | 183 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp); 184 | 185 | GCO_DUMP(rrcConnectionReconfiguration.pdu); 186 | 187 | delete &rrcConnectionReconfiguration; 188 | 189 | PE_PRINT(" SS -> UE RRC: RRCConnectionReconfiguration " ); 190 | 191 | PE_PRINT(" TC: Waiting for RRCConnectionReconfigurationComplete" ); 192 | 193 | NEXT_STATE ( RRCConnectionReconfigurationComplete ); 194 | } 195 | 196 | /******************************************************************************/ 197 | /* UE->SS RRC: RRCConnectionReconfigurationComplete */ 198 | /******************************************************************************/ 199 | 200 | ON_ASPX( sM_LTE_RrcConnectionReconfiguration_meas_xml, RRCConnectionReconfigurationComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 201 | { 202 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_RECONFIGURATION_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 203 | { 204 | PE_ERR("####### RRC Connection Reconfiguration Complete timeout #######" ); 205 | NOTIFY_COMPLETION_FAILURE(); 206 | } 207 | } 208 | 209 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_RrcConnectionReconfiguration_meas_xml, RRCConnectionReconfigurationComplete, RRCConnectionReconfigurationComplete ) 210 | { 211 | PE_PRINT(" UE -> SS RRC: RRCConnectionReconfigurationComplete " ); 212 | 213 | GCO_DUMP(pdu); 214 | 215 | if ( xmlRRCConnectionReconfigurationComplete != "" ) 216 | { 217 | if ( GCO_MATCHF(root, xmlRRCConnectionReconfigurationComplete.c_str()) ) 218 | { 219 | PE_PRINT("####### Message is OK #######" ); 220 | } 221 | else 222 | { 223 | PE_ERR("####### Message is NOK #######" ); 224 | NOTIFY_COMPLETION_FAILURE(); 225 | } 226 | } 227 | 228 | PE_PRINT(" TC: RRC Connection Reconfigure procedure completed" ); 229 | 230 | notifyCompletion(EV_OK); 231 | } 232 | 233 | /******************************************************************************/ 234 | /* END OF FILE */ 235 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReconfiguration_meas.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONRECONFIGURATION_MEAS_H_ 6 | #define _SM_LTE_RRCCONNECTIONRECONFIGURATION_MEAS_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionReconfiguration_meas **********************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReconfiguration_meas, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionReconfiguration; 21 | int CarrierFreq; 22 | int AllowedMeasBandwidth; 23 | bool RsrpOrRsrq; 24 | int Threshold; 25 | int Hysteresis; 26 | std::string xmlRRCConnectionReconfigurationComplete; 27 | 28 | public: 29 | 30 | sM_LTE_RrcConnectionReconfiguration_meas ( 31 | std::string& _xmlRRCConnectionReconfiguration, 32 | int _CarrierFreq, 33 | int _AllowedMeasBandwidth, 34 | bool _RsrpOrRsrq, 35 | int _Threshold, 36 | int _Hysteresis, 37 | std::string& _xmlRRCConnectionReconfigurationComplete 38 | ) 39 | { 40 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 41 | CarrierFreq = _CarrierFreq; 42 | AllowedMeasBandwidth = _AllowedMeasBandwidth; 43 | RsrpOrRsrq = _RsrpOrRsrq; 44 | Threshold = _Threshold; 45 | Hysteresis = _Hysteresis; 46 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 47 | } 48 | 49 | // Destructor 50 | 51 | ~sM_LTE_RrcConnectionReconfiguration_meas() 52 | { 53 | } 54 | 55 | void start(void); 56 | 57 | }; 58 | 59 | /* sM_LTE_RrcConnectionReconfiguration_meas_xml **********************************/ 60 | 61 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReconfiguration_meas_xml, sM_LteMlDefault, DLLLTECOMMON ) 62 | { 63 | protected: 64 | 65 | std::string xmlRRCConnectionReconfiguration; 66 | int MeasType; 67 | int CarrierFreq_cell0; 68 | int CarrierFreq_cell1; 69 | int AllowedMeasBandwidth_cell0; 70 | int AllowedMeasBandwidth_cell1; 71 | std::string xmlRRCConnectionReconfigurationComplete; 72 | 73 | public: 74 | 75 | sM_LTE_RrcConnectionReconfiguration_meas_xml ( 76 | std::string& _xmlRRCConnectionReconfiguration, 77 | int _MeasType, // intra-cell and intra-freq 78 | int _CarrierFreq_cell0, 79 | int _AllowedMeasBandwidth_cell0, 80 | std::string& _xmlRRCConnectionReconfigurationComplete 81 | ) 82 | { 83 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 84 | MeasType = _MeasType; 85 | CarrierFreq_cell0 = _CarrierFreq_cell0; 86 | AllowedMeasBandwidth_cell0 = _AllowedMeasBandwidth_cell0; 87 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 88 | } 89 | 90 | sM_LTE_RrcConnectionReconfiguration_meas_xml ( 91 | std::string& _xmlRRCConnectionReconfiguration, 92 | int _MeasType, // inter-freq 93 | int _CarrierFreq_cell0, 94 | int _AllowedMeasBandwidth_cell0, 95 | int _CarrierFreq_cell1, 96 | int _AllowedMeasBandwidth_cell1, 97 | std::string& _xmlRRCConnectionReconfigurationComplete 98 | ) 99 | { 100 | xmlRRCConnectionReconfiguration = _xmlRRCConnectionReconfiguration; 101 | MeasType = _MeasType; 102 | CarrierFreq_cell0 = _CarrierFreq_cell0; 103 | AllowedMeasBandwidth_cell0 = _AllowedMeasBandwidth_cell0; 104 | CarrierFreq_cell1 = _CarrierFreq_cell1; 105 | AllowedMeasBandwidth_cell1 = _AllowedMeasBandwidth_cell1; 106 | xmlRRCConnectionReconfigurationComplete = _xmlRRCConnectionReconfigurationComplete; 107 | } 108 | 109 | // Destructor 110 | 111 | ~sM_LTE_RrcConnectionReconfiguration_meas_xml() 112 | { 113 | } 114 | 115 | void start(void); 116 | 117 | }; 118 | 119 | #endif // _SM_LTE_RRCCONNECTIONRECONFIGURATION_MEAS_H_ 120 | 121 | /******************************************************************************/ 122 | /* END OF FILE */ 123 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReestablishment.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_RrcConnectionReestablishment.cpp 28 | 29 | Version: 3.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011 Dennis M Senyonjo 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 3.0 22.03.2011 / Dennis M S Security configuration 41 | 1.0 18.01.2011 / Dennis M S Original 42 | 43 | */ 44 | 45 | /* INCLUDE FILES **************************************************************/ 46 | 47 | #include "lte_common.h" 48 | #include 49 | 50 | /* PUBLIC *********************************************************************/ 51 | 52 | void sM_LTE_RrcConnectionReestablishment::start(void) 53 | { 54 | sM_LteMlDefault::start(); 55 | 56 | PE_PRINT(" TC: Waiting for RRCConnectionReestablishmentRequest" ); 57 | 58 | if ( WaitTimer == 0 ) 59 | { 60 | rsDefaultTimer->set(WAIT_RRC_REQ); 61 | } 62 | else 63 | { 64 | rsDefaultTimer->set(WaitTimer); 65 | } 66 | 67 | NEW_LTE_RRC_PDU( rrcConnectionReestablishment, DL_CCCH, RRCConnectionReestablishment, xmlRRCConnectionReestablishment.c_str() ); 68 | 69 | // Temporary hardcoding 70 | 71 | if ( rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->isActive_mac_MainConfig() ) 72 | { 73 | if ( LteReferenceTestConditions->getDRX_support() == 0 ) 74 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_drx_Config(false); 75 | if ( LteReferenceTestConditions->getPHR_support() == 0 ) 76 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->setActive_phr_Config(false); 77 | if ( LteReferenceTestConditions->getTAT_support() == 0 ) 78 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->mac_MainConfig()->explicitValue()->timeAlignmentTimerDedicated()->set(7); 79 | } 80 | 81 | if ( rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->isActive_physicalConfigDedicated() ) 82 | { 83 | if ( LteReferenceTestConditions->getTargetPowerSupport() == 0 ) 84 | { 85 | if ( rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->isActive_uplinkPowerControlDedicated() ) 86 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->uplinkPowerControlDedicated()->accumulationEnabled()->set(0); 87 | } 88 | if ( LteReferenceTestConditions->getSRS_support() == 0 ) 89 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->soundingRS_UL_ConfigDedicated()->setActive_release(); 90 | if ( LteReferenceTestConditions->getCQI_support() == 0 ) 91 | rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->radioResourceConfigDedicated()->physicalConfigDedicated()->setActive_cqi_ReportConfig(false); 92 | } 93 | 94 | NEXT_STATE ( RRCConnectionReestablishmentRequest ); 95 | } 96 | 97 | ON_TIMER( sM_LTE_RrcConnectionReestablishment, RRCConnectionReestablishmentRequest, RS_Default_Timer) 98 | { 99 | PE_ERR("####### RRCConnectionReestablishmentRequest timeout #######"); 100 | NOTIFY_COMPLETION_FAILURE(); 101 | } 102 | 103 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_RrcConnectionReestablishment, RRCConnectionReestablishmentRequest, RRCConnectionReestablishmentRequest ) 104 | { 105 | rsDefaultTimer->reset(); 106 | 107 | GCO_DUMP(pdu); 108 | 109 | Rnti = asp->Rnti()->get(); 110 | std::string tmp = cmw_Utils(" UE -> SS RRC: RRCConnectionReestablishmentRequest (Cell #%i)", asp->RrcCellHandle()->get() ); 111 | PE_PRINT(tmp.c_str()); 112 | 113 | if ( xmlRRCConnectionReestablishmentRequest != "" ) 114 | { 115 | if ( GCO_MATCHF(root, xmlRRCConnectionReestablishmentRequest.c_str()) ) 116 | { 117 | PE_PRINT("####### Message is OK #######" ); 118 | } 119 | else 120 | { 121 | PE_ERR("####### Message is NOK #######" ); 122 | NOTIFY_COMPLETION_FAILURE(); 123 | } 124 | } 125 | 126 | if ( CellHandleTarget != -1 ) 127 | { 128 | if ( asp->RrcCellHandle()->get() != CellHandleTarget ) 129 | { 130 | std::string tmp = cmw_Utils("####### Message received in wrong cell (%i), Valid cell is %i #######", asp->RrcCellHandle()->get(), CellHandleTarget ); 131 | PE_ERR(tmp.c_str()); 132 | NOTIFY_COMPLETION_FAILURE(); 133 | retcode = EV_FAIL; 134 | } 135 | } 136 | 137 | NEXT_STATE ( GetMacUeId ); 138 | } 139 | 140 | ON_ASPX( sM_LTE_RrcConnectionReestablishment, GetMacUeId, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcUpdateUeConfigInd ) 141 | { 142 | globaldata_lte->getUEIdentity()->setUEHandle(asp->RrcUeHandle()->get()); 143 | globaldata_lte->getUEIdentity()->setMacUeId(asp->MacUeId()->get()); 144 | globaldata_lte->getUEIdentity()->setCRNTI(asp->Crnti()->get()); 145 | 146 | UeId = asp->MacUeId()->get(); 147 | globaldata_lte->getUEIdentity(0)->setncc( rrcConnectionReestablishment.pdu->criticalExtensions()->c1()->rrcConnectionReestablishment_r8()->nextHopChainingCount()->get() ); 148 | 149 | PE_PRINT(" TC: Security input parameters"); 150 | PE_PRINT(" TC: PhyCellId = " << globaldata_lte->getCellConfig(CellHandleSource)->getPhyCellId() ); 151 | PE_PRINT(" TC: DLEARFCN = " << globaldata_lte->getCellConfig(CellHandleSource)->getDLEARFCN() ); 152 | PE_PRINT(" TC: NCC = " << globaldata_lte->getUEIdentity(0)->getncc() ); 153 | 154 | RUN_NEWP_STATEMACHINE ( sM_LTE_CrrcSecurityConfigReq, null, 155 | ( 156 | 0, // CorruptKenb 157 | true, // ReestablishmentOrHandover 158 | CellHandleSource // CellId 159 | ) 160 | ); 161 | 162 | if ( LteReferenceTestConditions->getPx_TimingAdvance() != -1 ) 163 | { 164 | RUN_NEWP_STATEMACHINE ( sM_LTE_TimingAdvance, null, 165 | ( 166 | std::string("Lte_CmacTimingControlConfigReq.xml"), // CmacTimingControlConfigReq 167 | UeId // UeId 168 | ) 169 | ); 170 | 171 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 172 | } 173 | 174 | if ( LteReferenceTestConditions->getTargetPowerSupport() == 1 ) 175 | { 176 | RUN_NEWP_STATEMACHINE ( sM_LTE_TxPowerControl, null, 177 | ( 178 | std::string("Lte_CmacPowerControlConfigReq.xml"), // CmacPowerControlConfigReq 179 | LteReferenceTestConditions->getTargetPowerPusch(), // TargetPowerPusch 180 | LteReferenceTestConditions->getTargetPowerPucch(), // TargetPowerPucch 181 | UeId // UeId 182 | ) 183 | ); 184 | 185 | RUN_NEWP_STATEMACHINE ( sM_SystemTC, null, ( TC_PRELIMINARY_VERDICT, retcode=MLAPI::lastRunReturnCode )); 186 | } 187 | 188 | if( EV_OK == retcode ) 189 | { 190 | pCrrcAsp = NEW_ASP_WITH_DL_CCCH_RRC_PDU ( rrcConnectionReestablishment, asp->RrcUeHandle()->get(), Rnti ); 191 | pCrrcAsp->Choice()->CrrcDlCcchMessageReq()->SupervisionDuration()->set(GEN_RRC_TIMER); 192 | 193 | GCO_DUMP(rrcConnectionReestablishment.pdu); 194 | 195 | OUTPUT( SAP_LTE_NET_CRRC, pCrrcAsp ); 196 | 197 | PE_PRINT(" SS -> UE RRC: RRCConnectionReestablishment " ); 198 | 199 | PE_PRINT(" TC: Waiting for RRCConnectionReestablishmentComplete" ); 200 | 201 | NEXT_STATE( RRCConnectionReestablishmentComplete ); 202 | } 203 | else 204 | { 205 | PE_ERR("####### Timing advance setting failed #######" ); 206 | NOTIFY_COMPLETION_FAILURE(); 207 | } 208 | } 209 | 210 | ON_ASPX( sM_LTE_RrcConnectionReestablishment, RRCConnectionReestablishmentComplete, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcTimeoutInd ) 211 | { 212 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_FAIL_RRCCONNECTION_REESTABLISHMENT_COMPLETE_TIMEOUT == asp->RrcResult()->get() ) 213 | { 214 | PE_ERR("####### RRCConnectionReestablishmentComplete timeout #######" ); 215 | NOTIFY_COMPLETION_FAILURE(); 216 | } 217 | } 218 | 219 | ON_LTE_UL_DCCH_RRC_PDU( sM_LTE_RrcConnectionReestablishment, RRCConnectionReestablishmentComplete, RRCConnectionReestablishmentComplete ) 220 | { 221 | rsDefaultTimer->reset(); 222 | 223 | GCO_DUMP(pdu); 224 | 225 | globaldata_lte->getUEIdentity(0)->setUEHandle(asp->RrcUeHandle()->get()); 226 | 227 | DELAY_ALL_EPS_NAS_PDU_TRANSITIONS(); 228 | 229 | PE_PRINT(" UE -> SS RRC: RRCConnectionReestablishmentComplete " ); 230 | 231 | if ( xmlRRCConnectionReestablishmentComplete != "" ) 232 | { 233 | if ( GCO_MATCHF(root, xmlRRCConnectionReestablishmentComplete.c_str()) ) 234 | { 235 | PE_PRINT("####### Message is OK #######" ); 236 | } 237 | else 238 | { 239 | PE_ERR("####### Message is NOK #######" ); 240 | NOTIFY_COMPLETION_FAILURE(); 241 | } 242 | } 243 | 244 | PE_PRINT(" TC: RRC Connection Re-establishment procedure completed" ); 245 | 246 | notifyCompletion(EV_OK); 247 | } 248 | 249 | /******************************************************************************/ 250 | /* END OF FILE */ 251 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionReestablishment.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONREESTABLISHMENT_H_ 6 | #define _SM_LTE_RRCCONNECTIONREESTABLISHMENT_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionReestablishment ***************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionReestablishment, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionReestablishmentRequest; 21 | std::string xmlRRCConnectionReestablishment; 22 | std::string xmlRRCConnectionReestablishmentComplete; 23 | int CellHandleTarget; 24 | int CellHandleSource; 25 | int retcode; 26 | int WaitTimer; 27 | int UeId; 28 | int Rnti; 29 | 30 | _CrrcAsp* pCrrcAsp; 31 | DECL_LTE_RRC_PDU( rrcConnectionReestablishment, DL_CCCH, RRCConnectionReestablishment ); 32 | 33 | public: 34 | 35 | sM_LTE_RrcConnectionReestablishment ( 36 | int _CellHandleTarget, 37 | std::string& _xmlRRCConnectionReestablishmentRequest, 38 | std::string& _xmlRRCConnectionReestablishment, 39 | std::string& _xmlRRCConnectionReestablishmentComplete, 40 | int _CellHandleSource, 41 | int _WaitTimer = WAIT_RRC_REQ 42 | ) 43 | { 44 | CellHandleTarget = _CellHandleTarget; 45 | xmlRRCConnectionReestablishmentRequest = _xmlRRCConnectionReestablishmentRequest; 46 | xmlRRCConnectionReestablishment = _xmlRRCConnectionReestablishment; 47 | xmlRRCConnectionReestablishmentComplete = _xmlRRCConnectionReestablishmentComplete; 48 | WaitTimer = _WaitTimer; 49 | CellHandleSource = _CellHandleSource; 50 | retcode = EV_OK; 51 | } 52 | 53 | // Destructor 54 | 55 | ~sM_LTE_RrcConnectionReestablishment() 56 | { 57 | } 58 | 59 | void start(void); 60 | }; 61 | 62 | #endif // _SM_LTE_RRCCONNECTIONREESTABLISHMENT_H_ 63 | 64 | /******************************************************************************/ 65 | /* END OF FILE */ 66 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionRelease.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_RrcConnectionRelease.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M Senyonjo Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | 48 | /* PUBLIC *********************************************************************/ 49 | 50 | void sM_LTE_RrcConnectionRelease::start(void) 51 | { 52 | sM_LteMlDefault::start(); 53 | 54 | DECL_NEW_LTE_RRC_PDU( rrcConnectionRelease, DL_DCCH, RRCConnectionRelease, xmlRRCConnectionRelease.c_str() ); 55 | 56 | if ( ReleaseCause != -1 ) 57 | { 58 | rrcConnectionRelease.pdu->criticalExtensions()->c1()->rrcConnectionRelease_r8()->releaseCause()->set(ReleaseCause); 59 | } 60 | 61 | if ( RedirCarrierInfo_eutra != -1 ) 62 | { 63 | rrcConnectionRelease.pdu->criticalExtensions()->c1()->rrcConnectionRelease_r8()->setActive_redirectedCarrierInfo(true); 64 | rrcConnectionRelease.pdu->criticalExtensions()->c1()->rrcConnectionRelease_r8()->redirectedCarrierInfo()->eutra()->set(RedirCarrierInfo_eutra); 65 | } 66 | 67 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_DL_DCCH_RRC_PDU( rrcConnectionRelease ) ); 68 | 69 | GCO_DUMP(rrcConnectionRelease.pdu); 70 | 71 | delete &rrcConnectionRelease; 72 | 73 | PE_PRINT(" UE <- SS RRC: RRCConnectionRelease" ); 74 | 75 | NEXT_STATE ( CrrcInfoInd ); 76 | } 77 | 78 | ON_ASPX( sM_LTE_RrcConnectionRelease, CrrcInfoInd, SAP_LTE_NET_CRRC, MDDB::Lte::Rrc::Crrc, _CrrcAsp, CrrcErrorInd ) 79 | { 80 | if ( MDDB::Lte::Rrc::_RrcResult::RRC_EV_INFO_RRC_CONNECTION_RELEASED == asp->RrcResult()->get() ) 81 | { 82 | PE_PRINT(" TC: RRC Connection Release procedure completed" ); 83 | notifyCompletion(EV_OK); 84 | } 85 | } 86 | 87 | /******************************************************************************/ 88 | /* END OF FILE */ 89 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionRelease.h: -------------------------------------------------------------------------------- 1 | //* *************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo v0.1 3 | // ***************************************************************************/ 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONRELEASE_H_ 6 | #define _SM_LTE_RRCCONNECTIONRELEASE_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionRelease ***********************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionRelease, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionRelease; 21 | int ReleaseCause; 22 | int RedirCarrierInfo_eutra; 23 | 24 | int CellNumber; 25 | 26 | public: 27 | 28 | sM_LTE_RrcConnectionRelease ( 29 | std::string& _xmlRRCConnectionRelease = std::string("Lte_RrcConnectionRelease.xml"), //default 30 | int _ReleaseCause = -1, 31 | int _RedirCarrierInfo_eutra = -1 32 | ) 33 | { 34 | xmlRRCConnectionRelease = _xmlRRCConnectionRelease; 35 | ReleaseCause = _ReleaseCause; 36 | RedirCarrierInfo_eutra = _RedirCarrierInfo_eutra; 37 | 38 | } 39 | 40 | // Destructor 41 | 42 | ~sM_LTE_RrcConnectionRelease() 43 | { 44 | } 45 | 46 | void start(void); 47 | 48 | }; 49 | 50 | #endif // _SM_LTE_RRCCONNECTIONRELEASE_H_ 51 | /******************************************************************************/ 52 | /* END OF FILE */ 53 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionRequest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | EUTRAN L2 SW 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Test Step for CMW-500 18 | --------------------- 19 | 20 | SW module 21 | 22 | 23 | 24 | 25 | 26 | Filename: sM_LTE_RrcConnectionRequest.cpp 27 | 28 | Version: 1.0 29 | 30 | Author: Dennis M Senyonjo 31 | 32 | 33 | Copyright (c) 2011. 34 | 35 | 36 | Change history: 37 | 38 | VERSION DATE/AUTHOR COMMENT 39 | 1.0 18.01.2011 / Dennis M S Original 40 | 41 | */ 42 | 43 | /* INCLUDE FILES **************************************************************/ 44 | 45 | #include "lte_common.h" 46 | #include 47 | 48 | /* PUBLIC *********************************************************************/ 49 | 50 | void sM_LTE_RrcConnectionRequest::start(void) 51 | { 52 | sM_LteMlDefault::start(); 53 | 54 | PE_PRINT(" TC: Waiting for RRCConnectionRequest" ); 55 | 56 | if ( WaitTimer == 0 ) 57 | { 58 | rsDefaultTimer->set(WAIT_RRC_REQ); 59 | } 60 | else 61 | { 62 | rsDefaultTimer->set(WaitTimer); 63 | } 64 | 65 | NEXT_STATE ( RRCConnectionRequest ); 66 | } 67 | 68 | ON_TIMER( sM_LTE_RrcConnectionRequest, RRCConnectionRequest, RS_Default_Timer) 69 | { 70 | if ( Desired == true ) 71 | { 72 | PE_ERR("####### RRCConnectionRequest timeout #######" ); 73 | NOTIFY_COMPLETION_FAILURE(); 74 | } 75 | else 76 | { 77 | PE_PRINT(" TC: RRCConnectionRequest timeout" ); 78 | notifyCompletion(EV_OK); 79 | } 80 | } 81 | 82 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_RrcConnectionRequest, RRCConnectionRequest, RRCConnectionRequest ) 83 | { 84 | rsDefaultTimer->reset(); 85 | 86 | GCO_DUMP(pdu); 87 | 88 | if ( Desired == true ) 89 | { 90 | PE_PRINT(" UE -> SS RRC: RRCConnectionRequest " ); 91 | 92 | if ( xmlRRCConnectionRequest != "" ) 93 | { 94 | if ( GCO_MATCHF(root, xmlRRCConnectionRequest.c_str()) ) 95 | { 96 | PE_PRINT("####### Message is OK #######" ); 97 | } 98 | else 99 | { 100 | PE_ERR("####### Message is NOK #######" ); 101 | NOTIFY_COMPLETION_FAILURE(); 102 | } 103 | } 104 | 105 | // Check CellHandle 106 | 107 | if ( asp->RrcCellHandle()->get() != CellHandle ) 108 | { 109 | PE_ERR("####### Message received in wrong cell #######" ); 110 | NOTIFY_COMPLETION_FAILURE(); 111 | } 112 | else 113 | { 114 | notifyCompletion(EV_OK); 115 | } 116 | } 117 | else 118 | { 119 | PE_ERR(" UE -> SS RRC: RRCConnectionRequest " ); 120 | PE_ERR("####### Message received but not excepted #######" ); 121 | NOTIFY_COMPLETION_FAILURE(); 122 | } 123 | } 124 | 125 | /** 126 | 127 | Author: Jussi Vatjus-Anttila 128 | 129 | STATE: RRC Connection Request shouldn't come 130 | 131 | Note: Waiting RRC Connection Request from UE. 132 | If tester received it, state goes FALSE, 133 | otherwise PASS. 134 | 135 | UE -> SS (RRCR) --> FALSE 136 | */ 137 | 138 | void sM_LTE_RrcConnectionRequestShouldntCome::start(void) 139 | { 140 | sM_LteMlDefault::start(); 141 | 142 | std::ostringstream ossInfo; 143 | ossInfo << " TC: Check that UE does not send RRC Connection Request for " << (WaitTimer/1000) << " seconds ......"; 144 | PE_PRINT(ossInfo.str()); 145 | 146 | rsDefaultTimer->set(WaitTimer); 147 | NEXT_STATE (RRCConnectionRequest); 148 | } 149 | 150 | /* 151 | ON_LTE_UL_CCCH_RRC_PDU( sM_LTE_RrcConnectionRequestShouldntCome, RRCConnectionRequest, RRCConnectionRequest ) 152 | { 153 | rsDefaultTimer->reset(); 154 | 155 | std::ostringstream ossInfo; 156 | ossInfo << "####### RRCConnectionRequest received during WaitTime ####### "; 157 | PE_ERR(ossInfo.str()); 158 | NOTIFY_COMPLETION_FAILURE(); 159 | } 160 | */ 161 | 162 | ON_TIMER(sM_LTE_RrcConnectionRequestShouldntCome, RRCConnectionRequest, RS_Default_Timer) 163 | { 164 | std::ostringstream ossInfo; 165 | ossInfo << " TC: RRCConnectionRequest timeout"; 166 | PE_PRINT(ossInfo.str()); 167 | notifyCompletion(EV_OK); 168 | } 169 | 170 | /******************************************************************************/ 171 | /* END OF FILE */ 172 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_RrcConnectionRequest.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_RRCCONNECTIONREQUEST_H_ 6 | #define _SM_LTE_RRCCONNECTIONREQUEST_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_RrcConnectionRequest************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionRequest, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlRRCConnectionRequest; 21 | int CellHandle; 22 | bool Desired; 23 | int WaitTimer; 24 | 25 | public: 26 | 27 | sM_LTE_RrcConnectionRequest( 28 | std::string& _xmlRRCConnectionRequest, 29 | int _CellHandle 30 | ) 31 | { 32 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 33 | CellHandle = _CellHandle; 34 | Desired = true; 35 | WaitTimer = 0; 36 | } 37 | 38 | sM_LTE_RrcConnectionRequest( 39 | std::string& _xmlRRCConnectionRequest, 40 | int _CellHandle, 41 | bool _Desired, 42 | int _WaitTimer 43 | ) 44 | { 45 | xmlRRCConnectionRequest = _xmlRRCConnectionRequest; 46 | CellHandle = _CellHandle; 47 | Desired = _Desired; 48 | WaitTimer = _WaitTimer; 49 | } 50 | 51 | // Destructor 52 | 53 | ~sM_LTE_RrcConnectionRequest() 54 | { 55 | } 56 | 57 | void start(void); 58 | }; 59 | 60 | DERIVED_STATEMACHINE_DLL( sM_LTE_RrcConnectionRequestShouldntCome, sM_LTE_RrcConnectionRequest, DLLLTECOMMON ) 61 | { 62 | private: 63 | 64 | protected: 65 | 66 | public: 67 | /** 68 | * Constructor 69 | */ 70 | sM_LTE_RrcConnectionRequestShouldntCome(int cellHandle, int WaitTime) 71 | : sM_LTE_RrcConnectionRequest(std::string(""), cellHandle, false, WaitTime) 72 | { 73 | } 74 | 75 | /** 76 | * Destructor 77 | */ 78 | ~sM_LTE_RrcConnectionRequestShouldntCome() 79 | { 80 | } 81 | 82 | /** 83 | * Startup code for the statemachine sM_LTE_NoRrcConnectionRequest 84 | * Overwrite the start() method in base statemachine sM_LteMlDefault. 85 | */ 86 | void start(void); 87 | }; 88 | 89 | 90 | #endif // _SM_LTE_RRCCONNECTIONREQUEST_H_ 91 | 92 | /******************************************************************************/ 93 | /* END OF FILE */ 94 | /******************************************************************************/ -------------------------------------------------------------------------------- /ERRC/sM_LTE_UeRadioAccessCapability.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_UERADIOACCESSCAPABILITY_H_ 6 | #define _SM_LTE_UERADIOACCESSCAPABILITY_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | #include "bitset" 12 | 13 | #define SM_LTE_UERADIOACCESSCAPABILITY_MAX_BANDS ( 64 ) 14 | 15 | /* CLASS DECLARATION *********************************************************/ 16 | 17 | /* sM_LTE_UeRadioAccessCapability ********************************************/ 18 | 19 | DERIVED_STATEMACHINE_DLL( sM_LTE_UeRadioAccessCapability, sM_LteMlDefault, DLLLTECOMMON ) 20 | { 21 | protected: 22 | 23 | std::string xmlUECapabilityEnquiry; 24 | std::string xmlUECapabilityInformation; 25 | 26 | bitset bitstring_ebands_ue; 27 | bitset bitstring_ebands; 28 | 29 | int retcode; 30 | 31 | void EUTRADecode( Lte::Std::_UE_CapabilityRAT_Container::__f372_ * ue_cap_cont ); 32 | 33 | bool mInterFreqNeedForGaps[SM_LTE_UERADIOACCESSCAPABILITY_MAX_BANDS] 34 | [SM_LTE_UERADIOACCESSCAPABILITY_MAX_BANDS]; 35 | 36 | public: 37 | 38 | bool getInterFreqNeedForGaps( int i, int j ); 39 | 40 | sM_LTE_UeRadioAccessCapability ( 41 | std::string& _xmlUECapabilityEnquiry, 42 | std::string& _xmlUECapabilityInformation 43 | ) 44 | { 45 | xmlUECapabilityEnquiry = _xmlUECapabilityEnquiry; 46 | xmlUECapabilityInformation = _xmlUECapabilityInformation; 47 | retcode = EV_OK; 48 | } 49 | 50 | // Destructor 51 | 52 | ~sM_LTE_UeRadioAccessCapability() 53 | { 54 | } 55 | 56 | void start(void); 57 | 58 | }; 59 | 60 | #endif // _SM_LTE_UERADIOACCESSCAPABILITY_H_ 61 | 62 | /******************************************************************************/ 63 | /* END OF FILE */ 64 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_CloseLoopbackActivation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_CloseLoopbackActivation.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M Senyonjo Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_CloseLoopbackActivation::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | DECL_NEW_ETC_PDU( sendpdu, EtcCloseUeTestLoop, xmlCloseUeTestLoop.c_str() ); 56 | 57 | GCO_DUMP(sendpdu.pdu); 58 | 59 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( sendpdu, UEIdentity ) ); 60 | delete &sendpdu; 61 | 62 | PE_PRINT(" UE <- SS RRC: DlInformationTransfer" ); 63 | PE_PRINT(" NAS: CLOSE UE TEST LOOP" ); 64 | PE_PRINT(" TC: Waiting for Close UE Test Loop Complete" ); 65 | 66 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 67 | 68 | NEXT_STATE ( CloseUeTestLoopComplete ); 69 | } 70 | 71 | ON_TIMER( sM_LTE_CloseLoopbackActivation, CloseUeTestLoopComplete, RS_Default_Timer) 72 | { 73 | PE_ERR("####### Close UE Test Loop Complete timeout #######" ); 74 | NOTIFY_COMPLETION_FAILURE(); 75 | } 76 | 77 | ON_ETC_PDU( sM_LTE_CloseLoopbackActivation, CloseUeTestLoopComplete, EtcCloseUeTestLoopComplete ) 78 | { 79 | rsDefaultTimer->reset(); 80 | 81 | GCO_DUMP(pdu); 82 | 83 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 84 | PE_PRINT(" NAS: CLOSE UE TEST LOOP COMPLETE" ); 85 | 86 | if ( xmlCloseUeTestLoopComplete != "" ) 87 | { 88 | if ( GCO_MATCHF(root, xmlCloseUeTestLoopComplete.c_str()) ) 89 | { 90 | PE_PRINT("####### Message is OK #######" ); 91 | } 92 | else 93 | { 94 | PE_ERR("####### Message is NOK #######" ); 95 | NOTIFY_COMPLETION_FAILURE(); 96 | } 97 | } 98 | 99 | PE_PRINT(" TC: Close UE Test Loop activation procedure completed" ); 100 | 101 | notifyCompletion(EV_OK); 102 | } 103 | 104 | /******************************************************************************/ 105 | /* END OF FILE */ 106 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_CloseLoopbackActivation.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_CLOSELOOPACTIVATION_H_ 6 | #define _SM_LTE_CLOSELOOPACTIVATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_CloseLoopbackActivation ********************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_CloseLoopbackActivation, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlCloseUeTestLoop; 21 | std::string xmlCloseUeTestLoopComplete; 22 | int UEIdentity; 23 | 24 | public: 25 | 26 | sM_LTE_CloseLoopbackActivation ( 27 | std::string& _xmlCloseUeTestLoop, 28 | std::string& _xmlCloseUeTestLoopComplete 29 | ) 30 | { 31 | xmlCloseUeTestLoop = _xmlCloseUeTestLoop; 32 | xmlCloseUeTestLoopComplete = _xmlCloseUeTestLoopComplete; 33 | UEIdentity = 0; 34 | } 35 | 36 | // Destructor 37 | 38 | ~sM_LTE_CloseLoopbackActivation() 39 | { 40 | } 41 | 42 | void start(void); 43 | 44 | }; 45 | 46 | #endif // _SM_LTE_CLOSELOOPACTIVATION_H_ 47 | 48 | /******************************************************************************/ 49 | /* END OF FILE */ 50 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_OpenLoopbackActivation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_OpenLoopbackActivation.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M Senyonjo Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_OpenLoopbackActivation::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | DECL_NEW_ETC_PDU( sendpdu, EtcOpenUeTestLoop, xmlOpenUeTestLoop.c_str() ); 56 | 57 | GCO_DUMP(sendpdu.pdu); 58 | 59 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( sendpdu, UEid ) ); 60 | delete &sendpdu; 61 | 62 | PE_PRINT(" UE <- UE RRC: DlInformationTransfer" ); 63 | PE_PRINT(" NAS: OPEN UE TEST LOOP" ); 64 | PE_PRINT(" TC: Waiting for Open UE Test Loop Complete" ); 65 | 66 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 67 | 68 | NEXT_STATE ( OpenUeTestLoopComplete ); 69 | } 70 | 71 | ON_TIMER( sM_LTE_OpenLoopbackActivation, OpenUeTestLoopComplete, RS_Default_Timer) 72 | { 73 | PE_ERR("####### Open UE Test Loop Complete timeout #######" ); 74 | NOTIFY_COMPLETION_FAILURE(); 75 | } 76 | 77 | ON_ETC_PDU( sM_LTE_OpenLoopbackActivation, OpenUeTestLoopComplete, EtcOpenUeTestLoopComplete ) 78 | { 79 | rsDefaultTimer->reset(); 80 | 81 | GCO_DUMP(pdu); 82 | 83 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 84 | PE_PRINT(" NAS: OPEN UE TEST LOOP COMPLETE" ); 85 | 86 | if ( xmlOpenUeTestLoopComplete != "" ) 87 | { 88 | if ( GCO_MATCHF(root, xmlOpenUeTestLoopComplete.c_str()) ) 89 | { 90 | PE_PRINT("####### Message is OK #######" ); 91 | } 92 | else 93 | { 94 | PE_ERR("####### Message is NOK #######" ); 95 | NOTIFY_COMPLETION_FAILURE(); 96 | } 97 | } 98 | 99 | PE_PRINT(" TC: Open UE Test Loop activation procedure completed" ); 100 | 101 | notifyCompletion(EV_OK); 102 | } 103 | 104 | /******************************************************************************/ 105 | /* END OF FILE */ 106 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_OpenLoopbackActivation.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_OPENLOOPACTIVATION_H_ 6 | #define _SM_LTE_OPENLOOPACTIVATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_OpenLoopbackActivation *********************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_OpenLoopbackActivation, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlOpenUeTestLoop; 21 | std::string xmlOpenUeTestLoopComplete; 22 | int UEid; 23 | 24 | public: 25 | 26 | sM_LTE_OpenLoopbackActivation ( 27 | std::string& _xmlOpenUeTestLoop, 28 | std::string& _xmlOpenUeTestLoopComplete 29 | ) 30 | { 31 | xmlOpenUeTestLoop = _xmlOpenUeTestLoop; 32 | xmlOpenUeTestLoopComplete = _xmlOpenUeTestLoopComplete; 33 | UEid = 0; 34 | } 35 | 36 | // Destructor 37 | 38 | ~sM_LTE_OpenLoopbackActivation() 39 | { 40 | } 41 | 42 | void start(void); 43 | 44 | }; 45 | 46 | #endif // _SM_LTE_OPENLOOPACTIVATION_H_ 47 | 48 | 49 | /******************************************************************************/ 50 | /* END OF FILE */ 51 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_TestModeActivation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_TestModeActivation.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M Senyonjo Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_TestModeActivation::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | DECL_NEW_ETC_PDU( sendpdu, EtcActivateRbTestMode, xmlActivateTestMode.c_str() ); 56 | 57 | GCO_DUMP(sendpdu.pdu); 58 | 59 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( sendpdu, UEid ) ); 60 | delete &sendpdu; 61 | 62 | PE_PRINT(" UE <- SS RRC: DlInformationTransfer" ); 63 | PE_PRINT(" NAS: ACTIVATE TEST MODE" ); 64 | PE_PRINT(" TC: Waiting for Activate Test Mode Complete" ); 65 | 66 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 67 | 68 | NEXT_STATE ( ActivateTestModeComplete ); 69 | } 70 | 71 | ON_TIMER( sM_LTE_TestModeActivation, ActivateTestModeComplete, RS_Default_Timer) 72 | { 73 | PE_ERR("####### Activate Test Mode Complete timeout #######" ); 74 | NOTIFY_COMPLETION_FAILURE(); 75 | } 76 | 77 | ON_ETC_PDU( sM_LTE_TestModeActivation, ActivateTestModeComplete, EtcActivateRbTestModeComplete ) 78 | { 79 | rsDefaultTimer->reset(); 80 | 81 | GCO_DUMP(pdu); 82 | 83 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 84 | PE_PRINT(" NAS: ACTIVATE TEST MODE COMPLETE" ); 85 | 86 | if ( xmlActivateTestModeComplete != "" ) 87 | { 88 | if ( GCO_MATCHF(root, xmlActivateTestModeComplete.c_str()) ) 89 | { 90 | PE_PRINT("####### Message is OK #######" ); 91 | } 92 | else 93 | { 94 | PE_ERR("####### Message is NOK #######" ); 95 | NOTIFY_COMPLETION_FAILURE(); 96 | } 97 | } 98 | 99 | PE_PRINT(" TC: Test mode activation procedure completed" ); 100 | 101 | notifyCompletion(EV_OK); 102 | } 103 | 104 | /******************************************************************************/ 105 | /* END OF FILE */ 106 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_TestModeActivation.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_TESTMODEACTIVATION_H_ 6 | #define _SM_LTE_TESTMODEACTIVATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_TestModeActivation *************************************************/ 15 | 16 | DERIVED_STATEMACHINE_DLL( sM_LTE_TestModeActivation, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlActivateTestMode; 21 | std::string xmlActivateTestModeComplete; 22 | int UEid; 23 | 24 | public: 25 | 26 | sM_LTE_TestModeActivation ( 27 | std::string& _xmlActivateTestMode, 28 | std::string& _xmlActivateTestModeComplete 29 | ) 30 | { 31 | xmlActivateTestMode = _xmlActivateTestMode; 32 | xmlActivateTestModeComplete = _xmlActivateTestModeComplete; 33 | UEid = 0; 34 | } 35 | 36 | // Destructor 37 | 38 | ~sM_LTE_TestModeActivation() 39 | { 40 | } 41 | 42 | void start(void); 43 | 44 | }; 45 | 46 | #endif // _SM_LTE_TESTMODEACTIVATION_H_ 47 | 48 | /******************************************************************************/ 49 | /* END OF FILE */ 50 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_TestModeDeactivation.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | EUTRAN L2 SW 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Test Step for CMW-500 19 | --------------------- 20 | 21 | SW module 22 | 23 | 24 | 25 | 26 | 27 | Filename: sM_LTE_TestModeDeactivation.cpp 28 | 29 | Version: 1.0 30 | 31 | Author: Dennis M Senyonjo 32 | 33 | 34 | Copyright (c) 2011. 35 | 36 | 37 | Change history: 38 | 39 | VERSION DATE/AUTHOR COMMENT 40 | 1.0 18.01.2011 / Dennis M Senyonjo Original 41 | 42 | */ 43 | 44 | /* INCLUDE FILES **************************************************************/ 45 | 46 | #include "lte_common.h" 47 | #include 48 | 49 | /* PUBLIC *********************************************************************/ 50 | 51 | void sM_LTE_TestModeDeactivation::start(void) 52 | { 53 | sM_LteMlDefault::start(); 54 | 55 | DECL_NEW_ETC_PDU( sendpdu, EtcDeactivateRbTestMode, xmlDeactivateTestMode.c_str() ); 56 | 57 | GCO_DUMP(sendpdu.pdu); 58 | 59 | OUTPUT( SAP_LTE_NET_CRRC, NEW_ASP_WITH_EPS_NAS_PDU( sendpdu ) ); 60 | delete &sendpdu; 61 | 62 | PE_PRINT(" UE <- SS RRC: DlInformationTransfer" ); 63 | PE_PRINT(" NAS: DEACTIVATE TEST MODE" ); 64 | PE_PRINT(" TC: Waiting for Deactivate Test Mode Complete" ); 65 | 66 | rsDefaultTimer->set(GEN_EPSSM_TIMER); 67 | 68 | NEXT_STATE ( DeactivateTestModeComplete ); 69 | } 70 | 71 | ON_TIMER( sM_LTE_TestModeDeactivation, DeactivateTestModeComplete, RS_Default_Timer) 72 | { 73 | PE_ERR("####### Deactivate Test Mode Complete timeout #######" ); 74 | NOTIFY_COMPLETION_FAILURE(); 75 | } 76 | 77 | ON_ETC_PDU( sM_LTE_TestModeDeactivation, DeactivateTestModeComplete, EtcDeactivateRbTestModeComplete ) 78 | { 79 | rsDefaultTimer->reset(); 80 | 81 | GCO_DUMP(pdu); 82 | 83 | PE_PRINT(" UE -> SS RRC: UlInformationTransfer" ); 84 | PE_PRINT(" NAS: DEACTIVATE TEST MODE COMPLETE" ); 85 | 86 | if ( xmlDeactivateTestModeComplete != "" ) 87 | { 88 | if ( GCO_MATCHF(root, xmlDeactivateTestModeComplete.c_str()) ) 89 | { 90 | PE_PRINT("####### Message is OK #######" ); 91 | } 92 | else 93 | { 94 | PE_ERR("####### Message is NOK #######" ); 95 | NOTIFY_COMPLETION_FAILURE(); 96 | } 97 | } 98 | 99 | PE_PRINT(" TC: Test mode deactivation procedure completed" ); 100 | 101 | notifyCompletion(EV_OK); 102 | } 103 | 104 | /******************************************************************************/ 105 | /* END OF FILE */ 106 | /******************************************************************************/ -------------------------------------------------------------------------------- /ETC/sM_LTE_TestModeDeactivation.h: -------------------------------------------------------------------------------- 1 | // **************************************************************************** 2 | // COPYRIGHT : (c) 2011 Dennis M Senyonjo 3 | // **************************************************************************** 4 | 5 | #ifndef _SM_LTE_TESTMODEDEACTIVATION_H_ 6 | #define _SM_LTE_TESTMODEDEACTIVATION_H_ 7 | 8 | /* INCLUDE FILES *************************************************************/ 9 | 10 | #include "lte_common.h" 11 | 12 | /* CLASS DECLARATION *********************************************************/ 13 | 14 | /* sM_LTE_TestModeDeactivation ***********************************************/ 15 | 16 | DERIVED_STATE_DLL( sM_LTE_TestModeDeactivation, sM_LteMlDefault, DLLLTECOMMON ) 17 | { 18 | protected: 19 | 20 | std::string xmlDeactivateTestMode; 21 | std::string xmlDeactivateTestModeComplete; 22 | int UEid; 23 | 24 | public: 25 | 26 | sM_LTE_TestModeDeactivation ( 27 | std::string& _xmlDeactivateTestMode, 28 | std::string& _xmlDeactivateTestModeComplete 29 | ) 30 | { 31 | xmlDeactivateTestMode = _xmlDeactivateTestMode; 32 | xmlDeactivateTestModeComplete = _xmlDeactivateTestModeComplete; 33 | UEid = 0; 34 | } 35 | 36 | // Destructor 37 | 38 | ~sM_LTE_TestModeDeactivation() 39 | { 40 | } 41 | 42 | void start(void); 43 | 44 | }; 45 | 46 | #endif // _SM_LTE_TESTMODEDEACTIVATION_H_ 47 | 48 | /******************************************************************************/ 49 | /* END OF FILE */ 50 | /******************************************************************************/ -------------------------------------------------------------------------------- /LIB/LTE_Basic.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_Basic.lib -------------------------------------------------------------------------------- /LIB/LTE_Basic_common.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_Basic_common.lib -------------------------------------------------------------------------------- /LIB/LTE_EPS_Bearer.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_EPS_Bearer.lib -------------------------------------------------------------------------------- /LIB/LTE_EPS_Bearer_common.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_EPS_Bearer_common.lib -------------------------------------------------------------------------------- /LIB/LTE_Mobility.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_Mobility.lib -------------------------------------------------------------------------------- /LIB/LTE_Mobility_common.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/LTE_Mobility_common.lib -------------------------------------------------------------------------------- /LIB/mlapilte.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/mlapilte.lib -------------------------------------------------------------------------------- /LIB/mlapirt1.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/mlapirt1.lib -------------------------------------------------------------------------------- /LIB/rsltecommon.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4reo/OpenLTE/e70e5550c752672a3aaf11242a2ef84c1e16e263/LIB/rsltecommon.lib -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenLTE 2 | Open Source LTE platform - Aims to be an Open Source Software Defined Radio (SDR) Erlang and C++ implementation of the 3GPP release 10 LTE spec. In the current version, it includes an eNodeB with a built-in simple Evolved Packet Core, and some tools used for scanning and recording LTE signals. Tested on the CMW500 and Ettus Research Hardware. 3 | --------------------------------------------------------------------------------