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 
33 using namespace ns3;
34 
35 NS_LOG_COMPONENT_DEFINE ("Asn1EncodingTest");
36 
37 class TestUtils
38 {
39 public:
40  // Function to convert packet contents in hex format
41  static std::string sprintPacketContentsHex (Ptr<Packet> pkt)
42  {
43  uint32_t psize = pkt->GetSize ();
44  uint8_t buffer[psize];
45  char sbuffer[psize * 3];
46  pkt->CopyData (buffer, psize);
47  for (uint32_t i = 0; i < psize; i++)
48  {
49  sprintf (&sbuffer[i * 3],"%02x ",buffer[i]);
50  }
51  return std::string (sbuffer);
52  }
53 
54  // Function to convert packet contents in binary format
55  static std::string sprintPacketContentsBin (Ptr<Packet> pkt)
56  {
57  uint32_t psize = pkt->GetSize ();
58  uint8_t buffer[psize];
59  std::ostringstream oss (std::ostringstream::out);
60  pkt->CopyData (buffer, psize);
61  for (uint32_t i = 0; i < psize; i++)
62  {
63  oss << (std::bitset<8> (buffer[i]));
64  }
65  return std::string (oss.str () + "\n");
66  }
67 
68  // Function to log packet contents
69  static void LogPacketContents (Ptr<Packet> pkt)
70  {
71  NS_LOG_DEBUG ("---- SERIALIZED PACKET CONTENTS (HEX): -------");
74  }
75 
76  template <class T>
77  static void LogPacketInfo (T source,std::string s)
78  {
79  NS_LOG_DEBUG ("--------- " << s.data () << " INFO: -------");
80  std::ostringstream oss (std::ostringstream::out);
81  source.Print (oss);
82  NS_LOG_DEBUG (oss.str ());
83  }
84 };
85 
86 // --------------------------- CLASS RrcHeaderTestCase -----------------------------
92 {
93 public:
94  RrcHeaderTestCase (std::string s);
95  virtual void DoRun (void) = 0;
96  LteRrcSap::RadioResourceConfigDedicated CreateRadioResourceConfigDedicated ();
97  void AssertEqualRadioResourceConfigDedicated (LteRrcSap::RadioResourceConfigDedicated rrcd1, LteRrcSap::RadioResourceConfigDedicated rrcd2);
98 
99 protected:
101 };
102 
104 {
105 }
106 
109 {
111 
112  rrd.drbToReleaseList = std::list<uint8_t> (4,2);
113 
114  LteRrcSap::SrbToAddMod srbToAddMod;
115  srbToAddMod.srbIdentity = 2;
116 
117  LteRrcSap::LogicalChannelConfig logicalChannelConfig;
118  logicalChannelConfig.priority = 9;
119  logicalChannelConfig.prioritizedBitRateKbps = 128;
120  logicalChannelConfig.bucketSizeDurationMs = 100;
121  logicalChannelConfig.logicalChannelGroup = 3;
122  srbToAddMod.logicalChannelConfig = logicalChannelConfig;
123 
124  rrd.srbToAddModList.insert (rrd.srbToAddModList.begin (),srbToAddMod);
125 
126  LteRrcSap::DrbToAddMod drbToAddMod;
127  drbToAddMod.epsBearerIdentity = 1;
128  drbToAddMod.drbIdentity = 1;
129  drbToAddMod.logicalChannelIdentity = 5;
130  LteRrcSap::RlcConfig rlcConfig;
131  rlcConfig.choice = LteRrcSap::RlcConfig::UM_BI_DIRECTIONAL;
132  drbToAddMod.rlcConfig = rlcConfig;
133 
134  LteRrcSap::LogicalChannelConfig logicalChannelConfig2;
135  logicalChannelConfig2.priority = 7;
136  logicalChannelConfig2.prioritizedBitRateKbps = 256;
137  logicalChannelConfig2.bucketSizeDurationMs = 50;
138  logicalChannelConfig2.logicalChannelGroup = 2;
139  drbToAddMod.logicalChannelConfig = logicalChannelConfig2;
140 
141  rrd.drbToAddModList.insert (rrd.drbToAddModList.begin (),drbToAddMod);
142 
143  rrd.havePhysicalConfigDedicated = true;
144  LteRrcSap::PhysicalConfigDedicated physicalConfigDedicated;
145  physicalConfigDedicated.haveSoundingRsUlConfigDedicated = true;
146  physicalConfigDedicated.soundingRsUlConfigDedicated.type = LteRrcSap::SoundingRsUlConfigDedicated::SETUP;
147  physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth = 2;
148  physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex = 12;
149 
150  physicalConfigDedicated.haveAntennaInfoDedicated = true;
151  physicalConfigDedicated.antennaInfo.transmissionMode = 2;
152 
153  physicalConfigDedicated.havePdschConfigDedicated = true;
154  physicalConfigDedicated.pdschConfigDedicated.pa = LteRrcSap::PdschConfigDedicated::dB0;
155 
156  rrd.physicalConfigDedicated = physicalConfigDedicated;
157 
158  return rrd;
159 }
160 
161 void
163 {
164  NS_TEST_ASSERT_MSG_EQ (rrcd1.srbToAddModList.size (), rrcd2.srbToAddModList.size (),"SrbToAddModList different sizes");
165 
166  std::list<LteRrcSap::SrbToAddMod> srcSrbToAddModList = rrcd1.srbToAddModList;
167  std::list<LteRrcSap::SrbToAddMod>::iterator it1 = srcSrbToAddModList.begin ();
168  std::list<LteRrcSap::SrbToAddMod> dstSrbToAddModList = rrcd2.srbToAddModList;
169  std::list<LteRrcSap::SrbToAddMod>::iterator it2 = dstSrbToAddModList.begin ();
170 
171  for (; it1 != srcSrbToAddModList.end (); it1++, it2++)
172  {
173  NS_TEST_ASSERT_MSG_EQ (it1->srbIdentity,it2->srbIdentity, "srbIdentity");
174  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.priority,it2->logicalChannelConfig.priority, "logicalChannelConfig.priority");
175  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.prioritizedBitRateKbps,it2->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
176  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.bucketSizeDurationMs,it2->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
177  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.logicalChannelGroup,it2->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
178  }
179 
180  NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToAddModList.size (), rrcd2.drbToAddModList.size (),"DrbToAddModList different sizes");
181 
182  std::list<LteRrcSap::DrbToAddMod> srcDrbToAddModList = rrcd1.drbToAddModList;
183  std::list<LteRrcSap::DrbToAddMod>::iterator it3 = srcDrbToAddModList.begin ();
184  std::list<LteRrcSap::DrbToAddMod> dstDrbToAddModList = rrcd2.drbToAddModList;
185  std::list<LteRrcSap::DrbToAddMod>::iterator it4 = dstDrbToAddModList.begin ();
186 
187  for (; it3 != srcDrbToAddModList.end (); it3++, it4++)
188  {
189  NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
190  NS_TEST_ASSERT_MSG_EQ (it3->drbIdentity,it4->drbIdentity, "drbIdentity");
191  NS_TEST_ASSERT_MSG_EQ (it3->rlcConfig.choice,it4->rlcConfig.choice, "rlcConfig.choice");
192  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelIdentity,it4->logicalChannelIdentity, "logicalChannelIdentity");
193  NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
194 
195  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.priority,it4->logicalChannelConfig.priority, "logicalChannelConfig.priority");
196  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.prioritizedBitRateKbps,it4->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
197  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.bucketSizeDurationMs,it4->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
198  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.logicalChannelGroup,it4->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
199  }
200 
201  NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToReleaseList.size (), rrcd2.drbToReleaseList.size (),"DrbToReleaseList different sizes");
202 
203  std::list<uint8_t> srcDrbToReleaseList = rrcd1.drbToReleaseList;
204  std::list<uint8_t> dstDrbToReleaseList = rrcd2.drbToReleaseList;
205  std::list<uint8_t>::iterator it5 = srcDrbToReleaseList.begin ();
206  std::list<uint8_t>::iterator it6 = dstDrbToReleaseList.begin ();
207 
208  for (; it5 != srcDrbToReleaseList.end (); it5++, it6++)
209  {
210  NS_TEST_ASSERT_MSG_EQ (*it5, *it6,"element != in DrbToReleaseList");
211  }
212 
213  NS_TEST_ASSERT_MSG_EQ (rrcd1.havePhysicalConfigDedicated,rrcd2.havePhysicalConfigDedicated, "HavePhysicalConfigDedicated");
214 
215  if (rrcd1.havePhysicalConfigDedicated)
216  {
219  "haveSoundingRsUlConfigDedicated");
220 
223  "soundingRsUlConfigDedicated.type");
226  "soundingRsUlConfigDedicated.srsBandwidth");
227 
230  "soundingRsUlConfigDedicated.srsConfigIndex");
231 
234  "haveAntennaInfoDedicated");
235 
237  {
240  "antennaInfo.transmissionMode");
241  }
242 
245  "havePdschConfigDedicated");
246 
248  {
251  "pdschConfigDedicated.pa");
252  }
253  }
254 }
255 
256 // --------------------------- CLASS RrcConnectionRequestTestCase -----------------------------
258 {
259 public:
261  virtual void DoRun (void);
262 };
263 
265 {
266 }
267 
268 void
270 {
271  packet = Create<Packet> ();
272  NS_LOG_DEBUG ("============= RrcConnectionRequestTestCase ===========");
273 
275  msg.ueIdentity = 0x83fecafecaULL;
276 
278  source.SetMessage (msg);
279 
280  // Log source info
281  TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (source,"SOURCE");
282 
283  // Add header
284  packet->AddHeader (source);
285 
286  // Log serialized packet contents
288 
289  // Remove header
290  RrcConnectionRequestHeader destination;
291  packet->RemoveHeader (destination);
292 
293  // Log destination info
294  TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (destination,"DESTINATION");
295 
296  // Check that the destination and source headers contain the same values
297  NS_TEST_ASSERT_MSG_EQ (source.GetMmec (),destination.GetMmec (), "Different m_mmec!");
298  NS_TEST_ASSERT_MSG_EQ (source.GetMtmsi (),destination.GetMtmsi (), "Different m_mTmsi!");
299 
300  packet = 0;
301 }
302 
303 // --------------------------- CLASS RrcConnectionSetupTestCase -----------------------------
305 {
306 public:
308  virtual void DoRun (void);
309 };
310 
312 {
313 }
314 
315 void
317 {
318  packet = Create<Packet> ();
319  NS_LOG_DEBUG ("============= RrcConnectionSetupTestCase ===========");
320 
322  msg.rrcTransactionIdentifier = 3;
324 
326  source.SetMessage (msg);
327 
328  // Log source info
329  TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (source,"SOURCE");
330 
331  // Add header
332  packet->AddHeader (source);
333 
334  // Log serialized packet contents
336 
337  // remove header
338  RrcConnectionSetupHeader destination;
339  packet->RemoveHeader (destination);
340 
341  // Log destination info
342  TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (destination,"DESTINATION");
343 
344  // Check that the destination and source headers contain the same values
345  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
346 
347  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (),destination.GetRadioResourceConfigDedicated ());
348 
349  packet = 0;
350 }
351 
352 // --------------------------- CLASS RrcConnectionSetupCompleteTestCase -----------------------------
354 {
355 public:
357  virtual void DoRun (void);
358 };
359 
361 {
362 }
363 
364 void
366 {
367  packet = Create<Packet> ();
368  NS_LOG_DEBUG ("============= RrcConnectionSetupCompleteTestCase ===========");
369 
371  msg.rrcTransactionIdentifier = 3;
372 
374  source.SetMessage (msg);
375 
376  // Log source info
377  TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (source,"SOURCE");
378 
379  // Add header
380  packet->AddHeader (source);
381 
382  // Log serialized packet contents
384 
385  // Remove header
387  packet->RemoveHeader (destination);
388 
389  // Log destination info
390  TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (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 
395  packet = 0;
396 }
397 
398 // --------------------------- CLASS RrcConnectionReconfigurationCompleteTestCase -----------------------------
400 {
401 public:
403  virtual void DoRun (void);
404 };
405 
407  : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationCompleteTestCase")
408 {
409 }
410 
411 void
413 {
414  packet = Create<Packet> ();
415  NS_LOG_DEBUG ("============= RrcConnectionReconfigurationCompleteTestCase ===========");
416 
418  msg.rrcTransactionIdentifier = 2;
419 
421  source.SetMessage (msg);
422 
423  // Log source info
424  TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (source,"SOURCE");
425 
426  // Add header
427  packet->AddHeader (source);
428 
429  // Log serialized packet contents
431 
432  // remove header
434  packet->RemoveHeader (destination);
435 
436  // Log destination info
437  TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (destination,"DESTINATION");
438 
439  // Check that the destination and source headers contain the same values
440  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
441 
442  packet = 0;
443 }
444 
445 // --------------------------- CLASS RrcConnectionReconfigurationTestCase -----------------------------
447 {
448 public:
450  virtual void DoRun (void);
451 };
452 
454  : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationTestCase")
455 {
456 }
457 
458 void
460 {
461  packet = Create<Packet> ();
462  NS_LOG_DEBUG ("============= RrcConnectionReconfigurationTestCase ===========");
463 
465  msg.rrcTransactionIdentifier = 2;
466 
467  msg.haveMeasConfig = true;
468 
469  msg.measConfig.haveQuantityConfig = true;
472 
473  msg.measConfig.haveMeasGapConfig = true;
474  msg.measConfig.measGapConfig.type = LteRrcSap::MeasGapConfig::SETUP;
475  msg.measConfig.measGapConfig.gapOffsetChoice = LteRrcSap::MeasGapConfig::GP0;
477 
478  msg.measConfig.haveSmeasure = true;
479  msg.measConfig.sMeasure = 57;
480 
481  msg.measConfig.haveSpeedStatePars = true;
482  msg.measConfig.speedStatePars.type = LteRrcSap::SpeedStatePars::SETUP;
489 
490  msg.measConfig.measObjectToRemoveList.push_back (23);
491  msg.measConfig.measObjectToRemoveList.push_back (13);
492 
493  msg.measConfig.reportConfigToRemoveList.push_back (7);
494  msg.measConfig.reportConfigToRemoveList.push_back (16);
495 
496  msg.measConfig.measIdToRemoveList.push_back (4);
497  msg.measConfig.measIdToRemoveList.push_back (18);
498 
499  // Set measObjectToAddModList
500  LteRrcSap::MeasObjectToAddMod measObjectToAddMod;
501  measObjectToAddMod.measObjectId = 3;
502  measObjectToAddMod.measObjectEutra.carrierFreq = 21;
503  measObjectToAddMod.measObjectEutra.allowedMeasBandwidth = 15;
504  measObjectToAddMod.measObjectEutra.presenceAntennaPort1 = true;
505  measObjectToAddMod.measObjectEutra.neighCellConfig = 3;
506  measObjectToAddMod.measObjectEutra.offsetFreq = -12;
507  measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (5);
508  measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (2);
509  measObjectToAddMod.measObjectEutra.blackCellsToRemoveList.push_back (1);
510  measObjectToAddMod.measObjectEutra.haveCellForWhichToReportCGI = true;
511  measObjectToAddMod.measObjectEutra.cellForWhichToReportCGI = 250;
512  LteRrcSap::CellsToAddMod cellsToAddMod;
513  cellsToAddMod.cellIndex = 20;
514  cellsToAddMod.physCellId = 14;
515  cellsToAddMod.cellIndividualOffset = 22;
516  measObjectToAddMod.measObjectEutra.cellsToAddModList.push_back (cellsToAddMod);
517  LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
518  blackCellsToAddMod.cellIndex = 18;
519  blackCellsToAddMod.physCellIdRange.start = 128;
520  blackCellsToAddMod.physCellIdRange.haveRange = true;
521  blackCellsToAddMod.physCellIdRange.range = 128;
522  measObjectToAddMod.measObjectEutra.blackCellsToAddModList.push_back (blackCellsToAddMod);
523  msg.measConfig.measObjectToAddModList.push_back (measObjectToAddMod);
524 
525  // Set reportConfigToAddModList
526  LteRrcSap::ReportConfigToAddMod reportConfigToAddMod;
527  reportConfigToAddMod.reportConfigId = 22;
528  reportConfigToAddMod.reportConfigEutra.triggerType = LteRrcSap::ReportConfigEutra::EVENT;
529  reportConfigToAddMod.reportConfigEutra.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
530  reportConfigToAddMod.reportConfigEutra.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
531  reportConfigToAddMod.reportConfigEutra.threshold1.range = 15;
532  reportConfigToAddMod.reportConfigEutra.threshold2.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ;
533  reportConfigToAddMod.reportConfigEutra.threshold2.range = 10;
534  reportConfigToAddMod.reportConfigEutra.reportOnLeave = true;
535  reportConfigToAddMod.reportConfigEutra.a3Offset = -25;
536  reportConfigToAddMod.reportConfigEutra.hysteresis = 18;
537  reportConfigToAddMod.reportConfigEutra.timeToTrigger = 100;
538  reportConfigToAddMod.reportConfigEutra.purpose = LteRrcSap::ReportConfigEutra::REPORT_STRONGEST_CELLS;
539  reportConfigToAddMod.reportConfigEutra.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ;
540  reportConfigToAddMod.reportConfigEutra.reportQuantity = LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY;
541  reportConfigToAddMod.reportConfigEutra.maxReportCells = 5;
542  reportConfigToAddMod.reportConfigEutra.reportInterval = LteRrcSap::ReportConfigEutra::MIN60;
543  reportConfigToAddMod.reportConfigEutra.reportAmount = 16;
544  msg.measConfig.reportConfigToAddModList.push_back (reportConfigToAddMod);
545 
546  // Set measIdToAddModList
547  LteRrcSap::MeasIdToAddMod measIdToAddMod,measIdToAddMod2;
548  measIdToAddMod.measId = 7;
549  measIdToAddMod.measObjectId = 6;
550  measIdToAddMod.reportConfigId = 5;
551  measIdToAddMod2.measId = 4;
552  measIdToAddMod2.measObjectId = 8;
553  measIdToAddMod2.reportConfigId = 12;
554  msg.measConfig.measIdToAddModList.push_back (measIdToAddMod);
555  msg.measConfig.measIdToAddModList.push_back (measIdToAddMod2);
556 
557  msg.haveMobilityControlInfo = true;
572 
574 
576 
578  source.SetMessage (msg);
579 
580  // Log source info
581  TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (source,"SOURCE");
582 
583  // Add header
584  packet->AddHeader (source);
585 
586  // Log serialized packet contents
588 
589  // remove header
591  packet->RemoveHeader (destination);
592 
593  // Log destination info
594  TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (destination,"DESTINATION");
595 
596  // Check that the destination and source headers contain the same values
597  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
598  NS_TEST_ASSERT_MSG_EQ (source.GetHaveMeasConfig (),destination.GetHaveMeasConfig (), "GetHaveMeasConfig");
599  NS_TEST_ASSERT_MSG_EQ (source.GetHaveMobilityControlInfo (),destination.GetHaveMobilityControlInfo (), "GetHaveMobilityControlInfo");
600  NS_TEST_ASSERT_MSG_EQ (source.GetHaveRadioResourceConfigDedicated (),destination.GetHaveRadioResourceConfigDedicated (), "GetHaveRadioResourceConfigDedicated");
601 
602  if ( source.GetHaveMobilityControlInfo () )
603  {
604  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().targetPhysCellId,destination.GetMobilityControlInfo ().targetPhysCellId, "GetMobilityControlInfo().targetPhysCellId");
605  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierFreq,destination.GetMobilityControlInfo ().haveCarrierFreq, "GetMobilityControlInfo().haveCarrierFreq");
606  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierBandwidth,destination.GetMobilityControlInfo ().haveCarrierBandwidth, "GetMobilityControlInfo().haveCarrierBandwidth");
607  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().newUeIdentity,destination.GetMobilityControlInfo ().newUeIdentity, "GetMobilityControlInfo().newUeIdentity");
608  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveRachConfigDedicated,destination.GetMobilityControlInfo ().haveRachConfigDedicated, "GetMobilityControlInfo().haveRachConfigDedicated");
609 
610  if (source.GetMobilityControlInfo ().haveCarrierFreq)
611  {
612  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierFreq.dlCarrierFreq,
613  destination.GetMobilityControlInfo ().carrierFreq.dlCarrierFreq,
614  "GetMobilityControlInfo().carrierFreq.dlCarrierFreq");
615  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierFreq.ulCarrierFreq,
616  destination.GetMobilityControlInfo ().carrierFreq.ulCarrierFreq,
617  "GetMobilityControlInfo().carrierFreq.ulCarrierFreq");
618  }
619 
620  if (source.GetMobilityControlInfo ().haveCarrierBandwidth)
621  {
622  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierBandwidth.dlBandwidth,
623  destination.GetMobilityControlInfo ().carrierBandwidth.dlBandwidth,
624  "GetMobilityControlInfo().carrierBandwidth.dlBandwidth");
625  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierBandwidth.ulBandwidth,
626  destination.GetMobilityControlInfo ().carrierBandwidth.ulBandwidth,
627  "GetMobilityControlInfo().carrierBandwidth.ulBandwidth");
628  }
629 
630  if (source.GetMobilityControlInfo ().haveRachConfigDedicated)
631  {
632  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().rachConfigDedicated.raPreambleIndex,
633  destination.GetMobilityControlInfo ().rachConfigDedicated.raPreambleIndex,
634  "GetMobilityControlInfo().rachConfigDedicated.raPreambleIndex");
635  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().rachConfigDedicated.raPrachMaskIndex,
636  destination.GetMobilityControlInfo ().rachConfigDedicated.raPrachMaskIndex,
637  "GetMobilityControlInfo().rachConfigDedicated.raPrachMaskIndex");
638  }
639  }
640 
641  if (source.GetHaveRadioResourceConfigDedicated ())
642  {
643  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (), destination.GetRadioResourceConfigDedicated ());
644  }
645 
646  packet = 0;
647 }
648 
649 // --------------------------- CLASS HandoverPreparationInfoTestCase -----------------------------
651 {
652 public:
654  virtual void DoRun (void);
655 };
656 
658 {
659 }
660 
661 void
663 {
664  packet = Create<Packet> ();
665  NS_LOG_DEBUG ("============= HandoverPreparationInfoTestCase ===========");
666 
669  msg.asConfig.sourceUeIdentity = 11;
673 
678 
684 
689 
691  source.SetMessage (msg);
692 
693  // Log source info
694  TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (source,"SOURCE");
695 
696  // Add header
697  packet->AddHeader (source);
698 
699  // Log serialized packet contents
701 
702  // remove header
703  HandoverPreparationInfoHeader destination;
704  packet->RemoveHeader (destination);
705 
706  // Log destination info
707  TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (destination,"DESTINATION");
708 
709  // Check that the destination and source headers contain the same values
710  AssertEqualRadioResourceConfigDedicated (source.GetAsConfig ().sourceRadioResourceConfig, destination.GetAsConfig ().sourceRadioResourceConfig);
711  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceUeIdentity, destination.GetAsConfig ().sourceUeIdentity, "sourceUeIdentity");
712  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceMasterInformationBlock.dlBandwidth,destination.GetAsConfig ().sourceMasterInformationBlock.dlBandwidth, "dlBandwidth");
713  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceMasterInformationBlock.systemFrameNumber, destination.GetAsConfig ().sourceMasterInformationBlock.systemFrameNumber, "systemFrameNumber");
714  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity, "plmnIdentity");
715  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication, "csgIndication");
716  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.cellIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.cellIdentity, "cellIdentity");
717  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity, "csgIdentity");
718  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceDlCarrierFreq, destination.GetAsConfig ().sourceDlCarrierFreq, "sourceDlCarrierFreq");
719 
720  packet = 0;
721 }
722 
723 // --------------------------- CLASS RrcConnectionReestablishmentRequestTestCase -----------------------------
725 {
726 public:
728  virtual void DoRun (void);
729 };
730 
732 {
733 }
734 
735 void
737 {
738  packet = Create<Packet> ();
739  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentRequestTestCase ===========");
740 
742  msg.ueIdentity.cRnti = 12;
743  msg.ueIdentity.physCellId = 21;
744  msg.reestablishmentCause = LteRrcSap::HANDOVER_FAILURE;
745 
747  source.SetMessage (msg);
748 
749  // Log source info
750  TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (source,"SOURCE");
751 
752  // Add header
753  packet->AddHeader (source);
754 
755  // Log serialized packet contents
757 
758  // remove header
760  packet->RemoveHeader (destination);
761 
762  // Log destination info
763  TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (destination,"DESTINATION");
764 
765  // Check that the destination and source headers contain the same values
766  NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().cRnti, destination.GetUeIdentity ().cRnti, "cRnti");
767  NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().physCellId, destination.GetUeIdentity ().physCellId, "physCellId");
768  NS_TEST_ASSERT_MSG_EQ (source.GetReestablishmentCause (),destination.GetReestablishmentCause (), "ReestablishmentCause");
769 
770  packet = 0;
771 }
772 
773 // --------------------------- CLASS RrcConnectionReestablishmentTestCase -----------------------------
775 {
776 public:
778  virtual void DoRun (void);
779 };
780 
782 {
783 }
784 
785 void
787 {
788  packet = Create<Packet> ();
789  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentTestCase ===========");
790 
792  msg.rrcTransactionIdentifier = 2;
794 
796  source.SetMessage (msg);
797 
798  // Log source info
799  TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (source,"SOURCE");
800 
801  // Add header
802  packet->AddHeader (source);
803 
804  // Log serialized packet contents
806 
807  // remove header
809  packet->RemoveHeader (destination);
810 
811  // Log destination info
812  TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (destination,"DESTINATION");
813 
814  // Check that the destination and source headers contain the same values
815  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
816  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (),destination.GetRadioResourceConfigDedicated ());
817 
818  packet = 0;
819 }
820 
821 // --------------------------- CLASS RrcConnectionReestablishmentCompleteTestCase -----------------------------
823 {
824 public:
826  virtual void DoRun (void);
827 };
828 
830 {
831 }
832 
833 void
835 {
836  packet = Create<Packet> ();
837  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentCompleteTestCase ===========");
838 
840  msg.rrcTransactionIdentifier = 3;
841 
843  source.SetMessage (msg);
844 
845  // Log source info
846  TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader> (source,"SOURCE");
847 
848  // Add header
849  packet->AddHeader (source);
850 
851  // Log serialized packet contents
853 
854  // remove header
856  packet->RemoveHeader (destination);
857 
858  // Log destination info
859  TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader> (destination,"DESTINATION");
860 
861  // Check that the destination and source headers contain the same values
862  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
863 
864  packet = 0;
865 }
866 
867 // --------------------------- CLASS RrcConnectionRejectTestCase -----------------------------
869 {
870 public:
872  virtual void DoRun (void);
873 };
874 
876 {
877 }
878 
879 void
881 {
882  packet = Create<Packet> ();
883  NS_LOG_DEBUG ("============= RrcConnectionRejectTestCase ===========");
884 
886  msg.waitTime = 2;
887 
889  source.SetMessage (msg);
890 
891  // Log source info
892  TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (source,"SOURCE");
893 
894  // Add header
895  packet->AddHeader (source);
896 
897  // Log serialized packet contents
899 
900  // remove header
901  RrcConnectionRejectHeader destination;
902  packet->RemoveHeader (destination);
903 
904  // Log destination info
905  TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (destination,"DESTINATION");
906 
907  // Check that the destination and source headers contain the same values
908  NS_TEST_ASSERT_MSG_EQ (source.GetMessage ().waitTime, destination.GetMessage ().waitTime, "Different waitTime!");
909 
910  packet = 0;
911 }
912 
913 // --------------------------- CLASS MeasurementReportTestCase -----------------------------
915 {
916 public:
918  virtual void DoRun (void);
919 };
920 
922 {
923 }
924 
925 void
927 {
928  packet = Create<Packet> ();
929  NS_LOG_DEBUG ("============= MeasurementReportTestCase ===========");
930 
932  msg.measResults.measId = 5;
933  msg.measResults.rsrpResult = 18;
934  msg.measResults.rsrqResult = 21;
936 
937  LteRrcSap::MeasResultEutra mResEutra;
938  mResEutra.physCellId = 9;
939  mResEutra.haveRsrpResult = true;
940  mResEutra.rsrpResult = 33;
941  mResEutra.haveRsrqResult = true;
942  mResEutra.rsrqResult = 22;
943  mResEutra.haveCgiInfo = true;
944  mResEutra.cgiInfo.plmnIdentity = 7;
945  mResEutra.cgiInfo.cellIdentity = 6;
946  mResEutra.cgiInfo.trackingAreaCode = 5;
947  msg.measResults.measResultListEutra.push_back (mResEutra);
948 
949 
951  source.SetMessage (msg);
952 
953  // Log source info
954  TestUtils::LogPacketInfo<MeasurementReportHeader> (source,"SOURCE");
955 
956  // Add header
957  packet->AddHeader (source);
958 
959  // Log serialized packet contents
961 
962  // remove header
963  MeasurementReportHeader destination;
964  packet->RemoveHeader (destination);
965 
966  // Log destination info
967  TestUtils::LogPacketInfo<MeasurementReportHeader> (destination,"DESTINATION");
968 
969  // Check that the destination and source headers contain the same values
970  LteRrcSap::MeasResults srcMeas = source.GetMessage ().measResults;
971  LteRrcSap::MeasResults dstMeas = destination.GetMessage ().measResults;
972 
973  NS_TEST_ASSERT_MSG_EQ (srcMeas.measId, dstMeas.measId, "Different measId!");
974  NS_TEST_ASSERT_MSG_EQ (srcMeas.rsrpResult, dstMeas.rsrpResult, "Different rsrpResult!");
975  NS_TEST_ASSERT_MSG_EQ (srcMeas.rsrqResult, dstMeas.rsrqResult, "Different rsrqResult!");
976  NS_TEST_ASSERT_MSG_EQ (srcMeas.haveMeasResultNeighCells, dstMeas.haveMeasResultNeighCells, "Different haveMeasResultNeighCells!");
977 
978  if (srcMeas.haveMeasResultNeighCells)
979  {
980  std::list<LteRrcSap::MeasResultEutra>::iterator itsrc = srcMeas.measResultListEutra.begin ();
981  std::list<LteRrcSap::MeasResultEutra>::iterator itdst = dstMeas.measResultListEutra.begin ();
982  for (; itsrc != srcMeas.measResultListEutra.end (); itsrc++, itdst++)
983  {
984  NS_TEST_ASSERT_MSG_EQ (itsrc->physCellId, itdst->physCellId, "Different physCellId!");
985 
986  NS_TEST_ASSERT_MSG_EQ (itsrc->haveCgiInfo, itdst->haveCgiInfo, "Different haveCgiInfo!");
987  if (itsrc->haveCgiInfo)
988  {
989  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentity, itdst->cgiInfo.plmnIdentity, "Different cgiInfo.plmnIdentity!");
990  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.cellIdentity, itdst->cgiInfo.cellIdentity, "Different cgiInfo.cellIdentity!");
991  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.trackingAreaCode, itdst->cgiInfo.trackingAreaCode, "Different cgiInfo.trackingAreaCode!");
992  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentityList.size (), itdst->cgiInfo.plmnIdentityList.size (), "Different cgiInfo.plmnIdentityList.size()!");
993 
994  if (!itsrc->cgiInfo.plmnIdentityList.empty ())
995  {
996  std::list<uint32_t>::iterator itsrc2 = itsrc->cgiInfo.plmnIdentityList.begin ();
997  std::list<uint32_t>::iterator itdst2 = itdst->cgiInfo.plmnIdentityList.begin ();
998  for (; itsrc2 != itsrc->cgiInfo.plmnIdentityList.begin (); itsrc2++, itdst2++)
999  {
1000  NS_TEST_ASSERT_MSG_EQ (*itsrc2, *itdst2, "Different plmnId elements!");
1001  }
1002  }
1003  }
1004 
1005  NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrpResult, itdst->haveRsrpResult, "Different haveRsrpResult!");
1006  if (itsrc->haveRsrpResult)
1007  {
1008  NS_TEST_ASSERT_MSG_EQ (itsrc->rsrpResult, itdst->rsrpResult, "Different rsrpResult!");
1009  }
1010 
1011  NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrqResult, itdst->haveRsrqResult, "Different haveRsrqResult!");
1012  if (itsrc->haveRsrqResult)
1013  {
1014  NS_TEST_ASSERT_MSG_EQ (itsrc->rsrqResult, itdst->rsrqResult, "Different rsrqResult!");
1015  }
1016 
1017  }
1018  }
1019 
1020  packet = 0;
1021 }
1022 
1023 // --------------------------- CLASS Asn1EncodingSuite -----------------------------
1025 {
1026 public:
1027  Asn1EncodingSuite ();
1028 };
1029 
1031  : TestSuite ("test-asn1-encoding", UNIT)
1032 {
1033  NS_LOG_FUNCTION (this);
1034  AddTestCase (new RrcConnectionRequestTestCase (), TestCase::QUICK);
1035  AddTestCase (new RrcConnectionSetupTestCase (), TestCase::QUICK);
1036  AddTestCase (new RrcConnectionSetupCompleteTestCase (), TestCase::QUICK);
1038  AddTestCase (new RrcConnectionReconfigurationTestCase (), TestCase::QUICK);
1039  AddTestCase (new HandoverPreparationInfoTestCase (), TestCase::QUICK);
1040  AddTestCase (new RrcConnectionReestablishmentRequestTestCase (), TestCase::QUICK);
1041  AddTestCase (new RrcConnectionReestablishmentTestCase (), TestCase::QUICK);
1043  AddTestCase (new RrcConnectionRejectTestCase (), TestCase::QUICK);
1044  AddTestCase (new MeasurementReportTestCase (), TestCase::QUICK);
1045 }
1046 
1048 
RrcHeaderTestCase(std::string s)
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:268
SystemInformationBlockType2 sourceSystemInformationBlockType2
Definition: lte-rrc-sap.h:553
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
PdschConfigDedicated pdschConfigDedicated
Definition: lte-rrc-sap.h:204
std::list< MeasObjectToAddMod > measObjectToAddModList
Definition: lte-rrc-sap.h:463
enum ns3::LteRrcSap::ReportConfigEutra::@70 triggerType
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
Definition: lte-rrc-sap.h:200
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition...
Definition: lte-rrc-sap.h:349
std::list< CellsToAddMod > cellsToAddModList
Definition: lte-rrc-sap.h:294
Asn1EncodingSuite asn1EncodingSuite
QuantityConfig quantityConfig
Definition: lte-rrc-sap.h:469
std::list< uint8_t > reportConfigToRemoveList
Definition: lte-rrc-sap.h:464
std::list< MeasResultEutra > measResultListEutra
Definition: lte-rrc-sap.h:582
A suite of tests to run.
Definition: test.h:1333
enum ns3::LteRrcSap::ReportConfigEutra::@73 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:339
void SetMessage(LteRrcSap::RrcConnectionRequest msg)
Receives a RrcConnectionRequest IE and stores the contents into the class attributes.
void SetMessage(LteRrcSap::RrcConnectionSetupCompleted msg)
Receives a RrcConnectionSetupCompleted IE and stores the contents into the class attributes.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Receives a RrcConnectionReestablishmentRequest IE and stores the contents into the class attributes...
static std::string sprintPacketContentsHex(Ptr< Packet > pkt)
std::list< SrbToAddMod > srbToAddModList
Definition: lte-rrc-sap.h:253
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:611
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
std::list< uint8_t > measObjectToRemoveList
Definition: lte-rrc-sap.h:462
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:792
enum ns3::LteRrcSap::ReportConfigEutra::@71 eventId
Choice of E-UTRA event triggered reporting criteria.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes...
enum ns3::LteRrcSap::MeasGapConfig::@77 gapOffsetChoice
void SetMessage(LteRrcSap::RrcConnectionReestablishment msg)
Receives a RrcConnectionReestablishment IE and stores the contents into the class attributes...
static void LogPacketInfo(T source, std::string s)
encapsulates test code
Definition: test.h:1147
static void LogPacketContents(Ptr< Packet > pkt)
RachConfigDedicated rachConfigDedicated
Definition: lte-rrc-sap.h:506
enum ns3::LteRrcSap::ThresholdEutra::@69 choice
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE...
std::list< BlackCellsToAddMod > blackCellsToAddModList
Definition: lte-rrc-sap.h:296
SystemInformationBlockType1 sourceSystemInformationBlockType1
Definition: lte-rrc-sap.h:552
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
static std::string sprintPacketContentsBin(Ptr< Packet > pkt)
This class manages the serialization/deserialization of RrcConnectionSetup IE.
static std::string sprintPacketContentsHex(Ptr< Packet > pkt)
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:298
#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:161
enum ns3::LteRrcSap::MeasGapConfig::@76 type
This class manages the serialization/deserialization of RrcConnectionReject IE.
std::list< MeasIdToAddMod > measIdToAddModList
Definition: lte-rrc-sap.h:467
PhysicalConfigDedicated physicalConfigDedicated
Definition: lte-rrc-sap.h:257
enum ns3::LteRrcSap::RlcConfig::@65 choice
void SetMessage(LteRrcSap::RrcConnectionReject msg)
Receives a RrcConnectionReject IE and stores the contents into the class attributes.
virtual void DoRun(void)
Implementation to actually run this TestCase.
MobilityStateParameters mobilityStateParameters
Definition: lte-rrc-sap.h:456
This class manages the serialization/deserialization of RRCConnectionReestablishmentRequest IE...
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:595
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetMessage(LteRrcSap::MeasurementReport msg)
Receives a MeasurementReport IE and stores the contents into the class attributes.
RadioResourceConfigDedicated sourceRadioResourceConfig
Definition: lte-rrc-sap.h:549
void SetMessage(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Receives a RrcConnectionReconfigurationCompleted IE and stores the contents into the class attributes...
bool reportOnLeave
Indicates whether or not the UE shall initiate the measurement reporting procedure when the leaving c...
Definition: lte-rrc-sap.h:343
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t maxReportCells
Maximum number of cells, excluding the serving cell, to be included in the measurement report...
Definition: lte-rrc-sap.h:373
enum ns3::LteRrcSap::ReportConfigEutra::@75 reportInterval
Indicates the interval between periodical reports.
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:629
enum ns3::LteRrcSap::ReportConfigEutra::@72 purpose
This class manages the serialization/deserialization of RrcConnectionRequest IE.
This class manages the serialization/deserialization of HandoverPreparationInfo IE.
MeasGapConfig measGapConfig
Definition: lte-rrc-sap.h:471
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:317
uint8_t reportAmount
Number of measurement reports applicable, always assumed to be infinite.
Definition: lte-rrc-sap.h:396
RadioResourceConfigCommonSib radioResourceConfigCommon
Definition: lte-rrc-sap.h:536
This class provides common functions to be inherited by the children TestCases.
void SetMessage(LteRrcSap::HandoverPreparationInfo msg)
Receives a HandoverPreparationInfo IE and stores the contents into the class attributes.
RadioResourceConfigCommon radioResourceConfigCommon
Definition: lte-rrc-sap.h:504
This class manages the serialization/deserialization of MeasurementReport IE.
CarrierBandwidthEutra carrierBandwidth
Definition: lte-rrc-sap.h:502
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:346
virtual void DoRun(void)
Implementation to actually run this TestCase.
LogicalChannelConfig logicalChannelConfig
Definition: lte-rrc-sap.h:220
SpeedStatePars speedStatePars
Definition: lte-rrc-sap.h:475
This class manages the serialization/deserialization of RrcConnectionReconfiguration IE...
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetMessage(LteRrcSap::RrcConnectionSetup msg)
Receives a RrcConnectionSetup IE and stores the contents into the class attributes.
std::list< uint8_t > blackCellsToRemoveList
Definition: lte-rrc-sap.h:295
std::list< DrbToAddMod > drbToAddModList
Definition: lte-rrc-sap.h:254
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:236
void AssertEqualRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd1, LteRrcSap::RadioResourceConfigDedicated rrcd2)
This class manages the serialization/deserialization of RrcConnectionReestablishmentComplete IE...
void SetMessage(LteRrcSap::RrcConnectionReconfiguration msg)
Receives a RrcConnectionReconfiguration IE and stores the contents into the class attributes...
This class manages the serialization/deserialization of RrcConnectionReestablishment IE...
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:356
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
enum ns3::LteRrcSap::ReportConfigEutra::@74 reportQuantity
The quantities to be included in the measurement report, always assumed to be BOTH.
virtual void DoRun(void)
Implementation to actually run this TestCase.
std::list< uint8_t > cellsToRemoveList
Definition: lte-rrc-sap.h:293
LteRrcSap::RadioResourceConfigDedicated CreateRadioResourceConfigDedicated()
enum ns3::LteRrcSap::SoundingRsUlConfigDedicated::@67 type
static std::string sprintPacketContentsBin(Ptr< Packet > pkt)
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:352
std::list< uint8_t > measIdToRemoveList
Definition: lte-rrc-sap.h:466
std::list< ReportConfigToAddMod > reportConfigToAddModList
Definition: lte-rrc-sap.h:465
enum ns3::LteRrcSap::SpeedStatePars::@78 type
SpeedStateScaleFactors timeToTriggerSf
Definition: lte-rrc-sap.h:457
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE...
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:257
RaSupervisionInfo raSupervisionInfo
Definition: lte-rrc-sap.h:237
MasterInformationBlock sourceMasterInformationBlock
Definition: lte-rrc-sap.h:551
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:340
virtual void DoRun(void)
Implementation to actually run this TestCase.