A Discrete-Event Network Simulator
API
test-asn1-encoding.cc
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Lluis Parcerisa <lparcerisa@cttc.cat>
19 */
20
21#include "ns3/log.h"
22#include "ns3/string.h"
23#include "ns3/double.h"
24#include "ns3/enum.h"
25#include "ns3/boolean.h"
26#include "ns3/test.h"
27#include "ns3/ptr.h"
28#include "ns3/packet.h"
29
30#include "ns3/lte-rrc-header.h"
31#include "ns3/lte-rrc-sap.h"
32
33using namespace ns3;
34
35NS_LOG_COMPONENT_DEFINE ("Asn1EncodingTest");
36
44{
45public:
51 static std::string sprintPacketContentsHex (Ptr<Packet> pkt)
52 {
53 uint32_t psize = pkt->GetSize ();
54 uint8_t buffer[psize];
55 char sbuffer[psize * 3];
56 pkt->CopyData (buffer, psize);
57 for (uint32_t i = 0; i < psize; i++)
58 {
59 sprintf (&sbuffer[i * 3],"%02x ",buffer[i]);
60 }
61 return std::string (sbuffer);
62 }
63
69 static std::string sprintPacketContentsBin (Ptr<Packet> pkt)
70 {
71 uint32_t psize = pkt->GetSize ();
72 uint8_t buffer[psize];
73 std::ostringstream oss (std::ostringstream::out);
74 pkt->CopyData (buffer, psize);
75 for (uint32_t i = 0; i < psize; i++)
76 {
77 oss << (std::bitset<8> (buffer[i]));
78 }
79 return std::string (oss.str () + "\n");
80 }
81
87 {
88 NS_LOG_DEBUG ("---- SERIALIZED PACKET CONTENTS (HEX): -------");
91 }
92
98 template <class T>
99 static void LogPacketInfo (T source,std::string s)
100 {
101 NS_LOG_DEBUG ("--------- " << s.data () << " INFO: -------");
102 std::ostringstream oss (std::ostringstream::out);
103 source.Print (oss);
104 NS_LOG_DEBUG (oss.str ());
105 }
106};
107
108// --------------------------- CLASS RrcHeaderTestCase -----------------------------
117{
118public:
123 RrcHeaderTestCase (std::string s);
124 virtual void DoRun (void) = 0;
136
137protected:
139};
140
142{
143}
144
147{
149
150 rrd.drbToReleaseList = std::list<uint8_t> (4,2);
151
152 LteRrcSap::SrbToAddMod srbToAddMod;
153 srbToAddMod.srbIdentity = 2;
154
155 LteRrcSap::LogicalChannelConfig logicalChannelConfig;
156 logicalChannelConfig.priority = 9;
157 logicalChannelConfig.prioritizedBitRateKbps = 128;
158 logicalChannelConfig.bucketSizeDurationMs = 100;
159 logicalChannelConfig.logicalChannelGroup = 3;
160 srbToAddMod.logicalChannelConfig = logicalChannelConfig;
161
162 rrd.srbToAddModList.insert (rrd.srbToAddModList.begin (),srbToAddMod);
163
164 LteRrcSap::DrbToAddMod drbToAddMod;
165 drbToAddMod.epsBearerIdentity = 1;
166 drbToAddMod.drbIdentity = 1;
167 drbToAddMod.logicalChannelIdentity = 5;
168 LteRrcSap::RlcConfig rlcConfig;
169 rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL;
170 drbToAddMod.rlcConfig = rlcConfig;
171
172 LteRrcSap::LogicalChannelConfig logicalChannelConfig2;
173 logicalChannelConfig2.priority = 7;
174 logicalChannelConfig2.prioritizedBitRateKbps = 256;
175 logicalChannelConfig2.bucketSizeDurationMs = 50;
176 logicalChannelConfig2.logicalChannelGroup = 2;
177 drbToAddMod.logicalChannelConfig = logicalChannelConfig2;
178
179 rrd.drbToAddModList.insert (rrd.drbToAddModList.begin (),drbToAddMod);
180
182 LteRrcSap::PhysicalConfigDedicated physicalConfigDedicated;
183 physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true;
184 physicalConfigDedicated.soundingRsUlConfigDedicated.type = LteRrcSap::SoundingRsUlConfigDedicated::SETUP;
185 physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth = 2;
186 physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = 12;
187
188 physicalConfigDedicated.haveAntennaInfoDedicated = true;
189 physicalConfigDedicated.antennaInfo.transmissionMode = 2;
190
191 physicalConfigDedicated.havePdschConfigDedicated = true;
192 physicalConfigDedicated.pdschConfigDedicated.pa = LteRrcSap::PdschConfigDedicated::dB0;
193
194 rrd.physicalConfigDedicated = physicalConfigDedicated;
195
196 return rrd;
197}
198
199void
201{
202 NS_TEST_ASSERT_MSG_EQ (rrcd1.srbToAddModList.size (), rrcd2.srbToAddModList.size (),"SrbToAddModList different sizes");
203
204 std::list<LteRrcSap::SrbToAddMod> srcSrbToAddModList = rrcd1.srbToAddModList;
205 std::list<LteRrcSap::SrbToAddMod>::iterator it1 = srcSrbToAddModList.begin ();
206 std::list<LteRrcSap::SrbToAddMod> dstSrbToAddModList = rrcd2.srbToAddModList;
207 std::list<LteRrcSap::SrbToAddMod>::iterator it2 = dstSrbToAddModList.begin ();
208
209 for (; it1 != srcSrbToAddModList.end (); it1++, it2++)
210 {
211 NS_TEST_ASSERT_MSG_EQ (it1->srbIdentity,it2->srbIdentity, "srbIdentity");
212 NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.priority,it2->logicalChannelConfig.priority, "logicalChannelConfig.priority");
213 NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.prioritizedBitRateKbps,it2->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
214 NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.bucketSizeDurationMs,it2->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
215 NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.logicalChannelGroup,it2->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
216 }
217
218 NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToAddModList.size (), rrcd2.drbToAddModList.size (),"DrbToAddModList different sizes");
219
220 std::list<LteRrcSap::DrbToAddMod> srcDrbToAddModList = rrcd1.drbToAddModList;
221 std::list<LteRrcSap::DrbToAddMod>::iterator it3 = srcDrbToAddModList.begin ();
222 std::list<LteRrcSap::DrbToAddMod> dstDrbToAddModList = rrcd2.drbToAddModList;
223 std::list<LteRrcSap::DrbToAddMod>::iterator it4 = dstDrbToAddModList.begin ();
224
225 for (; it3 != srcDrbToAddModList.end (); it3++, it4++)
226 {
227 NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
228 NS_TEST_ASSERT_MSG_EQ (it3->drbIdentity,it4->drbIdentity, "drbIdentity");
229 NS_TEST_ASSERT_MSG_EQ (it3->rlcConfig.choice,it4->rlcConfig.choice, "rlcConfig.choice");
230 NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelIdentity,it4->logicalChannelIdentity, "logicalChannelIdentity");
231 NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
232
233 NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.priority,it4->logicalChannelConfig.priority, "logicalChannelConfig.priority");
234 NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.prioritizedBitRateKbps,it4->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
235 NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.bucketSizeDurationMs,it4->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
236 NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.logicalChannelGroup,it4->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
237 }
238
239 NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToReleaseList.size (), rrcd2.drbToReleaseList.size (),"DrbToReleaseList different sizes");
240
241 std::list<uint8_t> srcDrbToReleaseList = rrcd1.drbToReleaseList;
242 std::list<uint8_t> dstDrbToReleaseList = rrcd2.drbToReleaseList;
243 std::list<uint8_t>::iterator it5 = srcDrbToReleaseList.begin ();
244 std::list<uint8_t>::iterator it6 = dstDrbToReleaseList.begin ();
245
246 for (; it5 != srcDrbToReleaseList.end (); it5++, it6++)
247 {
248 NS_TEST_ASSERT_MSG_EQ (*it5, *it6,"element != in DrbToReleaseList");
249 }
250
251 NS_TEST_ASSERT_MSG_EQ (rrcd1.havePhysicalConfigDedicated,rrcd2.havePhysicalConfigDedicated, "HavePhysicalConfigDedicated");
252
254 {
257 "haveSoundingRsUlConfigDedicated");
258
261 "soundingRsUlConfigDedicated.type");
264 "soundingRsUlConfigDedicated.srsBandwidth");
265
268 "soundingRsUlConfigDedicated.srsConfigIndex");
269
272 "haveAntennaInfoDedicated");
273
275 {
278 "antennaInfo.transmissionMode");
279 }
280
283 "havePdschConfigDedicated");
284
286 {
289 "pdschConfigDedicated.pa");
290 }
291 }
292}
293
301{
302public:
304 virtual void DoRun (void);
305};
306
308{
309}
310
311void
313{
314 packet = Create<Packet> ();
315 NS_LOG_DEBUG ("============= RrcConnectionRequestTestCase ===========");
316
318 msg.ueIdentity = 0x83fecafecaULL;
319
321 source.SetMessage (msg);
322
323 // Log source info
324 TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (source,"SOURCE");
325
326 // Add header
327 packet->AddHeader (source);
328
329 // Log serialized packet contents
331
332 // Remove header
333 RrcConnectionRequestHeader destination;
334 packet->RemoveHeader (destination);
335
336 // Log destination info
337 TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (destination,"DESTINATION");
338
339 // Check that the destination and source headers contain the same values
340 NS_TEST_ASSERT_MSG_EQ (source.GetMmec (),destination.GetMmec (), "Different m_mmec!");
341 NS_TEST_ASSERT_MSG_EQ (source.GetMtmsi (),destination.GetMtmsi (), "Different m_mTmsi!");
342
343 packet = 0;
344}
345
353{
354public:
356 virtual void DoRun (void);
357};
358
360{
361}
362
363void
365{
366 packet = Create<Packet> ();
367 NS_LOG_DEBUG ("============= RrcConnectionSetupTestCase ===========");
368
372
374 source.SetMessage (msg);
375
376 // Log source info
377 TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (source,"SOURCE");
378
379 // Add header
380 packet->AddHeader (source);
381
382 // Log serialized packet contents
384
385 // remove header
386 RrcConnectionSetupHeader destination;
387 packet->RemoveHeader (destination);
388
389 // Log destination info
390 TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (destination,"DESTINATION");
391
392 // Check that the destination and source headers contain the same values
393 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
394
396
397 packet = 0;
398}
399
407{
408public:
410 virtual void DoRun (void);
411};
412
414{
415}
416
417void
419{
420 packet = Create<Packet> ();
421 NS_LOG_DEBUG ("============= RrcConnectionSetupCompleteTestCase ===========");
422
425
427 source.SetMessage (msg);
428
429 // Log source info
430 TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (source,"SOURCE");
431
432 // Add header
433 packet->AddHeader (source);
434
435 // Log serialized packet contents
437
438 // Remove header
440 packet->RemoveHeader (destination);
441
442 // Log destination info
443 TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (destination,"DESTINATION");
444
445 // Check that the destination and source headers contain the same values
446 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
447
448 packet = 0;
449}
450
458{
459public:
461 virtual void DoRun (void);
462};
463
465 : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationCompleteTestCase")
466{
467}
468
469void
471{
472 packet = Create<Packet> ();
473 NS_LOG_DEBUG ("============= RrcConnectionReconfigurationCompleteTestCase ===========");
474
477
479 source.SetMessage (msg);
480
481 // Log source info
482 TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (source,"SOURCE");
483
484 // Add header
485 packet->AddHeader (source);
486
487 // Log serialized packet contents
489
490 // remove header
492 packet->RemoveHeader (destination);
493
494 // Log destination info
495 TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (destination,"DESTINATION");
496
497 // Check that the destination and source headers contain the same values
498 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
499
500 packet = 0;
501}
502
510{
511public:
513 virtual void DoRun (void);
514};
515
517 : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationTestCase")
518{
519}
520
521void
523{
524 packet = Create<Packet> ();
525 NS_LOG_DEBUG ("============= RrcConnectionReconfigurationTestCase ===========");
526
529
530 msg.haveMeasConfig = true;
531
535
536 msg.measConfig.haveMeasGapConfig = true;
537 msg.measConfig.measGapConfig.type = LteRrcSap::MeasGapConfig::SETUP;
538 msg.measConfig.measGapConfig.gapOffsetChoice = LteRrcSap::MeasGapConfig::GP0;
540
541 msg.measConfig.haveSmeasure = true;
542 msg.measConfig.sMeasure = 57;
543
545 msg.measConfig.speedStatePars.type = LteRrcSap::SpeedStatePars::SETUP;
552
553 msg.measConfig.measObjectToRemoveList.push_back (23);
554 msg.measConfig.measObjectToRemoveList.push_back (13);
555
556 msg.measConfig.reportConfigToRemoveList.push_back (7);
557 msg.measConfig.reportConfigToRemoveList.push_back (16);
558
559 msg.measConfig.measIdToRemoveList.push_back (4);
560 msg.measConfig.measIdToRemoveList.push_back (18);
561
562 // Set measObjectToAddModList
563 LteRrcSap::MeasObjectToAddMod measObjectToAddMod;
564 measObjectToAddMod.measObjectId = 3;
565 measObjectToAddMod.measObjectEutra.carrierFreq = 21;
566 measObjectToAddMod.measObjectEutra.allowedMeasBandwidth = 15;
567 measObjectToAddMod.measObjectEutra.presenceAntennaPort1 = true;
568 measObjectToAddMod.measObjectEutra.neighCellConfig = 3;
569 measObjectToAddMod.measObjectEutra.offsetFreq = -12;
570 measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (5);
571 measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (2);
572 measObjectToAddMod.measObjectEutra.blackCellsToRemoveList.push_back (1);
573 measObjectToAddMod.measObjectEutra.haveCellForWhichToReportCGI = true;
574 measObjectToAddMod.measObjectEutra.cellForWhichToReportCGI = 250;
575 LteRrcSap::CellsToAddMod cellsToAddMod;
576 cellsToAddMod.cellIndex = 20;
577 cellsToAddMod.physCellId = 14;
578 cellsToAddMod.cellIndividualOffset = 22;
579 measObjectToAddMod.measObjectEutra.cellsToAddModList.push_back (cellsToAddMod);
580 LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
581 blackCellsToAddMod.cellIndex = 18;
582 blackCellsToAddMod.physCellIdRange.start = 128;
583 blackCellsToAddMod.physCellIdRange.haveRange = true;
584 blackCellsToAddMod.physCellIdRange.range = 128;
585 measObjectToAddMod.measObjectEutra.blackCellsToAddModList.push_back (blackCellsToAddMod);
586 msg.measConfig.measObjectToAddModList.push_back (measObjectToAddMod);
587
588 // Set reportConfigToAddModList
589 LteRrcSap::ReportConfigToAddMod reportConfigToAddMod;
590 reportConfigToAddMod.reportConfigId = 22;
591 reportConfigToAddMod.reportConfigEutra.triggerType = LteRrcSap::ReportConfigEutra::EVENT;
592 reportConfigToAddMod.reportConfigEutra.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
593 reportConfigToAddMod.reportConfigEutra.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
594 reportConfigToAddMod.reportConfigEutra.threshold1.range = 15;
595 reportConfigToAddMod.reportConfigEutra.threshold2.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ;
596 reportConfigToAddMod.reportConfigEutra.threshold2.range = 10;
597 reportConfigToAddMod.reportConfigEutra.reportOnLeave = true;
598 reportConfigToAddMod.reportConfigEutra.a3Offset = -25;
599 reportConfigToAddMod.reportConfigEutra.hysteresis = 18;
600 reportConfigToAddMod.reportConfigEutra.timeToTrigger = 100;
601 reportConfigToAddMod.reportConfigEutra.purpose = LteRrcSap::ReportConfigEutra::REPORT_STRONGEST_CELLS;
602 reportConfigToAddMod.reportConfigEutra.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ;
603 reportConfigToAddMod.reportConfigEutra.reportQuantity = LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY;
604 reportConfigToAddMod.reportConfigEutra.maxReportCells = 5;
605 reportConfigToAddMod.reportConfigEutra.reportInterval = LteRrcSap::ReportConfigEutra::MIN60;
606 reportConfigToAddMod.reportConfigEutra.reportAmount = 16;
607 msg.measConfig.reportConfigToAddModList.push_back (reportConfigToAddMod);
608
609 // Set measIdToAddModList
610 LteRrcSap::MeasIdToAddMod measIdToAddMod,measIdToAddMod2;
611 measIdToAddMod.measId = 7;
612 measIdToAddMod.measObjectId = 6;
613 measIdToAddMod.reportConfigId = 5;
614 measIdToAddMod2.measId = 4;
615 measIdToAddMod2.measObjectId = 8;
616 measIdToAddMod2.reportConfigId = 12;
617 msg.measConfig.measIdToAddModList.push_back (measIdToAddMod);
618 msg.measConfig.measIdToAddModList.push_back (measIdToAddMod2);
619
620 msg.haveMobilityControlInfo = true;
635
637
639
640 msg.haveNonCriticalExtension = false; //Danilo
642 source.SetMessage (msg);
643
644 // Log source info
645 TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (source,"SOURCE");
646
647 // Add header
648 packet->AddHeader (source);
649
650 // Log serialized packet contents
652
653 // remove header
655 packet->RemoveHeader (destination);
656
657 // Log destination info
658 TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (destination,"DESTINATION");
659
660 // Check that the destination and source headers contain the same values
661 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
662 NS_TEST_ASSERT_MSG_EQ (source.GetHaveMeasConfig (),destination.GetHaveMeasConfig (), "GetHaveMeasConfig");
663 NS_TEST_ASSERT_MSG_EQ (source.GetHaveMobilityControlInfo (),destination.GetHaveMobilityControlInfo (), "GetHaveMobilityControlInfo");
664 NS_TEST_ASSERT_MSG_EQ (source.GetHaveRadioResourceConfigDedicated (),destination.GetHaveRadioResourceConfigDedicated (), "GetHaveRadioResourceConfigDedicated");
665
666 if ( source.GetHaveMobilityControlInfo () )
667 {
668 NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().targetPhysCellId,destination.GetMobilityControlInfo ().targetPhysCellId, "GetMobilityControlInfo().targetPhysCellId");
669 NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierFreq,destination.GetMobilityControlInfo ().haveCarrierFreq, "GetMobilityControlInfo().haveCarrierFreq");
670 NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierBandwidth,destination.GetMobilityControlInfo ().haveCarrierBandwidth, "GetMobilityControlInfo().haveCarrierBandwidth");
671 NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().newUeIdentity,destination.GetMobilityControlInfo ().newUeIdentity, "GetMobilityControlInfo().newUeIdentity");
672 NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveRachConfigDedicated,destination.GetMobilityControlInfo ().haveRachConfigDedicated, "GetMobilityControlInfo().haveRachConfigDedicated");
673
675 {
678 "GetMobilityControlInfo().carrierFreq.dlCarrierFreq");
681 "GetMobilityControlInfo().carrierFreq.ulCarrierFreq");
682 }
683
685 {
688 "GetMobilityControlInfo().carrierBandwidth.dlBandwidth");
691 "GetMobilityControlInfo().carrierBandwidth.ulBandwidth");
692 }
693
695 {
698 "GetMobilityControlInfo().rachConfigDedicated.raPreambleIndex");
701 "GetMobilityControlInfo().rachConfigDedicated.raPrachMaskIndex");
702 }
703 }
704
706 {
708 }
709
710 packet = 0;
711}
712
720{
721public:
723 virtual void DoRun (void);
724};
725
727{
728}
729
730void
732{
733 packet = Create<Packet> ();
734 NS_LOG_DEBUG ("============= HandoverPreparationInfoTestCase ===========");
735
738 msg.asConfig.sourceUeIdentity = 11;
742
747
753
758
760 source.SetMessage (msg);
761
762 // Log source info
763 TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (source,"SOURCE");
764
765 // Add header
766 packet->AddHeader (source);
767
768 // Log serialized packet contents
770
771 // remove header
773 packet->RemoveHeader (destination);
774
775 // Log destination info
776 TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (destination,"DESTINATION");
777
778 // Check that the destination and source headers contain the same values
780 NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceUeIdentity, destination.GetAsConfig ().sourceUeIdentity, "sourceUeIdentity");
787 NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceDlCarrierFreq, destination.GetAsConfig ().sourceDlCarrierFreq, "sourceDlCarrierFreq");
788
789 packet = 0;
790}
791
799{
800public:
802 virtual void DoRun (void);
803};
804
806{
807}
808
809void
811{
812 packet = Create<Packet> ();
813 NS_LOG_DEBUG ("============= RrcConnectionReestablishmentRequestTestCase ===========");
814
816 msg.ueIdentity.cRnti = 12;
817 msg.ueIdentity.physCellId = 21;
818 msg.reestablishmentCause = LteRrcSap::HANDOVER_FAILURE;
819
821 source.SetMessage (msg);
822
823 // Log source info
824 TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (source,"SOURCE");
825
826 // Add header
827 packet->AddHeader (source);
828
829 // Log serialized packet contents
831
832 // remove header
834 packet->RemoveHeader (destination);
835
836 // Log destination info
837 TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (destination,"DESTINATION");
838
839 // Check that the destination and source headers contain the same values
840 NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().cRnti, destination.GetUeIdentity ().cRnti, "cRnti");
841 NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().physCellId, destination.GetUeIdentity ().physCellId, "physCellId");
842 NS_TEST_ASSERT_MSG_EQ (source.GetReestablishmentCause (),destination.GetReestablishmentCause (), "ReestablishmentCause");
843
844 packet = 0;
845}
846
854{
855public:
857 virtual void DoRun (void);
858};
859
861{
862}
863
864void
866{
867 packet = Create<Packet> ();
868 NS_LOG_DEBUG ("============= RrcConnectionReestablishmentTestCase ===========");
869
873
875 source.SetMessage (msg);
876
877 // Log source info
878 TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (source,"SOURCE");
879
880 // Add header
881 packet->AddHeader (source);
882
883 // Log serialized packet contents
885
886 // remove header
888 packet->RemoveHeader (destination);
889
890 // Log destination info
891 TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (destination,"DESTINATION");
892
893 // Check that the destination and source headers contain the same values
894 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
896
897 packet = 0;
898}
899
907{
908public:
910 virtual void DoRun (void);
911};
912
914{
915}
916
917void
919{
920 packet = Create<Packet> ();
921 NS_LOG_DEBUG ("============= RrcConnectionReestablishmentCompleteTestCase ===========");
922
925
927 source.SetMessage (msg);
928
929 // Log source info
930 TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader> (source,"SOURCE");
931
932 // Add header
933 packet->AddHeader (source);
934
935 // Log serialized packet contents
937
938 // remove header
940 packet->RemoveHeader (destination);
941
942 // Log destination info
943 TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader> (destination,"DESTINATION");
944
945 // Check that the destination and source headers contain the same values
946 NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
947
948 packet = 0;
949}
950
958{
959public:
961 virtual void DoRun (void);
962};
963
965{
966}
967
968void
970{
971 packet = Create<Packet> ();
972 NS_LOG_DEBUG ("============= RrcConnectionRejectTestCase ===========");
973
975 msg.waitTime = 2;
976
978 source.SetMessage (msg);
979
980 // Log source info
981 TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (source,"SOURCE");
982
983 // Add header
984 packet->AddHeader (source);
985
986 // Log serialized packet contents
988
989 // remove header
990 RrcConnectionRejectHeader destination;
991 packet->RemoveHeader (destination);
992
993 // Log destination info
994 TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (destination,"DESTINATION");
995
996 // Check that the destination and source headers contain the same values
997 NS_TEST_ASSERT_MSG_EQ (source.GetMessage ().waitTime, destination.GetMessage ().waitTime, "Different waitTime!");
998
999 packet = 0;
1000}
1001
1009{
1010public:
1012 virtual void DoRun (void);
1013};
1014
1016{
1017}
1018
1019void
1021{
1022 packet = Create<Packet> ();
1023 NS_LOG_DEBUG ("============= MeasurementReportTestCase ===========");
1024
1026 msg.measResults.measId = 5;
1030
1032 mResEutra.physCellId = 9;
1033 mResEutra.haveRsrpResult = true;
1034 mResEutra.rsrpResult = 33;
1035 mResEutra.haveRsrqResult = true;
1036 mResEutra.rsrqResult = 22;
1037 mResEutra.haveCgiInfo = true;
1038 mResEutra.cgiInfo.plmnIdentity = 7;
1039 mResEutra.cgiInfo.cellIdentity = 6;
1040 mResEutra.cgiInfo.trackingAreaCode = 5;
1041 msg.measResults.measResultListEutra.push_back (mResEutra);
1042
1044
1046 source.SetMessage (msg);
1047
1048 // Log source info
1049 TestUtils::LogPacketInfo<MeasurementReportHeader> (source,"SOURCE");
1050
1051 // Add header
1052 packet->AddHeader (source);
1053
1054 // Log serialized packet contents
1056
1057 // remove header
1058 MeasurementReportHeader destination;
1059 packet->RemoveHeader (destination);
1060
1061 // Log destination info
1062 TestUtils::LogPacketInfo<MeasurementReportHeader> (destination,"DESTINATION");
1063
1064 // Check that the destination and source headers contain the same values
1065 LteRrcSap::MeasResults srcMeas = source.GetMessage ().measResults;
1066 LteRrcSap::MeasResults dstMeas = destination.GetMessage ().measResults;
1067
1068 NS_TEST_ASSERT_MSG_EQ (srcMeas.measId, dstMeas.measId, "Different measId!");
1069 NS_TEST_ASSERT_MSG_EQ (srcMeas.measResultPCell.rsrpResult, dstMeas.measResultPCell.rsrpResult, "Different rsrpResult!");
1070 NS_TEST_ASSERT_MSG_EQ (srcMeas.measResultPCell.rsrqResult, dstMeas.measResultPCell.rsrqResult, "Different rsrqResult!");
1071 NS_TEST_ASSERT_MSG_EQ (srcMeas.haveMeasResultNeighCells, dstMeas.haveMeasResultNeighCells, "Different haveMeasResultNeighCells!");
1072
1073 if (srcMeas.haveMeasResultNeighCells)
1074 {
1075 std::list<LteRrcSap::MeasResultEutra>::iterator itsrc = srcMeas.measResultListEutra.begin ();
1076 std::list<LteRrcSap::MeasResultEutra>::iterator itdst = dstMeas.measResultListEutra.begin ();
1077 for (; itsrc != srcMeas.measResultListEutra.end (); itsrc++, itdst++)
1078 {
1079 NS_TEST_ASSERT_MSG_EQ (itsrc->physCellId, itdst->physCellId, "Different physCellId!");
1080
1081 NS_TEST_ASSERT_MSG_EQ (itsrc->haveCgiInfo, itdst->haveCgiInfo, "Different haveCgiInfo!");
1082 if (itsrc->haveCgiInfo)
1083 {
1084 NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentity, itdst->cgiInfo.plmnIdentity, "Different cgiInfo.plmnIdentity!");
1085 NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.cellIdentity, itdst->cgiInfo.cellIdentity, "Different cgiInfo.cellIdentity!");
1086 NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.trackingAreaCode, itdst->cgiInfo.trackingAreaCode, "Different cgiInfo.trackingAreaCode!");
1087 NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentityList.size (), itdst->cgiInfo.plmnIdentityList.size (), "Different cgiInfo.plmnIdentityList.size()!");
1088
1089 if (!itsrc->cgiInfo.plmnIdentityList.empty ())
1090 {
1091 std::list<uint32_t>::iterator itsrc2 = itsrc->cgiInfo.plmnIdentityList.begin ();
1092 std::list<uint32_t>::iterator itdst2 = itdst->cgiInfo.plmnIdentityList.begin ();
1093 for (; itsrc2 != itsrc->cgiInfo.plmnIdentityList.begin (); itsrc2++, itdst2++)
1094 {
1095 NS_TEST_ASSERT_MSG_EQ (*itsrc2, *itdst2, "Different plmnId elements!");
1096 }
1097 }
1098 }
1099
1100 NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrpResult, itdst->haveRsrpResult, "Different haveRsrpResult!");
1101 if (itsrc->haveRsrpResult)
1102 {
1103 NS_TEST_ASSERT_MSG_EQ (itsrc->rsrpResult, itdst->rsrpResult, "Different rsrpResult!");
1104 }
1105
1106 NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrqResult, itdst->haveRsrqResult, "Different haveRsrqResult!");
1107 if (itsrc->haveRsrqResult)
1108 {
1109 NS_TEST_ASSERT_MSG_EQ (itsrc->rsrqResult, itdst->rsrqResult, "Different rsrqResult!");
1110 }
1111
1112 }
1113 }
1114
1115 packet = 0;
1116}
1117
1125{
1126public:
1128};
1129
1131 : TestSuite ("test-asn1-encoding", UNIT)
1132{
1133 NS_LOG_FUNCTION (this);
1134 AddTestCase (new RrcConnectionRequestTestCase (), TestCase::QUICK);
1135 AddTestCase (new RrcConnectionSetupTestCase (), TestCase::QUICK);
1136 AddTestCase (new RrcConnectionSetupCompleteTestCase (), TestCase::QUICK);
1138 AddTestCase (new RrcConnectionReconfigurationTestCase (), TestCase::QUICK);
1139 AddTestCase (new HandoverPreparationInfoTestCase (), TestCase::QUICK);
1141 AddTestCase (new RrcConnectionReestablishmentTestCase (), TestCase::QUICK);
1143 AddTestCase (new RrcConnectionRejectTestCase (), TestCase::QUICK);
1144 AddTestCase (new MeasurementReportTestCase (), TestCase::QUICK);
1145}
1146
1148
Asn1Encoding Test Suite.
Handover Preparation Info Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Measurement Report Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reconfiguration Complete Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reconfiguration Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Complete Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Request Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Reject Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Request Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Setup Complete Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Rrc Connection Setup Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class provides common functions to be inherited by the children TestCases.
LteRrcSap::RadioResourceConfigDedicated CreateRadioResourceConfigDedicated()
Create radio resource config dedicated.
RrcHeaderTestCase(std::string s)
Constructor.
Ptr< Packet > packet
the packet
void AssertEqualRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd1, LteRrcSap::RadioResourceConfigDedicated rrcd2)
Assert equal radio resource config dedicated.
virtual void DoRun(void)=0
Implementation to actually run this TestCase.
static void LogPacketContents(Ptr< Packet > pkt)
Function to log packet contents.
static void LogPacketInfo(T source, std::string s)
Function to log packet info.
static std::string sprintPacketContentsHex(Ptr< Packet > pkt)
Function to convert packet contents in hex format.
static std::string sprintPacketContentsBin(Ptr< Packet > pkt)
Function to convert packet contents in binary format.
This class manages the serialization/deserialization of HandoverPreparationInfo IE.
void SetMessage(LteRrcSap::HandoverPreparationInfo msg)
Receives a HandoverPreparationInfo IE and stores the contents into the class attributes.
LteRrcSap::AsConfig GetAsConfig() const
Getter for m_asConfig.
This class manages the serialization/deserialization of MeasurementReport IE.
LteRrcSap::MeasurementReport GetMessage() const
Returns a MeasurementReport IE from the values in the class attributes.
void SetMessage(LteRrcSap::MeasurementReport msg)
Receives a MeasurementReport IE and stores the contents into the class attributes.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:378
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:856
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE.
void SetMessage(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Receives a RrcConnectionReconfigurationCompleted IE and stores the contents into the class attributes...
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
This class manages the serialization/deserialization of RrcConnectionReconfiguration IE.
bool GetHaveMobilityControlInfo()
Getter for m_haveMobilityControlInfo.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated()
Getter for m_radioResourceConfigDedicated.
bool GetHaveMeasConfig()
Getter for m_haveMeasConfig.
bool GetHaveRadioResourceConfigDedicated()
Getter for m_haveRadioResourceConfigDedicated.
void SetMessage(LteRrcSap::RrcConnectionReconfiguration msg)
Receives a RrcConnectionReconfiguration IE and stores the contents into the class attributes.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
LteRrcSap::MobilityControlInfo GetMobilityControlInfo()
Getter for m_mobilityControlInfo.
This class manages the serialization/deserialization of RrcConnectionReestablishmentComplete IE.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier attribute.
This class manages the serialization/deserialization of RrcConnectionReestablishment IE.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier attribute.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated() const
Getter for m_radioResourceConfigDedicated attribute.
void SetMessage(LteRrcSap::RrcConnectionReestablishment msg)
Receives a RrcConnectionReestablishment IE and stores the contents into the class attributes.
This class manages the serialization/deserialization of RRCConnectionReestablishmentRequest IE.
LteRrcSap::ReestablishmentCause GetReestablishmentCause() const
Getter for m_reestablishmentCause.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Receives a RrcConnectionReestablishmentRequest IE and stores the contents into the class attributes.
LteRrcSap::ReestabUeIdentity GetUeIdentity() const
Getter for m_ueIdentity.
This class manages the serialization/deserialization of RrcConnectionReject IE.
LteRrcSap::RrcConnectionReject GetMessage() const
Returns a RrcConnectionReject IE from the values in the class attributes.
void SetMessage(LteRrcSap::RrcConnectionReject msg)
Receives a RrcConnectionReject IE and stores the contents into the class attributes.
This class manages the serialization/deserialization of RrcConnectionRequest IE.
std::bitset< 8 > GetMmec() const
Get MMEC attribute.
void SetMessage(LteRrcSap::RrcConnectionRequest msg)
Receives a RrcConnectionRequest IE and stores the contents into the class attributes.
std::bitset< 32 > GetMtmsi() const
Get M-TMSI attribute.
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE.
void SetMessage(LteRrcSap::RrcConnectionSetupCompleted msg)
Receives a RrcConnectionSetupCompleted IE and stores the contents into the class attributes.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
This class manages the serialization/deserialization of RrcConnectionSetup IE.
void SetMessage(LteRrcSap::RrcConnectionSetup msg)
Receives a RrcConnectionSetup IE and stores the contents into the class attributes.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated() const
Getter for m_radioResourceConfigDedicated.
encapsulates test code
Definition: test.h:994
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
A suite of tests to run.
Definition: test.h:1188
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition: test.h:141
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t transmissionMode
transmission mode
Definition: lte-rrc-sap.h:143
RadioResourceConfigDedicated sourceRadioResourceConfig
source radio resource config
Definition: lte-rrc-sap.h:618
MasterInformationBlock sourceMasterInformationBlock
source master information block
Definition: lte-rrc-sap.h:620
uint16_t sourceUeIdentity
source UE identity
Definition: lte-rrc-sap.h:619
MeasConfig sourceMeasConfig
source measure config
Definition: lte-rrc-sap.h:617
uint32_t sourceDlCarrierFreq
source DL carrier frequency
Definition: lte-rrc-sap.h:623
SystemInformationBlockType1 sourceSystemInformationBlockType1
source system information block type 1
Definition: lte-rrc-sap.h:621
SystemInformationBlockType2 sourceSystemInformationBlockType2
source system information block type 2
Definition: lte-rrc-sap.h:622
BlackCellsToAddMod structure.
Definition: lte-rrc-sap.h:319
PhysCellIdRange physCellIdRange
Phy cell ID range.
Definition: lte-rrc-sap.h:321
uint16_t dlBandwidth
DL bandwidth.
Definition: lte-rrc-sap.h:546
uint16_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:547
uint32_t dlCarrierFreq
DL carrier frequency.
Definition: lte-rrc-sap.h:539
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:540
CellsToAddMod structure.
Definition: lte-rrc-sap.h:303
int8_t cellIndividualOffset
cell individual offset
Definition: lte-rrc-sap.h:306
uint8_t cellIndex
cell index
Definition: lte-rrc-sap.h:304
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:305
uint32_t cellIdentity
cell identity
Definition: lte-rrc-sap.h:630
uint32_t plmnIdentity
PLMN identity.
Definition: lte-rrc-sap.h:629
uint16_t trackingAreaCode
tracking area code
Definition: lte-rrc-sap.h:631
DrbToAddMod structure.
Definition: lte-rrc-sap.h:236
uint8_t epsBearerIdentity
EPS bearer identity.
Definition: lte-rrc-sap.h:237
RlcConfig rlcConfig
RLC config.
Definition: lte-rrc-sap.h:239
uint8_t logicalChannelIdentity
logical channel identify
Definition: lte-rrc-sap.h:240
uint8_t drbIdentity
DRB identity.
Definition: lte-rrc-sap.h:238
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:241
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:90
uint16_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:91
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:896
LogicalChannelConfig structure.
Definition: lte-rrc-sap.h:109
uint16_t bucketSizeDurationMs
bucket size duration ms
Definition: lte-rrc-sap.h:112
uint16_t prioritizedBitRateKbps
prioritized bit rate Kbps
Definition: lte-rrc-sap.h:111
uint8_t logicalChannelGroup
logical channel group
Definition: lte-rrc-sap.h:113
uint16_t systemFrameNumber
system frame number
Definition: lte-rrc-sap.h:590
std::list< uint8_t > measIdToRemoveList
measure ID to remove list
Definition: lte-rrc-sap.h:524
uint8_t sMeasure
S measure.
Definition: lte-rrc-sap.h:531
std::list< MeasObjectToAddMod > measObjectToAddModList
measure object to add mod list
Definition: lte-rrc-sap.h:521
std::list< uint8_t > reportConfigToRemoveList
report config to remove list
Definition: lte-rrc-sap.h:522
std::list< uint8_t > measObjectToRemoveList
measure object to remove list
Definition: lte-rrc-sap.h:520
SpeedStatePars speedStatePars
speed state parameters
Definition: lte-rrc-sap.h:533
bool haveMeasGapConfig
have measure gap config?
Definition: lte-rrc-sap.h:528
QuantityConfig quantityConfig
quantity config
Definition: lte-rrc-sap.h:527
bool haveSmeasure
have S measure?
Definition: lte-rrc-sap.h:530
bool haveSpeedStatePars
have speed state parameters?
Definition: lte-rrc-sap.h:532
std::list< ReportConfigToAddMod > reportConfigToAddModList
report config to add mod list
Definition: lte-rrc-sap.h:523
MeasGapConfig measGapConfig
measure gap config
Definition: lte-rrc-sap.h:529
std::list< MeasIdToAddMod > measIdToAddModList
measure ID to add mod list
Definition: lte-rrc-sap.h:525
bool haveQuantityConfig
have quantity config?
Definition: lte-rrc-sap.h:526
enum ns3::LteRrcSap::MeasGapConfig::action type
action type
enum ns3::LteRrcSap::MeasGapConfig::gap gapOffsetChoice
gap offset
uint8_t gapOffsetValue
gap offset value
Definition: lte-rrc-sap.h:484
MeasIdToAddMod structure.
Definition: lte-rrc-sap.h:465
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:467
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:468
std::list< uint8_t > cellsToRemoveList
cells to remove list
Definition: lte-rrc-sap.h:332
bool haveCellForWhichToReportCGI
have cell for which to report CGI?
Definition: lte-rrc-sap.h:336
std::list< CellsToAddMod > cellsToAddModList
cells to add mod list
Definition: lte-rrc-sap.h:333
uint16_t allowedMeasBandwidth
allowed measure bandwidth
Definition: lte-rrc-sap.h:328
int8_t offsetFreq
offset frequency
Definition: lte-rrc-sap.h:331
uint8_t neighCellConfig
neighbor cell config
Definition: lte-rrc-sap.h:330
uint16_t cellForWhichToReportCGI
cell for which to report CGI
Definition: lte-rrc-sap.h:337
bool presenceAntennaPort1
antenna port 1 present?
Definition: lte-rrc-sap.h:329
std::list< uint8_t > blackCellsToRemoveList
black cells to remove list
Definition: lte-rrc-sap.h:334
std::list< BlackCellsToAddMod > blackCellsToAddModList
black cells to add mod list
Definition: lte-rrc-sap.h:335
uint32_t carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:327
MeasObjectToAddMod structure.
Definition: lte-rrc-sap.h:451
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:452
MeasObjectEutra measObjectEutra
measure object eutra
Definition: lte-rrc-sap.h:453
MeasResultEutra structure.
Definition: lte-rrc-sap.h:644
uint8_t rsrqResult
RSRQ result.
Definition: lte-rrc-sap.h:651
uint8_t rsrpResult
RSRP result.
Definition: lte-rrc-sap.h:649
bool haveRsrpResult
have RSRP result
Definition: lte-rrc-sap.h:648
bool haveRsrqResult
have RSRQ result?
Definition: lte-rrc-sap.h:650
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:645
bool haveCgiInfo
have CGI info?
Definition: lte-rrc-sap.h:646
uint8_t rsrqResult
the RSRQ result
Definition: lte-rrc-sap.h:639
uint8_t rsrpResult
the RSRP result
Definition: lte-rrc-sap.h:638
MeasResults structure.
Definition: lte-rrc-sap.h:680
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:681
bool haveMeasResultNeighCells
have measure result neighbor cells
Definition: lte-rrc-sap.h:683
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Definition: lte-rrc-sap.h:684
bool haveMeasResultServFreqList
has measResultServFreqList-r10
Definition: lte-rrc-sap.h:685
MeasResultPCell measResultPCell
measurement result primary cell
Definition: lte-rrc-sap.h:682
MeasurementReport structure.
Definition: lte-rrc-sap.h:902
MeasResults measResults
measure results
Definition: lte-rrc-sap.h:903
RadioResourceConfigCommon radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:566
RachConfigDedicated rachConfigDedicated
RACH config dedicated.
Definition: lte-rrc-sap.h:568
bool haveRachConfigDedicated
Have RACH config dedicated?
Definition: lte-rrc-sap.h:567
uint16_t newUeIdentity
new UE identity
Definition: lte-rrc-sap.h:565
bool haveCarrierBandwidth
have carrier bandwidth?
Definition: lte-rrc-sap.h:563
bool haveCarrierFreq
have carrier frequency?
Definition: lte-rrc-sap.h:561
CarrierBandwidthEutra carrierBandwidth
carrier bandwidth
Definition: lte-rrc-sap.h:564
CarrierFreqEutra carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:562
uint16_t targetPhysCellId
target Phy cell ID
Definition: lte-rrc-sap.h:560
uint8_t nCellChangeHigh
cell change high
Definition: lte-rrc-sap.h:493
uint8_t nCellChangeMedium
cell change medium
Definition: lte-rrc-sap.h:492
uint16_t start
starting cell ID
Definition: lte-rrc-sap.h:312
PhysicalConfigDedicated structure.
Definition: lte-rrc-sap.h:217
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-rrc-sap.h:223
bool haveAntennaInfoDedicated
have antenna info dedicated?
Definition: lte-rrc-sap.h:220
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
Definition: lte-rrc-sap.h:219
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
Definition: lte-rrc-sap.h:218
bool havePdschConfigDedicated
have PDSCH config dedicated?
Definition: lte-rrc-sap.h:222
AntennaInfoDedicated antennaInfo
antenna info
Definition: lte-rrc-sap.h:221
uint32_t plmnIdentity
PLMN identity.
Definition: lte-rrc-sap.h:68
uint8_t numberOfRaPreambles
number of RA preambles
Definition: lte-rrc-sap.h:247
uint8_t filterCoefficientRSRQ
filter coefficient RSRQ
Definition: lte-rrc-sap.h:298
uint8_t filterCoefficientRSRP
filter coefficient RSRP
Definition: lte-rrc-sap.h:297
uint8_t raResponseWindowSize
RA response window size.
Definition: lte-rrc-sap.h:254
uint8_t preambleTransMax
preamble transmit maximum
Definition: lte-rrc-sap.h:253
PreambleInfo preambleInfo
preamble info
Definition: lte-rrc-sap.h:266
RaSupervisionInfo raSupervisionInfo
RA supervision info.
Definition: lte-rrc-sap.h:267
uint8_t raPreambleIndex
RA preamble index.
Definition: lte-rrc-sap.h:553
uint8_t raPrachMaskIndex
RA PRACH mask index.
Definition: lte-rrc-sap.h:554
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:274
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:280
RadioResourceConfigDedicated structure.
Definition: lte-rrc-sap.h:286
PhysicalConfigDedicated physicalConfigDedicated
physical config dedicated
Definition: lte-rrc-sap.h:291
std::list< uint8_t > drbToReleaseList
DRB to release list.
Definition: lte-rrc-sap.h:289
bool havePhysicalConfigDedicated
have physical config dedicated?
Definition: lte-rrc-sap.h:290
std::list< DrbToAddMod > drbToAddModList
DRB to add mod list.
Definition: lte-rrc-sap.h:288
std::list< SrbToAddMod > srbToAddModList
SRB to add mod list.
Definition: lte-rrc-sap.h:287
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:575
bool reportOnLeave
Indicates whether or not the UE shall initiate the measurement reporting procedure when the leaving c...
Definition: lte-rrc-sap.h:385
uint8_t maxReportCells
Maximum number of cells, excluding the serving cell, to be included in the measurement report.
Definition: lte-rrc-sap.h:418
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition....
Definition: lte-rrc-sap.h:391
enum ns3::LteRrcSap::ReportConfigEutra::@68 reportInterval
Report interval enumeration.
uint8_t reportAmount
Number of measurement reports applicable, always assumed to be infinite.
Definition: lte-rrc-sap.h:442
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:382
enum ns3::LteRrcSap::ReportConfigEutra::@64 triggerType
Trigger enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@67 reportQuantity
Report type enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:381
enum ns3::LteRrcSap::ReportConfigEutra::report purpose
purpose
int8_t a3Offset
Offset value for Event A3. An integer between -30 and 30. The actual value is (value * 0....
Definition: lte-rrc-sap.h:388
uint16_t timeToTrigger
Time during which specific criteria for the event needs to be met in order to trigger a measurement r...
Definition: lte-rrc-sap.h:394
ReportConfigToAddMod structure.
Definition: lte-rrc-sap.h:458
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:459
ReportConfigEutra reportConfigEutra
report config eutra
Definition: lte-rrc-sap.h:460
RlcConfig structure.
Definition: lte-rrc-sap.h:96
enum ns3::LteRrcSap::RlcConfig::direction choice
direction choice
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:852
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:853
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:837
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:838
bool haveMobilityControlInfo
have mobility control info
Definition: lte-rrc-sap.h:841
bool haveRadioResourceConfigDedicated
have radio resource config dedicated
Definition: lte-rrc-sap.h:843
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:844
bool haveNonCriticalExtension
have critical extension?
Definition: lte-rrc-sap.h:845
MobilityControlInfo mobilityControlInfo
mobility control info
Definition: lte-rrc-sap.h:842
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:873
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:874
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:866
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:868
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:867
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:859
ReestablishmentCause reestablishmentCause
reestablishment cause
Definition: lte-rrc-sap.h:861
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:890
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:693
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:706
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:707
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:699
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:700
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:701
enum ns3::LteRrcSap::SoundingRsUlConfigDedicated::action type
action type
uint16_t srsConfigIndex
SRS config index.
Definition: lte-rrc-sap.h:137
SpeedStateScaleFactors timeToTriggerSf
time to trigger scale factors
Definition: lte-rrc-sap.h:514
MobilityStateParameters mobilityStateParameters
mobility state parameters
Definition: lte-rrc-sap.h:513
enum ns3::LteRrcSap::SpeedStatePars::action type
action type
uint8_t sfHigh
scale factor high
Definition: lte-rrc-sap.h:501
uint8_t sfMedium
scale factor medium
Definition: lte-rrc-sap.h:500
SrbToAddMod structure.
Definition: lte-rrc-sap.h:229
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:231
uint8_t srbIdentity
SB identity.
Definition: lte-rrc-sap.h:230
CellAccessRelatedInfo cellAccessRelatedInfo
cell access related info
Definition: lte-rrc-sap.h:596
RadioResourceConfigCommonSib radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:603
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:357
enum ns3::LteRrcSap::ThresholdEutra::@63 choice
Threshold enumeration.
Asn1EncodingSuite asn1EncodingSuite