コード例 #1
0
 def test_rrcConnectionEstablishmentSuccessSubsequentRrcCompleteIgnored(
         self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message, {
             "temporaryCrnti": temporaryCrnti,
             "uplinkGrant": uplinkGrant,
             "rrcTransactionIdentifier": rrcTransactionIdentifier
         })
     time.sleep(0.2)
     interface, channelInfo, message = rrcConnectionSetupComplete(
         rrcTransactionIdentifier, 28001,
         {"nasMessageType": "attachRequest"})
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message)
     self.assertEqual(self.enbResult,
                      EnbRrcConnectionEstablishmentProcedure.Success)
     time.sleep(0.2)
     self.enbResult = None
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message)
     time.sleep(0.2)
     self.assertEqual(self.enbResult, None)
コード例 #2
0
ファイル: test_enb.py プロジェクト: rainbow1987/pyEPS
 def test_noRrcConnectionSetupCompleteReceived(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434,
                               "moSignaling"))
     time.sleep(2.5)  # more than 3* 0.5 = 1.5 seconds  + 0.5 seconds
コード例 #3
0
ファイル: test_enb.py プロジェクト: abdulmecit/pyEPS
 def test_singleUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     rrcTransactionIdentifier = 0
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling"))
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionSetupComplete(
         rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"}))
     time.sleep(0.1) # ensure the enb call back is not waiting for rrc complete
     self.assertEqual(self.enb.state.uePool.numUes(), 1)
コード例 #4
0
ファイル: test_enb.py プロジェクト: abdulmecit/pyEPS
 def test_nUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     for temporaryCrnti, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000), *rrcConnectionRequest(
             temporaryCrnti, "randomValue", 3434, "moSignaling") )
         time.sleep(0.1)  # need this to solve issue of synch
     for rrcTransactionIdentifier, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000), *rrcConnectionSetupComplete(
             rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"}))
         time.sleep(0.1)
     time.sleep(0.1) # need this to solve issue of synch
     self.assertEqual(self.enb.state.uePool.numUes(), self.numUes)
コード例 #5
0
ファイル: rrc.py プロジェクト: abdulmecit/pyEPS
 def __sendRrcConnectionRequest__(self):
     interface, channelInfo, message = rrcConnectionRequest(self.temporaryCrnti, self.rrcEstablishmentInputParameters["ueIdentityType"],
                                                            self.rrcEstablishmentInputParameters["ueIdentityValue"],
                                                            self.rrcEstablishmentInputParameters["rrcEstablishmentCause"])
     self.ioService.sendMessage(self.enbAddress, interface, channelInfo, message)
     self.rrcConnectionRequestMessage = message # need to store this to compre with macCRI
     self.waitForRrcConnectionSetupTimerT300 = self.ioService.createTimer(
         self.procedureParameters["rrcConnectionSetupTimeoutT300"], self.__onRrcConnectionSetupTimeout__)
     self.waitForRrcConnectionSetupTimerT300.start()
     self.waitForMacContentionResolutionTimer = self.ioService.createTimer(
         self.procedureParameters["macContentionResolutionTimeout"], self.__onContentionResolutionTimeout__)
     self.waitForMacContentionResolutionTimer.start()
コード例 #6
0
ファイル: test_rrc.py プロジェクト: BBOZKUS/pyEPS
 def test_noRrcConnectionSetupCompleteReceived(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(), 9001),  interface, channelInfo, message, {
         "temporaryCrnti": temporaryCrnti,
         "uplinkGrant": uplinkGrant, 
         "rrcTransactionIdentifier": rrcTransactionIdentifier
     })
     time.sleep(1.7) # more than 3 * 0.5 = 1.5 seconds
     self.assertEqual(self.enbResult,
         EnbRrcConnectionEstablishmentProcedure.ErrorNoRrcConnectionCompleteMessage)
コード例 #7
0
ファイル: test_enb.py プロジェクト: rainbow1987/pyEPS
 def test_nUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     for temporaryCrnti, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000),
                       *rrcConnectionRequest(temporaryCrnti, "randomValue",
                                             3434, "moSignaling"))
         time.sleep(0.1)  # need this to solve issue of synch
     for rrcTransactionIdentifier, s in enumerate(self.ueIoServices):
         s.sendMessage((localhost(), 9000),
                       *rrcConnectionSetupComplete(
                           rrcTransactionIdentifier, 28001,
                           {"nasMessageType": "attachRequest"}))
         time.sleep(0.1)
     time.sleep(0.1)  # need this to solve issue of synch
     self.assertEqual(self.enb.state.uePool.numUes(), self.numUes)
コード例 #8
0
ファイル: test_enb.py プロジェクト: rainbow1987/pyEPS
 def test_singleUeRrcEstablishmentSuccess(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     rrcTransactionIdentifier = 0
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434,
                               "moSignaling"))
     self.ueIoServices[0].sendMessage(
         (localhost(), 9000),
         *rrcConnectionSetupComplete(rrcTransactionIdentifier, 28001,
                                     {"nasMessageType": "attachRequest"}))
     time.sleep(
         0.1)  # ensure the enb call back is not waiting for rrc complete
     self.assertEqual(self.enb.state.uePool.numUes(), 1)
コード例 #9
0
ファイル: test_rrc.py プロジェクト: BBOZKUS/pyEPS
 def test_rrcConnectionEstablishmentSuccess(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(), 9001),  interface, channelInfo, message, {
         "temporaryCrnti": temporaryCrnti,
         "uplinkGrant": uplinkGrant, 
         "rrcTransactionIdentifier": rrcTransactionIdentifier
     })
     time.sleep(0.2)
     interface, channelInfo, message = rrcConnectionSetupComplete(rrcTransactionIdentifier, 28001, {"nasMessageType": "attachRequest"})
     self.enbProcedure.handleRrcEstablishmentMessage((localhost(),9001),  interface, channelInfo, message)
     self.assertEqual(self.enbResult,
         EnbRrcConnectionEstablishmentProcedure.Success)
コード例 #10
0
 def test_noRrcConnectionSetupCompleteReceived(self):
     self.enbResult = None
     temporaryCrnti = 0
     uplinkGrant = 34
     rrcTransactionIdentifier = 0
     interface, channelInfo, message = rrcConnectionRequest(
         temporaryCrnti, "randomValue", 3434, "moSignaling")
     self.enbProcedure.handleRrcEstablishmentMessage(
         (localhost(), 9001), interface, channelInfo, message, {
             "temporaryCrnti": temporaryCrnti,
             "uplinkGrant": uplinkGrant,
             "rrcTransactionIdentifier": rrcTransactionIdentifier
         })
     time.sleep(1.7)  # more than 3 * 0.5 = 1.5 seconds
     self.assertEqual(
         self.enbResult, EnbRrcConnectionEstablishmentProcedure.
         ErrorNoRrcConnectionCompleteMessage)
コード例 #11
0
ファイル: test_enb.py プロジェクト: abdulmecit/pyEPS
 def test_noRrcConnectionSetupCompleteReceived(self):
     time.sleep(0.1)
     temporaryCrnti = 0
     self.ueIoServices[0].sendMessage((localhost(), 9000), *rrcConnectionRequest(temporaryCrnti, "randomValue", 3434, "moSignaling"))
     time.sleep(2.5) # more than 3* 0.5 = 1.5 seconds  + 0.5 seconds