示例#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
 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
 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
 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
 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
 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
 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