A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("Asn1EncodingTest");
34 
35 using namespace ns3;
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  rrd.physicalConfigDedicated = physicalConfigDedicated;
154 
155  return rrd;
156 }
157 
158 void
160 {
161  NS_TEST_ASSERT_MSG_EQ (rrcd1.srbToAddModList.size (), rrcd2.srbToAddModList.size (),"SrbToAddModList different sizes");
162 
163  std::list<LteRrcSap::SrbToAddMod> srcSrbToAddModList = rrcd1.srbToAddModList;
164  std::list<LteRrcSap::SrbToAddMod>::iterator it1 = srcSrbToAddModList.begin ();
165  std::list<LteRrcSap::SrbToAddMod> dstSrbToAddModList = rrcd2.srbToAddModList;
166  std::list<LteRrcSap::SrbToAddMod>::iterator it2 = dstSrbToAddModList.begin ();
167 
168  for (; it1 != srcSrbToAddModList.end (); it1++, it2++)
169  {
170  NS_TEST_ASSERT_MSG_EQ (it1->srbIdentity,it2->srbIdentity, "srbIdentity");
171  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.priority,it2->logicalChannelConfig.priority, "logicalChannelConfig.priority");
172  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.prioritizedBitRateKbps,it2->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
173  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.bucketSizeDurationMs,it2->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
174  NS_TEST_ASSERT_MSG_EQ (it1->logicalChannelConfig.logicalChannelGroup,it2->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
175  }
176 
177  NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToAddModList.size (), rrcd2.drbToAddModList.size (),"DrbToAddModList different sizes");
178 
179  std::list<LteRrcSap::DrbToAddMod> srcDrbToAddModList = rrcd1.drbToAddModList;
180  std::list<LteRrcSap::DrbToAddMod>::iterator it3 = srcDrbToAddModList.begin ();
181  std::list<LteRrcSap::DrbToAddMod> dstDrbToAddModList = rrcd2.drbToAddModList;
182  std::list<LteRrcSap::DrbToAddMod>::iterator it4 = dstDrbToAddModList.begin ();
183 
184  for (; it3 != srcDrbToAddModList.end (); it3++, it4++)
185  {
186  NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
187  NS_TEST_ASSERT_MSG_EQ (it3->drbIdentity,it4->drbIdentity, "drbIdentity");
188  NS_TEST_ASSERT_MSG_EQ (it3->rlcConfig.choice,it4->rlcConfig.choice, "rlcConfig.choice");
189  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelIdentity,it4->logicalChannelIdentity, "logicalChannelIdentity");
190  NS_TEST_ASSERT_MSG_EQ (it3->epsBearerIdentity,it4->epsBearerIdentity, "epsBearerIdentity");
191 
192  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.priority,it4->logicalChannelConfig.priority, "logicalChannelConfig.priority");
193  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.prioritizedBitRateKbps,it4->logicalChannelConfig.prioritizedBitRateKbps, "logicalChannelConfig.prioritizedBitRateKbps");
194  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.bucketSizeDurationMs,it4->logicalChannelConfig.bucketSizeDurationMs, "logicalChannelConfig.bucketSizeDurationMs");
195  NS_TEST_ASSERT_MSG_EQ (it3->logicalChannelConfig.logicalChannelGroup,it4->logicalChannelConfig.logicalChannelGroup, "logicalChannelConfig.logicalChannelGroup");
196  }
197 
198  NS_TEST_ASSERT_MSG_EQ (rrcd1.drbToReleaseList.size (), rrcd2.drbToReleaseList.size (),"DrbToReleaseList different sizes");
199 
200  std::list<uint8_t> srcDrbToReleaseList = rrcd1.drbToReleaseList;
201  std::list<uint8_t> dstDrbToReleaseList = rrcd2.drbToReleaseList;
202  std::list<uint8_t>::iterator it5 = srcDrbToReleaseList.begin ();
203  std::list<uint8_t>::iterator it6 = dstDrbToReleaseList.begin ();
204 
205  for (; it5 != srcDrbToReleaseList.end (); it5++, it6++)
206  {
207  NS_TEST_ASSERT_MSG_EQ (*it5, *it6,"element != in DrbToReleaseList");
208  }
209 
210  NS_TEST_ASSERT_MSG_EQ (rrcd1.havePhysicalConfigDedicated,rrcd2.havePhysicalConfigDedicated, "HavePhysicalConfigDedicated");
211 
212  if (rrcd1.havePhysicalConfigDedicated)
213  {
216  "haveSoundingRsUlConfigDedicated");
217 
220  "soundingRsUlConfigDedicated.type");
223  "soundingRsUlConfigDedicated.srsBandwidth");
224 
227  "soundingRsUlConfigDedicated.srsConfigIndex");
228 
231  "haveAntennaInfoDedicated");
232 
234  {
237  "antennaInfo.transmissionMode");
238  }
239  }
240 }
241 
242 // --------------------------- CLASS RrcConnectionRequestTestCase -----------------------------
244 {
245 public:
247  virtual void DoRun (void);
248 };
249 
251 {
252 }
253 
254 void
256 {
257  packet = Create<Packet> ();
258  NS_LOG_DEBUG ("============= RrcConnectionRequestTestCase ===========");
259 
261  msg.ueIdentity = 0x83fecafecaULL;
262 
264  source.SetMessage (msg);
265 
266  // Log source info
267  TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (source,"SOURCE");
268 
269  // Add header
270  packet->AddHeader (source);
271 
272  // Log serialized packet contents
274 
275  // Remove header
276  RrcConnectionRequestHeader destination;
277  packet->RemoveHeader (destination);
278 
279  // Log destination info
280  TestUtils::LogPacketInfo<RrcConnectionRequestHeader> (destination,"DESTINATION");
281 
282  // Check that the destination and source headers contain the same values
283  NS_TEST_ASSERT_MSG_EQ (source.GetMmec (),destination.GetMmec (), "Different m_mmec!");
284  NS_TEST_ASSERT_MSG_EQ (source.GetMtmsi (),destination.GetMtmsi (), "Different m_mTmsi!");
285 
286  packet = 0;
287 }
288 
289 // --------------------------- CLASS RrcConnectionSetupTestCase -----------------------------
291 {
292 public:
294  virtual void DoRun (void);
295 };
296 
298 {
299 }
300 
301 void
303 {
304  packet = Create<Packet> ();
305  NS_LOG_DEBUG ("============= RrcConnectionSetupTestCase ===========");
306 
308  msg.rrcTransactionIdentifier = 3;
310 
312  source.SetMessage (msg);
313 
314  // Log source info
315  TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (source,"SOURCE");
316 
317  // Add header
318  packet->AddHeader (source);
319 
320  // Log serialized packet contents
322 
323  // remove header
324  RrcConnectionSetupHeader destination;
325  packet->RemoveHeader (destination);
326 
327  // Log destination info
328  TestUtils::LogPacketInfo<RrcConnectionSetupHeader> (destination,"DESTINATION");
329 
330  // Check that the destination and source headers contain the same values
331  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
332 
333  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (),destination.GetRadioResourceConfigDedicated ());
334 
335  packet = 0;
336 }
337 
338 // --------------------------- CLASS RrcConnectionSetupCompleteTestCase -----------------------------
340 {
341 public:
343  virtual void DoRun (void);
344 };
345 
347 {
348 }
349 
350 void
352 {
353  packet = Create<Packet> ();
354  NS_LOG_DEBUG ("============= RrcConnectionSetupCompleteTestCase ===========");
355 
357  msg.rrcTransactionIdentifier = 3;
358 
360  source.SetMessage (msg);
361 
362  // Log source info
363  TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (source,"SOURCE");
364 
365  // Add header
366  packet->AddHeader (source);
367 
368  // Log serialized packet contents
370 
371  // Remove header
373  packet->RemoveHeader (destination);
374 
375  // Log destination info
376  TestUtils::LogPacketInfo<RrcConnectionSetupCompleteHeader> (destination,"DESTINATION");
377 
378  // Check that the destination and source headers contain the same values
379  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
380 
381  packet = 0;
382 }
383 
384 // --------------------------- CLASS RrcConnectionReconfigurationCompleteTestCase -----------------------------
386 {
387 public:
389  virtual void DoRun (void);
390 };
391 
393  : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationCompleteTestCase")
394 {
395 }
396 
397 void
399 {
400  packet = Create<Packet> ();
401  NS_LOG_DEBUG ("============= RrcConnectionReconfigurationCompleteTestCase ===========");
402 
404  msg.rrcTransactionIdentifier = 2;
405 
407  source.SetMessage (msg);
408 
409  // Log source info
410  TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (source,"SOURCE");
411 
412  // Add header
413  packet->AddHeader (source);
414 
415  // Log serialized packet contents
417 
418  // remove header
420  packet->RemoveHeader (destination);
421 
422  // Log destination info
423  TestUtils::LogPacketInfo<RrcConnectionReconfigurationCompleteHeader> (destination,"DESTINATION");
424 
425  // Check that the destination and source headers contain the same values
426  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
427 
428  packet = 0;
429 }
430 
431 // --------------------------- CLASS RrcConnectionReconfigurationTestCase -----------------------------
433 {
434 public:
436  virtual void DoRun (void);
437 };
438 
440  : RrcHeaderTestCase ("Testing RrcConnectionReconfigurationTestCase")
441 {
442 }
443 
444 void
446 {
447  packet = Create<Packet> ();
448  NS_LOG_DEBUG ("============= RrcConnectionReconfigurationTestCase ===========");
449 
451  msg.rrcTransactionIdentifier = 2;
452 
453  msg.haveMeasConfig = true;
454 
455  msg.measConfig.haveQuantityConfig = true;
458 
459  msg.measConfig.haveMeasGapConfig = true;
460  msg.measConfig.measGapConfig.type = LteRrcSap::MeasGapConfig::SETUP;
461  msg.measConfig.measGapConfig.gapOffsetChoice = LteRrcSap::MeasGapConfig::GP0;
463 
464  msg.measConfig.haveSmeasure = true;
465  msg.measConfig.sMeasure = 57;
466 
467  msg.measConfig.haveSpeedStatePars = true;
468  msg.measConfig.speedStatePars.type = LteRrcSap::SpeedStatePars::SETUP;
475 
476  msg.measConfig.measObjectToRemoveList.push_back (23);
477  msg.measConfig.measObjectToRemoveList.push_back (13);
478 
479  msg.measConfig.reportConfigToRemoveList.push_back (7);
480  msg.measConfig.reportConfigToRemoveList.push_back (16);
481 
482  msg.measConfig.measIdToRemoveList.push_back (4);
483  msg.measConfig.measIdToRemoveList.push_back (18);
484 
485  // Set measObjectToAddModList
486  LteRrcSap::MeasObjectToAddMod measObjectToAddMod;
487  measObjectToAddMod.measObjectId = 3;
488  measObjectToAddMod.measObjectEutra.carrierFreq = 21;
489  measObjectToAddMod.measObjectEutra.allowedMeasBandwidth = 15;
490  measObjectToAddMod.measObjectEutra.presenceAntennaPort1 = true;
491  measObjectToAddMod.measObjectEutra.neighCellConfig = 3;
492  measObjectToAddMod.measObjectEutra.offsetFreq = -12;
493  measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (5);
494  measObjectToAddMod.measObjectEutra.cellsToRemoveList.push_back (2);
495  measObjectToAddMod.measObjectEutra.blackCellsToRemoveList.push_back (1);
496  measObjectToAddMod.measObjectEutra.haveCellForWhichToReportCGI = true;
497  measObjectToAddMod.measObjectEutra.cellForWhichToReportCGI = 250;
498  LteRrcSap::CellsToAddMod cellsToAddMod;
499  cellsToAddMod.cellIndex = 20;
500  cellsToAddMod.physCellId = 14;
501  cellsToAddMod.cellIndividualOffset = 22;
502  measObjectToAddMod.measObjectEutra.cellsToAddModList.push_back (cellsToAddMod);
503  LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
504  blackCellsToAddMod.cellIndex = 18;
505  blackCellsToAddMod.physCellIdRange.start = 128;
506  blackCellsToAddMod.physCellIdRange.haveRange = true;
507  blackCellsToAddMod.physCellIdRange.range = 128;
508  measObjectToAddMod.measObjectEutra.blackCellsToAddModList.push_back (blackCellsToAddMod);
509  msg.measConfig.measObjectToAddModList.push_back (measObjectToAddMod);
510 
511  // Set reportConfigToAddModList
512  LteRrcSap::ReportConfigToAddMod reportConfigToAddMod;
513  reportConfigToAddMod.reportConfigId = 22;
514  reportConfigToAddMod.reportConfigEutra.triggerType = LteRrcSap::ReportConfigEutra::EVENT;
515  reportConfigToAddMod.reportConfigEutra.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
516  reportConfigToAddMod.reportConfigEutra.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
517  reportConfigToAddMod.reportConfigEutra.threshold1.range = 15;
518  reportConfigToAddMod.reportConfigEutra.threshold2.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRQ;
519  reportConfigToAddMod.reportConfigEutra.threshold2.range = 10;
520  reportConfigToAddMod.reportConfigEutra.reportOnLeave = true;
521  reportConfigToAddMod.reportConfigEutra.a3Offset = -25;
522  reportConfigToAddMod.reportConfigEutra.hysteresis = 18;
523  reportConfigToAddMod.reportConfigEutra.timeToTrigger = 100;
524  reportConfigToAddMod.reportConfigEutra.purpose = LteRrcSap::ReportConfigEutra::REPORT_STRONGEST_CELLS;
525  reportConfigToAddMod.reportConfigEutra.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRQ;
526  reportConfigToAddMod.reportConfigEutra.reportQuantity = LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY;
527  reportConfigToAddMod.reportConfigEutra.maxReportCells = 5;
528  reportConfigToAddMod.reportConfigEutra.reportInterval = LteRrcSap::ReportConfigEutra::MIN60;
529  reportConfigToAddMod.reportConfigEutra.reportAmount = 16;
530  msg.measConfig.reportConfigToAddModList.push_back (reportConfigToAddMod);
531 
532  // Set measIdToAddModList
533  LteRrcSap::MeasIdToAddMod measIdToAddMod,measIdToAddMod2;
534  measIdToAddMod.measId = 7;
535  measIdToAddMod.measObjectId = 6;
536  measIdToAddMod.reportConfigId = 5;
537  measIdToAddMod2.measId = 4;
538  measIdToAddMod2.measObjectId = 8;
539  measIdToAddMod2.reportConfigId = 12;
540  msg.measConfig.measIdToAddModList.push_back (measIdToAddMod);
541  msg.measConfig.measIdToAddModList.push_back (measIdToAddMod2);
542 
543  msg.haveMobilityControlInfo = true;
558 
560 
562 
564  source.SetMessage (msg);
565 
566  // Log source info
567  TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (source,"SOURCE");
568 
569  // Add header
570  packet->AddHeader (source);
571 
572  // Log serialized packet contents
574 
575  // remove header
577  packet->RemoveHeader (destination);
578 
579  // Log destination info
580  TestUtils::LogPacketInfo<RrcConnectionReconfigurationHeader> (destination,"DESTINATION");
581 
582  // Check that the destination and source headers contain the same values
583  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (),destination.GetRrcTransactionIdentifier (), "RrcTransactionIdentifier");
584  NS_TEST_ASSERT_MSG_EQ (source.GetHaveMeasConfig (),destination.GetHaveMeasConfig (), "GetHaveMeasConfig");
585  NS_TEST_ASSERT_MSG_EQ (source.GetHaveMobilityControlInfo (),destination.GetHaveMobilityControlInfo (), "GetHaveMobilityControlInfo");
586  NS_TEST_ASSERT_MSG_EQ (source.GetHaveRadioResourceConfigDedicated (),destination.GetHaveRadioResourceConfigDedicated (), "GetHaveRadioResourceConfigDedicated");
587 
588  if ( source.GetHaveMobilityControlInfo () )
589  {
590  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().targetPhysCellId,destination.GetMobilityControlInfo ().targetPhysCellId, "GetMobilityControlInfo().targetPhysCellId");
591  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierFreq,destination.GetMobilityControlInfo ().haveCarrierFreq, "GetMobilityControlInfo().haveCarrierFreq");
592  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveCarrierBandwidth,destination.GetMobilityControlInfo ().haveCarrierBandwidth, "GetMobilityControlInfo().haveCarrierBandwidth");
593  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().newUeIdentity,destination.GetMobilityControlInfo ().newUeIdentity, "GetMobilityControlInfo().newUeIdentity");
594  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().haveRachConfigDedicated,destination.GetMobilityControlInfo ().haveRachConfigDedicated, "GetMobilityControlInfo().haveRachConfigDedicated");
595 
596  if (source.GetMobilityControlInfo ().haveCarrierFreq)
597  {
598  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierFreq.dlCarrierFreq,
599  destination.GetMobilityControlInfo ().carrierFreq.dlCarrierFreq,
600  "GetMobilityControlInfo().carrierFreq.dlCarrierFreq");
601  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierFreq.ulCarrierFreq,
602  destination.GetMobilityControlInfo ().carrierFreq.ulCarrierFreq,
603  "GetMobilityControlInfo().carrierFreq.ulCarrierFreq");
604  }
605 
606  if (source.GetMobilityControlInfo ().haveCarrierBandwidth)
607  {
608  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierBandwidth.dlBandwidth,
609  destination.GetMobilityControlInfo ().carrierBandwidth.dlBandwidth,
610  "GetMobilityControlInfo().carrierBandwidth.dlBandwidth");
611  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().carrierBandwidth.ulBandwidth,
612  destination.GetMobilityControlInfo ().carrierBandwidth.ulBandwidth,
613  "GetMobilityControlInfo().carrierBandwidth.ulBandwidth");
614  }
615 
616  if (source.GetMobilityControlInfo ().haveRachConfigDedicated)
617  {
618  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().rachConfigDedicated.raPreambleIndex,
619  destination.GetMobilityControlInfo ().rachConfigDedicated.raPreambleIndex,
620  "GetMobilityControlInfo().rachConfigDedicated.raPreambleIndex");
621  NS_TEST_ASSERT_MSG_EQ (source.GetMobilityControlInfo ().rachConfigDedicated.raPrachMaskIndex,
622  destination.GetMobilityControlInfo ().rachConfigDedicated.raPrachMaskIndex,
623  "GetMobilityControlInfo().rachConfigDedicated.raPrachMaskIndex");
624  }
625  }
626 
627  if (source.GetHaveRadioResourceConfigDedicated ())
628  {
629  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (), destination.GetRadioResourceConfigDedicated ());
630  }
631 
632  packet = 0;
633 }
634 
635 // --------------------------- CLASS HandoverPreparationInfoTestCase -----------------------------
637 {
638 public:
640  virtual void DoRun (void);
641 };
642 
644 {
645 }
646 
647 void
649 {
650  packet = Create<Packet> ();
651  NS_LOG_DEBUG ("============= HandoverPreparationInfoTestCase ===========");
652 
655  msg.asConfig.sourceUeIdentity = 11;
659 
664 
670 
675 
677  source.SetMessage (msg);
678 
679  // Log source info
680  TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (source,"SOURCE");
681 
682  // Add header
683  packet->AddHeader (source);
684 
685  // Log serialized packet contents
687 
688  // remove header
689  HandoverPreparationInfoHeader destination;
690  packet->RemoveHeader (destination);
691 
692  // Log destination info
693  TestUtils::LogPacketInfo<HandoverPreparationInfoHeader> (destination,"DESTINATION");
694 
695  // Check that the destination and source headers contain the same values
696  AssertEqualRadioResourceConfigDedicated (source.GetAsConfig ().sourceRadioResourceConfig, destination.GetAsConfig ().sourceRadioResourceConfig);
697  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceUeIdentity, destination.GetAsConfig ().sourceUeIdentity, "sourceUeIdentity");
698  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceMasterInformationBlock.dlBandwidth,destination.GetAsConfig ().sourceMasterInformationBlock.dlBandwidth, "dlBandwidth");
699  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceMasterInformationBlock.systemFrameNumber, destination.GetAsConfig ().sourceMasterInformationBlock.systemFrameNumber, "systemFrameNumber");
700  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity, "plmnIdentity");
701  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIndication, "csgIndication");
702  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.cellIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.cellIdentity, "cellIdentity");
703  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity, destination.GetAsConfig ().sourceSystemInformationBlockType1.cellAccessRelatedInfo.csgIdentity, "csgIdentity");
704  NS_TEST_ASSERT_MSG_EQ (source.GetAsConfig ().sourceDlCarrierFreq, destination.GetAsConfig ().sourceDlCarrierFreq, "sourceDlCarrierFreq");
705 
706  packet = 0;
707 }
708 
709 // --------------------------- CLASS RrcConnectionReestablishmentRequestTestCase -----------------------------
711 {
712 public:
714  virtual void DoRun (void);
715 };
716 
718 {
719 }
720 
721 void
723 {
724  packet = Create<Packet> ();
725  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentRequestTestCase ===========");
726 
728  msg.ueIdentity.cRnti = 12;
729  msg.ueIdentity.physCellId = 21;
730  msg.reestablishmentCause = LteRrcSap::HANDOVER_FAILURE;
731 
733  source.SetMessage (msg);
734 
735  // Log source info
736  TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (source,"SOURCE");
737 
738  // Add header
739  packet->AddHeader (source);
740 
741  // Log serialized packet contents
743 
744  // remove header
746  packet->RemoveHeader (destination);
747 
748  // Log destination info
749  TestUtils::LogPacketInfo<RrcConnectionReestablishmentRequestHeader> (destination,"DESTINATION");
750 
751  // Check that the destination and source headers contain the same values
752  NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().cRnti, destination.GetUeIdentity ().cRnti, "cRnti");
753  NS_TEST_ASSERT_MSG_EQ (source.GetUeIdentity ().physCellId, destination.GetUeIdentity ().physCellId, "physCellId");
754  NS_TEST_ASSERT_MSG_EQ (source.GetReestablishmentCause (),destination.GetReestablishmentCause (), "ReestablishmentCause");
755 
756  packet = 0;
757 }
758 
759 // --------------------------- CLASS RrcConnectionReestablishmentTestCase -----------------------------
761 {
762 public:
764  virtual void DoRun (void);
765 };
766 
768 {
769 }
770 
771 void
773 {
774  packet = Create<Packet> ();
775  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentTestCase ===========");
776 
778  msg.rrcTransactionIdentifier = 2;
780 
782  source.SetMessage (msg);
783 
784  // Log source info
785  TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (source,"SOURCE");
786 
787  // Add header
788  packet->AddHeader (source);
789 
790  // Log serialized packet contents
792 
793  // remove header
795  packet->RemoveHeader (destination);
796 
797  // Log destination info
798  TestUtils::LogPacketInfo<RrcConnectionReestablishmentHeader> (destination,"DESTINATION");
799 
800  // Check that the destination and source headers contain the same values
801  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
802  AssertEqualRadioResourceConfigDedicated (source.GetRadioResourceConfigDedicated (),destination.GetRadioResourceConfigDedicated ());
803 
804  packet = 0;
805 }
806 
807 // --------------------------- CLASS RrcConnectionReestablishmentCompleteTestCase -----------------------------
809 {
810 public:
812  virtual void DoRun (void);
813 };
814 
816 {
817 }
818 
819 void
821 {
822  packet = Create<Packet> ();
823  NS_LOG_DEBUG ("============= RrcConnectionReestablishmentCompleteTestCase ===========");
824 
826  msg.rrcTransactionIdentifier = 3;
827 
829  source.SetMessage (msg);
830 
831  // Log source info
832  TestUtils::LogPacketInfo<RrcConnectionReestablishmentCompleteHeader> (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<RrcConnectionReestablishmentCompleteHeader> (destination,"DESTINATION");
846 
847  // Check that the destination and source headers contain the same values
848  NS_TEST_ASSERT_MSG_EQ (source.GetRrcTransactionIdentifier (), destination.GetRrcTransactionIdentifier (), "rrcTransactionIdentifier");
849 
850  packet = 0;
851 }
852 
853 // --------------------------- CLASS RrcConnectionRejectTestCase -----------------------------
855 {
856 public:
858  virtual void DoRun (void);
859 };
860 
862 {
863 }
864 
865 void
867 {
868  packet = Create<Packet> ();
869  NS_LOG_DEBUG ("============= RrcConnectionRejectTestCase ===========");
870 
872  msg.waitTime = 2;
873 
875  source.SetMessage (msg);
876 
877  // Log source info
878  TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (source,"SOURCE");
879 
880  // Add header
881  packet->AddHeader (source);
882 
883  // Log serialized packet contents
885 
886  // remove header
887  RrcConnectionRejectHeader destination;
888  packet->RemoveHeader (destination);
889 
890  // Log destination info
891  TestUtils::LogPacketInfo<RrcConnectionRejectHeader> (destination,"DESTINATION");
892 
893  // Check that the destination and source headers contain the same values
894  NS_TEST_ASSERT_MSG_EQ (source.GetMessage ().waitTime, destination.GetMessage ().waitTime, "Different waitTime!");
895 
896  packet = 0;
897 }
898 
899 // --------------------------- CLASS MeasurementReportTestCase -----------------------------
901 {
902 public:
904  virtual void DoRun (void);
905 };
906 
908 {
909 }
910 
911 void
913 {
914  packet = Create<Packet> ();
915  NS_LOG_DEBUG ("============= MeasurementReportTestCase ===========");
916 
918  msg.measResults.measId = 5;
919  msg.measResults.rsrpResult = 18;
920  msg.measResults.rsrqResult = 21;
922 
923  LteRrcSap::MeasResultEutra mResEutra;
924  mResEutra.physCellId = 9;
925  mResEutra.haveRsrpResult = true;
926  mResEutra.rsrpResult = 33;
927  mResEutra.haveRsrqResult = true;
928  mResEutra.rsrqResult = 22;
929  mResEutra.haveCgiInfo = true;
930  mResEutra.cgiInfo.plmnIdentity = 7;
931  mResEutra.cgiInfo.cellIdentity = 6;
932  mResEutra.cgiInfo.trackingAreaCode = 5;
933  msg.measResults.measResultListEutra.push_back (mResEutra);
934 
935 
937  source.SetMessage (msg);
938 
939  // Log source info
940  TestUtils::LogPacketInfo<MeasurementReportHeader> (source,"SOURCE");
941 
942  // Add header
943  packet->AddHeader (source);
944 
945  // Log serialized packet contents
947 
948  // remove header
949  MeasurementReportHeader destination;
950  packet->RemoveHeader (destination);
951 
952  // Log destination info
953  TestUtils::LogPacketInfo<MeasurementReportHeader> (destination,"DESTINATION");
954 
955  // Check that the destination and source headers contain the same values
956  LteRrcSap::MeasResults srcMeas = source.GetMessage ().measResults;
957  LteRrcSap::MeasResults dstMeas = destination.GetMessage ().measResults;
958 
959  NS_TEST_ASSERT_MSG_EQ (srcMeas.measId, dstMeas.measId, "Different measId!");
960  NS_TEST_ASSERT_MSG_EQ (srcMeas.rsrpResult, dstMeas.rsrpResult, "Different rsrpResult!");
961  NS_TEST_ASSERT_MSG_EQ (srcMeas.rsrqResult, dstMeas.rsrqResult, "Different rsrqResult!");
962  NS_TEST_ASSERT_MSG_EQ (srcMeas.haveMeasResultNeighCells, dstMeas.haveMeasResultNeighCells, "Different haveMeasResultNeighCells!");
963 
964  if (srcMeas.haveMeasResultNeighCells)
965  {
966  std::list<LteRrcSap::MeasResultEutra>::iterator itsrc = srcMeas.measResultListEutra.begin ();
967  std::list<LteRrcSap::MeasResultEutra>::iterator itdst = dstMeas.measResultListEutra.begin ();
968  for (; itsrc != srcMeas.measResultListEutra.end (); itsrc++, itdst++)
969  {
970  NS_TEST_ASSERT_MSG_EQ (itsrc->physCellId, itdst->physCellId, "Different physCellId!");
971 
972  NS_TEST_ASSERT_MSG_EQ (itsrc->haveCgiInfo, itdst->haveCgiInfo, "Different haveCgiInfo!");
973  if (itsrc->haveCgiInfo)
974  {
975  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentity, itdst->cgiInfo.plmnIdentity, "Different cgiInfo.plmnIdentity!");
976  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.cellIdentity, itdst->cgiInfo.cellIdentity, "Different cgiInfo.cellIdentity!");
977  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.trackingAreaCode, itdst->cgiInfo.trackingAreaCode, "Different cgiInfo.trackingAreaCode!");
978  NS_TEST_ASSERT_MSG_EQ (itsrc->cgiInfo.plmnIdentityList.size (), itdst->cgiInfo.plmnIdentityList.size (), "Different cgiInfo.plmnIdentityList.size()!");
979 
980  if (!itsrc->cgiInfo.plmnIdentityList.empty ())
981  {
982  std::list<uint32_t>::iterator itsrc2 = itsrc->cgiInfo.plmnIdentityList.begin ();
983  std::list<uint32_t>::iterator itdst2 = itdst->cgiInfo.plmnIdentityList.begin ();
984  for (; itsrc2 != itsrc->cgiInfo.plmnIdentityList.begin (); itsrc2++, itdst2++)
985  {
986  NS_TEST_ASSERT_MSG_EQ (*itsrc2, *itdst2, "Different plmnId elements!");
987  }
988  }
989  }
990 
991  NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrpResult, itdst->haveRsrpResult, "Different haveRsrpResult!");
992  if (itsrc->haveRsrpResult)
993  {
994  NS_TEST_ASSERT_MSG_EQ (itsrc->rsrpResult, itdst->rsrpResult, "Different rsrpResult!");
995  }
996 
997  NS_TEST_ASSERT_MSG_EQ (itsrc->haveRsrqResult, itdst->haveRsrqResult, "Different haveRsrqResult!");
998  if (itsrc->haveRsrqResult)
999  {
1000  NS_TEST_ASSERT_MSG_EQ (itsrc->rsrqResult, itdst->rsrqResult, "Different rsrqResult!");
1001  }
1002 
1003  }
1004  }
1005 
1006  packet = 0;
1007 }
1008 
1009 // --------------------------- CLASS Asn1EncodingSuite -----------------------------
1011 {
1012 public:
1013  Asn1EncodingSuite ();
1014 };
1015 
1017  : TestSuite ("test-asn1-encoding", UNIT)
1018 {
1019  NS_LOG_FUNCTION (this);
1020  AddTestCase (new RrcConnectionRequestTestCase (), TestCase::QUICK);
1021  AddTestCase (new RrcConnectionSetupTestCase (), TestCase::QUICK);
1022  AddTestCase (new RrcConnectionSetupCompleteTestCase (), TestCase::QUICK);
1024  AddTestCase (new RrcConnectionReconfigurationTestCase (), TestCase::QUICK);
1025  AddTestCase (new HandoverPreparationInfoTestCase (), TestCase::QUICK);
1026  AddTestCase (new RrcConnectionReestablishmentRequestTestCase (), TestCase::QUICK);
1027  AddTestCase (new RrcConnectionReestablishmentTestCase (), TestCase::QUICK);
1029  AddTestCase (new RrcConnectionRejectTestCase (), TestCase::QUICK);
1030  AddTestCase (new MeasurementReportTestCase (), TestCase::QUICK);
1031 }
1032 
1034 
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:490
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::list< MeasObjectToAddMod > measObjectToAddModList
Definition: lte-rrc-sap.h:400
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
Definition: lte-rrc-sap.h:140
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition...
Definition: lte-rrc-sap.h:286
std::list< CellsToAddMod > cellsToAddModList
Definition: lte-rrc-sap.h:231
Asn1EncodingSuite asn1EncodingSuite
QuantityConfig quantityConfig
Definition: lte-rrc-sap.h:406
std::list< uint8_t > reportConfigToRemoveList
Definition: lte-rrc-sap.h:401
enum ns3::LteRrcSap::ReportConfigEutra::@75 reportQuantity
The quantities to be included in the measurement report, always assumed to be BOTH.
std::list< MeasResultEutra > measResultListEutra
Definition: lte-rrc-sap.h:519
A suite of tests to run.
Definition: test.h:1105
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:276
enum ns3::LteRrcSap::SpeedStatePars::@79 type
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.
enum ns3::LteRrcSap::ReportConfigEutra::@72 eventId
Choice of E-UTRA event triggered reporting criteria.
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:190
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:548
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
std::list< uint8_t > measObjectToRemoveList
Definition: lte-rrc-sap.h:399
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:744
void SetMessage(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes...
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)
enum ns3::LteRrcSap::ReportConfigEutra::@76 reportInterval
Indicates the interval between periodical reports.
encapsulates test code
Definition: test.h:929
static void LogPacketContents(Ptr< Packet > pkt)
RachConfigDedicated rachConfigDedicated
Definition: lte-rrc-sap.h:443
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:233
SystemInformationBlockType1 sourceSystemInformationBlockType1
Definition: lte-rrc-sap.h:489
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.
enum ns3::LteRrcSap::SoundingRsUlConfigDedicated::@69 type
#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:148
Ptr< SampleEmitter > s
enum ns3::LteRrcSap::MeasGapConfig::@78 gapOffsetChoice
This class manages the serialization/deserialization of RrcConnectionReject IE.
std::list< MeasIdToAddMod > measIdToAddModList
Definition: lte-rrc-sap.h:404
PhysicalConfigDedicated physicalConfigDedicated
Definition: lte-rrc-sap.h:194
void SetMessage(LteRrcSap::RrcConnectionReject msg)
Receives a RrcConnectionReject IE and stores the contents into the class attributes.
enum ns3::LteRrcSap::ReportConfigEutra::@71 triggerType
virtual void DoRun(void)
Implementation to actually run this TestCase.
MobilityStateParameters mobilityStateParameters
Definition: lte-rrc-sap.h:393
This class manages the serialization/deserialization of RRCConnectionReestablishmentRequest IE...
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:532
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:486
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:280
enum ns3::LteRrcSap::MeasGapConfig::@77 type
enum ns3::LteRrcSap::ThresholdEutra::@70 choice
uint8_t maxReportCells
Maximum number of cells, excluding the serving cell, to be included in the measurement report...
Definition: lte-rrc-sap.h:310
RadioResourceConfigDedicated radioResourceConfigDedicated
Definition: lte-rrc-sap.h:566
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:408
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:254
uint8_t reportAmount
Number of measurement reports applicable, always assumed to be infinite.
Definition: lte-rrc-sap.h:333
RadioResourceConfigCommonSib radioResourceConfigCommon
Definition: lte-rrc-sap.h:473
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Definition: test.cc:184
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:441
This class manages the serialization/deserialization of MeasurementReport IE.
CarrierBandwidthEutra carrierBandwidth
Definition: lte-rrc-sap.h:439
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:283
virtual void DoRun(void)
Implementation to actually run this TestCase.
LogicalChannelConfig logicalChannelConfig
Definition: lte-rrc-sap.h:158
enum ns3::LteRrcSap::ReportConfigEutra::@74 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
SpeedStatePars speedStatePars
Definition: lte-rrc-sap.h:412
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:232
std::list< DrbToAddMod > drbToAddModList
Definition: lte-rrc-sap.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:213
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...
enum ns3::LteRrcSap::ReportConfigEutra::@73 purpose
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:381
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
std::list< uint8_t > cellsToRemoveList
Definition: lte-rrc-sap.h:230
LteRrcSap::RadioResourceConfigDedicated CreateRadioResourceConfigDedicated()
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:289
enum ns3::LteRrcSap::RlcConfig::@67 choice
std::list< uint8_t > measIdToRemoveList
Definition: lte-rrc-sap.h:403
std::list< ReportConfigToAddMod > reportConfigToAddModList
Definition: lte-rrc-sap.h:402
SpeedStateScaleFactors timeToTriggerSf
Definition: lte-rrc-sap.h:394
This class manages the serialization/deserialization of RrcConnectionSetupComplete IE...
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:253
RaSupervisionInfo raSupervisionInfo
Definition: lte-rrc-sap.h:175
MasterInformationBlock sourceMasterInformationBlock
Definition: lte-rrc-sap.h:488
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:277
virtual void DoRun(void)
Implementation to actually run this TestCase.