A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
test-asn1-encoding.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Lluis Parcerisa <lparcerisa@cttc.cat>
18 */
19
20#include "ns3/boolean.h"
21#include "ns3/double.h"
22#include "ns3/enum.h"
23#include "ns3/log.h"
24#include "ns3/lte-rrc-header.h"
25#include "ns3/lte-rrc-sap.h"
26#include "ns3/packet.h"
27#include "ns3/ptr.h"
28#include "ns3/string.h"
29#include "ns3/test.h"
30
31#include <iomanip>
32#include <vector>
33
34using namespace ns3;
35
36NS_LOG_COMPONENT_DEFINE("Asn1EncodingTest");
37
38/**
39 * \ingroup lte-test
40 *
41 * \brief Contains ASN encoding test utility functions.
42 */
44{
45 public:
46 /**
47 * Function to convert packet contents in hex format
48 * \param pkt the packet
49 * \returns the text string
50 */
51 static std::string sprintPacketContentsHex(Ptr<Packet> pkt)
52 {
53 std::vector<uint8_t> buffer(pkt->GetSize());
54 std::ostringstream oss(std::ostringstream::out);
55 pkt->CopyData(buffer.data(), buffer.size());
56 for (auto b : buffer)
57 {
58 oss << std::setfill('0') << std::setw(2) << std::hex << +b << " ";
59 }
60 return std::string(oss.str() + "\n");
61 }
62
63 /**
64 * Function to convert packet contents in binary format
65 * \param pkt the packet
66 * \returns the text string
67 */
68 static std::string sprintPacketContentsBin(Ptr<Packet> pkt)
69 {
70 std::vector<uint8_t> buffer(pkt->GetSize());
71 std::ostringstream oss(std::ostringstream::out);
72 pkt->CopyData(buffer.data(), buffer.size());
73 for (auto b : buffer)
74 {
75 oss << (std::bitset<8>(b));
76 }
77 return std::string(oss.str() + "\n");
78 }
79
80 /**
81 * Function to log packet contents
82 * \param pkt the packet
83 */
85 {
86 NS_LOG_DEBUG("---- SERIALIZED PACKET CONTENTS (HEX): -------");
89 }
90
91 /**
92 * Function to log packet info
93 * \param source T
94 * \param s the string
95 */
96 template <class T>
97 static void LogPacketInfo(T source, std::string s)
98 {
99 NS_LOG_DEBUG("--------- " << s.data() << " INFO: -------");
100 std::ostringstream oss(std::ostringstream::out);
101 source.Print(oss);
102 NS_LOG_DEBUG(oss.str());
103 }
104};
105
106// --------------------------- CLASS RrcHeaderTestCase -----------------------------
107/**
108 * \ingroup lte-test
109 *
110 * \brief This class provides common functions to be inherited
111 * by the children TestCases
112 */
114{
115 public:
116 /**
117 * Constructor
118 * \param s the reference name
119 */
120 RrcHeaderTestCase(std::string s);
121 void DoRun() override = 0;
122 /**
123 * \brief Create radio resource config dedicated
124 * \returns LteRrcSap::RadioResourceConfigDedicated
125 */
127 /**
128 * \brief Assert equal radio resource config dedicated
129 * \param rrcd1 LteRrcSap::RadioResourceConfigDedicated # 1
130 * \param rrcd2 LteRrcSap::RadioResourceConfigDedicated # 2
131 */
134
135 protected:
136 Ptr<Packet> packet; ///< the packet
137};
138
140 : TestCase(s)
141{
142}
143
146{
148
149 rrd.drbToReleaseList = std::list<uint8_t>(4, 2);
150
151 LteRrcSap::SrbToAddMod srbToAddMod;
152 srbToAddMod.srbIdentity = 2;
153
154 LteRrcSap::LogicalChannelConfig logicalChannelConfig;
155 logicalChannelConfig.priority = 9;
156 logicalChannelConfig.prioritizedBitRateKbps = 128;
157 logicalChannelConfig.bucketSizeDurationMs = 100;
158 logicalChannelConfig.logicalChannelGroup = 3;
159 srbToAddMod.logicalChannelConfig = logicalChannelConfig;
160
161 rrd.srbToAddModList.insert(rrd.srbToAddModList.begin(), srbToAddMod);
162
163 LteRrcSap::DrbToAddMod drbToAddMod;
164 drbToAddMod.epsBearerIdentity = 1;
165 drbToAddMod.drbIdentity = 1;
166 drbToAddMod.logicalChannelIdentity = 5;
167 LteRrcSap::RlcConfig rlcConfig;
169 drbToAddMod.rlcConfig = rlcConfig;
170
171 LteRrcSap::LogicalChannelConfig logicalChannelConfig2;
172 logicalChannelConfig2.priority = 7;
173 logicalChannelConfig2.prioritizedBitRateKbps = 256;
174 logicalChannelConfig2.bucketSizeDurationMs = 50;
175 logicalChannelConfig2.logicalChannelGroup = 2;
176 drbToAddMod.logicalChannelConfig = logicalChannelConfig2;
177
178 rrd.drbToAddModList.insert(rrd.drbToAddModList.begin(), drbToAddMod);
179
181 LteRrcSap::PhysicalConfigDedicated physicalConfigDedicated;
182 physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true;
183 physicalConfigDedicated.soundingRsUlConfigDedicated.type =
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;
193
194 rrd.physicalConfigDedicated = physicalConfigDedicated;
195
196 return rrd;
197}
198
199void
203{
205 rrcd2.srbToAddModList.size(),
206 "SrbToAddModList different sizes");
207
208 std::list<LteRrcSap::SrbToAddMod> srcSrbToAddModList = rrcd1.srbToAddModList;
209 auto it1 = srcSrbToAddModList.begin();
210 std::list<LteRrcSap::SrbToAddMod> dstSrbToAddModList = rrcd2.srbToAddModList;
211 auto it2 = dstSrbToAddModList.begin();
212
213 for (; it1 != srcSrbToAddModList.end(); it1++, it2++)
214 {
215 NS_TEST_ASSERT_MSG_EQ(it1->srbIdentity, it2->srbIdentity, "srbIdentity");
216 NS_TEST_ASSERT_MSG_EQ(it1->logicalChannelConfig.priority,
217 it2->logicalChannelConfig.priority,
218 "logicalChannelConfig.priority");
219 NS_TEST_ASSERT_MSG_EQ(it1->logicalChannelConfig.prioritizedBitRateKbps,
220 it2->logicalChannelConfig.prioritizedBitRateKbps,
221 "logicalChannelConfig.prioritizedBitRateKbps");
222 NS_TEST_ASSERT_MSG_EQ(it1->logicalChannelConfig.bucketSizeDurationMs,
223 it2->logicalChannelConfig.bucketSizeDurationMs,
224 "logicalChannelConfig.bucketSizeDurationMs");
225 NS_TEST_ASSERT_MSG_EQ(it1->logicalChannelConfig.logicalChannelGroup,
226 it2->logicalChannelConfig.logicalChannelGroup,
227 "logicalChannelConfig.logicalChannelGroup");
228 }
229
231 rrcd2.drbToAddModList.size(),
232 "DrbToAddModList different sizes");
233
234 std::list<LteRrcSap::DrbToAddMod> srcDrbToAddModList = rrcd1.drbToAddModList;
235 auto it3 = srcDrbToAddModList.begin();
236 std::list<LteRrcSap::DrbToAddMod> dstDrbToAddModList = rrcd2.drbToAddModList;
237 auto it4 = dstDrbToAddModList.begin();
238
239 for (; it3 != srcDrbToAddModList.end(); it3++, it4++)
240 {
241 NS_TEST_ASSERT_MSG_EQ(it3->epsBearerIdentity, it4->epsBearerIdentity, "epsBearerIdentity");
242 NS_TEST_ASSERT_MSG_EQ(it3->drbIdentity, it4->drbIdentity, "drbIdentity");
243 NS_TEST_ASSERT_MSG_EQ(it3->rlcConfig.choice, it4->rlcConfig.choice, "rlcConfig.choice");
244 NS_TEST_ASSERT_MSG_EQ(it3->logicalChannelIdentity,
245 it4->logicalChannelIdentity,
246 "logicalChannelIdentity");
247 NS_TEST_ASSERT_MSG_EQ(it3->epsBearerIdentity, it4->epsBearerIdentity, "epsBearerIdentity");
248
249 NS_TEST_ASSERT_MSG_EQ(it3->logicalChannelConfig.priority,
250 it4->logicalChannelConfig.priority,
251 "logicalChannelConfig.priority");
252 NS_TEST_ASSERT_MSG_EQ(it3->logicalChannelConfig.prioritizedBitRateKbps,
253 it4->logicalChannelConfig.prioritizedBitRateKbps,
254 "logicalChannelConfig.prioritizedBitRateKbps");
255 NS_TEST_ASSERT_MSG_EQ(it3->logicalChannelConfig.bucketSizeDurationMs,
256 it4->logicalChannelConfig.bucketSizeDurationMs,
257 "logicalChannelConfig.bucketSizeDurationMs");
258 NS_TEST_ASSERT_MSG_EQ(it3->logicalChannelConfig.logicalChannelGroup,
259 it4->logicalChannelConfig.logicalChannelGroup,
260 "logicalChannelConfig.logicalChannelGroup");
261 }
262
264 rrcd2.drbToReleaseList.size(),
265 "DrbToReleaseList different sizes");
266
267 std::list<uint8_t> srcDrbToReleaseList = rrcd1.drbToReleaseList;
268 std::list<uint8_t> dstDrbToReleaseList = rrcd2.drbToReleaseList;
269 auto it5 = srcDrbToReleaseList.begin();
270 auto it6 = dstDrbToReleaseList.begin();
271
272 for (; it5 != srcDrbToReleaseList.end(); it5++, it6++)
273 {
274 NS_TEST_ASSERT_MSG_EQ(*it5, *it6, "element != in DrbToReleaseList");
275 }
276
279 "HavePhysicalConfigDedicated");
280
282 {
285 "haveSoundingRsUlConfigDedicated");
286
289 "soundingRsUlConfigDedicated.type");
293 "soundingRsUlConfigDedicated.srsBandwidth");
294
298 "soundingRsUlConfigDedicated.srsConfigIndex");
299
302 "haveAntennaInfoDedicated");
303
305 {
308 "antennaInfo.transmissionMode");
309 }
310
313 "havePdschConfigDedicated");
314
316 {
319 "pdschConfigDedicated.pa");
320 }
321 }
322}
323
324/**
325 * \ingroup lte-test
326 *
327 * \brief Rrc Connection Request Test Case
328 */
330{
331 public:
333 void DoRun() override;
334};
335
337 : RrcHeaderTestCase("Testing RrcConnectionRequest")
338{
339}
340
341void
343{
344 packet = Create<Packet>();
345 NS_LOG_DEBUG("============= RrcConnectionRequestTestCase ===========");
346
348 msg.ueIdentity = 0x83fecafecaULL;
349
351 source.SetMessage(msg);
352
353 // Log source info
354 TestUtils::LogPacketInfo<RrcConnectionRequestHeader>(source, "SOURCE");
355
356 // Add header
357 packet->AddHeader(source);
358
359 // Log serialized packet contents
361
362 // Remove header
363 RrcConnectionRequestHeader destination;
364 packet->RemoveHeader(destination);
365
366 // Log destination info
367 TestUtils::LogPacketInfo<RrcConnectionRequestHeader>(destination, "DESTINATION");
368
369 // Check that the destination and source headers contain the same values
370 NS_TEST_ASSERT_MSG_EQ(source.GetMmec(), destination.GetMmec(), "Different m_mmec!");
371 NS_TEST_ASSERT_MSG_EQ(source.GetMtmsi(), destination.GetMtmsi(), "Different m_mTmsi!");
372
373 packet = nullptr;
374}
375
376/**
377 * \ingroup lte-test
378 *
379 * \brief Rrc Connection Setup Test Case
380 */
382{
383 public:
385 void DoRun() override;
386};
387
389 : RrcHeaderTestCase("Testing RrcConnectionSetupTestCase")
390{
391}
392
393void
395{
396 packet = Create<Packet>();
397 NS_LOG_DEBUG("============= RrcConnectionSetupTestCase ===========");
398
402
404 source.SetMessage(msg);
405
406 // Log source info
407 TestUtils::LogPacketInfo<RrcConnectionSetupHeader>(source, "SOURCE");
408
409 // Add header
410 packet->AddHeader(source);
411
412 // Log serialized packet contents
414
415 // remove header
416 RrcConnectionSetupHeader destination;
417 packet->RemoveHeader(destination);
418
419 // Log destination info
420 TestUtils::LogPacketInfo<RrcConnectionSetupHeader>(destination, "DESTINATION");
421
422 // Check that the destination and source headers contain the same values
424 destination.GetRrcTransactionIdentifier(),
425 "RrcTransactionIdentifier");
426
428 destination.GetRadioResourceConfigDedicated());
429
430 packet = nullptr;
431}
432
433/**
434 * \ingroup lte-test
435 *
436 * \brief Rrc Connection Setup Complete Test Case
437 */
439{
440 public:
442 void DoRun() override;
443};
444
446 : RrcHeaderTestCase("Testing RrcConnectionSetupCompleteTestCase")
447{
448}
449
450void
452{
453 packet = Create<Packet>();
454 NS_LOG_DEBUG("============= RrcConnectionSetupCompleteTestCase ===========");
455
458
460 source.SetMessage(msg);
461
462 // Log source info
463 TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader>(source, "SOURCE");
464
465 // Add header
466 packet->AddHeader(source);
467
468 // Log serialized packet contents
470
471 // Remove header
473 packet->RemoveHeader(destination);
474
475 // Log destination info
476 TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader>(destination, "DESTINATION");
477
478 // Check that the destination and source headers contain the same values
480 destination.GetRrcTransactionIdentifier(),
481 "RrcTransactionIdentifier");
482
483 packet = nullptr;
484}
485
486/**
487 * \ingroup lte-test
488 *
489 * \brief Rrc Connection Reconfiguration Complete Test Case
490 */
492{
493 public:
495 void DoRun() override;
496};
497
499 : RrcHeaderTestCase("Testing RrcConnectionReconfigurationCompleteTestCase")
500{
501}
502
503void
505{
506 packet = Create<Packet>();
507 NS_LOG_DEBUG("============= RrcConnectionReconfigurationCompleteTestCase ===========");
508
511
513 source.SetMessage(msg);
514
515 // Log source info
516 TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader>(source, "SOURCE");
517
518 // Add header
519 packet->AddHeader(source);
520
521 // Log serialized packet contents
523
524 // remove header
526 packet->RemoveHeader(destination);
527
528 // Log destination info
529 TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader>(destination,
530 "DESTINATION");
531
532 // Check that the destination and source headers contain the same values
534 destination.GetRrcTransactionIdentifier(),
535 "RrcTransactionIdentifier");
536
537 packet = nullptr;
538}
539
540/**
541 * \ingroup lte-test
542 *
543 * \brief Rrc Connection Reconfiguration Test Case
544 */
546{
547 public:
549 void DoRun() override;
550};
551
553 : RrcHeaderTestCase("Testing RrcConnectionReconfigurationTestCase")
554{
555}
556
557void
559{
560 packet = Create<Packet>();
561 NS_LOG_DEBUG("============= RrcConnectionReconfigurationTestCase ===========");
562
565
566 msg.haveMeasConfig = true;
567
571
572 msg.measConfig.haveMeasGapConfig = true;
576
577 msg.measConfig.haveSmeasure = true;
578 msg.measConfig.sMeasure = 57;
579
588
589 msg.measConfig.measObjectToRemoveList.push_back(23);
590 msg.measConfig.measObjectToRemoveList.push_back(13);
591
592 msg.measConfig.reportConfigToRemoveList.push_back(7);
593 msg.measConfig.reportConfigToRemoveList.push_back(16);
594
595 msg.measConfig.measIdToRemoveList.push_back(4);
596 msg.measConfig.measIdToRemoveList.push_back(18);
597
598 // Set measObjectToAddModList
599 LteRrcSap::MeasObjectToAddMod measObjectToAddMod;
600 measObjectToAddMod.measObjectId = 3;
601 measObjectToAddMod.measObjectEutra.carrierFreq = 21;
602 measObjectToAddMod.measObjectEutra.allowedMeasBandwidth = 15;
603 measObjectToAddMod.measObjectEutra.presenceAntennaPort1 = true;
604 measObjectToAddMod.measObjectEutra.neighCellConfig = 3;
605 measObjectToAddMod.measObjectEutra.offsetFreq = -12;
606 measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back(5);
607 measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back(2);
608 measObjectToAddMod.measObjectEutra.blackCellsToRemoveList.push_back(1);
609 measObjectToAddMod.measObjectEutra.haveCellForWhichToReportCGI = true;
610 measObjectToAddMod.measObjectEutra.cellForWhichToReportCGI = 250;
611 LteRrcSap::CellsToAddMod cellsToAddMod;
612 cellsToAddMod.cellIndex = 20;
613 cellsToAddMod.physCellId = 14;
614 cellsToAddMod.cellIndividualOffset = 22;
615 measObjectToAddMod.measObjectEutra.cellsToAddModList.push_back(cellsToAddMod);
616 LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
617 blackCellsToAddMod.cellIndex = 18;
618 blackCellsToAddMod.physCellIdRange.start = 128;
619 blackCellsToAddMod.physCellIdRange.haveRange = true;
620 blackCellsToAddMod.physCellIdRange.range = 128;
621 measObjectToAddMod.measObjectEutra.blackCellsToAddModList.push_back(blackCellsToAddMod);
622 msg.measConfig.measObjectToAddModList.push_back(measObjectToAddMod);
623
624 // Set reportConfigToAddModList
625 LteRrcSap::ReportConfigToAddMod reportConfigToAddMod;
626 reportConfigToAddMod.reportConfigId = 22;
629 reportConfigToAddMod.reportConfigEutra.threshold1.choice =
631 reportConfigToAddMod.reportConfigEutra.threshold1.range = 15;
632 reportConfigToAddMod.reportConfigEutra.threshold2.choice =
634 reportConfigToAddMod.reportConfigEutra.threshold2.range = 10;
635 reportConfigToAddMod.reportConfigEutra.reportOnLeave = true;
636 reportConfigToAddMod.reportConfigEutra.a3Offset = -25;
637 reportConfigToAddMod.reportConfigEutra.hysteresis = 18;
638 reportConfigToAddMod.reportConfigEutra.timeToTrigger = 100;
639 reportConfigToAddMod.reportConfigEutra.purpose =
642 reportConfigToAddMod.reportConfigEutra.reportQuantity =
644 reportConfigToAddMod.reportConfigEutra.maxReportCells = 5;
646 reportConfigToAddMod.reportConfigEutra.reportAmount = 16;
647 msg.measConfig.reportConfigToAddModList.push_back(reportConfigToAddMod);
648
649 // Set measIdToAddModList
650 LteRrcSap::MeasIdToAddMod measIdToAddMod;
651 LteRrcSap::MeasIdToAddMod measIdToAddMod2;
652 measIdToAddMod.measId = 7;
653 measIdToAddMod.measObjectId = 6;
654 measIdToAddMod.reportConfigId = 5;
655 measIdToAddMod2.measId = 4;
656 measIdToAddMod2.measObjectId = 8;
657 measIdToAddMod2.reportConfigId = 12;
658 msg.measConfig.measIdToAddModList.push_back(measIdToAddMod);
659 msg.measConfig.measIdToAddModList.push_back(measIdToAddMod2);
660
661 msg.haveMobilityControlInfo = true;
676 .preambleTransMax = 3;
679
681
683
684 msg.haveNonCriticalExtension = false; // Danilo
686 source.SetMessage(msg);
687
688 // Log source info
689 TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader>(source, "SOURCE");
690
691 // Add header
692 packet->AddHeader(source);
693
694 // Log serialized packet contents
696
697 // remove header
699 packet->RemoveHeader(destination);
700
701 // Log destination info
702 TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader>(destination, "DESTINATION");
703
704 // Check that the destination and source headers contain the same values
706 destination.GetRrcTransactionIdentifier(),
707 "RrcTransactionIdentifier");
709 destination.GetHaveMeasConfig(),
710 "GetHaveMeasConfig");
712 destination.GetHaveMobilityControlInfo(),
713 "GetHaveMobilityControlInfo");
716 "GetHaveRadioResourceConfigDedicated");
717
718 if (source.GetHaveMobilityControlInfo())
719 {
722 "GetMobilityControlInfo().targetPhysCellId");
725 "GetMobilityControlInfo().haveCarrierFreq");
728 "GetMobilityControlInfo().haveCarrierBandwidth");
731 "GetMobilityControlInfo().newUeIdentity");
734 "GetMobilityControlInfo().haveRachConfigDedicated");
735
737 {
740 "GetMobilityControlInfo().carrierFreq.dlCarrierFreq");
743 "GetMobilityControlInfo().carrierFreq.ulCarrierFreq");
744 }
745
747 {
750 "GetMobilityControlInfo().carrierBandwidth.dlBandwidth");
753 "GetMobilityControlInfo().carrierBandwidth.ulBandwidth");
754 }
755
757 {
761 "GetMobilityControlInfo().rachConfigDedicated.raPreambleIndex");
765 "GetMobilityControlInfo().rachConfigDedicated.raPrachMaskIndex");
766 }
767 }
768
770 {
772 destination.GetRadioResourceConfigDedicated());
773 }
774
775 packet = nullptr;
776}
777
778/**
779 * \ingroup lte-test
780 *
781 * \brief Handover Preparation Info Test Case
782 */
784{
785 public:
787 void DoRun() override;
788};
789
791 : RrcHeaderTestCase("Testing HandoverPreparationInfoTestCase")
792{
793}
794
795void
797{
798 packet = Create<Packet>();
799 NS_LOG_DEBUG("============= HandoverPreparationInfoTestCase ===========");
800
803 msg.asConfig.sourceUeIdentity = 11;
807
812 .plmnIdentity = 123;
813
822
827
829 source.SetMessage(msg);
830
831 // Log source info
832 TestUtils::LogPacketInfo<HandoverPreparationInfoHeader>(source, "SOURCE");
833
834 // Add header
835 packet->AddHeader(source);
836
837 // Log serialized packet contents
839
840 // remove header
842 packet->RemoveHeader(destination);
843
844 // Log destination info
845 TestUtils::LogPacketInfo<HandoverPreparationInfoHeader>(destination, "DESTINATION");
846
847 // Check that the destination and source headers contain the same values
851 destination.GetAsConfig().sourceUeIdentity,
852 "sourceUeIdentity");
855 "dlBandwidth");
858 "systemFrameNumber");
860 source.GetAsConfig()
862 destination.GetAsConfig()
864 "plmnIdentity");
867 destination.GetAsConfig()
869 "csgIndication");
872 destination.GetAsConfig()
874 "cellIdentity");
877 destination.GetAsConfig()
879 "csgIdentity");
881 destination.GetAsConfig().sourceDlCarrierFreq,
882 "sourceDlCarrierFreq");
883
884 packet = nullptr;
885}
886
887/**
888 * \ingroup lte-test
889 *
890 * \brief Rrc Connection Reestablishment Request Test Case
891 */
893{
894 public:
896 void DoRun() override;
897};
898
900 : RrcHeaderTestCase("Testing RrcConnectionReestablishmentRequestTestCase")
901{
902}
903
904void
906{
907 packet = Create<Packet>();
908 NS_LOG_DEBUG("============= RrcConnectionReestablishmentRequestTestCase ===========");
909
911 msg.ueIdentity.cRnti = 12;
912 msg.ueIdentity.physCellId = 21;
914
916 source.SetMessage(msg);
917
918 // Log source info
919 TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader>(source, "SOURCE");
920
921 // Add header
922 packet->AddHeader(source);
923
924 // Log serialized packet contents
926
927 // remove header
929 packet->RemoveHeader(destination);
930
931 // Log destination info
932 TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader>(destination, "DESTINATION");
933
934 // Check that the destination and source headers contain the same values
935 NS_TEST_ASSERT_MSG_EQ(source.GetUeIdentity().cRnti, destination.GetUeIdentity().cRnti, "cRnti");
937 destination.GetUeIdentity().physCellId,
938 "physCellId");
940 destination.GetReestablishmentCause(),
941 "ReestablishmentCause");
942
943 packet = nullptr;
944}
945
946/**
947 * \ingroup lte-test
948 *
949 * \brief Rrc Connection Reestablishment Test Case
950 */
952{
953 public:
955 void DoRun() override;
956};
957
959 : RrcHeaderTestCase("Testing RrcConnectionReestablishmentTestCase")
960{
961}
962
963void
965{
966 packet = Create<Packet>();
967 NS_LOG_DEBUG("============= RrcConnectionReestablishmentTestCase ===========");
968
972
974 source.SetMessage(msg);
975
976 // Log source info
977 TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader>(source, "SOURCE");
978
979 // Add header
980 packet->AddHeader(source);
981
982 // Log serialized packet contents
984
985 // remove header
987 packet->RemoveHeader(destination);
988
989 // Log destination info
990 TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader>(destination, "DESTINATION");
991
992 // Check that the destination and source headers contain the same values
994 destination.GetRrcTransactionIdentifier(),
995 "rrcTransactionIdentifier");
997 destination.GetRadioResourceConfigDedicated());
998
999 packet = nullptr;
1000}
1001
1002/**
1003 * \ingroup lte-test
1004 *
1005 * \brief Rrc Connection Reestablishment Complete Test Case
1006 */
1008{
1009 public:
1011 void DoRun() override;
1012};
1013
1015 : RrcHeaderTestCase("Testing RrcConnectionReestablishmentCompleteTestCase")
1016{
1017}
1018
1019void
1021{
1022 packet = Create<Packet>();
1023 NS_LOG_DEBUG("============= RrcConnectionReestablishmentCompleteTestCase ===========");
1024
1027
1029 source.SetMessage(msg);
1030
1031 // Log source info
1032 TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader>(source, "SOURCE");
1033
1034 // Add header
1035 packet->AddHeader(source);
1036
1037 // Log serialized packet contents
1039
1040 // remove header
1042 packet->RemoveHeader(destination);
1043
1044 // Log destination info
1045 TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader>(destination,
1046 "DESTINATION");
1047
1048 // Check that the destination and source headers contain the same values
1050 destination.GetRrcTransactionIdentifier(),
1051 "rrcTransactionIdentifier");
1052
1053 packet = nullptr;
1054}
1055
1056/**
1057 * \ingroup lte-test
1058 *
1059 * \brief Rrc Connection Reject Test Case
1060 */
1062{
1063 public:
1065 void DoRun() override;
1066};
1067
1069 : RrcHeaderTestCase("Testing RrcConnectionRejectTestCase")
1070{
1071}
1072
1073void
1075{
1076 packet = Create<Packet>();
1077 NS_LOG_DEBUG("============= RrcConnectionRejectTestCase ===========");
1078
1080 msg.waitTime = 2;
1081
1083 source.SetMessage(msg);
1084
1085 // Log source info
1086 TestUtils::LogPacketInfo<RrcConnectionRejectHeader>(source, "SOURCE");
1087
1088 // Add header
1089 packet->AddHeader(source);
1090
1091 // Log serialized packet contents
1093
1094 // remove header
1095 RrcConnectionRejectHeader destination;
1096 packet->RemoveHeader(destination);
1097
1098 // Log destination info
1099 TestUtils::LogPacketInfo<RrcConnectionRejectHeader>(destination, "DESTINATION");
1100
1101 // Check that the destination and source headers contain the same values
1103 destination.GetMessage().waitTime,
1104 "Different waitTime!");
1105
1106 packet = nullptr;
1107}
1108
1109/**
1110 * \ingroup lte-test
1111 *
1112 * \brief Measurement Report Test Case
1113 */
1115{
1116 public:
1118 void DoRun() override;
1119};
1120
1122 : RrcHeaderTestCase("Testing MeasurementReportTestCase")
1123{
1124}
1125
1126void
1128{
1129 packet = Create<Packet>();
1130 NS_LOG_DEBUG("============= MeasurementReportTestCase ===========");
1131
1133 msg.measResults.measId = 5;
1137
1139 mResEutra.physCellId = 9;
1140 mResEutra.haveRsrpResult = true;
1141 mResEutra.rsrpResult = 33;
1142 mResEutra.haveRsrqResult = true;
1143 mResEutra.rsrqResult = 22;
1144 mResEutra.haveCgiInfo = true;
1145 mResEutra.cgiInfo.plmnIdentity = 7;
1146 mResEutra.cgiInfo.cellIdentity = 6;
1147 mResEutra.cgiInfo.trackingAreaCode = 5;
1148 msg.measResults.measResultListEutra.push_back(mResEutra);
1149
1151
1153 source.SetMessage(msg);
1154
1155 // Log source info
1156 TestUtils::LogPacketInfo<MeasurementReportHeader>(source, "SOURCE");
1157
1158 // Add header
1159 packet->AddHeader(source);
1160
1161 // Log serialized packet contents
1163
1164 // remove header
1165 MeasurementReportHeader destination;
1166 packet->RemoveHeader(destination);
1167
1168 // Log destination info
1169 TestUtils::LogPacketInfo<MeasurementReportHeader>(destination, "DESTINATION");
1170
1171 // Check that the destination and source headers contain the same values
1173 LteRrcSap::MeasResults dstMeas = destination.GetMessage().measResults;
1174
1175 NS_TEST_ASSERT_MSG_EQ(srcMeas.measId, dstMeas.measId, "Different measId!");
1178 "Different rsrpResult!");
1181 "Different rsrqResult!");
1184 "Different haveMeasResultNeighCells!");
1185
1186 if (srcMeas.haveMeasResultNeighCells)
1187 {
1188 auto itsrc = srcMeas.measResultListEutra.begin();
1189 auto itdst = dstMeas.measResultListEutra.begin();
1190 for (; itsrc != srcMeas.measResultListEutra.end(); itsrc++, itdst++)
1191 {
1192 NS_TEST_ASSERT_MSG_EQ(itsrc->physCellId, itdst->physCellId, "Different physCellId!");
1193
1194 NS_TEST_ASSERT_MSG_EQ(itsrc->haveCgiInfo, itdst->haveCgiInfo, "Different haveCgiInfo!");
1195 if (itsrc->haveCgiInfo)
1196 {
1197 NS_TEST_ASSERT_MSG_EQ(itsrc->cgiInfo.plmnIdentity,
1198 itdst->cgiInfo.plmnIdentity,
1199 "Different cgiInfo.plmnIdentity!");
1200 NS_TEST_ASSERT_MSG_EQ(itsrc->cgiInfo.cellIdentity,
1201 itdst->cgiInfo.cellIdentity,
1202 "Different cgiInfo.cellIdentity!");
1203 NS_TEST_ASSERT_MSG_EQ(itsrc->cgiInfo.trackingAreaCode,
1204 itdst->cgiInfo.trackingAreaCode,
1205 "Different cgiInfo.trackingAreaCode!");
1206 NS_TEST_ASSERT_MSG_EQ(itsrc->cgiInfo.plmnIdentityList.size(),
1207 itdst->cgiInfo.plmnIdentityList.size(),
1208 "Different cgiInfo.plmnIdentityList.size()!");
1209
1210 if (!itsrc->cgiInfo.plmnIdentityList.empty())
1211 {
1212 auto itsrc2 = itsrc->cgiInfo.plmnIdentityList.begin();
1213 auto itdst2 = itdst->cgiInfo.plmnIdentityList.begin();
1214 for (; itsrc2 != itsrc->cgiInfo.plmnIdentityList.begin(); itsrc2++, itdst2++)
1215 {
1216 NS_TEST_ASSERT_MSG_EQ(*itsrc2, *itdst2, "Different plmnId elements!");
1217 }
1218 }
1219 }
1220
1221 NS_TEST_ASSERT_MSG_EQ(itsrc->haveRsrpResult,
1222 itdst->haveRsrpResult,
1223 "Different haveRsrpResult!");
1224 if (itsrc->haveRsrpResult)
1225 {
1226 NS_TEST_ASSERT_MSG_EQ(itsrc->rsrpResult,
1227 itdst->rsrpResult,
1228 "Different rsrpResult!");
1229 }
1230
1231 NS_TEST_ASSERT_MSG_EQ(itsrc->haveRsrqResult,
1232 itdst->haveRsrqResult,
1233 "Different haveRsrqResult!");
1234 if (itsrc->haveRsrqResult)
1235 {
1236 NS_TEST_ASSERT_MSG_EQ(itsrc->rsrqResult,
1237 itdst->rsrqResult,
1238 "Different rsrqResult!");
1239 }
1240 }
1241 }
1242
1243 packet = nullptr;
1244}
1245
1246/**
1247 * \ingroup lte-test
1248 *
1249 * \brief Asn1Encoding Test Suite
1250 */
1252{
1253 public:
1255};
1256
1258 : TestSuite("test-asn1-encoding", Type::UNIT)
1259{
1260 NS_LOG_FUNCTION(this);
1261 AddTestCase(new RrcConnectionRequestTestCase(), TestCase::Duration::QUICK);
1262 AddTestCase(new RrcConnectionSetupTestCase(), TestCase::Duration::QUICK);
1263 AddTestCase(new RrcConnectionSetupCompleteTestCase(), TestCase::Duration::QUICK);
1264 AddTestCase(new RrcConnectionReconfigurationCompleteTestCase(), TestCase::Duration::QUICK);
1265 AddTestCase(new RrcConnectionReconfigurationTestCase(), TestCase::Duration::QUICK);
1266 AddTestCase(new HandoverPreparationInfoTestCase(), TestCase::Duration::QUICK);
1267 AddTestCase(new RrcConnectionReestablishmentRequestTestCase(), TestCase::Duration::QUICK);
1268 AddTestCase(new RrcConnectionReestablishmentTestCase(), TestCase::Duration::QUICK);
1269 AddTestCase(new RrcConnectionReestablishmentCompleteTestCase(), TestCase::Duration::QUICK);
1270 AddTestCase(new RrcConnectionRejectTestCase(), TestCase::Duration::QUICK);
1271 AddTestCase(new MeasurementReportTestCase(), TestCase::Duration::QUICK);
1272}
1273
1274/**
1275 * \ingroup lte-test
1276 * Static variable for test initialization
1277 */
Asn1Encoding Test Suite.
Handover Preparation Info Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Measurement Report Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reconfiguration Complete Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reconfiguration Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Complete Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Request Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reestablishment Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Reject Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Request Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Setup Complete Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Rrc Connection Setup Test Case.
void DoRun() override
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 DoRun() override=0
Implementation to actually run this TestCase.
void AssertEqualRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd1, LteRrcSap::RadioResourceConfigDedicated rrcd2)
Assert equal radio resource config dedicated.
Contains ASN encoding test utility functions.
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:294
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:268
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
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.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated()
Getter for m_radioResourceConfigDedicated.
bool GetHaveRadioResourceConfigDedicated() const
Getter for m_haveRadioResourceConfigDedicated.
bool GetHaveMobilityControlInfo() const
Getter for m_haveMobilityControlInfo.
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.
bool GetHaveMeasConfig() const
Getter for m_haveMeasConfig.
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:1061
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1268
Type
Type of test.
Definition: test.h:1275
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Asn1EncodingSuite g_asn1EncodingSuite
Static variable for test initialization.
#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:145
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t transmissionMode
transmission mode
Definition: lte-rrc-sap.h:151
RadioResourceConfigDedicated sourceRadioResourceConfig
source radio resource config
Definition: lte-rrc-sap.h:652
MasterInformationBlock sourceMasterInformationBlock
source master information block
Definition: lte-rrc-sap.h:654
uint16_t sourceUeIdentity
source UE identity
Definition: lte-rrc-sap.h:653
MeasConfig sourceMeasConfig
source measure config
Definition: lte-rrc-sap.h:651
uint32_t sourceDlCarrierFreq
source DL carrier frequency
Definition: lte-rrc-sap.h:659
SystemInformationBlockType1 sourceSystemInformationBlockType1
source system information block type 1
Definition: lte-rrc-sap.h:656
SystemInformationBlockType2 sourceSystemInformationBlockType2
source system information block type 2
Definition: lte-rrc-sap.h:658
BlackCellsToAddMod structure.
Definition: lte-rrc-sap.h:329
PhysCellIdRange physCellIdRange
Phy cell ID range.
Definition: lte-rrc-sap.h:331
uint16_t dlBandwidth
DL bandwidth.
Definition: lte-rrc-sap.h:580
uint16_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:581
uint32_t dlCarrierFreq
DL carrier frequency.
Definition: lte-rrc-sap.h:573
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:574
CellsToAddMod structure.
Definition: lte-rrc-sap.h:313
int8_t cellIndividualOffset
cell individual offset
Definition: lte-rrc-sap.h:316
uint8_t cellIndex
cell index
Definition: lte-rrc-sap.h:314
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:315
uint32_t cellIdentity
cell identity
Definition: lte-rrc-sap.h:666
uint32_t plmnIdentity
PLMN identity.
Definition: lte-rrc-sap.h:665
uint16_t trackingAreaCode
tracking area code
Definition: lte-rrc-sap.h:667
DrbToAddMod structure.
Definition: lte-rrc-sap.h:245
uint8_t epsBearerIdentity
EPS bearer identity.
Definition: lte-rrc-sap.h:246
RlcConfig rlcConfig
RLC config.
Definition: lte-rrc-sap.h:248
uint8_t logicalChannelIdentity
logical channel identify
Definition: lte-rrc-sap.h:249
uint8_t drbIdentity
DRB identity.
Definition: lte-rrc-sap.h:247
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:250
uint32_t ulCarrierFreq
UL carrier frequency.
Definition: lte-rrc-sap.h:88
uint16_t ulBandwidth
UL bandwidth.
Definition: lte-rrc-sap.h:89
HandoverPreparationInfo structure.
Definition: lte-rrc-sap.h:942
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:624
std::list< uint8_t > measIdToRemoveList
measure ID to remove list
Definition: lte-rrc-sap.h:558
uint8_t sMeasure
S measure.
Definition: lte-rrc-sap.h:565
std::list< MeasObjectToAddMod > measObjectToAddModList
measure object to add mod list
Definition: lte-rrc-sap.h:555
std::list< uint8_t > reportConfigToRemoveList
report config to remove list
Definition: lte-rrc-sap.h:556
std::list< uint8_t > measObjectToRemoveList
measure object to remove list
Definition: lte-rrc-sap.h:554
SpeedStatePars speedStatePars
speed state parameters
Definition: lte-rrc-sap.h:567
bool haveMeasGapConfig
have measure gap config?
Definition: lte-rrc-sap.h:562
QuantityConfig quantityConfig
quantity config
Definition: lte-rrc-sap.h:561
bool haveSmeasure
have S measure?
Definition: lte-rrc-sap.h:564
bool haveSpeedStatePars
have speed state parameters?
Definition: lte-rrc-sap.h:566
std::list< ReportConfigToAddMod > reportConfigToAddModList
report config to add mod list
Definition: lte-rrc-sap.h:557
MeasGapConfig measGapConfig
measure gap config
Definition: lte-rrc-sap.h:563
std::list< MeasIdToAddMod > measIdToAddModList
measure ID to add mod list
Definition: lte-rrc-sap.h:559
bool haveQuantityConfig
have quantity config?
Definition: lte-rrc-sap.h:560
uint8_t gapOffsetValue
gap offset value
Definition: lte-rrc-sap.h:515
MeasIdToAddMod structure.
Definition: lte-rrc-sap.h:488
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:490
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:491
std::list< uint8_t > cellsToRemoveList
cells to remove list
Definition: lte-rrc-sap.h:342
bool haveCellForWhichToReportCGI
have cell for which to report CGI?
Definition: lte-rrc-sap.h:346
std::list< CellsToAddMod > cellsToAddModList
cells to add mod list
Definition: lte-rrc-sap.h:343
uint16_t allowedMeasBandwidth
allowed measure bandwidth
Definition: lte-rrc-sap.h:338
int8_t offsetFreq
offset frequency
Definition: lte-rrc-sap.h:341
uint8_t neighCellConfig
neighbor cell config
Definition: lte-rrc-sap.h:340
uint16_t cellForWhichToReportCGI
cell for which to report CGI
Definition: lte-rrc-sap.h:347
bool presenceAntennaPort1
antenna port 1 present?
Definition: lte-rrc-sap.h:339
std::list< uint8_t > blackCellsToRemoveList
black cells to remove list
Definition: lte-rrc-sap.h:344
std::list< BlackCellsToAddMod > blackCellsToAddModList
black cells to add mod list
Definition: lte-rrc-sap.h:345
uint32_t carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:337
MeasObjectToAddMod structure.
Definition: lte-rrc-sap.h:474
uint8_t measObjectId
measure object ID
Definition: lte-rrc-sap.h:475
MeasObjectEutra measObjectEutra
measure object eutra
Definition: lte-rrc-sap.h:476
MeasResultEutra structure.
Definition: lte-rrc-sap.h:680
uint8_t rsrqResult
RSRQ result.
Definition: lte-rrc-sap.h:687
uint8_t rsrpResult
RSRP result.
Definition: lte-rrc-sap.h:685
bool haveRsrpResult
have RSRP result
Definition: lte-rrc-sap.h:684
bool haveRsrqResult
have RSRQ result?
Definition: lte-rrc-sap.h:686
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:681
bool haveCgiInfo
have CGI info?
Definition: lte-rrc-sap.h:682
uint8_t rsrqResult
the RSRQ result
Definition: lte-rrc-sap.h:675
uint8_t rsrpResult
the RSRP result
Definition: lte-rrc-sap.h:674
MeasResults structure.
Definition: lte-rrc-sap.h:717
uint8_t measId
measure ID
Definition: lte-rrc-sap.h:718
bool haveMeasResultNeighCells
have measure result neighbor cells
Definition: lte-rrc-sap.h:720
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Definition: lte-rrc-sap.h:721
bool haveMeasResultServFreqList
has measResultServFreqList-r10
Definition: lte-rrc-sap.h:722
MeasResultPCell measResultPCell
measurement result primary cell
Definition: lte-rrc-sap.h:719
MeasurementReport structure.
Definition: lte-rrc-sap.h:948
MeasResults measResults
measure results
Definition: lte-rrc-sap.h:949
RadioResourceConfigCommon radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:600
RachConfigDedicated rachConfigDedicated
RACH config dedicated.
Definition: lte-rrc-sap.h:602
bool haveRachConfigDedicated
Have RACH config dedicated?
Definition: lte-rrc-sap.h:601
uint16_t newUeIdentity
new UE identity
Definition: lte-rrc-sap.h:599
bool haveCarrierBandwidth
have carrier bandwidth?
Definition: lte-rrc-sap.h:597
bool haveCarrierFreq
have carrier frequency?
Definition: lte-rrc-sap.h:595
CarrierBandwidthEutra carrierBandwidth
carrier bandwidth
Definition: lte-rrc-sap.h:598
CarrierFreqEutra carrierFreq
carrier frequency
Definition: lte-rrc-sap.h:596
uint16_t targetPhysCellId
target Phy cell ID
Definition: lte-rrc-sap.h:594
uint8_t nCellChangeHigh
cell change high
Definition: lte-rrc-sap.h:524
uint8_t nCellChangeMedium
cell change medium
Definition: lte-rrc-sap.h:523
uint16_t start
starting cell ID
Definition: lte-rrc-sap.h:322
PhysicalConfigDedicated structure.
Definition: lte-rrc-sap.h:226
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-rrc-sap.h:233
bool haveAntennaInfoDedicated
have antenna info dedicated?
Definition: lte-rrc-sap.h:230
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
Definition: lte-rrc-sap.h:229
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
Definition: lte-rrc-sap.h:227
bool havePdschConfigDedicated
have PDSCH config dedicated?
Definition: lte-rrc-sap.h:232
AntennaInfoDedicated antennaInfo
antenna info
Definition: lte-rrc-sap.h:231
uint32_t plmnIdentity
PLMN identity.
Definition: lte-rrc-sap.h:66
uint8_t numberOfRaPreambles
number of RA preambles
Definition: lte-rrc-sap.h:256
uint8_t filterCoefficientRSRQ
filter coefficient RSRQ
Definition: lte-rrc-sap.h:308
uint8_t filterCoefficientRSRP
filter coefficient RSRP
Definition: lte-rrc-sap.h:307
uint8_t raResponseWindowSize
RA response window size.
Definition: lte-rrc-sap.h:263
uint8_t preambleTransMax
preamble transmit maximum
Definition: lte-rrc-sap.h:262
PreambleInfo preambleInfo
preamble info
Definition: lte-rrc-sap.h:276
RaSupervisionInfo raSupervisionInfo
RA supervision info.
Definition: lte-rrc-sap.h:277
uint8_t raPreambleIndex
RA preamble index.
Definition: lte-rrc-sap.h:587
uint8_t raPrachMaskIndex
RA PRACH mask index.
Definition: lte-rrc-sap.h:588
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:284
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:290
RadioResourceConfigDedicated structure.
Definition: lte-rrc-sap.h:296
PhysicalConfigDedicated physicalConfigDedicated
physical config dedicated
Definition: lte-rrc-sap.h:301
std::list< uint8_t > drbToReleaseList
DRB to release list.
Definition: lte-rrc-sap.h:299
bool havePhysicalConfigDedicated
have physical config dedicated?
Definition: lte-rrc-sap.h:300
std::list< DrbToAddMod > drbToAddModList
DRB to add mod list.
Definition: lte-rrc-sap.h:298
std::list< SrbToAddMod > srbToAddModList
SRB to add mod list.
Definition: lte-rrc-sap.h:297
uint16_t physCellId
Phy cell ID.
Definition: lte-rrc-sap.h:609
bool reportOnLeave
Indicates whether or not the UE shall initiate the measurement reporting procedure when the leaving c...
Definition: lte-rrc-sap.h:399
uint8_t maxReportCells
Maximum number of cells, excluding the serving cell, to be included in the measurement report.
Definition: lte-rrc-sap.h:441
enum ns3::LteRrcSap::ReportConfigEutra::@62 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@61 triggerType
Trigger enumeration.
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition.
Definition: lte-rrc-sap.h:407
@ RSRQ
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:426
@ EVENT_A2
Event A2: Serving becomes worse than absolute threshold.
Definition: lte-rrc-sap.h:385
uint8_t reportAmount
Number of measurement reports applicable, always assumed to be infinite.
Definition: lte-rrc-sap.h:465
enum ns3::LteRrcSap::ReportConfigEutra::@65 reportInterval
Report interval enumeration.
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:394
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:393
enum ns3::LteRrcSap::ReportConfigEutra::@64 reportQuantity
Report type enumeration.
int8_t a3Offset
Offset value for Event A3.
Definition: lte-rrc-sap.h:403
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:411
ReportConfigToAddMod structure.
Definition: lte-rrc-sap.h:481
uint8_t reportConfigId
report config ID
Definition: lte-rrc-sap.h:482
ReportConfigEutra reportConfigEutra
report config eutra
Definition: lte-rrc-sap.h:483
RlcConfig structure.
Definition: lte-rrc-sap.h:94
Direction choice
direction choice
Definition: lte-rrc-sap.h:104
RrcConnectionReconfigurationCompleted structure.
Definition: lte-rrc-sap.h:898
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:899
RrcConnectionReconfiguration structure.
Definition: lte-rrc-sap.h:881
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:882
bool haveMobilityControlInfo
have mobility control info
Definition: lte-rrc-sap.h:885
bool haveRadioResourceConfigDedicated
have radio resource config dedicated
Definition: lte-rrc-sap.h:887
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:889
bool haveNonCriticalExtension
have critical extension?
Definition: lte-rrc-sap.h:890
MobilityControlInfo mobilityControlInfo
mobility control info
Definition: lte-rrc-sap.h:886
RrcConnectionReestablishmentComplete structure.
Definition: lte-rrc-sap.h:919
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:920
RrcConnectionReestablishment structure.
Definition: lte-rrc-sap.h:911
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:914
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:912
RrcConnectionReestablishmentRequest structure.
Definition: lte-rrc-sap.h:904
ReestablishmentCause reestablishmentCause
reestablishment cause
Definition: lte-rrc-sap.h:906
RrcConnectionReject structure.
Definition: lte-rrc-sap.h:936
RrcConnectionRequest structure.
Definition: lte-rrc-sap.h:730
RrcConnectionSetupCompleted structure.
Definition: lte-rrc-sap.h:744
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:745
RrcConnectionSetup structure.
Definition: lte-rrc-sap.h:736
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:737
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
Definition: lte-rrc-sap.h:739
uint16_t srsConfigIndex
SRS config index.
Definition: lte-rrc-sap.h:145
SpeedStateScaleFactors timeToTriggerSf
time to trigger scale factors
Definition: lte-rrc-sap.h:548
MobilityStateParameters mobilityStateParameters
mobility state parameters
Definition: lte-rrc-sap.h:547
uint8_t sfHigh
scale factor high
Definition: lte-rrc-sap.h:532
uint8_t sfMedium
scale factor medium
Definition: lte-rrc-sap.h:531
SrbToAddMod structure.
Definition: lte-rrc-sap.h:238
LogicalChannelConfig logicalChannelConfig
logical channel config
Definition: lte-rrc-sap.h:240
uint8_t srbIdentity
SB identity.
Definition: lte-rrc-sap.h:239
CellAccessRelatedInfo cellAccessRelatedInfo
cell access related info
Definition: lte-rrc-sap.h:630
RadioResourceConfigCommonSib radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:637
@ THRESHOLD_RSRP
RSRP is used for the threshold.
Definition: lte-rrc-sap.h:364
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
Definition: lte-rrc-sap.h:365
enum ns3::LteRrcSap::ThresholdEutra::@60 choice
Threshold enumeration.
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:368