A Discrete-Event Network Simulator
API
lte-rrc-header.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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  * Modified by:
19  * Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
20  * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
21  */
22 
23 #include "lte-rrc-header.h"
24 
25 #include "ns3/log.h"
26 
27 #include <sstream>
28 #include <stdio.h>
29 
30 #define MAX_DRB 11 // According to section 6.4 3GPP TS 36.331
31 #define MAX_EARFCN 262143
32 #define MAX_RAT_CAPABILITIES 8
33 #define MAX_SI_MESSAGE 32
34 #define MAX_SIB 32
35 
36 #define MAX_REPORT_CONFIG_ID 32
37 #define MAX_OBJECT_ID 32
38 #define MAX_MEAS_ID 32
39 #define MAX_CELL_MEAS 32
40 #define MAX_CELL_REPORT 8
41 
42 #define MAX_SCELL_REPORT 5
43 #define MAX_SCELL_CONF 5
44 
45 namespace ns3
46 {
47 
48 NS_LOG_COMPONENT_DEFINE("RrcHeader");
49 
52 {
53 }
54 
55 TypeId
57 {
58  static TypeId tid = TypeId("ns3::RrcAsn1Header").SetParent<Header>().SetGroupName("Lte");
59  return tid;
60 }
61 
62 TypeId
64 {
65  return GetTypeId();
66 }
67 
68 int
70 {
71  return m_messageType;
72 }
73 
74 int
75 RrcAsn1Header::BandwidthToEnum(uint16_t bandwidth) const
76 {
77  int n;
78  switch (bandwidth)
79  {
80  case 6:
81  n = 0;
82  break;
83  case 15:
84  n = 1;
85  break;
86  case 25:
87  n = 2;
88  break;
89  case 50:
90  n = 3;
91  break;
92  case 75:
93  n = 4;
94  break;
95  case 100:
96  n = 5;
97  break;
98  default:
99  NS_FATAL_ERROR("Wrong bandwidth: " << bandwidth);
100  }
101  return n;
102 }
103 
104 uint16_t
106 {
107  uint16_t bw;
108  switch (n)
109  {
110  case 0:
111  bw = 6;
112  break;
113  case 1:
114  bw = 15;
115  break;
116  case 2:
117  bw = 25;
118  break;
119  case 3:
120  bw = 50;
121  break;
122  case 4:
123  bw = 75;
124  break;
125  case 5:
126  bw = 100;
127  break;
128  default:
129  NS_FATAL_ERROR("Wrong enum value for bandwidth: " << n);
130  }
131  return bw;
132 }
133 
134 void
135 RrcAsn1Header::SerializeDrbToAddModList(std::list<LteRrcSap::DrbToAddMod> drbToAddModList) const
136 {
137  // Serialize DRB-ToAddModList sequence-of
138  SerializeSequenceOf(drbToAddModList.size(), MAX_DRB, 1);
139 
140  // Serialize the elements in the sequence-of list
141  auto it = drbToAddModList.begin();
142  for (; it != drbToAddModList.end(); it++)
143  {
144  // Serialize DRB-ToAddMod sequence
145  // 5 optional fields. Extension marker is present.
146  std::bitset<5> drbToAddModListOptionalFieldsPresent = std::bitset<5>();
147  drbToAddModListOptionalFieldsPresent.set(4, true); // eps-BearerIdentity present
148  drbToAddModListOptionalFieldsPresent.set(3, false); // pdcp-Config not present
149  drbToAddModListOptionalFieldsPresent.set(2, true); // rlc-Config present
150  drbToAddModListOptionalFieldsPresent.set(1, true); // logicalChannelIdentity present
151  drbToAddModListOptionalFieldsPresent.set(0, true); // logicalChannelConfig present
152  SerializeSequence(drbToAddModListOptionalFieldsPresent, true);
153 
154  // Serialize eps-BearerIdentity::=INTEGER (0..15)
155  SerializeInteger(it->epsBearerIdentity, 0, 15);
156 
157  // Serialize drb-Identity ::= INTEGER (1..32)
158  SerializeInteger(it->drbIdentity, 1, 32);
159 
160  switch (it->rlcConfig.choice)
161  {
163  // Serialize rlc-Config choice
164  SerializeChoice(4, 1, true);
165 
166  // Serialize UL-UM-RLC
167  SerializeSequence(std::bitset<0>(), false);
168  SerializeEnum(2, 0); // sn-FieldLength
169 
170  // Serialize DL-UM-RLC
171  SerializeSequence(std::bitset<0>(), false);
172  SerializeEnum(2, 0); // sn-FieldLength
173  SerializeEnum(32, 0); // t-Reordering
174  break;
175 
177  // Serialize rlc-Config choice
178  SerializeChoice(4, 2, true);
179 
180  // Serialize UL-UM-RLC
181  SerializeSequence(std::bitset<0>(), false);
182  SerializeEnum(2, 0); // sn-FieldLength
183  break;
184 
186  // Serialize rlc-Config choice
187  SerializeChoice(4, 3, true);
188 
189  // Serialize DL-UM-RLC
190  SerializeSequence(std::bitset<0>(), false);
191  SerializeEnum(2, 0); // sn-FieldLength
192  SerializeEnum(32, 0); // t-Reordering
193  break;
194 
196  default:
197  // Serialize rlc-Config choice
198  SerializeChoice(4, 0, true);
199 
200  // Serialize UL-AM-RLC
201  SerializeSequence(std::bitset<0>(), false);
202  SerializeEnum(64, 0); // t-PollRetransmit
203  SerializeEnum(8, 0); // pollPDU
204  SerializeEnum(16, 0); // pollByte
205  SerializeEnum(8, 0); // maxRetxThreshold
206 
207  // Serialize DL-AM-RLC
208  SerializeSequence(std::bitset<0>(), false);
209  SerializeEnum(32, 0); // t-Reordering
210  SerializeEnum(64, 0); // t-StatusProhibit
211  break;
212  }
213 
214  // Serialize logicalChannelIdentity ::=INTEGER (3..10)
215  SerializeInteger(it->logicalChannelIdentity, 3, 10);
216 
217  // Serialize logicalChannelConfig
218  SerializeLogicalChannelConfig(it->logicalChannelConfig);
219  }
220 }
221 
222 void
223 RrcAsn1Header::SerializeSrbToAddModList(std::list<LteRrcSap::SrbToAddMod> srbToAddModList) const
224 {
225  // Serialize SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod
226  SerializeSequenceOf(srbToAddModList.size(), 2, 1);
227 
228  // Serialize the elements in the sequence-of list
229  auto it = srbToAddModList.begin();
230  for (; it != srbToAddModList.end(); it++)
231  {
232  // Serialize SRB-ToAddMod sequence
233  // 2 optional fields. Extension marker is present.
234  std::bitset<2> srbToAddModListOptionalFieldsPresent = std::bitset<2>();
235  srbToAddModListOptionalFieldsPresent.set(1, false); // rlc-Config not present
236  srbToAddModListOptionalFieldsPresent.set(0, true); // logicalChannelConfig present
237  SerializeSequence(srbToAddModListOptionalFieldsPresent, true);
238 
239  // Serialize srb-Identity ::= INTEGER (1..2)
240  SerializeInteger(it->srbIdentity, 1, 2);
241 
242  // Serialize logicalChannelConfig choice
243  // 2 options, selected option 0 (var "explicitValue", of type LogicalChannelConfig)
244  SerializeChoice(2, 0, false);
245 
246  // Serialize LogicalChannelConfig
247  SerializeLogicalChannelConfig(it->logicalChannelConfig);
248  }
249 }
250 
251 void
253  LteRrcSap::LogicalChannelConfig logicalChannelConfig) const
254 {
255  // Serialize LogicalChannelConfig sequence
256  // 1 optional field (ul-SpecificParameters), which is present. Extension marker present.
257  SerializeSequence(std::bitset<1>(1), true);
258 
259  // Serialize ul-SpecificParameters sequence
260  // 1 optional field (logicalChannelGroup), which is present. No extension marker.
261  SerializeSequence(std::bitset<1>(1), false);
262 
263  // Serialize priority ::= INTEGER (1..16)
264  SerializeInteger(logicalChannelConfig.priority, 1, 16);
265 
266  // Serialize prioritisedBitRate
267  int prioritizedBitRate;
268  switch (logicalChannelConfig.prioritizedBitRateKbps)
269  {
270  case 0:
271  prioritizedBitRate = 0;
272  break;
273  case 8:
274  prioritizedBitRate = 1;
275  break;
276  case 16:
277  prioritizedBitRate = 2;
278  break;
279  case 32:
280  prioritizedBitRate = 3;
281  break;
282  case 64:
283  prioritizedBitRate = 4;
284  break;
285  case 128:
286  prioritizedBitRate = 5;
287  break;
288  case 256:
289  prioritizedBitRate = 6;
290  break;
291  default:
292  prioritizedBitRate = 7; // Infinity
293  }
294  SerializeEnum(16, prioritizedBitRate);
295 
296  // Serialize bucketSizeDuration
297  int bucketSizeDuration;
298  switch (logicalChannelConfig.bucketSizeDurationMs)
299  {
300  case 50:
301  bucketSizeDuration = 0;
302  break;
303  case 100:
304  bucketSizeDuration = 1;
305  break;
306  case 150:
307  bucketSizeDuration = 2;
308  break;
309  case 300:
310  bucketSizeDuration = 3;
311  break;
312  case 500:
313  bucketSizeDuration = 4;
314  break;
315  case 1000:
316  bucketSizeDuration = 5;
317  break;
318  default:
319  bucketSizeDuration = 5;
320  }
321  SerializeEnum(8, bucketSizeDuration);
322 
323  // Serialize logicalChannelGroup ::= INTEGER (0..3)
324  SerializeInteger(logicalChannelConfig.logicalChannelGroup, 0, 3);
325 }
326 
327 void
329  LteRrcSap::PhysicalConfigDedicated physicalConfigDedicated) const
330 {
331  // Serialize PhysicalConfigDedicated Sequence
332  std::bitset<10> optionalFieldsPhysicalConfigDedicated;
333  optionalFieldsPhysicalConfigDedicated.set(
334  9,
335  physicalConfigDedicated.havePdschConfigDedicated); // pdsch-ConfigDedicated
336  optionalFieldsPhysicalConfigDedicated.set(8, false); // pucch-ConfigDedicated not present
337  optionalFieldsPhysicalConfigDedicated.set(7, false); // pusch-ConfigDedicated not present
338  optionalFieldsPhysicalConfigDedicated.set(6, false); // uplinkPowerControlDedicated not present
339  optionalFieldsPhysicalConfigDedicated.set(5, false); // tpc-PDCCH-ConfigPUCCH not present
340  optionalFieldsPhysicalConfigDedicated.set(4, false); // tpc-PDCCH-ConfigPUSCH not present
341  optionalFieldsPhysicalConfigDedicated.set(3, false); // cqi-ReportConfig not present
342  optionalFieldsPhysicalConfigDedicated.set(
343  2,
344  physicalConfigDedicated.haveSoundingRsUlConfigDedicated); // soundingRS-UL-ConfigDedicated
345  optionalFieldsPhysicalConfigDedicated.set(
346  1,
347  physicalConfigDedicated.haveAntennaInfoDedicated); // antennaInfo
348  optionalFieldsPhysicalConfigDedicated.set(0, false); // schedulingRequestConfig not present
349  SerializeSequence(optionalFieldsPhysicalConfigDedicated, true);
350 
351  if (physicalConfigDedicated.havePdschConfigDedicated)
352  {
353  // Serialize Pdsch-ConfigDedicated Sequence:
354  // 0 optional / default fields, no extension marker.
355  SerializeSequence(std::bitset<0>(), false);
356 
357  // Serialize p-a
358  // Assuming the value in the struct is the enum index
359  SerializeEnum(8, physicalConfigDedicated.pdschConfigDedicated.pa);
360 
361  // Serialize release
362  SerializeNull();
363  }
364 
365  if (physicalConfigDedicated.haveSoundingRsUlConfigDedicated)
366  {
367  // Serialize SoundingRS-UL-ConfigDedicated choice:
368  switch (physicalConfigDedicated.soundingRsUlConfigDedicated.type)
369  {
371  SerializeChoice(2, 0, false);
372  SerializeNull();
373  break;
374 
376  default:
377  // 2 options, selected: 1 (setup)
378  SerializeChoice(2, 1, false);
379 
380  // Serialize setup sequence
381  // 0 optional / default fields, no extension marker.
382  SerializeSequence(std::bitset<0>(), false);
383 
384  // Serialize srs-Bandwidth
385  SerializeEnum(4, physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth);
386 
387  // Serialize srs-HoppingBandwidth
388  SerializeEnum(4, 0);
389 
390  // Serialize freqDomainPosition
391  SerializeInteger(0, 0, 23);
392 
393  // Serialize duration
394  SerializeBoolean(false);
395 
396  // Serialize srs-ConfigIndex
398  0,
399  1023);
400 
401  // Serialize transmissionComb
402  SerializeInteger(0, 0, 1);
403 
404  // Serialize cyclicShift
405  SerializeEnum(8, 0);
406 
407  break;
408  }
409  }
410 
411  if (physicalConfigDedicated.haveAntennaInfoDedicated)
412  {
413  // Serialize antennaInfo choice
414  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
415  SerializeChoice(2, 0, false);
416 
417  // Serialize AntennaInfoDedicated sequence
418  // 1 optional parameter, not present. No extension marker.
419  SerializeSequence(std::bitset<1>(0), false);
420 
421  // Serialize transmissionMode
422  // Assuming the value in the struct is the enum index
423  SerializeEnum(8, physicalConfigDedicated.antennaInfo.transmissionMode);
424 
425  // Serialize ue-TransmitAntennaSelection choice
426  SerializeChoice(2, 0, false);
427 
428  // Serialize release
429  SerializeNull();
430  }
431 }
432 
433 void
435  LteRrcSap::RadioResourceConfigDedicated radioResourceConfigDedicated) const
436 {
437  bool isSrbToAddModListPresent = !radioResourceConfigDedicated.srbToAddModList.empty();
438  bool isDrbToAddModListPresent = !radioResourceConfigDedicated.drbToAddModList.empty();
439  bool isDrbToReleaseListPresent = !radioResourceConfigDedicated.drbToReleaseList.empty();
440 
441  // 6 optional fields. Extension marker is present.
442  std::bitset<6> optionalFieldsPresent = std::bitset<6>();
443  optionalFieldsPresent.set(5, isSrbToAddModListPresent); // srb-ToAddModList present
444  optionalFieldsPresent.set(4, isDrbToAddModListPresent); // drb-ToAddModList present
445  optionalFieldsPresent.set(3, isDrbToReleaseListPresent); // drb-ToReleaseList present
446  optionalFieldsPresent.set(2, false); // mac-MainConfig not present
447  optionalFieldsPresent.set(1, false); // sps-Config not present
448  optionalFieldsPresent.set(0, radioResourceConfigDedicated.havePhysicalConfigDedicated);
449  SerializeSequence(optionalFieldsPresent, true);
450 
451  // Serialize srbToAddModList
452  if (isSrbToAddModListPresent)
453  {
454  SerializeSrbToAddModList(radioResourceConfigDedicated.srbToAddModList);
455  }
456 
457  // Serialize drbToAddModList
458  if (isDrbToAddModListPresent)
459  {
460  SerializeDrbToAddModList(radioResourceConfigDedicated.drbToAddModList);
461  }
462 
463  // Serialize drbToReleaseList
464  if (isDrbToReleaseListPresent)
465  {
466  SerializeSequenceOf(radioResourceConfigDedicated.drbToReleaseList.size(), MAX_DRB, 1);
467  auto it = radioResourceConfigDedicated.drbToReleaseList.begin();
468  for (; it != radioResourceConfigDedicated.drbToReleaseList.end(); it++)
469  {
470  // DRB-Identity ::= INTEGER (1..32)
471  SerializeInteger(*it, 1, 32);
472  }
473  }
474 
475  if (radioResourceConfigDedicated.havePhysicalConfigDedicated)
476  {
477  SerializePhysicalConfigDedicated(radioResourceConfigDedicated.physicalConfigDedicated);
478  }
479 }
480 
481 void
483  LteRrcSap::SystemInformationBlockType1 systemInformationBlockType1) const
484 {
485  // 3 optional fields, no extension marker.
486  std::bitset<3> sysInfoBlk1Opts;
487  sysInfoBlk1Opts.set(2, false); // p-Max absent
488  sysInfoBlk1Opts.set(1, false); // tdd-Config absent
489  sysInfoBlk1Opts.set(0, false); // nonCriticalExtension absent
490  SerializeSequence(sysInfoBlk1Opts, false);
491 
492  // Serialize cellAccessRelatedInfo
493  // 1 optional field (csgIdentity) which is present, no extension marker.
494  SerializeSequence(std::bitset<1>(1), false);
495 
496  // Serialize plmn-IdentityList
497  SerializeSequenceOf(1, 6, 1);
498 
499  // PLMN-IdentityInfo
500  SerializeSequence(std::bitset<0>(), false);
501 
503  systemInformationBlockType1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity);
504 
505  // Serialize trackingAreaCode
506  SerializeBitstring(std::bitset<16>(0));
507  // Serialize cellIdentity
509  std::bitset<28>(systemInformationBlockType1.cellAccessRelatedInfo.cellIdentity));
510  // Serialize cellBarred
511  SerializeEnum(2, 0);
512  // Serialize intraFreqReselection
513  SerializeEnum(2, 0);
514  // Serialize csg-Indication
515  SerializeBoolean(systemInformationBlockType1.cellAccessRelatedInfo.csgIndication);
516  // Serialize csg-Identity
518  std::bitset<27>(systemInformationBlockType1.cellAccessRelatedInfo.csgIdentity));
519 
520  // Serialize cellSelectionInfo
521  SerializeSequence(std::bitset<1>(0), false);
522  // Serialize q-RxLevMin
523  SerializeInteger(-50, -70, -22);
524 
525  // Serialize freqBandIndicator
526  SerializeInteger(1, 1, 64);
527 
528  // Serialize schedulingInfoList
530  // SchedulingInfo
531  SerializeSequence(std::bitset<0>(), false);
532  // si-Periodicity
533  SerializeEnum(7, 0);
534  // sib-MappingInfo
535  SerializeSequenceOf(0, MAX_SIB - 1, 0);
536 
537  // Serialize si-WindowLength
538  SerializeEnum(7, 0);
539 
540  // Serialize systemInfoValueTag
541  SerializeInteger(0, 0, 31);
542 }
543 
544 void
546  LteRrcSap::RadioResourceConfigCommon radioResourceConfigCommon) const
547 {
548  // 9 optional fields. Extension marker yes.
549  std::bitset<9> rrCfgCmmOpts;
550  rrCfgCmmOpts.set(8, true); // rach-ConfigCommon is present
551  rrCfgCmmOpts.set(7, false); // pdsch-ConfigCommon not present
552  rrCfgCmmOpts.set(6, false); // phich-Config not present
553  rrCfgCmmOpts.set(5, false); // pucch-ConfigCommon not present
554  rrCfgCmmOpts.set(4, false); // soundingRS-UL-ConfigCommon not present
555  rrCfgCmmOpts.set(3, false); // uplinkPowerControlCommon not present
556  rrCfgCmmOpts.set(2, false); // antennaInfoCommon not present
557  rrCfgCmmOpts.set(1, false); // p-Max not present
558  rrCfgCmmOpts.set(0, false); // tdd-Config not present
559 
560  SerializeSequence(rrCfgCmmOpts, true);
561 
562  if (rrCfgCmmOpts[8])
563  {
564  // Serialize RACH-ConfigCommon
565  SerializeRachConfigCommon(radioResourceConfigCommon.rachConfigCommon);
566  }
567 
568  // Serialize PRACH-Config
569  // 1 optional, 0 extension marker.
570  SerializeSequence(std::bitset<1>(0), false);
571 
572  // Serialize PRACH-Config rootSequenceIndex
573  SerializeInteger(0, 0, 1023);
574 
575  // Serialize PUSCH-ConfigCommon
576  SerializeSequence(std::bitset<0>(), false);
577 
578  // Serialize pusch-ConfigBasic
579  SerializeSequence(std::bitset<0>(), false);
580  SerializeInteger(1, 1, 4);
581  SerializeEnum(2, 0);
582  SerializeInteger(0, 0, 98);
583  SerializeBoolean(false);
584 
585  // Serialize UL-ReferenceSignalsPUSCH
586  SerializeSequence(std::bitset<0>(), false);
587  SerializeBoolean(false);
588  SerializeInteger(0, 0, 29);
589  SerializeBoolean(false);
590  SerializeInteger(4, 0, 7);
591 
592  // Serialize UL-CyclicPrefixLength
593  SerializeEnum(2, 0);
594 }
595 
596 void
598  LteRrcSap::RadioResourceConfigCommonSib radioResourceConfigCommonSib) const
599 {
600  SerializeSequence(std::bitset<0>(0), true);
601 
602  // rach-ConfigCommon
603  SerializeRachConfigCommon(radioResourceConfigCommonSib.rachConfigCommon);
604 
605  // bcch-Config
606  SerializeSequence(std::bitset<0>(0), false);
607  SerializeEnum(4, 0); // modificationPeriodCoeff
608  // pcch-Config
609  SerializeSequence(std::bitset<0>(0), false);
610  SerializeEnum(4, 0); // defaultPagingCycle
611  SerializeEnum(8, 0); // nB
612  // prach-Config
613  SerializeSequence(std::bitset<1>(0), false);
614  SerializeInteger(0, 0, 1023); // rootSequenceIndex
615  // pdsch-ConfigCommon
616  SerializeSequence(std::bitset<0>(0), false);
617  SerializeInteger(0, -60, 50); // referenceSignalPower
618  SerializeInteger(0, 0, 3); // p-b
619  // pusch-ConfigCommon
620  SerializeSequence(std::bitset<0>(0), false);
621  SerializeSequence(std::bitset<0>(0), false); // pusch-ConfigBasic
622  SerializeInteger(1, 1, 4); // n-SB
623  SerializeEnum(2, 0); // hoppingMode
624  SerializeInteger(0, 0, 98); // pusch-HoppingOffset
625  SerializeBoolean(false); // enable64QAM
626  SerializeSequence(std::bitset<0>(0), false); // UL-ReferenceSignalsPUSCH
627  SerializeBoolean(false); // groupHoppingEnabled
628  SerializeInteger(0, 0, 29); // groupAssignmentPUSCH
629  SerializeBoolean(false); // sequenceHoppingEnabled
630  SerializeInteger(0, 0, 7); // cyclicShift
631  // pucch-ConfigCommon
632  SerializeSequence(std::bitset<0>(0), false);
633  SerializeEnum(3, 0); // deltaPUCCH-Shift
634  SerializeInteger(0, 0, 98); // nRB-CQI
635  SerializeInteger(0, 0, 7); // nCS-AN
636  SerializeInteger(0, 0, 2047); // n1PUCCH-AN
637  // soundingRS-UL-ConfigCommon
638  SerializeChoice(2, 0, false);
639  SerializeNull(); // release
640  // uplinkPowerControlCommon
641  SerializeSequence(std::bitset<0>(0), false);
642  SerializeInteger(0, -126, 24); // p0-NominalPUSCH
643  SerializeEnum(8, 0); // alpha
644  SerializeInteger(-110, -127, -96); // p0-NominalPUCCH
645  SerializeSequence(std::bitset<0>(0), false); // deltaFList-PUCCH
646  SerializeEnum(3, 0); // deltaF-PUCCH-Format1
647  SerializeEnum(3, 0); // deltaF-PUCCH-Format1b
648  SerializeEnum(4, 0); // deltaF-PUCCH-Format2
649  SerializeEnum(3, 0); // deltaF-PUCCH-Format2a
650  SerializeEnum(3, 0); // deltaF-PUCCH-Format2b
651  SerializeInteger(0, -1, 6);
652  // ul-CyclicPrefixLength
653  SerializeEnum(2, 0);
654 }
655 
656 void
658  LteRrcSap::SystemInformationBlockType2 systemInformationBlockType2) const
659 {
660  SerializeSequence(std::bitset<2>(0), true);
661 
662  // RadioResourceConfigCommonSib
664 
665  // ue-TimersAndConstants
666  SerializeSequence(std::bitset<0>(0), true);
667  SerializeEnum(8, 0); // t300
668  SerializeEnum(8, 0); // t301
669  SerializeEnum(7, 0); // t310
670  SerializeEnum(8, 0); // n310
671  SerializeEnum(7, 0); // t311
672  SerializeEnum(8, 0); // n311
673 
674  // freqInfo
675  SerializeSequence(std::bitset<2>(3), false);
676  SerializeInteger((int)systemInformationBlockType2.freqInfo.ulCarrierFreq, 0, MAX_EARFCN);
677  SerializeEnum(6, BandwidthToEnum(systemInformationBlockType2.freqInfo.ulBandwidth));
678 
679  SerializeInteger(29, 1, 32); // additionalSpectrumEmission
680  // timeAlignmentTimerCommon
681  SerializeEnum(8, 0);
682 }
683 
684 void
686 {
687  // Watchdog: if list has 0 elements, set boolean to false
688  if (measResults.measResultListEutra.empty())
689  {
690  measResults.haveMeasResultNeighCells = false;
691  }
692 
693  std::bitset<4> measResultOptional;
694  measResultOptional.set(3, measResults.haveMeasResultServFreqList);
695  measResultOptional.set(2, false); // LocationInfo-r10
696  measResultOptional.set(1, false); // MeasResultForECID-r9
697  measResultOptional.set(0, measResults.haveMeasResultNeighCells);
698  SerializeSequence(measResultOptional, true);
699 
700  // Serialize measId
701  SerializeInteger(measResults.measId, 1, MAX_MEAS_ID);
702 
703  // Serialize measResultPCell sequence
704  SerializeSequence(std::bitset<0>(0), false);
705 
706  // Serialize rsrpResult
707  SerializeInteger(measResults.measResultPCell.rsrpResult, 0, 97);
708 
709  // Serialize rsrqResult
710  SerializeInteger(measResults.measResultPCell.rsrqResult, 0, 34);
711 
712  if (measResults.haveMeasResultNeighCells)
713  {
714  // Serialize Choice = 0 (MeasResultListEUTRA)
715  SerializeChoice(4, 0, false);
716 
717  // Serialize measResultNeighCells
719 
720  // serialize MeasResultEutra elements in the list
721  for (auto it = measResults.measResultListEutra.begin();
722  it != measResults.measResultListEutra.end();
723  it++)
724  {
725  SerializeSequence(std::bitset<1>(it->haveCgiInfo), false);
726 
727  // Serialize PhysCellId
728  SerializeInteger(it->physCellId, 0, 503);
729 
730  // Serialize CgiInfo
731  if (it->haveCgiInfo)
732  {
733  SerializeSequence(std::bitset<1>(it->cgiInfo.plmnIdentityList.size()), false);
734 
735  // Serialize cellGlobalId
736  SerializeSequence(std::bitset<0>(0), false);
737  SerializePlmnIdentity(it->cgiInfo.plmnIdentity);
738  SerializeBitstring(std::bitset<28>(it->cgiInfo.cellIdentity));
739 
740  // Serialize trackingAreaCode
741  SerializeBitstring(std::bitset<16>(it->cgiInfo.trackingAreaCode));
742 
743  // Serialize plmn-IdentityList
744  if (!it->cgiInfo.plmnIdentityList.empty())
745  {
746  SerializeSequenceOf(it->cgiInfo.plmnIdentityList.size(), 5, 1);
747  for (auto it2 = it->cgiInfo.plmnIdentityList.begin();
748  it2 != it->cgiInfo.plmnIdentityList.end();
749  it2++)
750  {
751  SerializePlmnIdentity(*it2);
752  }
753  }
754  }
755 
756  // Serialize measResult
757  std::bitset<2> measResultFieldsPresent;
758  measResultFieldsPresent[1] = it->haveRsrpResult;
759  measResultFieldsPresent[0] = it->haveRsrqResult;
760  SerializeSequence(measResultFieldsPresent, true);
761 
762  if (it->haveRsrpResult)
763  {
764  SerializeInteger(it->rsrpResult, 0, 97);
765  }
766 
767  if (it->haveRsrqResult)
768  {
769  SerializeInteger(it->rsrqResult, 0, 34);
770  }
771  }
772  }
773 
774  // measResultServFreqList-r10 serialization
775  if (measResults.haveMeasResultServFreqList)
776  {
777  // Serialize measResultServFreqList-r10
779  // serialize MeasResultServFreqList-r10 elements in the list
780  for (const auto& it : measResults.measResultServFreqList)
781  {
782  // Serialize MeasResultServFreq-r10
783  std::bitset<2> measResultServFreqPresent;
784  measResultServFreqPresent[0] = it.haveMeasResultSCell;
785  measResultServFreqPresent[1] = it.haveMeasResultBestNeighCell;
786  SerializeSequence(measResultServFreqPresent, true);
787 
788  // Serialize servFreqId-r10
789  SerializeInteger(it.servFreqId, 0, 7);
790 
791  if (it.haveMeasResultSCell)
792  {
793  // Serialize rsrpResultSCell-r10
794  SerializeInteger(it.measResultSCell.rsrpResult, 0, 97);
795 
796  // Serialize rsrqResultSCell-r10
797  SerializeInteger(it.measResultSCell.rsrqResult, 0, 34);
798  }
799 
800  if (it.haveMeasResultBestNeighCell)
801  {
802  // Serialize physCellId-r10
803  SerializeInteger(it.measResultBestNeighCell.physCellId, 0, 503);
804 
805  // Serialize rsrpResultNCell-r10
806  SerializeInteger(it.measResultBestNeighCell.rsrpResult, 0, 97);
807 
808  // Serialize rsrqResultNCell-r10
809  SerializeInteger(it.measResultBestNeighCell.rsrqResult, 0, 34);
810  }
811 
812  NS_ASSERT(!it.haveMeasResultBestNeighCell); // Not implemented
813  }
814  }
815 }
816 
817 void
819 {
820  // plmn-Identity sequence, mcc is optional, no extension marker
821  SerializeSequence(std::bitset<1>(0), false);
822 
823  // Serialize mnc
824  int nDig = (plmnId > 99) ? 3 : 2;
825 
826  SerializeSequenceOf(nDig, 3, 2);
827  for (int i = nDig - 1; i >= 0; i--)
828  {
829  int n = floor(plmnId / pow(10, i));
830  SerializeInteger(n, 0, 9);
831  plmnId -= n * pow(10, i);
832  }
833 
834  // cellReservedForOperatorUse
835  SerializeEnum(2, 0);
836 }
837 
838 void
840 {
841  // rach-ConfigCommon
842  SerializeSequence(std::bitset<0>(0), true);
843 
844  // preambleInfo
845  SerializeSequence(std::bitset<1>(0), false);
846 
847  // numberOfRA-Preambles
848  switch (rachConfigCommon.preambleInfo.numberOfRaPreambles)
849  {
850  case 4:
851  SerializeEnum(16, 0);
852  break;
853  case 8:
854  SerializeEnum(16, 1);
855  break;
856  case 12:
857  SerializeEnum(16, 2);
858  break;
859  case 16:
860  SerializeEnum(16, 3);
861  break;
862  case 20:
863  SerializeEnum(16, 4);
864  break;
865  case 24:
866  SerializeEnum(16, 5);
867  break;
868  case 28:
869  SerializeEnum(16, 6);
870  break;
871  case 32:
872  SerializeEnum(16, 7);
873  break;
874  case 36:
875  SerializeEnum(16, 8);
876  break;
877  case 40:
878  SerializeEnum(16, 9);
879  break;
880  case 44:
881  SerializeEnum(16, 10);
882  break;
883  case 48:
884  SerializeEnum(16, 11);
885  break;
886  case 52:
887  SerializeEnum(16, 12);
888  break;
889  case 56:
890  SerializeEnum(16, 13);
891  break;
892  case 60:
893  SerializeEnum(16, 14);
894  break;
895  case 64:
896  SerializeEnum(16, 15);
897  break;
898  default:
899  NS_FATAL_ERROR("Wrong numberOfRA-Preambles value");
900  }
901 
902  SerializeSequence(std::bitset<0>(0), false); // powerRampingParameters
903  SerializeEnum(4, 0); // powerRampingStep
904  SerializeEnum(16, 0); // preambleInitialReceivedTargetPower
905  SerializeSequence(std::bitset<0>(0), false); // ra-SupervisionInfo
906 
907  // preambleTransMax
908  switch (rachConfigCommon.raSupervisionInfo.preambleTransMax)
909  {
910  case 3:
911  SerializeEnum(11, 0);
912  break;
913  case 4:
914  SerializeEnum(11, 1);
915  break;
916  case 5:
917  SerializeEnum(11, 2);
918  break;
919  case 6:
920  SerializeEnum(11, 3);
921  break;
922  case 7:
923  SerializeEnum(11, 4);
924  break;
925  case 8:
926  SerializeEnum(11, 5);
927  break;
928  case 10:
929  SerializeEnum(11, 6);
930  break;
931  case 20:
932  SerializeEnum(11, 7);
933  break;
934  case 50:
935  SerializeEnum(11, 8);
936  break;
937  case 100:
938  SerializeEnum(11, 9);
939  break;
940  case 200:
941  SerializeEnum(11, 10);
942  break;
943  default:
944  SerializeEnum(11, 0);
945  }
946 
947  // ra-ResponseWindowSize
948  switch (rachConfigCommon.raSupervisionInfo.raResponseWindowSize)
949  {
950  case 2:
951  SerializeEnum(8, 0);
952  break;
953  case 3:
954  SerializeEnum(8, 1);
955  break;
956  case 4:
957  SerializeEnum(8, 2);
958  break;
959  case 5:
960  SerializeEnum(8, 3);
961  break;
962  case 6:
963  SerializeEnum(8, 4);
964  break;
965  case 7:
966  SerializeEnum(8, 5);
967  break;
968  case 8:
969  SerializeEnum(8, 6);
970  break;
971  case 10:
972  SerializeEnum(8, 7);
973  break;
974  default:
975  SerializeEnum(8, 0);
976  }
977 
978  SerializeEnum(8, 0); // mac-ContentionResolutionTimer
979  SerializeInteger(1, 1, 8); // maxHARQ-Msg3Tx
980 
981  // connEstFailCount
982  switch (rachConfigCommon.txFailParam.connEstFailCount)
983  {
984  case 1:
985  SerializeEnum(8, 1);
986  break;
987  case 2:
988  SerializeEnum(8, 2);
989  break;
990  case 3:
991  SerializeEnum(8, 3);
992  break;
993  case 4:
994  SerializeEnum(8, 4);
995  break;
996  default:
997  SerializeEnum(8, 1);
998  }
999 }
1000 
1001 void
1002 RrcAsn1Header::SerializeQoffsetRange(int8_t qOffsetRange) const
1003 {
1004  switch (qOffsetRange)
1005  {
1006  case -24:
1007  SerializeEnum(31, 0);
1008  break;
1009  case -22:
1010  SerializeEnum(31, 1);
1011  break;
1012  case -20:
1013  SerializeEnum(31, 2);
1014  break;
1015  case -18:
1016  SerializeEnum(31, 3);
1017  break;
1018  case -16:
1019  SerializeEnum(31, 4);
1020  break;
1021  case -14:
1022  SerializeEnum(31, 5);
1023  break;
1024  case -12:
1025  SerializeEnum(31, 6);
1026  break;
1027  case -10:
1028  SerializeEnum(31, 7);
1029  break;
1030  case -8:
1031  SerializeEnum(31, 8);
1032  break;
1033  case -6:
1034  SerializeEnum(31, 9);
1035  break;
1036  case -5:
1037  SerializeEnum(31, 10);
1038  break;
1039  case -4:
1040  SerializeEnum(31, 11);
1041  break;
1042  case -3:
1043  SerializeEnum(31, 12);
1044  break;
1045  case -2:
1046  SerializeEnum(31, 13);
1047  break;
1048  case -1:
1049  SerializeEnum(31, 14);
1050  break;
1051  case 0:
1052  SerializeEnum(31, 15);
1053  break;
1054  case 1:
1055  SerializeEnum(31, 16);
1056  break;
1057  case 2:
1058  SerializeEnum(31, 17);
1059  break;
1060  case 3:
1061  SerializeEnum(31, 18);
1062  break;
1063  case 4:
1064  SerializeEnum(31, 19);
1065  break;
1066  case 5:
1067  SerializeEnum(31, 20);
1068  break;
1069  case 6:
1070  SerializeEnum(31, 21);
1071  break;
1072  case 8:
1073  SerializeEnum(31, 22);
1074  break;
1075  case 10:
1076  SerializeEnum(31, 23);
1077  break;
1078  case 12:
1079  SerializeEnum(31, 24);
1080  break;
1081  case 14:
1082  SerializeEnum(31, 25);
1083  break;
1084  case 16:
1085  SerializeEnum(31, 26);
1086  break;
1087  case 18:
1088  SerializeEnum(31, 27);
1089  break;
1090  case 20:
1091  SerializeEnum(31, 28);
1092  break;
1093  case 22:
1094  SerializeEnum(31, 29);
1095  break;
1096  case 24:
1097  SerializeEnum(31, 30);
1098  break;
1099  default:
1100  SerializeEnum(31, 15);
1101  }
1102 }
1103 
1104 void
1106 {
1107  switch (thresholdEutra.choice)
1108  {
1110  SerializeChoice(2, 0, false);
1111  SerializeInteger(thresholdEutra.range, 0, 97);
1112  break;
1114  default:
1115  SerializeChoice(2, 1, false);
1116  SerializeInteger(thresholdEutra.range, 0, 34);
1117  }
1118 }
1119 
1120 void
1122 {
1123  // Serialize MeasConfig sequence
1124  // 11 optional fields, extension marker present
1125  std::bitset<11> measConfigOptional;
1126  measConfigOptional.set(10, !measConfig.measObjectToRemoveList.empty());
1127  measConfigOptional.set(9, !measConfig.measObjectToAddModList.empty());
1128  measConfigOptional.set(8, !measConfig.reportConfigToRemoveList.empty());
1129  measConfigOptional.set(7, !measConfig.reportConfigToAddModList.empty());
1130  measConfigOptional.set(6, !measConfig.measIdToRemoveList.empty());
1131  measConfigOptional.set(5, !measConfig.measIdToAddModList.empty());
1132  measConfigOptional.set(4, measConfig.haveQuantityConfig);
1133  measConfigOptional.set(3, measConfig.haveMeasGapConfig);
1134  measConfigOptional.set(2, measConfig.haveSmeasure);
1135  measConfigOptional.set(1, false); // preRegistrationInfoHRPD
1136  measConfigOptional.set(0, measConfig.haveSpeedStatePars);
1137  SerializeSequence(measConfigOptional, true);
1138 
1139  if (!measConfig.measObjectToRemoveList.empty())
1140  {
1142  for (auto it = measConfig.measObjectToRemoveList.begin();
1143  it != measConfig.measObjectToRemoveList.end();
1144  it++)
1145  {
1147  }
1148  }
1149 
1150  if (!measConfig.measObjectToAddModList.empty())
1151  {
1153  for (auto it = measConfig.measObjectToAddModList.begin();
1154  it != measConfig.measObjectToAddModList.end();
1155  it++)
1156  {
1157  SerializeSequence(std::bitset<0>(), false);
1158  SerializeInteger(it->measObjectId, 1, MAX_OBJECT_ID);
1159  SerializeChoice(4, 0, true); // Select MeasObjectEUTRA
1160 
1161  // Serialize measObjectEutra
1162  std::bitset<5> measObjOpts;
1163  measObjOpts.set(4, !it->measObjectEutra.cellsToRemoveList.empty());
1164  measObjOpts.set(3, !it->measObjectEutra.cellsToAddModList.empty());
1165  measObjOpts.set(2, !it->measObjectEutra.blackCellsToRemoveList.empty());
1166  measObjOpts.set(1, !it->measObjectEutra.blackCellsToAddModList.empty());
1167  measObjOpts.set(0, it->measObjectEutra.haveCellForWhichToReportCGI);
1168  SerializeSequence(measObjOpts, true);
1169 
1170  // Serialize carrierFreq
1171  SerializeInteger(it->measObjectEutra.carrierFreq, 0, MAX_EARFCN);
1172 
1173  // Serialize allowedMeasBandwidth
1174  SerializeEnum(6, BandwidthToEnum(it->measObjectEutra.allowedMeasBandwidth));
1175 
1176  SerializeBoolean(it->measObjectEutra.presenceAntennaPort1);
1177  SerializeBitstring(std::bitset<2>(it->measObjectEutra.neighCellConfig));
1178  SerializeQoffsetRange(it->measObjectEutra.offsetFreq);
1179 
1180  if (!it->measObjectEutra.cellsToRemoveList.empty())
1181  {
1182  SerializeSequenceOf(it->measObjectEutra.cellsToRemoveList.size(), MAX_CELL_MEAS, 1);
1183  for (auto it2 = it->measObjectEutra.cellsToRemoveList.begin();
1184  it2 != it->measObjectEutra.cellsToRemoveList.end();
1185  it2++)
1186  {
1187  SerializeInteger(*it2, 1, MAX_CELL_MEAS);
1188  }
1189  }
1190 
1191  if (!it->measObjectEutra.cellsToAddModList.empty())
1192  {
1193  SerializeSequenceOf(it->measObjectEutra.cellsToAddModList.size(), MAX_CELL_MEAS, 1);
1194  for (auto it2 = it->measObjectEutra.cellsToAddModList.begin();
1195  it2 != it->measObjectEutra.cellsToAddModList.end();
1196  it2++)
1197  {
1198  SerializeSequence(std::bitset<0>(), false);
1199 
1200  // Serialize cellIndex
1201  SerializeInteger(it2->cellIndex, 1, MAX_CELL_MEAS);
1202 
1203  // Serialize PhysCellId
1204  SerializeInteger(it2->physCellId, 0, 503);
1205 
1206  // Serialize cellIndividualOffset
1207  SerializeQoffsetRange(it2->cellIndividualOffset);
1208  }
1209  }
1210 
1211  if (!it->measObjectEutra.blackCellsToRemoveList.empty())
1212  {
1213  SerializeSequenceOf(it->measObjectEutra.blackCellsToRemoveList.size(),
1214  MAX_CELL_MEAS,
1215  1);
1216  for (auto it2 = it->measObjectEutra.blackCellsToRemoveList.begin();
1217  it2 != it->measObjectEutra.blackCellsToRemoveList.end();
1218  it2++)
1219  {
1220  SerializeInteger(*it2, 1, MAX_CELL_MEAS);
1221  }
1222  }
1223 
1224  if (!it->measObjectEutra.blackCellsToAddModList.empty())
1225  {
1226  SerializeSequenceOf(it->measObjectEutra.blackCellsToAddModList.size(),
1227  MAX_CELL_MEAS,
1228  1);
1229  for (auto it2 = it->measObjectEutra.blackCellsToAddModList.begin();
1230  it2 != it->measObjectEutra.blackCellsToAddModList.end();
1231  it2++)
1232  {
1233  SerializeSequence(std::bitset<0>(), false);
1234  SerializeInteger(it2->cellIndex, 1, MAX_CELL_MEAS);
1235 
1236  // Serialize PhysCellIdRange
1237  // range optional
1238  std::bitset<1> rangePresent(it2->physCellIdRange.haveRange);
1239  SerializeSequence(rangePresent, false);
1240  SerializeInteger(it2->physCellIdRange.start, 0, 503);
1241  if (it2->physCellIdRange.haveRange)
1242  {
1243  switch (it2->physCellIdRange.range)
1244  {
1245  case 4:
1246  SerializeEnum(16, 0);
1247  break;
1248  case 8:
1249  SerializeEnum(16, 1);
1250  break;
1251  case 12:
1252  SerializeEnum(16, 2);
1253  break;
1254  case 16:
1255  SerializeEnum(16, 3);
1256  break;
1257  case 24:
1258  SerializeEnum(16, 4);
1259  break;
1260  case 32:
1261  SerializeEnum(16, 5);
1262  break;
1263  case 48:
1264  SerializeEnum(16, 6);
1265  break;
1266  case 64:
1267  SerializeEnum(16, 7);
1268  break;
1269  case 84:
1270  SerializeEnum(16, 8);
1271  break;
1272  case 96:
1273  SerializeEnum(16, 9);
1274  break;
1275  case 128:
1276  SerializeEnum(16, 10);
1277  break;
1278  case 168:
1279  SerializeEnum(16, 11);
1280  break;
1281  case 252:
1282  SerializeEnum(16, 12);
1283  break;
1284  case 504:
1285  SerializeEnum(16, 13);
1286  break;
1287  default:
1288  SerializeEnum(16, 0);
1289  }
1290  }
1291  }
1292  }
1293 
1294  if (it->measObjectEutra.haveCellForWhichToReportCGI)
1295  {
1296  SerializeInteger(it->measObjectEutra.cellForWhichToReportCGI, 0, 503);
1297  }
1298  }
1299  }
1300 
1301  if (!measConfig.reportConfigToRemoveList.empty())
1302  {
1304  for (auto it = measConfig.reportConfigToRemoveList.begin();
1305  it != measConfig.reportConfigToRemoveList.end();
1306  it++)
1307  {
1309  }
1310  }
1311 
1312  if (!measConfig.reportConfigToAddModList.empty())
1313  {
1315  for (auto it = measConfig.reportConfigToAddModList.begin();
1316  it != measConfig.reportConfigToAddModList.end();
1317  it++)
1318  {
1319  SerializeSequence(std::bitset<0>(), false);
1320  SerializeInteger(it->reportConfigId, 1, MAX_REPORT_CONFIG_ID);
1321  SerializeChoice(2, 0, false); // reportConfigEUTRA
1322 
1323  // Serialize ReportConfigEUTRA
1324  SerializeSequence(std::bitset<0>(), true);
1325  switch (it->reportConfigEutra.triggerType)
1326  {
1328  SerializeChoice(2, 1, false);
1329  SerializeSequence(std::bitset<0>(), false);
1330  switch (it->reportConfigEutra.purpose)
1331  {
1333  SerializeEnum(2, 1);
1334  break;
1336  default:
1337  SerializeEnum(2, 0);
1338  }
1339  break;
1341  default:
1342  SerializeChoice(2, 0, false);
1343  SerializeSequence(std::bitset<0>(), false);
1344  switch (it->reportConfigEutra.eventId)
1345  {
1347  SerializeChoice(5, 0, true);
1348  SerializeSequence(std::bitset<0>(), false);
1349  SerializeThresholdEutra(it->reportConfigEutra.threshold1);
1350  break;
1352  SerializeChoice(5, 1, true);
1353  SerializeSequence(std::bitset<0>(), false);
1354  SerializeThresholdEutra(it->reportConfigEutra.threshold1);
1355  break;
1357  SerializeChoice(5, 2, true);
1358  SerializeSequence(std::bitset<0>(), false);
1359  SerializeInteger(it->reportConfigEutra.a3Offset, -30, 30);
1360  SerializeBoolean(it->reportConfigEutra.reportOnLeave);
1361  break;
1363  SerializeChoice(5, 3, true);
1364  SerializeSequence(std::bitset<0>(), false);
1365  SerializeThresholdEutra(it->reportConfigEutra.threshold1);
1366  break;
1368  default:
1369  SerializeChoice(5, 4, true);
1370  SerializeSequence(std::bitset<0>(), false);
1371  SerializeThresholdEutra(it->reportConfigEutra.threshold1);
1372  SerializeThresholdEutra(it->reportConfigEutra.threshold2);
1373  }
1374 
1375  SerializeInteger(it->reportConfigEutra.hysteresis, 0, 30);
1376 
1377  switch (it->reportConfigEutra.timeToTrigger)
1378  {
1379  case 0:
1380  SerializeEnum(16, 0);
1381  break;
1382  case 40:
1383  SerializeEnum(16, 1);
1384  break;
1385  case 64:
1386  SerializeEnum(16, 2);
1387  break;
1388  case 80:
1389  SerializeEnum(16, 3);
1390  break;
1391  case 100:
1392  SerializeEnum(16, 4);
1393  break;
1394  case 128:
1395  SerializeEnum(16, 5);
1396  break;
1397  case 160:
1398  SerializeEnum(16, 6);
1399  break;
1400  case 256:
1401  SerializeEnum(16, 7);
1402  break;
1403  case 320:
1404  SerializeEnum(16, 8);
1405  break;
1406  case 480:
1407  SerializeEnum(16, 9);
1408  break;
1409  case 512:
1410  SerializeEnum(16, 10);
1411  break;
1412  case 640:
1413  SerializeEnum(16, 11);
1414  break;
1415  case 1024:
1416  SerializeEnum(16, 12);
1417  break;
1418  case 1280:
1419  SerializeEnum(16, 13);
1420  break;
1421  case 2560:
1422  SerializeEnum(16, 14);
1423  break;
1424  case 5120:
1425  default:
1426  SerializeEnum(16, 15);
1427  }
1428  } // end trigger type
1429 
1430  // Serialize triggerQuantity
1431  if (it->reportConfigEutra.triggerQuantity == LteRrcSap::ReportConfigEutra::RSRP)
1432  {
1433  SerializeEnum(2, 0);
1434  }
1435  else
1436  {
1437  SerializeEnum(2, 1);
1438  }
1439 
1440  // Serialize reportQuantity
1441  if (it->reportConfigEutra.reportQuantity ==
1443  {
1444  SerializeEnum(2, 0);
1445  }
1446  else
1447  {
1448  SerializeEnum(2, 1);
1449  }
1450 
1451  // Serialize maxReportCells
1452  SerializeInteger(it->reportConfigEutra.maxReportCells, 1, MAX_CELL_REPORT);
1453 
1454  // Serialize reportInterval
1455  switch (it->reportConfigEutra.reportInterval)
1456  {
1458  SerializeEnum(16, 0);
1459  break;
1461  SerializeEnum(16, 1);
1462  break;
1464  SerializeEnum(16, 2);
1465  break;
1467  SerializeEnum(16, 3);
1468  break;
1470  SerializeEnum(16, 4);
1471  break;
1473  SerializeEnum(16, 5);
1474  break;
1476  SerializeEnum(16, 6);
1477  break;
1479  SerializeEnum(16, 7);
1480  break;
1482  SerializeEnum(16, 8);
1483  break;
1485  SerializeEnum(16, 9);
1486  break;
1488  SerializeEnum(16, 10);
1489  break;
1491  SerializeEnum(16, 11);
1492  break;
1494  SerializeEnum(16, 12);
1495  break;
1497  SerializeEnum(16, 13);
1498  break;
1500  SerializeEnum(16, 14);
1501  break;
1503  default:
1504  SerializeEnum(16, 15);
1505  }
1506 
1507  // Serialize reportAmount
1508  switch (it->reportConfigEutra.reportAmount)
1509  {
1510  case 1:
1511  SerializeEnum(8, 0);
1512  break;
1513  case 2:
1514  SerializeEnum(8, 1);
1515  break;
1516  case 4:
1517  SerializeEnum(8, 2);
1518  break;
1519  case 8:
1520  SerializeEnum(8, 3);
1521  break;
1522  case 16:
1523  SerializeEnum(8, 4);
1524  break;
1525  case 32:
1526  SerializeEnum(8, 5);
1527  break;
1528  case 64:
1529  SerializeEnum(8, 6);
1530  break;
1531  default:
1532  SerializeEnum(8, 7);
1533  }
1534  }
1535  }
1536 
1537  if (!measConfig.measIdToRemoveList.empty())
1538  {
1539  SerializeSequenceOf(measConfig.measIdToRemoveList.size(), MAX_MEAS_ID, 1);
1540  for (auto it = measConfig.measIdToRemoveList.begin();
1541  it != measConfig.measIdToRemoveList.end();
1542  it++)
1543  {
1544  SerializeInteger(*it, 1, MAX_MEAS_ID);
1545  }
1546  }
1547 
1548  if (!measConfig.measIdToAddModList.empty())
1549  {
1550  SerializeSequenceOf(measConfig.measIdToAddModList.size(), MAX_MEAS_ID, 1);
1551  for (auto it = measConfig.measIdToAddModList.begin();
1552  it != measConfig.measIdToAddModList.end();
1553  it++)
1554  {
1555  SerializeInteger(it->measId, 1, MAX_MEAS_ID);
1556  SerializeInteger(it->measObjectId, 1, MAX_OBJECT_ID);
1557  SerializeInteger(it->reportConfigId, 1, MAX_REPORT_CONFIG_ID);
1558  }
1559  }
1560 
1561  if (measConfig.haveQuantityConfig)
1562  {
1563  // QuantityConfig sequence
1564  // 4 optional fields, only first (EUTRA) present. Extension marker yes.
1565  std::bitset<4> quantityConfigOpts(0);
1566  quantityConfigOpts.set(3, true);
1567  SerializeSequence(quantityConfigOpts, true);
1568  SerializeSequence(std::bitset<0>(), false);
1569 
1570  switch (measConfig.quantityConfig.filterCoefficientRSRP)
1571  {
1572  case 0:
1573  SerializeEnum(16, 0);
1574  break;
1575  case 1:
1576  SerializeEnum(16, 1);
1577  break;
1578  case 2:
1579  SerializeEnum(16, 2);
1580  break;
1581  case 3:
1582  SerializeEnum(16, 3);
1583  break;
1584  case 4:
1585  SerializeEnum(16, 4);
1586  break;
1587  case 5:
1588  SerializeEnum(16, 5);
1589  break;
1590  case 6:
1591  SerializeEnum(16, 6);
1592  break;
1593  case 7:
1594  SerializeEnum(16, 7);
1595  break;
1596  case 8:
1597  SerializeEnum(16, 8);
1598  break;
1599  case 9:
1600  SerializeEnum(16, 9);
1601  break;
1602  case 11:
1603  SerializeEnum(16, 10);
1604  break;
1605  case 13:
1606  SerializeEnum(16, 11);
1607  break;
1608  case 15:
1609  SerializeEnum(16, 12);
1610  break;
1611  case 17:
1612  SerializeEnum(16, 13);
1613  break;
1614  case 19:
1615  SerializeEnum(16, 14);
1616  break;
1617  default:
1618  SerializeEnum(16, 4);
1619  }
1620 
1621  switch (measConfig.quantityConfig.filterCoefficientRSRQ)
1622  {
1623  case 0:
1624  SerializeEnum(16, 0);
1625  break;
1626  case 1:
1627  SerializeEnum(16, 1);
1628  break;
1629  case 2:
1630  SerializeEnum(16, 2);
1631  break;
1632  case 3:
1633  SerializeEnum(16, 3);
1634  break;
1635  case 4:
1636  SerializeEnum(16, 4);
1637  break;
1638  case 5:
1639  SerializeEnum(16, 5);
1640  break;
1641  case 6:
1642  SerializeEnum(16, 6);
1643  break;
1644  case 7:
1645  SerializeEnum(16, 7);
1646  break;
1647  case 8:
1648  SerializeEnum(16, 8);
1649  break;
1650  case 9:
1651  SerializeEnum(16, 9);
1652  break;
1653  case 11:
1654  SerializeEnum(16, 10);
1655  break;
1656  case 13:
1657  SerializeEnum(16, 11);
1658  break;
1659  case 15:
1660  SerializeEnum(16, 12);
1661  break;
1662  case 17:
1663  SerializeEnum(16, 13);
1664  break;
1665  case 19:
1666  SerializeEnum(16, 14);
1667  break;
1668  default:
1669  SerializeEnum(16, 4);
1670  }
1671  }
1672 
1673  if (measConfig.haveMeasGapConfig)
1674  {
1675  switch (measConfig.measGapConfig.type)
1676  {
1678  SerializeChoice(2, 0, false);
1679  SerializeNull();
1680  break;
1682  default:
1683  SerializeChoice(2, 1, false);
1684  SerializeSequence(std::bitset<0>(), false);
1685  switch (measConfig.measGapConfig.gapOffsetChoice)
1686  {
1688  SerializeChoice(2, 0, true);
1689  SerializeInteger(measConfig.measGapConfig.gapOffsetValue, 0, 39);
1690  break;
1692  default:
1693  SerializeChoice(2, 1, true);
1694  SerializeInteger(measConfig.measGapConfig.gapOffsetValue, 0, 79);
1695  }
1696  }
1697  }
1698 
1699  if (measConfig.haveSmeasure)
1700  {
1701  SerializeInteger(measConfig.sMeasure, 0, 97);
1702  }
1703 
1704  // ...Here preRegistrationInfoHRPD would be serialized
1705 
1706  if (measConfig.haveSpeedStatePars)
1707  {
1708  switch (measConfig.speedStatePars.type)
1709  {
1711  SerializeChoice(2, 0, false);
1712  SerializeNull();
1713  break;
1715  default:
1716  SerializeChoice(2, 1, false);
1717  SerializeSequence(std::bitset<0>(), false);
1719  {
1720  case 30:
1721  SerializeEnum(8, 0);
1722  break;
1723  case 60:
1724  SerializeEnum(8, 1);
1725  break;
1726  case 120:
1727  SerializeEnum(8, 2);
1728  break;
1729  case 180:
1730  SerializeEnum(8, 3);
1731  break;
1732  case 240:
1733  SerializeEnum(8, 4);
1734  break;
1735  default:
1736  SerializeEnum(8, 5);
1737  break;
1738  }
1739 
1741  {
1742  case 30:
1743  SerializeEnum(8, 0);
1744  break;
1745  case 60:
1746  SerializeEnum(8, 1);
1747  break;
1748  case 120:
1749  SerializeEnum(8, 2);
1750  break;
1751  case 180:
1752  SerializeEnum(8, 3);
1753  break;
1754  case 240:
1755  SerializeEnum(8, 4);
1756  break;
1757  default:
1758  SerializeEnum(8, 5);
1759  break;
1760  }
1761 
1763  1,
1764  16);
1766  1,
1767  16);
1768 
1769  SerializeSequence(std::bitset<0>(), false);
1770  switch (measConfig.speedStatePars.timeToTriggerSf.sfMedium)
1771  {
1772  case 25:
1773  SerializeEnum(4, 0);
1774  break;
1775  case 50:
1776  SerializeEnum(4, 1);
1777  break;
1778  case 75:
1779  SerializeEnum(4, 2);
1780  break;
1781  case 100:
1782  default:
1783  SerializeEnum(4, 3);
1784  }
1785 
1786  switch (measConfig.speedStatePars.timeToTriggerSf.sfHigh)
1787  {
1788  case 25:
1789  SerializeEnum(4, 0);
1790  break;
1791  case 50:
1792  SerializeEnum(4, 1);
1793  break;
1794  case 75:
1795  SerializeEnum(4, 2);
1796  break;
1797  case 100:
1798  default:
1799  SerializeEnum(4, 3);
1800  }
1801  }
1802  }
1803 }
1804 
1805 void
1807  LteRrcSap::NonCriticalExtensionConfiguration nonCriticalExtension) const
1808 {
1809  // 3 optional fields. Extension marker not present.
1810  std::bitset<3> noncriticalExtension_v1020;
1811  noncriticalExtension_v1020.set(
1812  2,
1813  !nonCriticalExtension.sCellToReleaseList.empty()); // sCellToReleaseList-r10
1814  noncriticalExtension_v1020.set(
1815  1,
1816  !nonCriticalExtension.sCellToAddModList.empty()); // sCellToAddModList-r10
1817  noncriticalExtension_v1020.set(
1818  0,
1819  false); // No nonCriticalExtension RRCConnectionReconfiguration-v1130-IEs
1820  SerializeSequence(noncriticalExtension_v1020, false);
1821 
1822  if (!nonCriticalExtension.sCellToReleaseList.empty())
1823  {
1824  SerializeSequenceOf(nonCriticalExtension.sCellToReleaseList.size(), MAX_OBJECT_ID, 1);
1825  for (uint8_t sCellIndex : nonCriticalExtension.sCellToReleaseList)
1826  {
1827  SerializeInteger(sCellIndex, 1, 7); // sCellIndex-r10
1828  }
1829  }
1830 
1831  if (!nonCriticalExtension.sCellToAddModList.empty())
1832  {
1833  SerializeSequenceOf(nonCriticalExtension.sCellToAddModList.size(), MAX_OBJECT_ID, 1);
1834  for (auto& it : nonCriticalExtension.sCellToAddModList)
1835  {
1836  std::bitset<4> sCellToAddMod_r10;
1837  sCellToAddMod_r10.set(3, true); // sCellIndex
1838  sCellToAddMod_r10.set(2, true); // CellIdentification
1839  sCellToAddMod_r10.set(1, true); // RadioResourceConfigCommonSCell
1840  sCellToAddMod_r10.set(
1841  0,
1842  it.haveRadioResourceConfigDedicatedSCell); // No nonCriticalExtension RRC
1843  SerializeSequence(sCellToAddMod_r10, false);
1844  SerializeInteger(it.sCellIndex, 1, 7); // sCellIndex-r10
1845 
1846  // Serialize CellIdentification
1847  std::bitset<2> cellIdentification_r10;
1848  cellIdentification_r10.set(1, true); // phyCellId-r10
1849  cellIdentification_r10.set(0, true); // dl-CarrierFreq-r10
1850  SerializeSequence(cellIdentification_r10, false);
1851 
1852  SerializeInteger(it.cellIdentification.physCellId, 1, 65536);
1853  SerializeInteger(it.cellIdentification.dlCarrierFreq, 1, MAX_EARFCN);
1854 
1855  // Serialize RadioResourceConfigCommonSCell
1856  SerializeRadioResourceConfigCommonSCell(it.radioResourceConfigCommonSCell);
1857 
1858  if (it.haveRadioResourceConfigDedicatedSCell)
1859  {
1860  // Serialize RadioResourceConfigDedicatedSCell
1861  SerializeRadioResourceDedicatedSCell(it.radioResourceConfigDedicatedSCell);
1862  }
1863  }
1864  }
1865 }
1866 
1867 void
1870 {
1871  // 2 optional fields. Extension marker not present.
1872  std::bitset<2> radioResourceConfigCommonSCell_r10;
1873  radioResourceConfigCommonSCell_r10.set(1, rrccsc.haveNonUlConfiguration); // NonUlConfiguration
1874  radioResourceConfigCommonSCell_r10.set(0, rrccsc.haveUlConfiguration); // UlConfiguration
1875  SerializeSequence(radioResourceConfigCommonSCell_r10, false);
1876 
1877  if (rrccsc.haveNonUlConfiguration)
1878  {
1879  // 5 optional fields. Extension marker not present.
1880  std::bitset<5> nonUlConfiguration_r10;
1881  nonUlConfiguration_r10.set(4, true); // Dl- bandwidth --> convert in enum
1882  nonUlConfiguration_r10.set(3, true); // AntennaInfoCommon-r10
1883  nonUlConfiguration_r10.set(2, false); // phich-Config-r10 Not Implemented
1884  nonUlConfiguration_r10.set(1, true); // pdschConfigCommon
1885  nonUlConfiguration_r10.set(0, false); // Tdd-Config-r10 Not Implemented
1886  SerializeSequence(nonUlConfiguration_r10, false);
1887 
1889 
1890  std::bitset<1> antennaInfoCommon_r10;
1891  antennaInfoCommon_r10.set(0, true);
1892  SerializeSequence(antennaInfoCommon_r10, false);
1894 
1895  std::bitset<2> pdschConfigCommon_r10;
1896  pdschConfigCommon_r10.set(1, true);
1897  pdschConfigCommon_r10.set(0, true);
1898  SerializeSequence(pdschConfigCommon_r10, false);
1899 
1902  }
1903  if (rrccsc.haveUlConfiguration)
1904  {
1905  // Serialize Ul Configuration
1906  // 7 optional fields. Extension marker present.
1907  std::bitset<7> UlConfiguration_r10;
1908  UlConfiguration_r10.set(6, true); // ul-Configuration-r10
1909  UlConfiguration_r10.set(5, false); // p-Max-r10 Not Implemented
1910  UlConfiguration_r10.set(4, true); // uplinkPowerControlCommonSCell-r10
1911  UlConfiguration_r10.set(3, false); // soundingRS-UL-ConfigCommon-r10
1912  UlConfiguration_r10.set(2, false); // ul-CyclicPrefixLength-r10
1913  UlConfiguration_r10.set(1, true); // prach-ConfigSCell-r10
1914  UlConfiguration_r10.set(0, false); // pusch-ConfigCommon-r10 Not Implemented
1915  SerializeSequence(UlConfiguration_r10, true);
1916 
1917  // Serialize ulFreqInfo
1918  std::bitset<3> FreqInfo_r10;
1919  FreqInfo_r10.set(2, true); // ulCarrierFreq
1920  FreqInfo_r10.set(1, true); // UlBandwidth
1921  FreqInfo_r10.set(0, false); // additionalSpectrumEmissionSCell-r10 Not Implemented
1922  SerializeSequence(FreqInfo_r10, false);
1923 
1926 
1927  // Serialize UlPowerControlCommonSCell
1928  std::bitset<2> UlPowerControlCommonSCell_r10;
1929  UlPowerControlCommonSCell_r10.set(1, false); // p0-NominalPUSCH-r10 Not Implemented
1930  UlPowerControlCommonSCell_r10.set(0, true); // alpha
1931  SerializeSequence(UlPowerControlCommonSCell_r10, false);
1932 
1934 
1935  // Serialize soundingRs-UlConfigCommon
1936  // Not Implemented
1937 
1938  // Serialize PrachConfigSCell
1939  std::bitset<1> prachConfigSCell_r10;
1940  prachConfigSCell_r10.set(0, true);
1941  SerializeSequence(prachConfigSCell_r10, false);
1943  }
1944 }
1945 
1946 void
1949 {
1950  // Serialize RadioResourceConfigDedicatedSCell
1951  std::bitset<1> RadioResourceConfigDedicatedSCell_r10;
1952  RadioResourceConfigDedicatedSCell_r10.set(0, true);
1953  SerializeSequence(RadioResourceConfigDedicatedSCell_r10, false);
1954 
1957 }
1958 
1959 void
1962 {
1963  std::bitset<2> pcdscOpt;
1964  pcdscOpt.set(1, pcdsc.haveNonUlConfiguration);
1965  pcdscOpt.set(0, pcdsc.haveUlConfiguration);
1966  SerializeSequence(pcdscOpt, true);
1967 
1968  if (pcdsc.haveNonUlConfiguration)
1969  {
1970  // Serialize NonUl configuration
1971  std::bitset<4> nulOpt;
1972  nulOpt.set(3, pcdsc.haveAntennaInfoDedicated);
1973  nulOpt.set(2, false); // crossCarrierSchedulingConfig-r10 Not Implemented
1974  nulOpt.set(1, false); // csi-RS-Config-r10 Not Implemented
1975  nulOpt.set(0, pcdsc.havePdschConfigDedicated); // pdsch-ConfigDedicated-r10
1976  SerializeSequence(nulOpt, false);
1977 
1978  if (pcdsc.haveAntennaInfoDedicated)
1979  {
1980  // Serialize antennaInfo choice
1981  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
1982  SerializeChoice(2, 0, false);
1983 
1984  // Serialize AntennaInfoDedicated sequence
1985  // 1 optional parameter, not present. No extension marker.
1986  SerializeSequence(std::bitset<1>(0), false);
1987 
1988  // Serialize transmissionMode
1989  // Assuming the value in the struct is the enum index
1991 
1992  // Serialize ue-TransmitAntennaSelection choice
1993  SerializeChoice(2, 0, false);
1994 
1995  // Serialize release
1996  SerializeNull();
1997  }
1998  if (pcdsc.havePdschConfigDedicated)
1999  {
2000  // Serialize Pdsch-ConfigDedicated Sequence:
2001  // 0 optional / default fields, no extension marker.
2002  SerializeSequence(std::bitset<0>(), false);
2003 
2004  // Serialize p-a
2005  // Assuming the value in the struct is the enum index
2007 
2008  // Serialize release
2009  SerializeNull();
2010  }
2011  }
2012  if (pcdsc.haveUlConfiguration)
2013  {
2014  // Serialize Ul Configuration
2015  std::bitset<7> ulOpt;
2016  ulOpt.set(6, pcdsc.haveAntennaInfoUlDedicated); // antennaInfoUL-r10
2017  ulOpt.set(5, false); // pusch-ConfigDedicatedSCell-r10 not present
2018  ulOpt.set(4, false); // uplinkPowerControlDedicatedSCell-r10 not present
2019  ulOpt.set(3, false); // cqi-ReportConfigSCell-r10 not present
2020  ulOpt.set(2, pcdsc.haveSoundingRsUlConfigDedicated); // soundingRS-UL-ConfigDedicated-r10
2021  ulOpt.set(1, false); // soundingRS-UL-ConfigDedicated-v1020 not present
2022  ulOpt.set(0, false); // soundingRS-UL-ConfigDedicatedAperiodic-r10 not present
2023  SerializeSequence(ulOpt, false);
2024 
2025  if (pcdsc.haveAntennaInfoUlDedicated)
2026  {
2027  // Serialize antennaInfo choice
2028  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
2029  SerializeChoice(2, 0, false);
2030 
2031  // Serialize AntennaInfoDedicated sequence
2032  // 1 optional parameter, not present. No extension marker.
2033  SerializeSequence(std::bitset<1>(0), false);
2034 
2035  // Serialize transmissionMode
2036  // Assuming the value in the struct is the enum index
2038 
2039  // Serialize ue-TransmitAntennaSelection choice
2040  SerializeChoice(2, 0, false);
2041 
2042  // Serialize release
2043  SerializeNull();
2044  }
2046  {
2047  // Serialize SoundingRS-UL-ConfigDedicated choice:
2048  switch (pcdsc.soundingRsUlConfigDedicated.type)
2049  {
2051  SerializeChoice(2, 0, false);
2052  SerializeNull();
2053  break;
2054 
2056  default:
2057  // 2 options, selected: 1 (setup)
2058  SerializeChoice(2, 1, false);
2059 
2060  // Serialize setup sequence
2061  // 0 optional / default fields, no extension marker.
2062  SerializeSequence(std::bitset<0>(), false);
2063 
2064  // Serialize srs-Bandwidth
2066 
2067  // Serialize srs-HoppingBandwidth
2068  SerializeEnum(4, 0);
2069 
2070  // Serialize freqDomainPosition
2071  SerializeInteger(0, 0, 23);
2072 
2073  // Serialize duration
2074  SerializeBoolean(false);
2075 
2076  // Serialize srs-ConfigIndex
2078 
2079  // Serialize transmissionComb
2080  SerializeInteger(0, 0, 1);
2081 
2082  // Serialize cyclicShift
2083  SerializeEnum(8, 0);
2084 
2085  break;
2086  }
2087  }
2088  }
2089 }
2090 
2093  Buffer::Iterator bIterator)
2094 {
2095  int thresholdEutraChoice;
2096  int range;
2097  bIterator = DeserializeChoice(2, false, &thresholdEutraChoice, bIterator);
2098 
2099  switch (thresholdEutraChoice)
2100  {
2101  case 0:
2103  bIterator = DeserializeInteger(&range, 0, 97, bIterator);
2104  thresholdEutra->range = range;
2105  break;
2106  case 1:
2107  default:
2109  bIterator = DeserializeInteger(&range, 0, 34, bIterator);
2110  thresholdEutra->range = range;
2111  }
2112 
2113  return bIterator;
2114 }
2115 
2118 {
2119  int n;
2120  bIterator = DeserializeEnum(31, &n, bIterator);
2121  switch (n)
2122  {
2123  case 0:
2124  *qOffsetRange = -24;
2125  break;
2126  case 1:
2127  *qOffsetRange = -22;
2128  break;
2129  case 2:
2130  *qOffsetRange = -20;
2131  break;
2132  case 3:
2133  *qOffsetRange = -18;
2134  break;
2135  case 4:
2136  *qOffsetRange = -16;
2137  break;
2138  case 5:
2139  *qOffsetRange = -14;
2140  break;
2141  case 6:
2142  *qOffsetRange = -12;
2143  break;
2144  case 7:
2145  *qOffsetRange = -10;
2146  break;
2147  case 8:
2148  *qOffsetRange = -8;
2149  break;
2150  case 9:
2151  *qOffsetRange = -6;
2152  break;
2153  case 10:
2154  *qOffsetRange = -5;
2155  break;
2156  case 11:
2157  *qOffsetRange = -4;
2158  break;
2159  case 12:
2160  *qOffsetRange = -3;
2161  break;
2162  case 13:
2163  *qOffsetRange = -2;
2164  break;
2165  case 14:
2166  *qOffsetRange = -1;
2167  break;
2168  case 15:
2169  *qOffsetRange = 0;
2170  break;
2171  case 16:
2172  *qOffsetRange = 1;
2173  break;
2174  case 17:
2175  *qOffsetRange = 2;
2176  break;
2177  case 18:
2178  *qOffsetRange = 3;
2179  break;
2180  case 19:
2181  *qOffsetRange = 4;
2182  break;
2183  case 20:
2184  *qOffsetRange = 5;
2185  break;
2186  case 21:
2187  *qOffsetRange = 6;
2188  break;
2189  case 22:
2190  *qOffsetRange = 8;
2191  break;
2192  case 23:
2193  *qOffsetRange = 10;
2194  break;
2195  case 24:
2196  *qOffsetRange = 12;
2197  break;
2198  case 25:
2199  *qOffsetRange = 14;
2200  break;
2201  case 26:
2202  *qOffsetRange = 16;
2203  break;
2204  case 27:
2205  *qOffsetRange = 18;
2206  break;
2207  case 28:
2208  *qOffsetRange = 20;
2209  break;
2210  case 29:
2211  *qOffsetRange = 22;
2212  break;
2213  case 30:
2214  default:
2215  *qOffsetRange = 24;
2216  }
2217  return bIterator;
2218 }
2219 
2222  LteRrcSap::RadioResourceConfigDedicated* radioResourceConfigDedicated,
2223  Buffer::Iterator bIterator)
2224 {
2225  // Deserialize RadioResourceConfigDedicated sequence
2226  std::bitset<6> optionalFieldsPresent = std::bitset<6>();
2227  bIterator = DeserializeSequence(&optionalFieldsPresent, true, bIterator);
2228 
2229  if (optionalFieldsPresent[5])
2230  {
2231  // Deserialize srb-ToAddModList
2232  bIterator =
2233  DeserializeSrbToAddModList(&(radioResourceConfigDedicated->srbToAddModList), bIterator);
2234  }
2235 
2236  if (optionalFieldsPresent[4])
2237  {
2238  // Deserialize drb-ToAddModList
2239  bIterator =
2240  DeserializeDrbToAddModList(&(radioResourceConfigDedicated->drbToAddModList), bIterator);
2241  }
2242 
2243  if (optionalFieldsPresent[3])
2244  {
2245  // Deserialize drb-ToReleaseList
2246  int n;
2247  int val;
2248  bIterator = DeserializeSequenceOf(&n, MAX_DRB, 1, bIterator);
2249  for (int i = 0; i < n; i++)
2250  {
2251  bIterator = DeserializeInteger(&val, 1, 32, bIterator);
2252  radioResourceConfigDedicated->drbToReleaseList.push_back(val);
2253  }
2254  }
2255 
2256  if (optionalFieldsPresent[2])
2257  {
2258  // Deserialize mac-MainConfig
2259  // ...
2260  }
2261 
2262  if (optionalFieldsPresent[1])
2263  {
2264  // Deserialize sps-Config
2265  // ...
2266  }
2267 
2268  radioResourceConfigDedicated->havePhysicalConfigDedicated = optionalFieldsPresent[0];
2269  if (optionalFieldsPresent[0])
2270  {
2271  // Deserialize physicalConfigDedicated
2273  &radioResourceConfigDedicated->physicalConfigDedicated,
2274  bIterator);
2275  }
2276 
2277  return bIterator;
2278 }
2279 
2281 RrcAsn1Header::DeserializeSrbToAddModList(std::list<LteRrcSap::SrbToAddMod>* srbToAddModList,
2282  Buffer::Iterator bIterator)
2283 {
2284  int numElems;
2285  bIterator = DeserializeSequenceOf(&numElems, 2, 1, bIterator);
2286 
2287  srbToAddModList->clear();
2288 
2289  // Deserialize SRB-ToAddMod elements
2290  for (int i = 0; i < numElems; i++)
2291  {
2292  LteRrcSap::SrbToAddMod srbToAddMod;
2293  // Deserialize SRB-ToAddMod sequence
2294  // 2 optional fields, extension marker present
2295  std::bitset<2> optionalFields;
2296  bIterator = DeserializeSequence(&optionalFields, true, bIterator);
2297 
2298  // Deserialize srbIdentity
2299  int n;
2300  bIterator = DeserializeInteger(&n, 1, 2, bIterator);
2301  srbToAddMod.srbIdentity = n;
2302 
2303  if (optionalFields[1])
2304  {
2305  // Deserialize rlcConfig choice
2306  // ...
2307  }
2308 
2309  if (optionalFields[0])
2310  {
2311  // Deserialize logicalChannelConfig choice
2312  int sel;
2313  bIterator = DeserializeChoice(2, false, &sel, bIterator);
2314 
2315  // Deserialize logicalChannelConfig defaultValue
2316  if (sel == 1)
2317  {
2318  bIterator = DeserializeNull(bIterator);
2319  }
2320 
2321  // Deserialize logicalChannelConfig explicitValue
2322  else if (sel == 0)
2323  {
2324  bIterator =
2325  DeserializeLogicalChannelConfig(&srbToAddMod.logicalChannelConfig, bIterator);
2326  }
2327  }
2328  srbToAddModList->insert(srbToAddModList->end(), srbToAddMod);
2329  }
2330 
2331  return bIterator;
2332 }
2333 
2335 RrcAsn1Header::DeserializeDrbToAddModList(std::list<LteRrcSap::DrbToAddMod>* drbToAddModList,
2336  Buffer::Iterator bIterator)
2337 {
2338  int n;
2339  int val;
2340  bIterator = DeserializeSequenceOf(&n, MAX_DRB, 1, bIterator);
2341 
2342  drbToAddModList->clear();
2343 
2344  for (int i = 0; i < n; i++)
2345  {
2346  LteRrcSap::DrbToAddMod drbToAddMod;
2347 
2348  std::bitset<5> optionalFields;
2349  bIterator = DeserializeSequence(&optionalFields, true, bIterator);
2350 
2351  if (optionalFields[4])
2352  {
2353  // Deserialize epsBearerIdentity
2354  bIterator = DeserializeInteger(&val, 0, 15, bIterator);
2355  drbToAddMod.epsBearerIdentity = val;
2356  }
2357 
2358  bIterator = DeserializeInteger(&val, 1, 32, bIterator);
2359  drbToAddMod.drbIdentity = val;
2360 
2361  if (optionalFields[3])
2362  {
2363  // Deserialize pdcp-Config
2364  // ...
2365  }
2366 
2367  if (optionalFields[2])
2368  {
2369  // Deserialize RLC-Config
2370  int chosen;
2371  bIterator = DeserializeChoice(4, true, &chosen, bIterator);
2372 
2373  int sel;
2374  std::bitset<0> bitset0;
2375  switch (chosen)
2376  {
2377  case 0:
2379 
2380  // Deserialize UL-AM-RLC
2381  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2382  bIterator = DeserializeEnum(64, &sel, bIterator); // t-PollRetransmit
2383  bIterator = DeserializeEnum(8, &sel, bIterator); // pollPDU
2384  bIterator = DeserializeEnum(16, &sel, bIterator); // pollByte
2385  bIterator = DeserializeEnum(8, &sel, bIterator); // maxRetxThreshold
2386 
2387  // Deserialize DL-AM-RLC
2388  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2389  bIterator = DeserializeEnum(32, &sel, bIterator); // t-Reordering
2390  bIterator = DeserializeEnum(64, &sel, bIterator); // t-StatusProhibit
2391  break;
2392 
2393  case 1:
2395 
2396  // Deserialize UL-UM-RLC
2397  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2398  bIterator = DeserializeEnum(2, &sel, bIterator); // sn-FieldLength
2399 
2400  // Deserialize DL-UM-RLC
2401  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2402  bIterator = DeserializeEnum(2, &sel, bIterator); // sn-FieldLength
2403  bIterator = DeserializeEnum(32, &sel, bIterator); // t-Reordering
2404  break;
2405 
2406  case 2:
2408 
2409  // Deserialize UL-UM-RLC
2410  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2411  bIterator = DeserializeEnum(2, &sel, bIterator); // sn-FieldLength
2412  break;
2413 
2414  case 3:
2416 
2417  // Deserialize DL-UM-RLC
2418  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2419  bIterator = DeserializeEnum(2, &sel, bIterator); // sn-FieldLength
2420  bIterator = DeserializeEnum(32, &sel, bIterator); // t-Reordering
2421  break;
2422  }
2423  }
2424 
2425  if (optionalFields[1])
2426  {
2427  bIterator = DeserializeInteger(&val, 3, 10, bIterator);
2428  drbToAddMod.logicalChannelIdentity = val;
2429  }
2430 
2431  if (optionalFields[0])
2432  {
2433  bIterator =
2434  DeserializeLogicalChannelConfig(&drbToAddMod.logicalChannelConfig, bIterator);
2435  }
2436 
2437  drbToAddModList->insert(drbToAddModList->end(), drbToAddMod);
2438  }
2439  return bIterator;
2440 }
2441 
2444  LteRrcSap::LogicalChannelConfig* logicalChannelConfig,
2445  Buffer::Iterator bIterator)
2446 {
2447  int n;
2448 
2449  // Deserialize LogicalChannelConfig sequence
2450  // 1 optional field, extension marker is present.
2451  std::bitset<1> bitset1;
2452  bIterator = DeserializeSequence(&bitset1, true, bIterator);
2453 
2454  if (bitset1[0])
2455  {
2456  // Deserialize ul-SpecificParameters sequence
2457  bIterator = DeserializeSequence(&bitset1, false, bIterator);
2458 
2459  // Deserialize priority
2460  bIterator = DeserializeInteger(&n, 1, 16, bIterator);
2461  logicalChannelConfig->priority = n;
2462 
2463  // Deserialize prioritisedBitRate
2464  bIterator = DeserializeEnum(16, &n, bIterator);
2465  uint16_t prioritizedBitRateKbps;
2466 
2467  switch (n)
2468  {
2469  case 0:
2470  prioritizedBitRateKbps = 0;
2471  break;
2472  case 1:
2473  prioritizedBitRateKbps = 8;
2474  break;
2475  case 2:
2476  prioritizedBitRateKbps = 16;
2477  break;
2478  case 3:
2479  prioritizedBitRateKbps = 32;
2480  break;
2481  case 4:
2482  prioritizedBitRateKbps = 64;
2483  break;
2484  case 5:
2485  prioritizedBitRateKbps = 128;
2486  break;
2487  case 6:
2488  prioritizedBitRateKbps = 256;
2489  break;
2490  case 7:
2491  prioritizedBitRateKbps = 10000;
2492  break;
2493  default:
2494  prioritizedBitRateKbps = 10000;
2495  }
2496  logicalChannelConfig->prioritizedBitRateKbps = prioritizedBitRateKbps;
2497 
2498  // Deserialize bucketSizeDuration
2499  bIterator = DeserializeEnum(8, &n, bIterator);
2500  uint16_t bucketSizeDurationMs;
2501  switch (n)
2502  {
2503  case 0:
2504  bucketSizeDurationMs = 50;
2505  break;
2506  case 1:
2507  bucketSizeDurationMs = 100;
2508  break;
2509  case 2:
2510  bucketSizeDurationMs = 150;
2511  break;
2512  case 3:
2513  bucketSizeDurationMs = 300;
2514  break;
2515  case 4:
2516  bucketSizeDurationMs = 500;
2517  break;
2518  case 5:
2519  bucketSizeDurationMs = 1000;
2520  break;
2521  default:
2522  bucketSizeDurationMs = 1000;
2523  }
2524  logicalChannelConfig->bucketSizeDurationMs = bucketSizeDurationMs;
2525 
2526  if (bitset1[0])
2527  {
2528  // Deserialize logicalChannelGroup
2529  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
2530  logicalChannelConfig->logicalChannelGroup = n;
2531  }
2532  }
2533  return bIterator;
2534 }
2535 
2538  LteRrcSap::PhysicalConfigDedicated* physicalConfigDedicated,
2539  Buffer::Iterator bIterator)
2540 {
2541  std::bitset<10> optionalFieldPresent;
2542  bIterator = DeserializeSequence(&optionalFieldPresent, true, bIterator);
2543 
2544  physicalConfigDedicated->havePdschConfigDedicated = optionalFieldPresent[9];
2545  if (optionalFieldPresent[9])
2546  {
2547  // Deserialize pdsch-ConfigDedicated
2548  std::bitset<0> bitset0;
2549  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2550 
2551  int slct;
2552 
2553  // Deserialize p-a
2554  bIterator = DeserializeEnum(8, &slct, bIterator);
2555  physicalConfigDedicated->pdschConfigDedicated.pa = slct;
2556 
2557  bIterator = DeserializeNull(bIterator);
2558  }
2559  if (optionalFieldPresent[8])
2560  {
2561  // Deserialize pucch-ConfigDedicated
2562  // ...
2563  }
2564  if (optionalFieldPresent[7])
2565  {
2566  // Deserialize pusch-ConfigDedicated
2567  // ...
2568  }
2569  if (optionalFieldPresent[6])
2570  {
2571  // Deserialize uplinkPowerControlDedicated
2572  // ...
2573  }
2574  if (optionalFieldPresent[5])
2575  {
2576  // Deserialize tpc-PDCCH-ConfigPUCCH
2577  // ...
2578  }
2579  if (optionalFieldPresent[4])
2580  {
2581  // Deserialize tpc-PDCCH-ConfigPUSCH
2582  // ...
2583  }
2584  if (optionalFieldPresent[3])
2585  {
2586  // Deserialize cqi-ReportConfig
2587  // ...
2588  }
2589  physicalConfigDedicated->haveSoundingRsUlConfigDedicated = optionalFieldPresent[2];
2590  if (optionalFieldPresent[2])
2591  {
2592  // Deserialize soundingRS-UL-ConfigDedicated
2593  int sel;
2594  bIterator = DeserializeChoice(2, false, &sel, bIterator);
2595 
2596  if (sel == 0)
2597  {
2598  physicalConfigDedicated->soundingRsUlConfigDedicated.type =
2600 
2601  bIterator = DeserializeNull(bIterator);
2602  }
2603 
2604  else if (sel == 1)
2605  {
2606  physicalConfigDedicated->soundingRsUlConfigDedicated.type =
2608 
2609  std::bitset<0> bitset0;
2610  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2611 
2612  int slct;
2613 
2614  // Deserialize srs-Bandwidth
2615  bIterator = DeserializeEnum(4, &slct, bIterator);
2616  physicalConfigDedicated->soundingRsUlConfigDedicated.srsBandwidth = slct;
2617 
2618  // Deserialize srs-HoppingBandwidth
2619  bIterator = DeserializeEnum(4, &slct, bIterator);
2620 
2621  // Deserialize freqDomainPosition
2622  bIterator = DeserializeInteger(&slct, 0, 23, bIterator);
2623 
2624  // Deserialize duration
2625  bool duration;
2626  bIterator = DeserializeBoolean(&duration, bIterator);
2627 
2628  // Deserialize srs-ConfigIndex
2629  bIterator = DeserializeInteger(&slct, 0, 1023, bIterator);
2630  physicalConfigDedicated->soundingRsUlConfigDedicated.srsConfigIndex = slct;
2631 
2632  // Deserialize transmissionComb
2633  bIterator = DeserializeInteger(&slct, 0, 1, bIterator);
2634 
2635  // Deserialize cyclicShift
2636  bIterator = DeserializeEnum(8, &slct, bIterator);
2637  }
2638  }
2639  physicalConfigDedicated->haveAntennaInfoDedicated = optionalFieldPresent[1];
2640  if (optionalFieldPresent[1])
2641  {
2642  // Deserialize antennaInfo
2643  int sel;
2644  bIterator = DeserializeChoice(2, false, &sel, bIterator);
2645  if (sel == 1)
2646  {
2647  bIterator = DeserializeNull(bIterator);
2648  }
2649  else if (sel == 0)
2650  {
2651  std::bitset<1> codebookSubsetRestrictionPresent;
2652  bIterator = DeserializeSequence(&codebookSubsetRestrictionPresent, false, bIterator);
2653 
2654  int txmode;
2655  bIterator = DeserializeEnum(8, &txmode, bIterator);
2656  physicalConfigDedicated->antennaInfo.transmissionMode = txmode;
2657 
2658  if (codebookSubsetRestrictionPresent[0])
2659  {
2660  // Deserialize codebookSubsetRestriction
2661  // ...
2662  }
2663 
2664  int txantennaselchosen;
2665  bIterator = DeserializeChoice(2, false, &txantennaselchosen, bIterator);
2666  if (txantennaselchosen == 0)
2667  {
2668  // Deserialize ue-TransmitAntennaSelection release
2669  bIterator = DeserializeNull(bIterator);
2670  }
2671  else if (txantennaselchosen == 1)
2672  {
2673  // Deserialize ue-TransmitAntennaSelection setup
2674  // ...
2675  }
2676  }
2677  }
2678  if (optionalFieldPresent[0])
2679  {
2680  // Deserialize schedulingRequestConfig
2681  // ...
2682  }
2683  return bIterator;
2684 }
2685 
2686 void
2687 RrcAsn1Header::Print(std::ostream& os) const
2688 {
2689  NS_LOG_FUNCTION(this << &os);
2690  NS_FATAL_ERROR("RrcAsn1Header Print() function must also specify "
2691  "LteRrcSap::RadioResourceConfigDedicated as a second argument");
2692 }
2693 
2696  LteRrcSap::NonCriticalExtensionConfiguration* nonCriticalExtension,
2697  Buffer::Iterator bIterator)
2698 {
2699  NS_LOG_FUNCTION(this);
2700  std::bitset<2> nonCriticalExtension_v890;
2701  bIterator = DeserializeSequence(&nonCriticalExtension_v890, false, bIterator);
2702 
2703  if (nonCriticalExtension_v890[0])
2704  {
2705  // Continue to analyze future Release optional fields
2706  std::bitset<3> nonCriticalExtension_v920;
2707  bIterator = DeserializeSequence(&nonCriticalExtension_v920, false, bIterator);
2708  if (nonCriticalExtension_v920[0])
2709  {
2710  // Continue to deserialize future Release optional fields
2711  std::bitset<3> nonCriticalExtension_v1020;
2712  bIterator = DeserializeSequence(&nonCriticalExtension_v1020, false, bIterator);
2713 
2714  if (nonCriticalExtension_v1020[2])
2715  {
2716  // sCellToReleaseList-r10
2717  int numElems;
2718 
2719  bIterator = DeserializeSequenceOf(&numElems, MAX_OBJECT_ID, 1, bIterator);
2720  nonCriticalExtension->sCellToReleaseList.clear();
2721 
2722  for (int i = 0; i < numElems; i++)
2723  {
2724  // Deserialize SCellIndex-r10
2725  int sCellIndex;
2726  bIterator = DeserializeInteger(&sCellIndex, 1, 7, bIterator);
2727  nonCriticalExtension->sCellToReleaseList.push_back(sCellIndex);
2728  }
2729  }
2730 
2731  if (nonCriticalExtension_v1020[1])
2732  {
2733  // sCellToAddModList-r10
2734 
2735  int numElems;
2736  bIterator = DeserializeSequenceOf(&numElems, MAX_OBJECT_ID, 1, bIterator);
2737  nonCriticalExtension->sCellToAddModList.clear();
2738  // Deserialize SCellToAddMod
2739  for (int i = 0; i < numElems; i++)
2740  {
2741  std::bitset<4> sCellToAddMod_r10;
2742  bIterator = DeserializeSequence(&sCellToAddMod_r10, false, bIterator);
2743 
2745  // Deserialize sCellIndex
2746  NS_ASSERT(sCellToAddMod_r10[3]); // sCellIndex
2747  int n;
2748  bIterator = DeserializeInteger(&n, 1, 7, bIterator);
2749  sctam.sCellIndex = n;
2750  // Deserialize CellIdentification
2751  NS_ASSERT(sCellToAddMod_r10[2]); // CellIdentification
2752  bIterator = DeserializeCellIdentification(&sctam.cellIdentification, bIterator);
2753 
2754  // Deserialize RadioResourceConfigCommonSCell
2755  NS_ASSERT(sCellToAddMod_r10[1]);
2758  bIterator);
2759  if (sCellToAddMod_r10[0])
2760  {
2762  // Deserialize RadioResourceConfigDedicatedSCell
2765  bIterator);
2766  }
2767  else
2768  {
2770  }
2771 
2772  nonCriticalExtension->sCellToAddModList.push_back(sctam);
2773  }
2774  }
2775 
2776  NS_ASSERT(!nonCriticalExtension_v1020[0]); // No nonCriticalExtension
2777  // RRCConnectionReconfiguration-v1130-IEs
2778  }
2779  }
2780 
2781  return bIterator;
2782 }
2783 
2786  Buffer::Iterator bIterator)
2787 {
2788  NS_LOG_FUNCTION(this);
2789  std::bitset<2> cellIdentification_r10;
2790  bIterator = DeserializeSequence(&cellIdentification_r10, false, bIterator);
2791  NS_ASSERT(cellIdentification_r10[1]); // phyCellId-r10
2792  int n1;
2793  bIterator = DeserializeInteger(&n1, 1, 65536, bIterator);
2794  ci->physCellId = n1;
2795  int n2;
2796  NS_ASSERT(cellIdentification_r10[0]); // dl-CarrierFreq-r10
2797  bIterator = DeserializeInteger(&n2, 1, MAX_EARFCN, bIterator);
2798  ci->dlCarrierFreq = n2;
2799 
2800  return bIterator;
2801 }
2802 
2806  Buffer::Iterator bIterator)
2807 {
2808  NS_LOG_FUNCTION(this);
2809  std::bitset<2> radioResourceConfigCommonSCell_r10;
2810  bIterator = DeserializeSequence(&radioResourceConfigCommonSCell_r10, false, bIterator);
2811  rrccsc->haveNonUlConfiguration = radioResourceConfigCommonSCell_r10[1];
2812  rrccsc->haveUlConfiguration = radioResourceConfigCommonSCell_r10[0];
2813  if (rrccsc->haveNonUlConfiguration)
2814  {
2815  std::bitset<5> nonUlConfiguration_r10;
2816  bIterator = DeserializeSequence(&nonUlConfiguration_r10, false, bIterator);
2817  int n;
2818  bIterator = DeserializeInteger(&n, 6, 100, bIterator);
2819  rrccsc->nonUlConfiguration.dlBandwidth = n;
2820 
2821  std::bitset<1> antennaInfoCommon_r10;
2822  bIterator = DeserializeSequence(&antennaInfoCommon_r10, false, bIterator);
2823  bIterator = DeserializeInteger(&n, 0, 65536, bIterator);
2825 
2826  std::bitset<2> pdschConfigCommon_r10;
2827  bIterator = DeserializeSequence(&pdschConfigCommon_r10, false, bIterator);
2828  bIterator = DeserializeInteger(&n, -60, 50, bIterator);
2830  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
2832  }
2833  if (rrccsc->haveUlConfiguration)
2834  {
2835  std::bitset<7> UlConfiguration_r10;
2836  bIterator = DeserializeSequence(&UlConfiguration_r10, true, bIterator);
2837 
2838  std::bitset<3> FreqInfo_r10;
2839  bIterator = DeserializeSequence(&FreqInfo_r10, false, bIterator);
2840  int n;
2841  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
2843  bIterator = DeserializeInteger(&n, 6, 100, bIterator);
2845 
2846  std::bitset<2> UlPowerControlCommonSCell_r10;
2847  bIterator = DeserializeSequence(&UlPowerControlCommonSCell_r10, false, bIterator);
2848  bIterator = DeserializeInteger(&n, 0, 65536, bIterator);
2850 
2851  std::bitset<1> prachConfigSCell_r10;
2852  bIterator = DeserializeSequence(&prachConfigSCell_r10, false, bIterator);
2853  bIterator = DeserializeInteger(&n, 0, 256, bIterator);
2855  }
2856 
2857  return bIterator;
2858 }
2859 
2863  Buffer::Iterator bIterator)
2864 {
2865  NS_LOG_FUNCTION(this);
2866  std::bitset<1> RadioResourceConfigDedicatedSCell_r10;
2867  bIterator = DeserializeSequence(&RadioResourceConfigDedicatedSCell_r10, false, bIterator);
2868  bIterator =
2870 
2871  return bIterator;
2872 }
2873 
2877  Buffer::Iterator bIterator)
2878 {
2879  NS_LOG_FUNCTION(this);
2880  std::bitset<2> pcdscOpt;
2881  bIterator = DeserializeSequence(&pcdscOpt, true, bIterator);
2882  pcdsc->haveNonUlConfiguration = pcdscOpt[1];
2883  pcdsc->haveUlConfiguration = pcdscOpt[0];
2884  if (pcdsc->haveNonUlConfiguration)
2885  {
2886  std::bitset<4> nulOpt;
2887  bIterator = DeserializeSequence(&nulOpt, false, bIterator);
2888  pcdsc->haveAntennaInfoDedicated = nulOpt[3];
2889  NS_ASSERT(!nulOpt[2]); // crossCarrierSchedulingConfig-r10 Not Implemented
2890  NS_ASSERT(!nulOpt[1]); // csi-RS-Config-r10 Not Implemented
2891  pcdsc->havePdschConfigDedicated = nulOpt[0];
2892 
2893  if (pcdsc->haveAntennaInfoDedicated)
2894  {
2895  // Deserialize antennaInfo
2896  int sel;
2897  bIterator = DeserializeChoice(2, false, &sel, bIterator);
2898  if (sel == 1)
2899  {
2900  bIterator = DeserializeNull(bIterator);
2901  }
2902  else if (sel == 0)
2903  {
2904  std::bitset<1> codebookSubsetRestrictionPresent;
2905  bIterator =
2906  DeserializeSequence(&codebookSubsetRestrictionPresent, false, bIterator);
2907 
2908  int txmode;
2909  bIterator = DeserializeEnum(8, &txmode, bIterator);
2910  pcdsc->antennaInfo.transmissionMode = txmode;
2911 
2912  if (codebookSubsetRestrictionPresent[0])
2913  {
2914  // Deserialize codebookSubsetRestriction
2915  NS_FATAL_ERROR("Not implemented yet");
2916  // ...
2917  }
2918 
2919  int txantennaselchosen;
2920  bIterator = DeserializeChoice(2, false, &txantennaselchosen, bIterator);
2921  if (txantennaselchosen == 0)
2922  {
2923  // Deserialize ue-TransmitAntennaSelection release
2924  bIterator = DeserializeNull(bIterator);
2925  }
2926  else if (txantennaselchosen == 1)
2927  {
2928  // Deserialize ue-TransmitAntennaSelection setup
2929  NS_FATAL_ERROR("Not implemented yet");
2930  // ...
2931  }
2932  }
2933  }
2934  if (pcdsc->havePdschConfigDedicated)
2935  {
2936  // Deserialize pdsch-ConfigDedicated
2937  std::bitset<0> bitset0;
2938  bIterator = DeserializeSequence(&bitset0, false, bIterator);
2939 
2940  int slct;
2941 
2942  // Deserialize p-a
2943  bIterator = DeserializeEnum(8, &slct, bIterator);
2944  pcdsc->pdschConfigDedicated.pa = slct;
2945 
2946  bIterator = DeserializeNull(bIterator);
2947  }
2948  }
2949  if (pcdsc->haveUlConfiguration)
2950  {
2951  std::bitset<7> ulOpt;
2952  bIterator = DeserializeSequence(&ulOpt, false, bIterator);
2953  pcdsc->haveAntennaInfoUlDedicated = ulOpt[6];
2954  NS_ASSERT(!ulOpt[5]); // pusch-ConfigDedicatedSCell-r10 not present
2955  NS_ASSERT(!ulOpt[4]); // uplinkPowerControlDedicatedSCell-r10 not present
2956  NS_ASSERT(!ulOpt[3]); // cqi-ReportConfigSCell-r10 not present
2957  pcdsc->haveSoundingRsUlConfigDedicated = ulOpt[2];
2958  NS_ASSERT(!ulOpt[1]); // soundingRS-UL-ConfigDedicated-v1020 not present
2959  NS_ASSERT(!ulOpt[0]); // soundingRS-UL-ConfigDedicatedAperiodic-r10 not present
2960 
2961  if (pcdsc->haveAntennaInfoUlDedicated)
2962  {
2963  // Deserialize antennaInfo
2964  int sel;
2965  bIterator = DeserializeChoice(2, false, &sel, bIterator);
2966  if (sel == 1)
2967  {
2968  bIterator = DeserializeNull(bIterator);
2969  }
2970  else if (sel == 0)
2971  {
2972  std::bitset<1> codebookSubsetRestrictionPresent;
2973  bIterator =
2974  DeserializeSequence(&codebookSubsetRestrictionPresent, false, bIterator);
2975 
2976  int txmode;
2977  bIterator = DeserializeEnum(8, &txmode, bIterator);
2978  pcdsc->antennaInfoUl.transmissionMode = txmode;
2979 
2980  if (codebookSubsetRestrictionPresent[0])
2981  {
2982  // Deserialize codebookSubsetRestriction
2983  NS_FATAL_ERROR("Not implemented yet");
2984  // ...
2985  }
2986 
2987  int txantennaselchosen;
2988  bIterator = DeserializeChoice(2, false, &txantennaselchosen, bIterator);
2989  if (txantennaselchosen == 0)
2990  {
2991  // Deserialize ue-TransmitAntennaSelection release
2992  bIterator = DeserializeNull(bIterator);
2993  }
2994  else if (txantennaselchosen == 1)
2995  {
2996  // Deserialize ue-TransmitAntennaSelection setup
2997  NS_FATAL_ERROR("Not implemented yet");
2998  // ...
2999  }
3000  }
3001  }
3003  {
3004  // Deserialize soundingRS-UL-ConfigDedicated
3005  int sel;
3006  bIterator = DeserializeChoice(2, false, &sel, bIterator);
3007 
3008  if (sel == 0)
3009  {
3012 
3013  bIterator = DeserializeNull(bIterator);
3014  }
3015 
3016  else if (sel == 1)
3017  {
3020 
3021  std::bitset<0> bitset0;
3022  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3023 
3024  int slct;
3025 
3026  // Deserialize srs-Bandwidth
3027  bIterator = DeserializeEnum(4, &slct, bIterator);
3029 
3030  // Deserialize srs-HoppingBandwidth
3031  bIterator = DeserializeEnum(4, &slct, bIterator);
3032 
3033  // Deserialize freqDomainPosition
3034  bIterator = DeserializeInteger(&slct, 0, 23, bIterator);
3035 
3036  // Deserialize duration
3037  bool duration;
3038  bIterator = DeserializeBoolean(&duration, bIterator);
3039 
3040  // Deserialize srs-ConfigIndex
3041  bIterator = DeserializeInteger(&slct, 0, 1023, bIterator);
3043 
3044  // Deserialize transmissionComb
3045  bIterator = DeserializeInteger(&slct, 0, 1, bIterator);
3046 
3047  // Deserialize cyclicShift
3048  bIterator = DeserializeEnum(8, &slct, bIterator);
3049  }
3050  }
3051  }
3052 
3053  return bIterator;
3054 }
3055 
3056 void
3057 RrcAsn1Header::Print(std::ostream& os,
3058  LteRrcSap::RadioResourceConfigDedicated radioResourceConfigDedicated) const
3059 {
3060  os << " srbToAddModList: " << std::endl;
3061  auto it = radioResourceConfigDedicated.srbToAddModList.begin();
3062  for (; it != radioResourceConfigDedicated.srbToAddModList.end(); it++)
3063  {
3064  os << " srbIdentity: " << (int)it->srbIdentity << std::endl;
3065  os << " logicalChannelConfig: " << std::endl;
3066  os << " priority: " << (int)it->logicalChannelConfig.priority << std::endl;
3067  os << " prioritizedBitRateKbps: "
3068  << (int)it->logicalChannelConfig.prioritizedBitRateKbps << std::endl;
3069  os << " bucketSizeDurationMs: "
3070  << (int)it->logicalChannelConfig.bucketSizeDurationMs << std::endl;
3071  os << " logicalChannelGroup: " << (int)it->logicalChannelConfig.logicalChannelGroup
3072  << std::endl;
3073  }
3074  os << std::endl;
3075 
3076  os << " drbToAddModList: " << std::endl;
3077  auto it2 = radioResourceConfigDedicated.drbToAddModList.begin();
3078  for (; it2 != radioResourceConfigDedicated.drbToAddModList.end(); it2++)
3079  {
3080  os << " epsBearerIdentity: " << (int)it2->epsBearerIdentity << std::endl;
3081  os << " drbIdentity: " << (int)it2->drbIdentity << std::endl;
3082  os << " rlcConfig: " << it2->rlcConfig.choice << std::endl;
3083  os << " logicalChannelIdentity: " << (int)it2->logicalChannelIdentity << std::endl;
3084  os << " logicalChannelConfig: " << std::endl;
3085  os << " priority: " << (int)it2->logicalChannelConfig.priority << std::endl;
3086  os << " prioritizedBitRateKbps: "
3087  << (int)it2->logicalChannelConfig.prioritizedBitRateKbps << std::endl;
3088  os << " bucketSizeDurationMs: "
3089  << (int)it2->logicalChannelConfig.bucketSizeDurationMs << std::endl;
3090  os << " logicalChannelGroup: " << (int)it2->logicalChannelConfig.logicalChannelGroup
3091  << std::endl;
3092  }
3093  os << std::endl;
3094 
3095  os << " drbToReleaseList: ";
3096  auto it3 = radioResourceConfigDedicated.drbToReleaseList.begin();
3097  for (; it3 != radioResourceConfigDedicated.drbToReleaseList.end(); it3++)
3098  {
3099  os << (int)*it3 << ", ";
3100  }
3101  os << std::endl;
3102 
3103  os << " havePhysicalConfigDedicated: "
3104  << radioResourceConfigDedicated.havePhysicalConfigDedicated << std::endl;
3105 
3106  if (radioResourceConfigDedicated.havePhysicalConfigDedicated)
3107  {
3108  os << " physicalConfigDedicated: " << std::endl;
3109 
3110  os << " haveSoundingRsUlConfigDedicated: "
3111  << radioResourceConfigDedicated.physicalConfigDedicated.haveSoundingRsUlConfigDedicated
3112  << std::endl;
3113  if (radioResourceConfigDedicated.physicalConfigDedicated.haveSoundingRsUlConfigDedicated)
3114  {
3115  os << " soundingRsUlConfigDedicated: " << std::endl;
3116  os << " type: "
3117  << radioResourceConfigDedicated.physicalConfigDedicated.soundingRsUlConfigDedicated
3118  .type
3119  << std::endl;
3120  os << " srsBandwidth: "
3121  << (int)radioResourceConfigDedicated.physicalConfigDedicated
3123  << std::endl;
3124  os << " srsConfigIndex: "
3125  << (int)radioResourceConfigDedicated.physicalConfigDedicated
3127  << std::endl;
3128  }
3129 
3130  os << " haveAntennaInfoDedicated: "
3131  << radioResourceConfigDedicated.physicalConfigDedicated.haveAntennaInfoDedicated
3132  << std::endl;
3133  if (radioResourceConfigDedicated.physicalConfigDedicated.haveAntennaInfoDedicated)
3134  {
3135  os << " antennaInfo Tx mode: "
3136  << (int)radioResourceConfigDedicated.physicalConfigDedicated.antennaInfo
3138  << std::endl;
3139  }
3140  }
3141 }
3142 
3145  LteRrcSap::SystemInformationBlockType1* systemInformationBlockType1,
3146  Buffer::Iterator bIterator)
3147 {
3148  std::bitset<0> bitset0;
3149  int n;
3150 
3151  std::bitset<3> sysInfoBlkT1Opts;
3152  bIterator = DeserializeSequence(&sysInfoBlkT1Opts, false, bIterator);
3153 
3154  // Deserialize cellAccessRelatedInfo
3155  std::bitset<1> cellAccessRelatedInfoOpts;
3156  bIterator = DeserializeSequence(&cellAccessRelatedInfoOpts, false, bIterator);
3157 
3158  // Deserialize plmn-IdentityList
3159  int numPlmnIdentityInfoElements;
3160  bIterator = DeserializeSequenceOf(&numPlmnIdentityInfoElements, 6, 1, bIterator);
3161  for (int i = 0; i < numPlmnIdentityInfoElements; i++)
3162  {
3163  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3164 
3165  // plmn-Identity
3166  bIterator = DeserializePlmnIdentity(
3167  &systemInformationBlockType1->cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity,
3168  bIterator);
3169  }
3170 
3171  // Deserialize trackingAreaCode
3172  std::bitset<16> trackingAreaCode;
3173  bIterator = DeserializeBitstring(&trackingAreaCode, bIterator);
3174 
3175  // Deserialize cellIdentity
3176  std::bitset<28> cellIdentity;
3177  bIterator = DeserializeBitstring(&cellIdentity, bIterator);
3178  systemInformationBlockType1->cellAccessRelatedInfo.cellIdentity = cellIdentity.to_ulong();
3179 
3180  // Deserialize cellBarred
3181  bIterator = DeserializeEnum(2, &n, bIterator);
3182 
3183  // Deserialize intraFreqReselection
3184  bIterator = DeserializeEnum(2, &n, bIterator);
3185 
3186  // Deserialize csg-Indication
3187  bIterator =
3188  DeserializeBoolean(&systemInformationBlockType1->cellAccessRelatedInfo.csgIndication,
3189  bIterator);
3190 
3191  if (cellAccessRelatedInfoOpts[0])
3192  {
3193  // Deserialize csg-Identity
3194  std::bitset<27> csgIdentity;
3195  bIterator = DeserializeBitstring(&csgIdentity, bIterator);
3196  systemInformationBlockType1->cellAccessRelatedInfo.csgIdentity = csgIdentity.to_ulong();
3197  }
3198 
3199  // Deserialize cellSelectionInfo
3200  std::bitset<1> qRxLevMinOffsetPresent;
3201  bIterator = DeserializeSequence(&qRxLevMinOffsetPresent, false, bIterator);
3202  bIterator = DeserializeInteger(&n, -70, -22, bIterator); // q-RxLevMin
3203  if (qRxLevMinOffsetPresent[0])
3204  {
3205  // Deserialize qRxLevMinOffset
3206  // ...
3207  }
3208 
3209  if (sysInfoBlkT1Opts[2])
3210  {
3211  // Deserialize p-Max
3212  // ...
3213  }
3214 
3215  // freqBandIndicator
3216  bIterator = DeserializeInteger(&n, 1, 64, bIterator);
3217 
3218  // schedulingInfoList
3219  int numSchedulingInfo;
3220  bIterator = DeserializeSequenceOf(&numSchedulingInfo, MAX_SI_MESSAGE, 1, bIterator);
3221  for (int i = 0; i < numSchedulingInfo; i++)
3222  {
3223  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3224  bIterator = DeserializeEnum(7, &n, bIterator); // si-Periodicity
3225  int numSibType;
3226  bIterator =
3227  DeserializeSequenceOf(&numSibType, MAX_SIB - 1, 0, bIterator); // sib-MappingInfo
3228  for (int j = 0; j < numSibType; j++)
3229  {
3230  bIterator = DeserializeEnum(16, &n, bIterator); // SIB-Type
3231  }
3232  }
3233 
3234  if (sysInfoBlkT1Opts[1])
3235  {
3236  // tdd-Config
3237  // ...
3238  }
3239 
3240  // si-WindowLength
3241  bIterator = DeserializeEnum(7, &n, bIterator);
3242 
3243  // systemInfoValueTag
3244  bIterator = DeserializeInteger(&n, 0, 31, bIterator);
3245 
3246  if (sysInfoBlkT1Opts[0])
3247  {
3248  // Deserialize nonCriticalExtension
3249  // ...
3250  }
3251  return bIterator;
3252 }
3253 
3256  LteRrcSap::SystemInformationBlockType2* systemInformationBlockType2,
3257  Buffer::Iterator bIterator)
3258 {
3259  std::bitset<0> bitset0;
3260  int n;
3261 
3262  std::bitset<2> sysInfoBlkT2Opts;
3263  bIterator = DeserializeSequence(&sysInfoBlkT2Opts, true, bIterator);
3264  if (sysInfoBlkT2Opts[1])
3265  {
3266  // Deserialize ac-BarringInfo
3267  // ...
3268  }
3269 
3270  // Deserialize radioResourceConfigCommon
3272  &systemInformationBlockType2->radioResourceConfigCommon,
3273  bIterator);
3274 
3275  // Deserialize ue-TimersAndConstants
3276  bIterator = DeserializeSequence(&bitset0, true, bIterator);
3277  bIterator = DeserializeEnum(8, &n, bIterator); // t300
3278  bIterator = DeserializeEnum(8, &n, bIterator); // t301
3279  bIterator = DeserializeEnum(7, &n, bIterator); // t310
3280  bIterator = DeserializeEnum(8, &n, bIterator); // n310
3281  bIterator = DeserializeEnum(7, &n, bIterator); // t311
3282  bIterator = DeserializeEnum(8, &n, bIterator); // n311
3283 
3284  // Deserialize freqInfo
3285  std::bitset<2> freqInfoOpts;
3286  bIterator = DeserializeSequence(&freqInfoOpts, false, bIterator);
3287  if (freqInfoOpts[1])
3288  {
3289  // Deserialize ul-CarrierFreq
3290  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
3291  systemInformationBlockType2->freqInfo.ulCarrierFreq = n;
3292  }
3293  if (freqInfoOpts[0])
3294  {
3295  // Deserialize ul-Bandwidth
3296  bIterator = DeserializeEnum(6, &n, bIterator);
3297  systemInformationBlockType2->freqInfo.ulBandwidth = EnumToBandwidth(n);
3298  }
3299 
3300  // additionalSpectrumEmission
3301  bIterator = DeserializeInteger(&n, 1, 32, bIterator);
3302 
3303  if (sysInfoBlkT2Opts[0])
3304  {
3305  // Deserialize mbsfn-SubframeConfigList
3306  // ...
3307  }
3308 
3309  // Deserialize timeAlignmentTimerCommon
3310  bIterator = DeserializeEnum(8, &n, bIterator);
3311 
3312  return bIterator;
3313 }
3314 
3317  LteRrcSap::RadioResourceConfigCommon* radioResourceConfigCommon,
3318  Buffer::Iterator bIterator)
3319 {
3320  std::bitset<0> bitset0;
3321  int n;
3322 
3323  std::bitset<9> rrCfgCommOptions;
3324  bIterator = DeserializeSequence(&rrCfgCommOptions, true, bIterator);
3325 
3326  // rach-ConfigCommon
3327  if (rrCfgCommOptions[8])
3328  {
3329  bIterator =
3330  DeserializeRachConfigCommon(&radioResourceConfigCommon->rachConfigCommon, bIterator);
3331  }
3332 
3333  // prach-Config
3334  std::bitset<1> prachConfigInfoPresent;
3335  bIterator = DeserializeSequence(&prachConfigInfoPresent, false, bIterator);
3336 
3337  // prach-Config -> rootSequenceIndex
3338  bIterator = DeserializeInteger(&n, 0, 1023, bIterator);
3339 
3340  // prach-Config -> prach-ConfigInfo
3341  if (prachConfigInfoPresent[0])
3342  {
3343  // ...
3344  }
3345 
3346  // pdsch-ConfigCommon
3347  if (rrCfgCommOptions[7])
3348  {
3349  // ...
3350  }
3351 
3352  // pusch-ConfigCommon
3353  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3354 
3355  // pusch-ConfigCommon -> pusch-ConfigBasic
3356  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3357 
3358  // pusch-ConfigCommon -> pusch-ConfigBasic -> n-SB
3359  bIterator = DeserializeInteger(&n, 1, 4, bIterator);
3360 
3361  // pusch-ConfigCommon -> pusch-ConfigBasic -> hoppingMode
3362  bIterator = DeserializeEnum(2, &n, bIterator);
3363 
3364  // pusch-ConfigCommon -> pusch-ConfigBasic -> pusch-HoppingOffset
3365  bIterator = DeserializeInteger(&n, 0, 98, bIterator);
3366 
3367  // pusch-ConfigCommon -> pusch-ConfigBasic -> enable64QAM
3368  bool enable64QAM;
3369  bIterator = DeserializeBoolean(&enable64QAM, bIterator);
3370 
3371  // ul-ReferenceSignalsPUSCH
3372  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3373 
3374  // groupHoppingEnabled
3375  bool dummyBool;
3376  bIterator = DeserializeBoolean(&dummyBool, bIterator);
3377 
3378  // groupAssignmentPUSCH
3379  bIterator = DeserializeInteger(&n, 0, 29, bIterator);
3380 
3381  // sequenceHoppingEnabled
3382  bIterator = DeserializeBoolean(&dummyBool, bIterator);
3383 
3384  // cyclicShift
3385  bIterator = DeserializeInteger(&n, 0, 7, bIterator);
3386 
3387  // phich-Config
3388  if (rrCfgCommOptions[6])
3389  {
3390  // ...
3391  }
3392 
3393  // pucch-ConfigCommon
3394  if (rrCfgCommOptions[5])
3395  {
3396  // ...
3397  }
3398 
3399  // soundingRS-UL-ConfigCommon
3400  if (rrCfgCommOptions[4])
3401  {
3402  // ...
3403  }
3404 
3405  // uplinkPowerControlCommon
3406  if (rrCfgCommOptions[3])
3407  {
3408  // ...
3409  }
3410 
3411  // antennaInfoCommon
3412  if (rrCfgCommOptions[2])
3413  {
3414  // ...
3415  }
3416 
3417  // p-Max
3418  if (rrCfgCommOptions[1])
3419  {
3420  // ...
3421  }
3422 
3423  // tdd-Config
3424  if (rrCfgCommOptions[0])
3425  {
3426  // ...
3427  }
3428 
3429  // ul-CyclicPrefixLength
3430  bIterator = DeserializeEnum(2, &n, bIterator);
3431 
3432  return bIterator;
3433 }
3434 
3437  Buffer::Iterator bIterator)
3438 {
3439  std::bitset<0> bitset0;
3440  int n;
3441 
3442  bIterator = DeserializeSequence(&bitset0, true, bIterator);
3443 
3444  // preambleInfo
3445  std::bitset<1> preamblesGroupAConfigPresent;
3446  bIterator = DeserializeSequence(&preamblesGroupAConfigPresent, false, bIterator);
3447 
3448  // numberOfRA-Preambles
3449  bIterator = DeserializeEnum(16, &n, bIterator);
3450  switch (n)
3451  {
3452  case 0:
3453  rachConfigCommon->preambleInfo.numberOfRaPreambles = 4;
3454  break;
3455  case 1:
3456  rachConfigCommon->preambleInfo.numberOfRaPreambles = 8;
3457  break;
3458  case 2:
3459  rachConfigCommon->preambleInfo.numberOfRaPreambles = 12;
3460  break;
3461  case 3:
3462  rachConfigCommon->preambleInfo.numberOfRaPreambles = 16;
3463  break;
3464  case 4:
3465  rachConfigCommon->preambleInfo.numberOfRaPreambles = 20;
3466  break;
3467  case 5:
3468  rachConfigCommon->preambleInfo.numberOfRaPreambles = 24;
3469  break;
3470  case 6:
3471  rachConfigCommon->preambleInfo.numberOfRaPreambles = 28;
3472  break;
3473  case 7:
3474  rachConfigCommon->preambleInfo.numberOfRaPreambles = 32;
3475  break;
3476  case 8:
3477  rachConfigCommon->preambleInfo.numberOfRaPreambles = 36;
3478  break;
3479  case 9:
3480  rachConfigCommon->preambleInfo.numberOfRaPreambles = 40;
3481  break;
3482  case 10:
3483  rachConfigCommon->preambleInfo.numberOfRaPreambles = 44;
3484  break;
3485  case 11:
3486  rachConfigCommon->preambleInfo.numberOfRaPreambles = 48;
3487  break;
3488  case 12:
3489  rachConfigCommon->preambleInfo.numberOfRaPreambles = 52;
3490  break;
3491  case 13:
3492  rachConfigCommon->preambleInfo.numberOfRaPreambles = 56;
3493  break;
3494  case 14:
3495  rachConfigCommon->preambleInfo.numberOfRaPreambles = 60;
3496  break;
3497  case 15:
3498  rachConfigCommon->preambleInfo.numberOfRaPreambles = 64;
3499  break;
3500  default:
3501  rachConfigCommon->preambleInfo.numberOfRaPreambles = 4;
3502  }
3503 
3504  if (preamblesGroupAConfigPresent[0])
3505  {
3506  // Deserialize preamblesGroupAConfig
3507  // ...
3508  }
3509 
3510  // powerRampingParameters
3511  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3512  bIterator = DeserializeEnum(4, &n, bIterator); // powerRampingStep
3513  bIterator = DeserializeEnum(16, &n, bIterator); // preambleInitialReceivedTargetPower
3514 
3515  // ra-SupervisionInfo
3516  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3517  bIterator = DeserializeEnum(11, &n, bIterator); // preambleTransMax
3518  switch (n)
3519  {
3520  case 0:
3521  rachConfigCommon->raSupervisionInfo.preambleTransMax = 3;
3522  break;
3523  case 1:
3524  rachConfigCommon->raSupervisionInfo.preambleTransMax = 4;
3525  break;
3526  case 2:
3527  rachConfigCommon->raSupervisionInfo.preambleTransMax = 5;
3528  break;
3529  case 3:
3530  rachConfigCommon->raSupervisionInfo.preambleTransMax = 6;
3531  break;
3532  case 4:
3533  rachConfigCommon->raSupervisionInfo.preambleTransMax = 7;
3534  break;
3535  case 5:
3536  rachConfigCommon->raSupervisionInfo.preambleTransMax = 8;
3537  break;
3538  case 6:
3539  rachConfigCommon->raSupervisionInfo.preambleTransMax = 10;
3540  break;
3541  case 7:
3542  rachConfigCommon->raSupervisionInfo.preambleTransMax = 20;
3543  break;
3544  case 8:
3545  rachConfigCommon->raSupervisionInfo.preambleTransMax = 50;
3546  break;
3547  case 9:
3548  rachConfigCommon->raSupervisionInfo.preambleTransMax = 100;
3549  break;
3550  case 10:
3551  rachConfigCommon->raSupervisionInfo.preambleTransMax = 200;
3552  break;
3553  default:
3554  rachConfigCommon->raSupervisionInfo.preambleTransMax = 0;
3555  }
3556 
3557  // ra-ResponseWindowSize
3558  bIterator = DeserializeEnum(8, &n, bIterator);
3559  switch (n)
3560  {
3561  case 0:
3562  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 2;
3563  break;
3564  case 1:
3565  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 3;
3566  break;
3567  case 2:
3568  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 4;
3569  break;
3570  case 3:
3571  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 5;
3572  break;
3573  case 4:
3574  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 6;
3575  break;
3576  case 5:
3577  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 7;
3578  break;
3579  case 6:
3580  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 8;
3581  break;
3582  case 7:
3583  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 10;
3584  break;
3585  default:
3586  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 0;
3587  }
3588 
3589  bIterator = DeserializeEnum(8, &n, bIterator); // mac-ContentionResolutionTimer
3590  bIterator = DeserializeInteger(&n, 1, 8, bIterator); // maxHARQ-Msg3Tx
3591 
3592  // connEstFailCount
3593  bIterator = DeserializeEnum(8, &n, bIterator);
3594  switch (n)
3595  {
3596  case 1:
3597  rachConfigCommon->txFailParam.connEstFailCount = 1;
3598  break;
3599  case 2:
3600  rachConfigCommon->txFailParam.connEstFailCount = 2;
3601  break;
3602  case 3:
3603  rachConfigCommon->txFailParam.connEstFailCount = 3;
3604  break;
3605  case 4:
3606  rachConfigCommon->txFailParam.connEstFailCount = 4;
3607  break;
3608  default:
3609  rachConfigCommon->txFailParam.connEstFailCount = 1;
3610  }
3611  return bIterator;
3612 }
3613 
3616  LteRrcSap::RadioResourceConfigCommonSib* radioResourceConfigCommonSib,
3617  Buffer::Iterator bIterator)
3618 {
3619  std::bitset<0> bitset0;
3620  int n;
3621 
3622  bIterator = DeserializeSequence(&bitset0, true, bIterator);
3623 
3624  // rach-ConfigCommon
3625  bIterator =
3626  DeserializeRachConfigCommon(&radioResourceConfigCommonSib->rachConfigCommon, bIterator);
3627 
3628  // bcch-Config
3629  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3630  bIterator = DeserializeEnum(4, &n, bIterator); // modificationPeriodCoeff
3631 
3632  // pcch-Config
3633  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3634  bIterator = DeserializeEnum(4, &n, bIterator); // defaultPagingCycle
3635  bIterator = DeserializeEnum(8, &n, bIterator); // nB
3636 
3637  // prach-Config
3638  std::bitset<1> prachConfigInfoPresent;
3639  bIterator = DeserializeSequence(&prachConfigInfoPresent, false, bIterator);
3640  // prach-Config -> rootSequenceIndex
3641  bIterator = DeserializeInteger(&n, 0, 1023, bIterator);
3642  // prach-Config -> prach-ConfigInfo
3643  if (prachConfigInfoPresent[0])
3644  {
3645  // ...
3646  }
3647 
3648  // pdsch-ConfigCommon
3649  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3650  bIterator = DeserializeInteger(&n, -60, 50, bIterator); // referenceSignalPower
3651  bIterator = DeserializeInteger(&n, 0, 3, bIterator); // p-b
3652 
3653  // pusch-ConfigCommon
3654  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3655 
3656  // pusch-ConfigCommon -> pusch-ConfigBasic
3657  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3658 
3659  // pusch-ConfigCommon -> pusch-ConfigBasic -> n-SB
3660  bIterator = DeserializeInteger(&n, 1, 4, bIterator);
3661 
3662  // pusch-ConfigCommon -> pusch-ConfigBasic -> hoppingMode
3663  bIterator = DeserializeEnum(2, &n, bIterator);
3664 
3665  // pusch-ConfigCommon -> pusch-ConfigBasic -> pusch-HoppingOffset
3666  bIterator = DeserializeInteger(&n, 0, 98, bIterator);
3667 
3668  // pusch-ConfigCommon -> pusch-ConfigBasic -> enable64QAM
3669  bool dummyBoolean;
3670  bIterator = DeserializeBoolean(&dummyBoolean, bIterator);
3671 
3672  // ul-ReferenceSignalsPUSCH
3673  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3674 
3675  // groupHoppingEnabled
3676  bIterator = DeserializeBoolean(&dummyBoolean, bIterator);
3677 
3678  // groupAssignmentPUSCH
3679  bIterator = DeserializeInteger(&n, 0, 29, bIterator);
3680 
3681  // sequenceHoppingEnabled
3682  bIterator = DeserializeBoolean(&dummyBoolean, bIterator);
3683 
3684  // cyclicShift
3685  bIterator = DeserializeInteger(&n, 0, 7, bIterator);
3686 
3687  // pucch-ConfigCommon
3688  bIterator = DeserializeEnum(3, &n, bIterator); // deltaPUCCH-Shift
3689  bIterator = DeserializeInteger(&n, 0, 98, bIterator); // nRB-CQI
3690  bIterator = DeserializeInteger(&n, 0, 7, bIterator); // nCS-AN
3691  bIterator = DeserializeInteger(&n, 0, 2047, bIterator); // n1PUCCH-AN
3692 
3693  // soundingRS-UL-ConfigCommon
3694  int choice;
3695  bIterator = DeserializeChoice(2, false, &choice, bIterator);
3696  if (choice == 0)
3697  {
3698  bIterator = DeserializeNull(bIterator); // release
3699  }
3700  if (choice == 1)
3701  {
3702  // setup
3703  // ...
3704  }
3705 
3706  // uplinkPowerControlCommon
3707  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3708  bIterator = DeserializeInteger(&n, -126, 24, bIterator); // p0-NominalPUSCH
3709  bIterator = DeserializeEnum(8, &n, bIterator); // alpha
3710  bIterator = DeserializeInteger(&n, -127, -96, bIterator); // p0-NominalPUCCH
3711  // deltaFList-PUCCH
3712  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3713  bIterator = DeserializeEnum(3, &n, bIterator); // deltaF-PUCCH-Format1
3714  bIterator = DeserializeEnum(3, &n, bIterator); // deltaF-PUCCH-Format1b
3715  bIterator = DeserializeEnum(4, &n, bIterator); // deltaF-PUCCH-Format2
3716  bIterator = DeserializeEnum(3, &n, bIterator); // deltaF-PUCCH-Format2a
3717  bIterator = DeserializeEnum(3, &n, bIterator); // deltaF-PUCCH-Format2b
3718  bIterator = DeserializeInteger(&n, -1, 6, bIterator); // deltaPreambleMsg3
3719 
3720  // ul-CyclicPrefixLength
3721  bIterator = DeserializeEnum(2, &n, bIterator);
3722 
3723  return bIterator;
3724 }
3725 
3728  Buffer::Iterator bIterator)
3729 {
3730  int n;
3731  std::bitset<0> b0;
3732  std::bitset<4> measResultOptionalPresent;
3733  // bIterator = DeserializeSequence (&measResultNeighCellsPresent,true,bIterator);
3734  bIterator = DeserializeSequence(&measResultOptionalPresent, true, bIterator);
3735 
3736  // Deserialize measId
3737  bIterator = DeserializeInteger(&n, 1, MAX_MEAS_ID, bIterator);
3738  measResults->measId = n;
3739 
3740  // Deserialize measResultServCell
3741  bIterator = DeserializeSequence(&b0, false, bIterator);
3742 
3743  // Deserialize rsrpResult
3744  bIterator = DeserializeInteger(&n, 0, 97, bIterator);
3745  measResults->measResultPCell.rsrpResult = n;
3746 
3747  // Deserialize rsrqResult
3748  bIterator = DeserializeInteger(&n, 0, 34, bIterator);
3749  measResults->measResultPCell.rsrqResult = n;
3750 
3751  measResults->haveMeasResultNeighCells = measResultOptionalPresent[0];
3752  measResults->haveMeasResultServFreqList = measResultOptionalPresent[3];
3753  if (measResults->haveMeasResultNeighCells)
3754  {
3755  int measResultNeighCellsChoice;
3756 
3757  // Deserialize measResultNeighCells
3758  bIterator = DeserializeChoice(4, false, &measResultNeighCellsChoice, bIterator);
3759 
3760  if (measResultNeighCellsChoice == 0)
3761  {
3762  // Deserialize measResultListEUTRA
3763  int numElems;
3764  bIterator = DeserializeSequenceOf(&numElems, MAX_CELL_REPORT, 1, bIterator);
3765 
3766  for (int i = 0; i < numElems; i++)
3767  {
3768  LteRrcSap::MeasResultEutra measResultEutra;
3769 
3770  std::bitset<1> isCgiInfoPresent;
3771  bIterator = DeserializeSequence(&isCgiInfoPresent, false, bIterator);
3772 
3773  // PhysCellId
3774  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
3775  measResultEutra.physCellId = n;
3776 
3777  measResultEutra.haveCgiInfo = isCgiInfoPresent[0];
3778  if (isCgiInfoPresent[0])
3779  {
3780  std::bitset<1> havePlmnIdentityList;
3781  bIterator = DeserializeSequence(&havePlmnIdentityList, false, bIterator);
3782 
3783  // Deserialize cellGlobalId
3784  bIterator = DeserializeSequence(&b0, false, bIterator);
3785 
3786  // Deserialize plmn-Identity
3787  bIterator =
3788  DeserializePlmnIdentity(&measResultEutra.cgiInfo.plmnIdentity, bIterator);
3789 
3790  // Deserialize CellIdentity
3791  std::bitset<28> cellId;
3792  bIterator = DeserializeBitstring(&cellId, bIterator);
3793  measResultEutra.cgiInfo.cellIdentity = cellId.to_ulong();
3794 
3795  // Deserialize trackingAreaCode
3796  std::bitset<16> trArCo;
3797  bIterator = DeserializeBitstring(&trArCo, bIterator);
3798  measResultEutra.cgiInfo.trackingAreaCode = trArCo.to_ulong();
3799 
3800  // Deserialize plmn-IdentityList
3801  if (havePlmnIdentityList[0])
3802  {
3803  int numPlmnElems;
3804  bIterator = DeserializeSequenceOf(&numPlmnElems, 5, 1, bIterator);
3805 
3806  for (int j = 0; j < numPlmnElems; j++)
3807  {
3808  uint32_t plmnId;
3809  bIterator = DeserializePlmnIdentity(&plmnId, bIterator);
3810  measResultEutra.cgiInfo.plmnIdentityList.push_back(plmnId);
3811  }
3812  }
3813  }
3814 
3815  // Deserialize measResult
3816  std::bitset<2> measResultOpts;
3817  bIterator = DeserializeSequence(&measResultOpts, true, bIterator);
3818 
3819  measResultEutra.haveRsrpResult = measResultOpts[1];
3820  if (measResultOpts[1])
3821  {
3822  // Deserialize rsrpResult
3823  bIterator = DeserializeInteger(&n, 0, 97, bIterator);
3824  measResultEutra.rsrpResult = n;
3825  }
3826 
3827  measResultEutra.haveRsrqResult = measResultOpts[0];
3828  if (measResultOpts[0])
3829  {
3830  // Deserialize rsrqResult
3831  bIterator = DeserializeInteger(&n, 0, 34, bIterator);
3832  measResultEutra.rsrqResult = n;
3833  }
3834 
3835  measResults->measResultListEutra.push_back(measResultEutra);
3836  }
3837  }
3838 
3839  if (measResultNeighCellsChoice == 1)
3840  {
3841  // Deserialize measResultListUTRA
3842  // ...
3843  }
3844 
3845  if (measResultNeighCellsChoice == 2)
3846  {
3847  // Deserialize measResultListGERAN
3848  // ...
3849  }
3850  if (measResultNeighCellsChoice == 3)
3851  {
3852  // Deserialize measResultsCDMA2000
3853  // ...
3854  }
3855  }
3856  if (measResults->haveMeasResultServFreqList)
3857  {
3858  int numElems;
3859  bIterator = DeserializeSequenceOf(&numElems, MAX_SCELL_REPORT, 1, bIterator);
3860  for (int i = 0; i < numElems; i++)
3861  {
3862  LteRrcSap::MeasResultServFreq measResultServFreq;
3863 
3864  // Deserialize MeasResultServFreq-r10
3865  std::bitset<2> measResultScellPresent;
3866  bIterator = DeserializeSequence(&measResultScellPresent, true, bIterator);
3867  measResultServFreq.haveMeasResultSCell = measResultScellPresent[0];
3868  measResultServFreq.haveMeasResultBestNeighCell = measResultScellPresent[1];
3869 
3870  // Deserialize servFreqId-r10
3871  int servFreqId;
3872  bIterator = DeserializeInteger(&servFreqId, 0, 7, bIterator);
3873  measResultServFreq.servFreqId = servFreqId;
3874 
3875  if (measResultServFreq.haveMeasResultSCell)
3876  {
3877  // Deserialize rsrpResult
3878  bIterator = DeserializeInteger(&n, 0, 97, bIterator);
3879  measResultServFreq.measResultSCell.rsrpResult = n;
3880 
3881  // Deserialize rsrqResult
3882  bIterator = DeserializeInteger(&n, 0, 34, bIterator);
3883  measResultServFreq.measResultSCell.rsrqResult = n;
3884  }
3885 
3886  if (measResultServFreq.haveMeasResultBestNeighCell)
3887  {
3888  // Deserialize physCellId-r10
3889  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
3890  measResultServFreq.measResultBestNeighCell.physCellId = n;
3891 
3892  // Deserialize rsrpResultNCell-r10
3893  bIterator = DeserializeInteger(&n, 0, 97, bIterator);
3894  measResultServFreq.measResultBestNeighCell.rsrpResult = n;
3895 
3896  // Deserialize rsrqResultNCell-r10
3897  bIterator = DeserializeInteger(&n, 0, 34, bIterator);
3898  measResultServFreq.measResultBestNeighCell.rsrqResult = n;
3899  }
3900  measResults->measResultServFreqList.push_back(measResultServFreq);
3901  }
3902  }
3903  return bIterator;
3904 }
3905 
3908 {
3909  int n;
3910  std::bitset<1> isMccPresent;
3911  bIterator = DeserializeSequence(&isMccPresent, false, bIterator);
3912 
3913  if (isMccPresent[0])
3914  {
3915  // Deserialize mcc
3916  // ...
3917  }
3918 
3919  // Deserialize mnc
3920  int mncDigits;
3921  int mnc = 0;
3922  bIterator = DeserializeSequenceOf(&mncDigits, 3, 2, bIterator);
3923 
3924  for (int j = mncDigits - 1; j >= 0; j--)
3925  {
3926  bIterator = DeserializeInteger(&n, 0, 9, bIterator);
3927  mnc += n * pow(10, j);
3928  }
3929 
3930  *plmnId = mnc;
3931 
3932  // cellReservedForOperatorUse
3933  bIterator = DeserializeEnum(2, &n, bIterator);
3934  return bIterator;
3935 }
3936 
3939 {
3940  std::bitset<0> bitset0;
3941  std::bitset<2> bitset2;
3942  std::bitset<11> bitset11;
3943  int n;
3944 
3945  // measConfig
3946  bIterator = DeserializeSequence(&bitset11, true, bIterator);
3947 
3948  if (bitset11[10])
3949  {
3950  // measObjectToRemoveList
3951  int measObjectToRemoveListElems;
3952  bIterator =
3953  DeserializeSequenceOf(&measObjectToRemoveListElems, MAX_OBJECT_ID, 1, bIterator);
3954 
3955  for (int i = 0; i < measObjectToRemoveListElems; i++)
3956  {
3957  bIterator = DeserializeInteger(&n, 1, MAX_OBJECT_ID, bIterator);
3958  measConfig->measObjectToRemoveList.push_back(n);
3959  }
3960  }
3961 
3962  if (bitset11[9])
3963  {
3964  // measObjectToAddModList
3965  int measObjectToAddModListElems;
3966  bIterator =
3967  DeserializeSequenceOf(&measObjectToAddModListElems, MAX_OBJECT_ID, 1, bIterator);
3968 
3969  for (int i = 0; i < measObjectToAddModListElems; i++)
3970  {
3972 
3973  bIterator = DeserializeSequence(&bitset0, false, bIterator);
3974 
3975  bIterator = DeserializeInteger(&n, 1, MAX_OBJECT_ID, bIterator);
3976  elem.measObjectId = n;
3977 
3978  int measObjectChoice;
3979  bIterator = DeserializeChoice(4, true, &measObjectChoice, bIterator);
3980 
3981  switch (measObjectChoice)
3982  {
3983  case 1:
3984  // Deserialize measObjectUTRA
3985  // ...
3986  break;
3987 
3988  case 2:
3989  // Deserialize measObjectGERAN
3990  // ...
3991  break;
3992 
3993  case 3:
3994  // Deserialize measObjectCDMA2000
3995  // ...
3996  break;
3997 
3998  case 0:
3999  default:
4000  // Deserialize measObjectEUTRA
4001  std::bitset<5> measObjectEutraOpts;
4002  bIterator = DeserializeSequence(&measObjectEutraOpts, true, bIterator);
4003 
4004  // carrierFreq
4005  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
4006  elem.measObjectEutra.carrierFreq = n;
4007 
4008  // allowedMeasBandwidth
4009  bIterator = DeserializeEnum(6, &n, bIterator);
4011 
4012  // presenceAntennaPort1
4013  bIterator =
4015 
4016  // neighCellConfig
4017  bIterator = DeserializeBitstring(&bitset2, bIterator);
4018  elem.measObjectEutra.neighCellConfig = bitset2.to_ulong();
4019 
4020  // offsetFreq
4021  bIterator = DeserializeQoffsetRange(&elem.measObjectEutra.offsetFreq, bIterator);
4022 
4023  if (measObjectEutraOpts[4])
4024  {
4025  // cellsToRemoveList
4026  int numElems;
4027  bIterator = DeserializeSequenceOf(&numElems, MAX_CELL_MEAS, 1, bIterator);
4028 
4029  for (int i = 0; i < numElems; i++)
4030  {
4031  bIterator = DeserializeInteger(&n, 1, MAX_CELL_MEAS, bIterator);
4032  elem.measObjectEutra.cellsToRemoveList.push_back(n);
4033  }
4034  }
4035 
4036  if (measObjectEutraOpts[3])
4037  {
4038  // cellsToAddModList
4039  int numElems;
4040  bIterator = DeserializeSequenceOf(&numElems, MAX_CELL_MEAS, 1, bIterator);
4041 
4042  for (int i = 0; i < numElems; i++)
4043  {
4044  LteRrcSap::CellsToAddMod cellsToAddMod;
4045 
4046  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4047 
4048  // cellIndex
4049  bIterator = DeserializeInteger(&n, 1, MAX_CELL_MEAS, bIterator);
4050  cellsToAddMod.cellIndex = n;
4051 
4052  // PhysCellId
4053  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
4054  cellsToAddMod.physCellId = n;
4055 
4056  // cellIndividualOffset
4057  bIterator =
4058  DeserializeQoffsetRange(&cellsToAddMod.cellIndividualOffset, bIterator);
4059 
4060  elem.measObjectEutra.cellsToAddModList.push_back(cellsToAddMod);
4061  }
4062  }
4063 
4064  if (measObjectEutraOpts[2])
4065  {
4066  // blackCellsToRemoveList
4067  int numElems;
4068  bIterator = DeserializeSequenceOf(&numElems, MAX_CELL_MEAS, 1, bIterator);
4069 
4070  for (int i = 0; i < numElems; i++)
4071  {
4072  bIterator = DeserializeInteger(&n, 1, MAX_CELL_MEAS, bIterator);
4073  elem.measObjectEutra.blackCellsToRemoveList.push_back(n);
4074  }
4075  }
4076 
4077  if (measObjectEutraOpts[1])
4078  {
4079  // blackCellsToAddModList
4080  int numElems;
4081  bIterator = DeserializeSequenceOf(&numElems, MAX_CELL_MEAS, 1, bIterator);
4082 
4083  for (int i = 0; i < numElems; i++)
4084  {
4085  LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
4086  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4087 
4088  bIterator = DeserializeInteger(&n, 1, MAX_CELL_MEAS, bIterator);
4089  blackCellsToAddMod.cellIndex = n;
4090 
4091  // PhysCellIdRange
4092  std::bitset<1> isRangePresent;
4093  bIterator = DeserializeSequence(&isRangePresent, false, bIterator);
4094 
4095  // start
4096  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
4097  blackCellsToAddMod.physCellIdRange.start = n;
4098 
4099  blackCellsToAddMod.physCellIdRange.haveRange = isRangePresent[0];
4100  // initialize range to silence compiler warning
4101  blackCellsToAddMod.physCellIdRange.range = 0;
4102  if (blackCellsToAddMod.physCellIdRange.haveRange)
4103  {
4104  // range
4105  bIterator = DeserializeEnum(16, &n, bIterator);
4106  switch (n)
4107  {
4108  case 0:
4109  blackCellsToAddMod.physCellIdRange.range = 4;
4110  break;
4111  case 1:
4112  blackCellsToAddMod.physCellIdRange.range = 8;
4113  break;
4114  case 2:
4115  blackCellsToAddMod.physCellIdRange.range = 12;
4116  break;
4117  case 3:
4118  blackCellsToAddMod.physCellIdRange.range = 16;
4119  break;
4120  case 4:
4121  blackCellsToAddMod.physCellIdRange.range = 24;
4122  break;
4123  case 5:
4124  blackCellsToAddMod.physCellIdRange.range = 32;
4125  break;
4126  case 6:
4127  blackCellsToAddMod.physCellIdRange.range = 48;
4128  break;
4129  case 7:
4130  blackCellsToAddMod.physCellIdRange.range = 64;
4131  break;
4132  case 8:
4133  blackCellsToAddMod.physCellIdRange.range = 84;
4134  break;
4135  case 9:
4136  blackCellsToAddMod.physCellIdRange.range = 96;
4137  break;
4138  case 10:
4139  blackCellsToAddMod.physCellIdRange.range = 128;
4140  break;
4141  case 11:
4142  blackCellsToAddMod.physCellIdRange.range = 168;
4143  break;
4144  case 12:
4145  blackCellsToAddMod.physCellIdRange.range = 252;
4146  break;
4147  case 13:
4148  blackCellsToAddMod.physCellIdRange.range = 504;
4149  break;
4150  default:
4151  blackCellsToAddMod.physCellIdRange.range = 0;
4152  }
4153  }
4154 
4155  elem.measObjectEutra.blackCellsToAddModList.push_back(blackCellsToAddMod);
4156  }
4157  }
4158 
4159  elem.measObjectEutra.haveCellForWhichToReportCGI = measObjectEutraOpts[0];
4160  if (measObjectEutraOpts[0])
4161  {
4162  // cellForWhichToReportCGI
4163  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
4165  }
4166  }
4167  measConfig->measObjectToAddModList.push_back(elem);
4168  }
4169  }
4170 
4171  if (bitset11[8])
4172  {
4173  // reportConfigToRemoveList
4174  int reportConfigToRemoveListElems;
4175  bIterator = DeserializeSequenceOf(&reportConfigToRemoveListElems,
4177  1,
4178  bIterator);
4179 
4180  for (int i = 0; i < reportConfigToRemoveListElems; i++)
4181  {
4182  bIterator = DeserializeInteger(&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
4183  measConfig->reportConfigToRemoveList.push_back(n);
4184  }
4185  }
4186 
4187  if (bitset11[7])
4188  {
4189  // reportConfigToAddModList
4190  int reportConfigToAddModListElems;
4191  bIterator = DeserializeSequenceOf(&reportConfigToAddModListElems,
4193  1,
4194  bIterator);
4195 
4196  for (int i = 0; i < reportConfigToAddModListElems; i++)
4197  {
4199 
4200  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4201  bIterator = DeserializeInteger(&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
4202  elem.reportConfigId = n;
4203 
4204  // Deserialize reportConfig
4205  int reportConfigChoice;
4206  bIterator = DeserializeChoice(2, false, &reportConfigChoice, bIterator);
4207 
4208  if (reportConfigChoice == 0)
4209  {
4210  // reportConfigEUTRA
4211  bIterator = DeserializeSequence(&bitset0, true, bIterator);
4212 
4213  // triggerType
4214  int triggerTypeChoice;
4215  bIterator = DeserializeChoice(2, false, &triggerTypeChoice, bIterator);
4216 
4217  if (triggerTypeChoice == 0)
4218  {
4219  // event
4221  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4222 
4223  // eventId
4224  int eventIdChoice;
4225  bIterator = DeserializeChoice(5, true, &eventIdChoice, bIterator);
4226 
4227  switch (eventIdChoice)
4228  {
4229  case 0:
4231  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4233  bIterator);
4234  break;
4235 
4236  case 1:
4238  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4240  bIterator);
4241  break;
4242 
4243  case 2:
4245  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4246  bIterator = DeserializeInteger(&n, -30, 30, bIterator);
4247  elem.reportConfigEutra.a3Offset = n;
4248  bIterator =
4250  break;
4251 
4252  case 3:
4254  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4256  bIterator);
4257  break;
4258 
4259  case 4:
4260  default:
4262  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4264  bIterator);
4266  bIterator);
4267  }
4268 
4269  bIterator = DeserializeInteger(&n, 0, 30, bIterator);
4270  elem.reportConfigEutra.hysteresis = n;
4271 
4272  bIterator = DeserializeEnum(16, &n, bIterator);
4273  switch (n)
4274  {
4275  case 0:
4277  break;
4278  case 1:
4279  elem.reportConfigEutra.timeToTrigger = 40;
4280  break;
4281  case 2:
4282  elem.reportConfigEutra.timeToTrigger = 64;
4283  break;
4284  case 3:
4285  elem.reportConfigEutra.timeToTrigger = 80;
4286  break;
4287  case 4:
4288  elem.reportConfigEutra.timeToTrigger = 100;
4289  break;
4290  case 5:
4291  elem.reportConfigEutra.timeToTrigger = 128;
4292  break;
4293  case 6:
4294  elem.reportConfigEutra.timeToTrigger = 160;
4295  break;
4296  case 7:
4297  elem.reportConfigEutra.timeToTrigger = 256;
4298  break;
4299  case 8:
4300  elem.reportConfigEutra.timeToTrigger = 320;
4301  break;
4302  case 9:
4303  elem.reportConfigEutra.timeToTrigger = 480;
4304  break;
4305  case 10:
4306  elem.reportConfigEutra.timeToTrigger = 512;
4307  break;
4308  case 11:
4309  elem.reportConfigEutra.timeToTrigger = 640;
4310  break;
4311  case 12:
4312  elem.reportConfigEutra.timeToTrigger = 1024;
4313  break;
4314  case 13:
4315  elem.reportConfigEutra.timeToTrigger = 1280;
4316  break;
4317  case 14:
4318  elem.reportConfigEutra.timeToTrigger = 2560;
4319  break;
4320  case 15:
4321  default:
4322  elem.reportConfigEutra.timeToTrigger = 5120;
4323  break;
4324  }
4325  }
4326 
4327  if (triggerTypeChoice == 1)
4328  {
4329  // periodical
4331 
4332  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4333  bIterator = DeserializeEnum(2, &n, bIterator);
4334  if (n == 0)
4335  {
4336  elem.reportConfigEutra.purpose =
4338  }
4339  else
4340  {
4342  }
4343  }
4344 
4345  // triggerQuantity
4346  bIterator = DeserializeEnum(2, &n, bIterator);
4347  if (n == 0)
4348  {
4350  }
4351  else
4352  {
4354  }
4355 
4356  // reportQuantity
4357  bIterator = DeserializeEnum(2, &n, bIterator);
4358  if (n == 0)
4359  {
4362  }
4363  else
4364  {
4366  }
4367 
4368  // maxReportCells
4369  bIterator = DeserializeInteger(&n, 1, MAX_CELL_REPORT, bIterator);
4371 
4372  // reportInterval
4373  bIterator = DeserializeEnum(16, &n, bIterator);
4374  switch (n)
4375  {
4376  case 0:
4378  break;
4379  case 1:
4381  break;
4382  case 2:
4384  break;
4385  case 3:
4387  break;
4388  case 4:
4390  break;
4391  case 5:
4393  break;
4394  case 6:
4396  break;
4397  case 7:
4399  break;
4400  case 8:
4402  break;
4403  case 9:
4405  break;
4406  case 10:
4408  break;
4409  case 11:
4411  break;
4412  case 12:
4414  break;
4415  case 13:
4417  break;
4418  case 14:
4420  break;
4421  case 15:
4422  default:
4424  }
4425 
4426  // reportAmount
4427  bIterator = DeserializeEnum(8, &n, bIterator);
4428  switch (n)
4429  {
4430  case 0:
4432  break;
4433  case 1:
4435  break;
4436  case 2:
4438  break;
4439  case 3:
4441  break;
4442  case 4:
4443  elem.reportConfigEutra.reportAmount = 16;
4444  break;
4445  case 5:
4446  elem.reportConfigEutra.reportAmount = 32;
4447  break;
4448  case 6:
4449  elem.reportConfigEutra.reportAmount = 64;
4450  break;
4451  default:
4453  }
4454  }
4455 
4456  if (reportConfigChoice == 1)
4457  {
4458  // ReportConfigInterRAT
4459  // ...
4460  }
4461 
4462  measConfig->reportConfigToAddModList.push_back(elem);
4463  }
4464  }
4465 
4466  if (bitset11[6])
4467  {
4468  // measIdToRemoveList
4469  int measIdToRemoveListElems;
4470  bIterator = DeserializeSequenceOf(&measIdToRemoveListElems, MAX_MEAS_ID, 1, bIterator);
4471 
4472  for (int i = 0; i < measIdToRemoveListElems; i++)
4473  {
4474  bIterator = DeserializeInteger(&n, 1, MAX_MEAS_ID, bIterator);
4475  measConfig->measIdToRemoveList.push_back(n);
4476  }
4477  }
4478 
4479  if (bitset11[5])
4480  {
4481  // measIdToAddModList
4482  int measIdToAddModListElems;
4483  bIterator = DeserializeSequenceOf(&measIdToAddModListElems, MAX_MEAS_ID, 1, bIterator);
4484 
4485  for (int i = 0; i < measIdToAddModListElems; i++)
4486  {
4488 
4489  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4490 
4491  bIterator = DeserializeInteger(&n, 1, MAX_MEAS_ID, bIterator);
4492  elem.measId = n;
4493 
4494  bIterator = DeserializeInteger(&n, 1, MAX_OBJECT_ID, bIterator);
4495  elem.measObjectId = n;
4496 
4497  bIterator = DeserializeInteger(&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
4498  elem.reportConfigId = n;
4499 
4500  measConfig->measIdToAddModList.push_back(elem);
4501  }
4502  }
4503 
4504  measConfig->haveQuantityConfig = bitset11[4];
4505  if (measConfig->haveQuantityConfig)
4506  {
4507  // quantityConfig
4508  std::bitset<4> quantityConfigOpts;
4509  bIterator = DeserializeSequence(&quantityConfigOpts, true, bIterator);
4510 
4511  if (quantityConfigOpts[3])
4512  {
4513  // quantityConfigEUTRA
4514  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4515  bIterator = DeserializeEnum(16, &n, bIterator);
4516  switch (n)
4517  {
4518  case 0:
4519  measConfig->quantityConfig.filterCoefficientRSRP = 0;
4520  break;
4521  case 1:
4522  measConfig->quantityConfig.filterCoefficientRSRP = 1;
4523  break;
4524  case 2:
4525  measConfig->quantityConfig.filterCoefficientRSRP = 2;
4526  break;
4527  case 3:
4528  measConfig->quantityConfig.filterCoefficientRSRP = 3;
4529  break;
4530  case 4:
4531  measConfig->quantityConfig.filterCoefficientRSRP = 4;
4532  break;
4533  case 5:
4534  measConfig->quantityConfig.filterCoefficientRSRP = 5;
4535  break;
4536  case 6:
4537  measConfig->quantityConfig.filterCoefficientRSRP = 6;
4538  break;
4539  case 7:
4540  measConfig->quantityConfig.filterCoefficientRSRP = 7;
4541  break;
4542  case 8:
4543  measConfig->quantityConfig.filterCoefficientRSRP = 8;
4544  break;
4545  case 9:
4546  measConfig->quantityConfig.filterCoefficientRSRP = 9;
4547  break;
4548  case 10:
4549  measConfig->quantityConfig.filterCoefficientRSRP = 11;
4550  break;
4551  case 11:
4552  measConfig->quantityConfig.filterCoefficientRSRP = 13;
4553  break;
4554  case 12:
4555  measConfig->quantityConfig.filterCoefficientRSRP = 15;
4556  break;
4557  case 13:
4558  measConfig->quantityConfig.filterCoefficientRSRP = 17;
4559  break;
4560  case 14:
4561  measConfig->quantityConfig.filterCoefficientRSRP = 19;
4562  break;
4563  case 15:
4564  measConfig->quantityConfig.filterCoefficientRSRP = 0;
4565  break;
4566  default:
4567  measConfig->quantityConfig.filterCoefficientRSRP = 4;
4568  }
4569  bIterator = DeserializeEnum(16, &n, bIterator);
4570  switch (n)
4571  {
4572  case 0:
4573  measConfig->quantityConfig.filterCoefficientRSRQ = 0;
4574  break;
4575  case 1:
4576  measConfig->quantityConfig.filterCoefficientRSRQ = 1;
4577  break;
4578  case 2:
4579  measConfig->quantityConfig.filterCoefficientRSRQ = 2;
4580  break;
4581  case 3:
4582  measConfig->quantityConfig.filterCoefficientRSRQ = 3;
4583  break;
4584  case 4:
4585  measConfig->quantityConfig.filterCoefficientRSRQ = 4;
4586  break;
4587  case 5:
4588  measConfig->quantityConfig.filterCoefficientRSRQ = 5;
4589  break;
4590  case 6:
4591  measConfig->quantityConfig.filterCoefficientRSRQ = 6;
4592  break;
4593  case 7:
4594  measConfig->quantityConfig.filterCoefficientRSRQ = 7;
4595  break;
4596  case 8:
4597  measConfig->quantityConfig.filterCoefficientRSRQ = 8;
4598  break;
4599  case 9:
4600  measConfig->quantityConfig.filterCoefficientRSRQ = 9;
4601  break;
4602  case 10:
4603  measConfig->quantityConfig.filterCoefficientRSRQ = 11;
4604  break;
4605  case 11:
4606  measConfig->quantityConfig.filterCoefficientRSRQ = 13;
4607  break;
4608  case 12:
4609  measConfig->quantityConfig.filterCoefficientRSRQ = 15;
4610  break;
4611  case 13:
4612  measConfig->quantityConfig.filterCoefficientRSRQ = 17;
4613  break;
4614  case 14:
4615  measConfig->quantityConfig.filterCoefficientRSRQ = 19;
4616  break;
4617  case 15:
4618  measConfig->quantityConfig.filterCoefficientRSRQ = 0;
4619  break;
4620  default:
4621  measConfig->quantityConfig.filterCoefficientRSRQ = 4;
4622  }
4623  }
4624  if (quantityConfigOpts[2])
4625  {
4626  // quantityConfigUTRA
4627  // ...
4628  }
4629  if (quantityConfigOpts[1])
4630  {
4631  // quantityConfigGERAN
4632  // ...
4633  }
4634  if (quantityConfigOpts[0])
4635  {
4636  // quantityConfigCDMA2000
4637  // ...
4638  }
4639  }
4640 
4641  measConfig->haveMeasGapConfig = bitset11[3];
4642  if (measConfig->haveMeasGapConfig)
4643  {
4644  // measGapConfig
4645  int measGapConfigChoice;
4646  bIterator = DeserializeChoice(2, false, &measGapConfigChoice, bIterator);
4647  switch (measGapConfigChoice)
4648  {
4649  case 0:
4651  bIterator = DeserializeNull(bIterator);
4652  break;
4653  case 1:
4654  default:
4656  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4657 
4658  int gapOffsetChoice;
4659  bIterator = DeserializeChoice(2, true, &gapOffsetChoice, bIterator);
4660  switch (gapOffsetChoice)
4661  {
4662  case 0:
4664  bIterator = DeserializeInteger(&n, 0, 39, bIterator);
4665  measConfig->measGapConfig.gapOffsetValue = n;
4666  break;
4667  case 1:
4668  default:
4670  bIterator = DeserializeInteger(&n, 0, 79, bIterator);
4671  measConfig->measGapConfig.gapOffsetValue = n;
4672  }
4673  }
4674  }
4675 
4676  measConfig->haveSmeasure = bitset11[2];
4677  if (measConfig->haveSmeasure)
4678  {
4679  // s-Measure
4680  bIterator = DeserializeInteger(&n, 0, 97, bIterator);
4681  measConfig->sMeasure = n;
4682  }
4683 
4684  if (bitset11[1])
4685  {
4686  // preRegistrationInfoHRPD
4687  // ...
4688  }
4689 
4690  measConfig->haveSpeedStatePars = bitset11[0];
4691  if (measConfig->haveSpeedStatePars)
4692  {
4693  // speedStatePars
4694  int speedStateParsChoice;
4695  bIterator = DeserializeChoice(2, false, &speedStateParsChoice, bIterator);
4696  switch (speedStateParsChoice)
4697  {
4698  case 0:
4700  bIterator = DeserializeNull(bIterator);
4701  break;
4702  case 1:
4703  default:
4705  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4706 
4707  // Deserialize mobilityStateParameters
4708  // Deserialize t-Evaluation
4709  bIterator = DeserializeEnum(8, &n, bIterator);
4710  switch (n)
4711  {
4712  case 0:
4714  break;
4715  case 1:
4717  break;
4718  case 2:
4720  break;
4721  case 3:
4723  break;
4724  case 4:
4726  break;
4727  default:
4729  }
4730  // Deserialize t-HystNormal
4731  bIterator = DeserializeEnum(8, &n, bIterator);
4732  switch (n)
4733  {
4734  case 0:
4736  break;
4737  case 1:
4739  break;
4740  case 2:
4742  break;
4743  case 3:
4745  break;
4746  case 4:
4748  break;
4749  default:
4751  }
4752 
4753  bIterator = DeserializeInteger(&n, 1, 16, bIterator);
4755 
4756  bIterator = DeserializeInteger(&n, 1, 16, bIterator);
4758 
4759  // Deserialize timeToTriggerSf
4760  bIterator = DeserializeEnum(4, &n, bIterator);
4761  measConfig->speedStatePars.timeToTriggerSf.sfMedium = (n + 1) * 25;
4762  bIterator = DeserializeEnum(4, &n, bIterator);
4763  measConfig->speedStatePars.timeToTriggerSf.sfHigh = (n + 1) * 25;
4764  }
4765  }
4766  return bIterator;
4767 }
4768 
4770 
4771 // Constructor
4773  : RrcUlCcchMessage()
4774 {
4775  m_mmec = std::bitset<8>(0UL);
4776  m_mTmsi = std::bitset<32>(0UL);
4778  m_spare = std::bitset<1>(0UL);
4779 }
4780 
4781 // Destructor
4783 {
4784 }
4785 
4786 TypeId
4788 {
4789  static TypeId tid =
4790  TypeId("ns3::RrcConnectionRequestHeader").SetParent<Header>().SetGroupName("Lte");
4791  return tid;
4792 }
4793 
4794 void
4795 RrcConnectionRequestHeader::Print(std::ostream& os) const
4796 {
4797  os << "MMEC:" << m_mmec << std::endl;
4798  os << "MTMSI:" << m_mTmsi << std::endl;
4799  os << "EstablishmentCause:" << m_establishmentCause << std::endl;
4800  os << "Spare: " << m_spare << std::endl;
4801 }
4802 
4803 void
4805 {
4807 
4809 
4810  // Serialize RRCConnectionRequest sequence:
4811  // no default or optional fields. Extension marker not present.
4812  SerializeSequence(std::bitset<0>(), false);
4813 
4814  // Serialize criticalExtensions choice:
4815  // 2 options, selected: 0 (option: rrcConnectionRequest-r8)
4816  SerializeChoice(2, 0, false);
4817 
4818  // Serialize RRCConnectionRequest-r8-IEs sequence:
4819  // no default or optional fields. Extension marker not present.
4820  SerializeSequence(std::bitset<0>(), false);
4821 
4822  // Serialize InitialUE-Identity choice:
4823  // 2 options, selected: 0 (option: s-TMSI)
4824  SerializeChoice(2, 0, false);
4825 
4826  // Serialize S-TMSI sequence:
4827  // no default or optional fields. Extension marker not present.
4828  SerializeSequence(std::bitset<0>(), false);
4829 
4830  // Serialize mmec : MMEC ::= BIT STRING (SIZE (8))
4832 
4833  // Serialize m-TMSI ::= BIT STRING (SIZE (32))
4835 
4836  // Serialize establishmentCause : EstablishmentCause ::= ENUMERATED
4838 
4839  // Serialize spare : BIT STRING (SIZE (1))
4840  SerializeBitstring(std::bitset<1>());
4841 
4842  // Finish serialization
4844 }
4845 
4846 uint32_t
4848 {
4849  std::bitset<1> dummy;
4850  std::bitset<0> optionalOrDefaultMask;
4851  int selectedOption;
4852 
4853  bIterator = DeserializeUlCcchMessage(bIterator);
4854 
4855  // Deserialize RCConnectionRequest sequence
4856  bIterator = DeserializeSequence(&optionalOrDefaultMask, false, bIterator);
4857 
4858  // Deserialize criticalExtensions choice:
4859  bIterator = DeserializeChoice(2, false, &selectedOption, bIterator);
4860 
4861  // Deserialize RRCConnectionRequest-r8-IEs sequence
4862  bIterator = DeserializeSequence(&optionalOrDefaultMask, false, bIterator);
4863 
4864  // Deserialize InitialUE-Identity choice
4865  bIterator = DeserializeChoice(2, false, &selectedOption, bIterator);
4866 
4867  // Deserialize S-TMSI sequence
4868  bIterator = DeserializeSequence(&optionalOrDefaultMask, false, bIterator);
4869 
4870  // Deserialize mmec
4871  bIterator = DeserializeBitstring(&m_mmec, bIterator);
4872 
4873  // Deserialize m-TMSI
4874  bIterator = DeserializeBitstring(&m_mTmsi, bIterator);
4875 
4876  // Deserialize establishmentCause
4877  bIterator = DeserializeEnum(8, &selectedOption, bIterator);
4878 
4879  // Deserialize spare
4880  bIterator = DeserializeBitstring(&dummy, bIterator);
4881 
4882  return GetSerializedSize();
4883 }
4884 
4885 void
4887 {
4888  m_mTmsi = std::bitset<32>((uint32_t)msg.ueIdentity);
4889  m_mmec = std::bitset<8>((uint32_t)(msg.ueIdentity >> 32));
4890  m_isDataSerialized = false;
4891 }
4892 
4895 {
4897  msg.ueIdentity = (((uint64_t)m_mmec.to_ulong()) << 32) | (m_mTmsi.to_ulong());
4898 
4899  return msg;
4900 }
4901 
4902 std::bitset<8>
4904 {
4905  return m_mmec;
4906 }
4907 
4908 std::bitset<32>
4910 {
4911  return m_mTmsi;
4912 }
4913 
4916 {
4917 }
4918 
4920 {
4921 }
4922 
4923 void
4924 RrcConnectionSetupHeader::Print(std::ostream& os) const
4925 {
4926  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
4927  os << "radioResourceConfigDedicated:" << std::endl;
4929 }
4930 
4931 void
4933 {
4935 
4937 
4938  SerializeInteger(15, 0, 15);
4939 
4940  // Serialize RRCConnectionSetup sequence:
4941  // no default or optional fields. Extension marker not present.
4942  SerializeSequence(std::bitset<0>(), false);
4943 
4944  // Serialize rrc-TransactionIdentifier ::=INTEGER (0..3)
4946 
4947  // Serialize criticalExtensions choice:
4948  // 2 options, selected: 0 (option: c1)
4949  SerializeChoice(2, 0, false);
4950 
4951  // Serialize c1 choice:
4952  // 8 options, selected: 0 (option: rrcConnectionSetup-r8)
4953  SerializeChoice(8, 0, false);
4954 
4955  // Serialize rrcConnectionSetup-r8 sequence
4956  // 1 optional fields (not present). Extension marker not present.
4957  SerializeSequence(std::bitset<1>(0), false);
4958 
4959  // Serialize RadioResourceConfigDedicated sequence
4961 
4962  // Serialize nonCriticalExtension sequence
4963  // 2 optional fields, none present. No extension marker.
4964  SerializeSequence(std::bitset<2>(0), false);
4965 
4966  // Finish serialization
4968 }
4969 
4970 uint32_t
4972 {
4973  int n;
4974 
4975  std::bitset<0> bitset0;
4976  std::bitset<1> bitset1;
4977  std::bitset<2> bitset2;
4978 
4979  bIterator = DeserializeDlCcchMessage(bIterator);
4980 
4981  bIterator = DeserializeInteger(&n, 0, 15, bIterator);
4982 
4983  // Deserialize RRCConnectionSetup sequence
4984  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4985 
4986  // Deserialize rrc-TransactionIdentifier ::=INTEGER (0..3)
4987  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
4989 
4990  // Deserialize criticalExtensions choice
4991  int criticalExtensionChoice;
4992  bIterator = DeserializeChoice(2, false, &criticalExtensionChoice, bIterator);
4993  if (criticalExtensionChoice == 1)
4994  {
4995  // Deserialize criticalExtensionsFuture
4996  bIterator = DeserializeSequence(&bitset0, false, bIterator);
4997  }
4998  else if (criticalExtensionChoice == 0)
4999  {
5000  // Deserialize c1
5001  int c1;
5002  bIterator = DeserializeChoice(8, false, &c1, bIterator);
5003 
5004  if (c1 > 0)
5005  {
5006  // Deserialize spareX , X:=7..1
5007  bIterator = DeserializeNull(bIterator);
5008  }
5009  else if (c1 == 0)
5010  {
5011  // Deserialize rrcConnectionSetup-r8
5012  // 1 optional fields, no extension marker.
5013  bIterator = DeserializeSequence(&bitset1, false, bIterator);
5014 
5015  // Deserialize radioResourceConfigDedicated
5016  bIterator =
5018 
5019  if (bitset1[0])
5020  {
5021  // Deserialize nonCriticalExtension
5022  // 2 optional fields, no extension marker.
5023  bIterator = DeserializeSequence(&bitset2, false, bIterator);
5024 
5025  // Deserialization of lateR8NonCriticalExtension and nonCriticalExtension
5026  // ...
5027  }
5028  }
5029  }
5030  return GetSerializedSize();
5031 }
5032 
5033 void
5035 {
5038  m_isDataSerialized = false;
5039 }
5040 
5043 {
5047  return msg;
5048 }
5049 
5050 uint8_t
5052 {
5054 }
5055 
5056 bool
5058 {
5060 }
5061 
5062 std::list<LteRrcSap::SrbToAddMod>
5064 {
5066 }
5067 
5068 std::list<LteRrcSap::DrbToAddMod>
5070 {
5072 }
5073 
5074 std::list<uint8_t>
5076 {
5078 }
5079 
5082 {
5084 }
5085 
5088 {
5090 }
5091 
5093 
5095 {
5096 }
5097 
5099 {
5100 }
5101 
5102 void
5104 {
5106 
5107  // Serialize DCCH message
5109 
5110  // Serialize RRCConnectionSetupComplete sequence:
5111  // no default or optional fields. Extension marker not present.
5112  SerializeSequence(std::bitset<0>(), false);
5113 
5114  // Serialize rrc-TransactionIdentifier
5116 
5117  // Serialize criticalExtensions choice
5118  // 2 options, selected 0 (c1)
5119  SerializeChoice(2, 0, false);
5120 
5121  // Choose spare3 NULL
5122  SerializeChoice(4, 1, false);
5123 
5124  // Serialize spare3 NULL
5125  SerializeNull();
5126 
5127  // Finish serialization
5129 }
5130 
5131 uint32_t
5133 {
5134  std::bitset<0> bitset0;
5135 
5136  bIterator = DeserializeUlDcchMessage(bIterator);
5137 
5138  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5139 
5140  int n;
5141  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
5143 
5144  bIterator = DeserializeChoice(2, false, &n, bIterator);
5145 
5146  if (n == 1)
5147  {
5148  // Deserialize criticalExtensionsFuture
5149  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5150  }
5151  else if (n == 0)
5152  {
5153  // Deserialize c1
5154  int c1Chosen;
5155  bIterator = DeserializeChoice(4, false, &c1Chosen, bIterator);
5156 
5157  if (c1Chosen == 0)
5158  {
5159  // Deserialize rrcConnectionSetupComplete-r8
5160  // ...
5161  }
5162  else
5163  {
5164  bIterator = DeserializeNull(bIterator);
5165  }
5166  }
5167 
5168  return GetSerializedSize();
5169 }
5170 
5171 void
5173 {
5174  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
5175 }
5176 
5177 void
5179 {
5181  m_isDataSerialized = false;
5182 }
5183 
5184 uint8_t
5186 {
5188 }
5189 
5192 {
5195  return msg;
5196 }
5197 
5199 
5201 {
5202 }
5203 
5205 {
5206 }
5207 
5208 void
5210 {
5212 
5213  // Serialize DCCH message
5215 
5216  // Serialize RRCConnectionSetupComplete sequence:
5217  // no default or optional fields. Extension marker not present.
5218  SerializeSequence(std::bitset<0>(), false);
5219 
5220  // Serialize rrc-TransactionIdentifier
5222 
5223  // Serialize criticalExtensions choice
5224  // 2 options, selected 1 (criticalExtensionsFuture)
5225  SerializeChoice(2, 1, false);
5226 
5227  // Choose criticalExtensionsFuture
5228  SerializeSequence(std::bitset<0>(), false);
5229 
5230  // Finish serialization
5232 }
5233 
5234 uint32_t
5236 {
5237  std::bitset<0> bitset0;
5238  int n;
5239 
5240  bIterator = DeserializeUlDcchMessage(bIterator);
5241  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5242 
5243  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
5245 
5246  bIterator = DeserializeChoice(2, false, &n, bIterator);
5247 
5248  if (n == 1)
5249  {
5250  // Deserialize criticalExtensionsFuture
5251  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5252  }
5253  else if (n == 0)
5254  {
5255  // Deserialize rrcConnectionReconfigurationComplete-r8
5256  // ...
5257  }
5258 
5259  return GetSerializedSize();
5260 }
5261 
5262 void
5264 {
5265  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
5266 }
5267 
5268 void
5271 {
5273  m_isDataSerialized = false;
5274 }
5275 
5278 {
5281  return msg;
5282 }
5283 
5284 uint8_t
5286 {
5288 }
5289 
5291 
5293 {
5294 }
5295 
5297 {
5298 }
5299 
5300 void
5302 {
5304 
5306 
5307  // Serialize RRCConnectionSetupComplete sequence:
5308  // no default or optional fields. Extension marker not present.
5309  SerializeSequence(std::bitset<0>(), false);
5310 
5311  // Serialize rrc-TransactionIdentifier
5313 
5314  // Serialize criticalExtensions choice
5315  // 2 options, selected 0 (c1)
5316  SerializeChoice(2, 0, false);
5317 
5318  // Serialize c1 choice
5319  // 8 options, selected 0 (rrcConnectionReconfiguration-r8)
5320  SerializeChoice(8, 0, false);
5321 
5322  // Serialize RRCConnectionReconfiguration-r8-IEs sequence:
5323  // 6 optional fields. Extension marker not present.
5324  std::bitset<6> options;
5325  options.set(5, m_haveMeasConfig);
5326  options.set(4, m_haveMobilityControlInfo);
5327  options.set(3, false); // No dedicatedInfoNASList
5328  options.set(2, m_haveRadioResourceConfigDedicated);
5329  options.set(1, false); // No securityConfigHO
5330  options.set(0, m_haveNonCriticalExtension); // Implemented nonCriticalExtension because
5331  // compatibility with R10 - CA
5332  SerializeSequence(options, false);
5333 
5334  if (m_haveMeasConfig)
5335  {
5337  }
5338 
5340  {
5341  // Serialize MobilityControlInfo
5342 
5343  // 4 optional fields, extension marker present.
5344  std::bitset<4> mobCtrlIntoOptional;
5345  mobCtrlIntoOptional.set(3, m_mobilityControlInfo.haveCarrierFreq);
5346  mobCtrlIntoOptional.set(2, m_mobilityControlInfo.haveCarrierBandwidth);
5347  mobCtrlIntoOptional.set(1, false); // No additionalSpectrumEmission
5348  mobCtrlIntoOptional.set(0, m_mobilityControlInfo.haveRachConfigDedicated);
5349  SerializeSequence(mobCtrlIntoOptional, true);
5350 
5351  // Serialize targetPhysCellId
5353 
5355  {
5356  SerializeSequence(std::bitset<1>(1), false);
5359  }
5360 
5362  {
5363  SerializeSequence(std::bitset<1>(1), false);
5364 
5365  // Serialize dl-Bandwidth
5367 
5368  // Serialize ul-Bandwidth
5370  }
5371 
5372  // Serialize t304
5373  SerializeEnum(8, 0);
5374 
5375  // Serialize newUE-Identity
5377 
5378  // Serialize radioResourceConfigCommon
5380 
5382  {
5383  SerializeSequence(std::bitset<0>(), false);
5386  }
5387  }
5388 
5390  {
5391  // Serialize RadioResourceConfigDedicated
5393  }
5394 
5396  {
5397  // Serialize NonCriticalExtension RRCConnectionReconfiguration-v890-IEs sequence:
5398  // 2 optional fields. Extension marker not present.
5399  std::bitset<2> noncriticalExtension_v890;
5400  noncriticalExtension_v890.set(1, false); // No lateNonCriticalExtension
5401  noncriticalExtension_v890.set(
5402  0,
5403  m_haveNonCriticalExtension); // Implemented nonCriticalExtension because compatibility
5404  // with R10 - CA
5405  // Enable RRCCoonectionReconfiguration-v920-IEs
5406  SerializeSequence(noncriticalExtension_v890, false);
5407 
5408  // Serialize NonCriticalExtension RRCConnectionReconfiguration-v920-IEs sequence:
5409  // 3 optional fields. Extension marker not present.
5410  std::bitset<3> noncriticalExtension_v920;
5411  noncriticalExtension_v920.set(1, false); // No otherConfig-r9
5412  noncriticalExtension_v920.set(1, false); // No fullConfig-r9
5413  // Enable RRCCoonectionReconfiguration-v1020-IEs
5414  noncriticalExtension_v920.set(
5415  0,
5416  m_haveNonCriticalExtension); // Implemented nonCriticalExtension because compatibility
5417  // with R10 - CA
5418  SerializeSequence(noncriticalExtension_v920, false);
5419 
5421  m_nonCriticalExtension); // Serializing RRCConnectionReconfiguration-r8-IEs
5422  }
5423 
5424  // Finish serialization
5426 }
5427 
5428 uint32_t
5430 {
5431  std::bitset<0> bitset0;
5432 
5433  bIterator = DeserializeDlDcchMessage(bIterator);
5434 
5435  // RRCConnectionReconfiguration sequence
5436  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5437 
5438  // rrc-TransactionIdentifier
5439  int n;
5440  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
5442 
5443  // criticalExtensions
5444  int sel;
5445  bIterator = DeserializeChoice(2, false, &sel, bIterator);
5446  if (sel == 1)
5447  {
5448  // criticalExtensionsFuture
5449  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5450  }
5451  else if (sel == 0)
5452  {
5453  // c1
5454  int c1Chosen;
5455  bIterator = DeserializeChoice(8, false, &c1Chosen, bIterator);
5456  if (c1Chosen > 0)
5457  {
5458  bIterator = DeserializeNull(bIterator);
5459  }
5460  else if (c1Chosen == 0)
5461  {
5462  // rrcConnectionReconfiguration-r8
5463  std::bitset<6> rrcConnRecOpts;
5464  bIterator = DeserializeSequence(&rrcConnRecOpts, false, bIterator);
5465 
5466  m_haveMeasConfig = rrcConnRecOpts[5];
5467  if (m_haveMeasConfig)
5468  {
5469  bIterator = DeserializeMeasConfig(&m_measConfig, bIterator);
5470  }
5471 
5472  m_haveMobilityControlInfo = rrcConnRecOpts[4];
5474  {
5475  // mobilityControlInfo
5476  std::bitset<4> mobCtrlOpts;
5477  bIterator = DeserializeSequence(&mobCtrlOpts, true, bIterator);
5478 
5479  // PhysCellId
5480  bIterator = DeserializeInteger(&n, 0, 503, bIterator);
5482 
5483  // carrierFreq
5484  m_mobilityControlInfo.haveCarrierFreq = mobCtrlOpts[3];
5486  {
5487  std::bitset<1> ulCarrierFreqPresent;
5488  bIterator = DeserializeSequence(&ulCarrierFreqPresent, false, bIterator);
5489 
5490  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
5492 
5493  if (ulCarrierFreqPresent[0])
5494  {
5495  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
5497  }
5498  }
5499 
5500  // carrierBandwidth
5503  {
5504  std::bitset<1> ulBandwidthPresent;
5505  bIterator = DeserializeSequence(&ulBandwidthPresent, false, bIterator);
5506 
5507  bIterator = DeserializeEnum(16, &n, bIterator);
5509 
5510  if (ulBandwidthPresent[0])
5511  {
5512  bIterator = DeserializeEnum(16, &n, bIterator);
5514  }
5515  }
5516 
5517  // additionalSpectrumEmission
5518  if (mobCtrlOpts[1])
5519  {
5520  // ...
5521  }
5522 
5523  // t304
5524  bIterator = DeserializeEnum(8, &n, bIterator);
5525 
5526  // newUE-Identity
5527  std::bitset<16> cRnti;
5528  bIterator = DeserializeBitstring(&cRnti, bIterator);
5529  m_mobilityControlInfo.newUeIdentity = cRnti.to_ulong();
5530 
5531  // radioResourceConfigCommon
5534  bIterator);
5535 
5538  {
5539  bIterator = DeserializeSequence(&bitset0, false, bIterator);
5540  bIterator = DeserializeInteger(&n, 0, 63, bIterator);
5542  bIterator = DeserializeInteger(&n, 0, 15, bIterator);
5544  }
5545  }
5546 
5547  // dedicatedInfoNASList
5548  if (rrcConnRecOpts[3])
5549  {
5550  // ...
5551  }
5552 
5553  // radioResourceConfigDedicated
5554  m_haveRadioResourceConfigDedicated = rrcConnRecOpts[2];
5556  {
5558  bIterator);
5559  }
5560 
5561  // securityConfigHO
5562  if (rrcConnRecOpts[1])
5563  {
5564  // ...
5565  }
5566 
5567  // nonCriticalExtension
5568  m_haveNonCriticalExtension = rrcConnRecOpts[0];
5570  {
5571  bIterator =
5573  // ...
5574  }
5575  }
5576  }
5577 
5578  return GetSerializedSize();
5579 }
5580 
5581 void
5583 {
5584  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
5585  os << "haveMeasConfig: " << m_haveMeasConfig << std::endl;
5586  if (m_haveMeasConfig)
5587  {
5588  if (!m_measConfig.measObjectToRemoveList.empty())
5589  {
5590  os << " measObjectToRemoveList: ";
5591  std::list<uint8_t> auxList = m_measConfig.measObjectToRemoveList;
5592  auto it = auxList.begin();
5593  for (; it != auxList.end(); it++)
5594  {
5595  os << (int)*it << ", ";
5596  }
5597  os << std::endl;
5598  }
5600  {
5601  os << " reportConfigToRemoveList: ";
5602  std::list<uint8_t> auxList = m_measConfig.reportConfigToRemoveList;
5603  auto it = auxList.begin();
5604  for (; it != auxList.end(); it++)
5605  {
5606  os << (int)*it << ", ";
5607  }
5608  os << std::endl;
5609  }
5610  if (!m_measConfig.measIdToRemoveList.empty())
5611  {
5612  os << " measIdToRemoveList: ";
5613  std::list<uint8_t> auxList = m_measConfig.measIdToRemoveList;
5614  auto it = auxList.begin();
5615  for (; it != auxList.end(); it++)
5616  {
5617  os << (int)*it << ", ";
5618  }
5619  os << std::endl;
5620  }
5621 
5622  if (!m_measConfig.measObjectToAddModList.empty())
5623  {
5624  os << " measObjectToAddMod: " << std::endl;
5625  std::list<LteRrcSap::MeasObjectToAddMod> auxList = m_measConfig.measObjectToAddModList;
5626  auto it = auxList.begin();
5627  for (; it != auxList.end(); it++)
5628  {
5629  os << " measObjectId: " << (int)it->measObjectId << std::endl;
5630  os << " carrierFreq: " << (int)it->measObjectEutra.carrierFreq << std::endl;
5631  os << " allowedMeasBandwidth: " << (int)it->measObjectEutra.allowedMeasBandwidth
5632  << std::endl;
5633  os << " presenceAntennaPort1: " << it->measObjectEutra.presenceAntennaPort1
5634  << std::endl;
5635  os << " neighCellConfig: " << (int)it->measObjectEutra.neighCellConfig
5636  << std::endl;
5637  os << " offsetFreq: " << (int)it->measObjectEutra.offsetFreq << std::endl;
5638 
5639  if (!it->measObjectEutra.cellsToRemoveList.empty())
5640  {
5641  os << " cellsToRemoveList: ";
5642  std::list<uint8_t> auxList = it->measObjectEutra.cellsToRemoveList;
5643  auto it = auxList.begin();
5644  for (; it != auxList.end(); it++)
5645  {
5646  os << (int)*it << ", ";
5647  }
5648  os << std::endl;
5649  }
5650 
5651  if (!it->measObjectEutra.blackCellsToRemoveList.empty())
5652  {
5653  os << " blackCellsToRemoveList: ";
5654  std::list<uint8_t> auxList = it->measObjectEutra.blackCellsToRemoveList;
5655  auto it = auxList.begin();
5656  for (; it != auxList.end(); it++)
5657  {
5658  os << (int)*it << ", ";
5659  }
5660  os << std::endl;
5661  }
5662 
5663  if (!it->measObjectEutra.cellsToAddModList.empty())
5664  {
5665  os << " cellsToAddModList: " << std::endl;
5666  std::list<LteRrcSap::CellsToAddMod> auxList =
5667  it->measObjectEutra.cellsToAddModList;
5668  auto it = auxList.begin();
5669  for (; it != auxList.end(); it++)
5670  {
5671  os << " cellIndex: " << (int)it->cellIndex << std::endl;
5672  os << " physCellId: " << (int)it->physCellId << std::endl;
5673  os << " cellIndividualOffset: " << (int)it->cellIndividualOffset
5674  << std::endl;
5675  os << " ------ " << std::endl;
5676  }
5677  }
5678 
5679  if (!it->measObjectEutra.blackCellsToAddModList.empty())
5680  {
5681  os << " blackCellsToAddModList: " << std::endl;
5682  std::list<LteRrcSap::BlackCellsToAddMod> auxList =
5683  it->measObjectEutra.blackCellsToAddModList;
5684  auto it = auxList.begin();
5685  for (; it != auxList.end(); it++)
5686  {
5687  os << " cellIndex: " << (int)it->cellIndex << std::endl;
5688  os << " physCellIdRange.start: " << (int)it->physCellIdRange.start
5689  << std::endl;
5690  os << " physCellIdRange.haveRange: " << it->physCellIdRange.haveRange
5691  << std::endl;
5692  os << " physCellIdRange.range: " << (int)it->physCellIdRange.range
5693  << std::endl;
5694  os << " ------ " << std::endl;
5695  }
5696  }
5697 
5698  os << " haveCellForWhichToReportCGI: "
5699  << it->measObjectEutra.haveCellForWhichToReportCGI << std::endl;
5700  os << " cellForWhichToReportCGI: "
5701  << (int)it->measObjectEutra.cellForWhichToReportCGI << std::endl;
5702  os << " ------------- " << std::endl;
5703  }
5704  }
5705 
5707  {
5708  os << " reportConfigToAddModList: " << std::endl;
5709  std::list<LteRrcSap::ReportConfigToAddMod> auxList =
5711  auto it = auxList.begin();
5712  for (; it != auxList.end(); it++)
5713  {
5714  os << " reportConfigId: " << (int)it->reportConfigId << std::endl;
5715  os << " reportConfigEutra.triggerType "
5716  << (int)it->reportConfigEutra.triggerType << std::endl;
5717  if (it->reportConfigEutra.triggerType == LteRrcSap::ReportConfigEutra::EVENT)
5718  {
5719  os << " reportConfigEutra.eventId " << (int)it->reportConfigEutra.eventId
5720  << std::endl;
5721  if (it->reportConfigEutra.eventId == LteRrcSap::ReportConfigEutra::EVENT_A3)
5722  {
5723  os << " reportConfigEutra.reportOnLeave "
5724  << (int)it->reportConfigEutra.reportOnLeave << std::endl;
5725  os << " reportConfigEutra.a3Offset "
5726  << (int)it->reportConfigEutra.a3Offset << std::endl;
5727  }
5728  else
5729  {
5730  os << " reportConfigEutra.threshold1.choice "
5731  << (int)it->reportConfigEutra.threshold1.choice << std::endl;
5732  os << " reportConfigEutra.threshold1.range "
5733  << (int)it->reportConfigEutra.threshold1.range << std::endl;
5734  if (it->reportConfigEutra.eventId == LteRrcSap::ReportConfigEutra::EVENT_A5)
5735  {
5736  os << " reportConfigEutra.threshold2.choice "
5737  << (int)it->reportConfigEutra.threshold2.choice << std::endl;
5738  os << " reportConfigEutra.threshold2.range "
5739  << (int)it->reportConfigEutra.threshold2.range << std::endl;
5740  }
5741  }
5742  os << " reportConfigEutra.hysteresis "
5743  << (int)it->reportConfigEutra.hysteresis << std::endl;
5744  os << " reportConfigEutra.timeToTrigger "
5745  << (int)it->reportConfigEutra.timeToTrigger << std::endl;
5746  }
5747  else
5748  {
5749  os << " reportConfigEutra.purpose " << (int)it->reportConfigEutra.purpose
5750  << std::endl;
5751  }
5752  os << " reportConfigEutra.triggerQuantity "
5753  << (int)it->reportConfigEutra.triggerQuantity << std::endl;
5754  os << " reportConfigEutra.reportQuantity "
5755  << (int)it->reportConfigEutra.reportQuantity << std::endl;
5756  os << " reportConfigEutra.maxReportCells "
5757  << (int)it->reportConfigEutra.maxReportCells << std::endl;
5758  os << " reportConfigEutra.reportInterval "
5759  << (int)it->reportConfigEutra.reportInterval << std::endl;
5760  os << " reportConfigEutra.reportAmount "
5761  << (int)it->reportConfigEutra.reportAmount << std::endl;
5762  }
5763  }
5764 
5765  if (!m_measConfig.measIdToAddModList.empty())
5766  {
5767  os << " measIdToAddModList: " << std::endl;
5768  std::list<LteRrcSap::MeasIdToAddMod> auxList = m_measConfig.measIdToAddModList;
5769  auto it = auxList.begin();
5770  for (; it != auxList.end(); it++)
5771  {
5772  os << " measId: " << (int)it->measId << std::endl;
5773  os << " measObjectId: " << (int)it->measObjectId << std::endl;
5774  os << " reportConfigId: " << (int)it->reportConfigId << std::endl;
5775  os << " ------ " << std::endl;
5776  }
5777  }
5778 
5779  os << " haveQuantityConfig: " << m_measConfig.haveQuantityConfig << std::endl;
5781  {
5782  os << " filterCoefficientRSRP: "
5783  << (int)m_measConfig.quantityConfig.filterCoefficientRSRP << std::endl;
5784  os << " filterCoefficientRSRQ:"
5785  << (int)m_measConfig.quantityConfig.filterCoefficientRSRQ << std::endl;
5786  }
5787 
5788  os << " haveMeasGapConfig: " << m_measConfig.haveMeasGapConfig << std::endl;
5790  {
5791  os << " measGapConfig.type: " << m_measConfig.measGapConfig.type << std::endl;
5792  os << " measGapConfig.gap (gap0/1,value): ("
5794  << (int)m_measConfig.measGapConfig.gapOffsetValue << ")" << std::endl;
5795  }
5796 
5797  os << " haveSmeasure: " << m_measConfig.haveSmeasure << std::endl;
5799  {
5800  os << " sMeasure: " << (int)m_measConfig.sMeasure << std::endl;
5801  }
5802 
5803  os << " haveSpeedStatePars: " << m_measConfig.haveSpeedStatePars << std::endl;
5805  {
5806  os << " speedStatePars.type: " << m_measConfig.speedStatePars.type << std::endl;
5807  os << " speedStatePars.mobilityStateParameters.tEvaluation: "
5809  os << " speedStatePars.mobilityStateParameters.tHystNormal: "
5811  os << " speedStatePars.mobilityStateParameters.nCellChangeMedium: "
5813  << std::endl;
5814  os << " speedStatePars.mobilityStateParameters.nCellChangeHigh: "
5816  << std::endl;
5817  os << " speedStatePars.timeToTriggerSf.sfMedium: "
5818  << (int)m_measConfig.speedStatePars.timeToTriggerSf.sfMedium << std::endl;
5819  os << " speedStatePars.timeToTriggerSf.sfHigh: "
5820  << (int)m_measConfig.speedStatePars.timeToTriggerSf.sfHigh << std::endl;
5821  }
5822  }
5823 
5824  os << "haveMobilityControlInfo: " << m_haveMobilityControlInfo << std::endl;
5826  {
5827  os << "targetPhysCellId: " << (int)m_mobilityControlInfo.targetPhysCellId << std::endl;
5828  os << "haveCarrierFreq: " << m_mobilityControlInfo.haveCarrierFreq << std::endl;
5830  {
5831  os << " carrierFreq.dlCarrierFreq: "
5832  << (int)m_mobilityControlInfo.carrierFreq.dlCarrierFreq << std::endl;
5833  os << " carrierFreq.dlCarrierFreq: "
5834  << (int)m_mobilityControlInfo.carrierFreq.ulCarrierFreq << std::endl;
5835  }
5836  os << "haveCarrierBandwidth: " << m_mobilityControlInfo.haveCarrierBandwidth << std::endl;
5838  {
5839  os << " carrierBandwidth.dlBandwidth: "
5840  << (int)m_mobilityControlInfo.carrierBandwidth.dlBandwidth << std::endl;
5841  os << " carrierBandwidth.ulBandwidth: "
5842  << (int)m_mobilityControlInfo.carrierBandwidth.ulBandwidth << std::endl;
5843  }
5844  os << "newUeIdentity: " << (int)m_mobilityControlInfo.newUeIdentity << std::endl;
5845  os << "haveRachConfigDedicated: " << m_mobilityControlInfo.haveRachConfigDedicated
5846  << std::endl;
5848  {
5849  os << "raPreambleIndex: "
5851  os << "raPrachMaskIndex: "
5853  }
5854  }
5855  os << "haveRadioResourceConfigDedicated: " << m_haveRadioResourceConfigDedicated << std::endl;
5857  {
5859  }
5860 }
5861 
5862 void
5864 {
5867  m_measConfig = msg.measConfig;
5874 
5875  m_isDataSerialized = false;
5876 }
5877 
5880 {
5882 
5885  msg.measConfig = m_measConfig;
5892 
5893  return msg;
5894 }
5895 
5896 uint8_t
5898 {
5900 }
5901 
5902 bool
5904 {
5905  return m_haveMeasConfig;
5906 }
5907 
5910 {
5911  return m_measConfig;
5912 }
5913 
5914 bool
5916 {
5918 }
5919 
5922 {
5923  return m_mobilityControlInfo;
5924 }
5925 
5926 bool
5928 {
5930 }
5931 
5934 {
5936 }
5937 
5938 bool
5940 {
5942 }
5943 
5946 {
5947  return m_nonCriticalExtension;
5948 }
5949 
5950 bool
5952 {
5954 }
5955 
5956 std::list<LteRrcSap::SrbToAddMod>
5958 {
5960 }
5961 
5962 std::list<LteRrcSap::DrbToAddMod>
5964 {
5966 }
5967 
5968 std::list<uint8_t>
5970 {
5972 }
5973 
5976 {
5978 }
5979 
5981 
5983 {
5984 }
5985 
5986 void
5988 {
5990 
5991  // Serialize HandoverPreparationInformation sequence:
5992  // no default or optional fields. Extension marker not present.
5993  SerializeSequence(std::bitset<0>(), false);
5994 
5995  // Serialize criticalExtensions choice
5996  // 2 options, selected 0 (c1)
5997  SerializeChoice(2, 0, false);
5998 
5999  // Serialize c1 choice
6000  // 8 options, selected 0 (handoverPreparationInformation-r8)
6001  SerializeChoice(8, 0, false);
6002 
6003  // Serialize HandoverPreparationInformation-r8-IEs sequence
6004  // 4 optional fields, no extension marker.
6005  std::bitset<4> handoverPrepInfoOpts;
6006  handoverPrepInfoOpts.set(3, true); // as-Config present
6007  handoverPrepInfoOpts.set(2, false); // rrm-Config not present
6008  handoverPrepInfoOpts.set(1, false); // as-Context not present
6009  handoverPrepInfoOpts.set(0, false); // nonCriticalExtension not present
6010  SerializeSequence(handoverPrepInfoOpts, false);
6011 
6012  // Serialize ue-RadioAccessCapabilityInfo
6014 
6015  // Serialize as-Config
6016  SerializeSequence(std::bitset<0>(), true);
6017 
6018  // Serialize sourceMeasConfig
6020 
6021  // Serialize sourceRadioResourceConfig
6023 
6024  // Serialize sourceSecurityAlgorithmConfig
6025  SerializeSequence(std::bitset<0>(), false);
6026  // cipheringAlgorithm
6027  SerializeEnum(8, 0);
6028  // integrityProtAlgorithm
6029  SerializeEnum(8, 0);
6030 
6031  // Serialize sourceUE-Identity
6033 
6034  // Serialize sourceMasterInformationBlock
6035  SerializeSequence(std::bitset<0>(), false);
6036  SerializeEnum(
6037  6,
6039  SerializeSequence(std::bitset<0>(), false); // phich-Config sequence
6040  SerializeEnum(2, 0); // phich-Duration
6041  SerializeEnum(4, 0); // phich-Resource
6042  SerializeBitstring(std::bitset<8>(
6044  SerializeBitstring(std::bitset<10>(321)); // spare
6045 
6046  // Serialize sourceSystemInformationBlockType1 sequence
6048 
6049  // Serialize sourceSystemInformationBlockType2
6051 
6052  // Serialize AntennaInfoCommon
6053  SerializeSequence(std::bitset<0>(0), false);
6054  SerializeEnum(4, 0); // antennaPortsCount
6055 
6056  // Serialize sourceDlCarrierFreq
6058 
6059  // Finish serialization
6061 }
6062 
6063 uint32_t
6065 {
6066  std::bitset<0> bitset0;
6067  int n;
6068 
6069  // Deserialize HandoverPreparationInformation sequence
6070  // 0 optional fields, no extension marker
6071  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6072 
6073  // Deserialize criticalExtensions choice
6074  int criticalExtensionsChosen;
6075  bIterator = DeserializeChoice(2, false, &criticalExtensionsChosen, bIterator);
6076 
6077  if (criticalExtensionsChosen == 1)
6078  {
6079  // Deserialize criticalExtensionsFuture
6080  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6081  }
6082  else if (criticalExtensionsChosen == 0)
6083  {
6084  // Deserialize c1 choice
6085  int c1Chosen;
6086  bIterator = DeserializeChoice(8, false, &c1Chosen, bIterator);
6087  if (c1Chosen > 0)
6088  {
6089  bIterator = DeserializeNull(bIterator);
6090  }
6091  else if (c1Chosen == 0)
6092  {
6093  // Deserialize handoverPreparationInformation-r8
6094  std::bitset<4> handoverPrepInfoOpts;
6095  bIterator = DeserializeSequence(&handoverPrepInfoOpts, false, bIterator);
6096 
6097  // Deserialize ue-RadioAccessCapabilityInfo
6098  bIterator = DeserializeSequenceOf(&n, MAX_RAT_CAPABILITIES, 0, bIterator);
6099  for (int i = 0; i < n; i++)
6100  {
6101  // Deserialize UE-CapabilityRAT-Container
6102  // ...
6103  }
6104 
6105  if (handoverPrepInfoOpts[3])
6106  {
6107  // Deserialize as-Config sequence
6108  bIterator = DeserializeSequence(&bitset0, true, bIterator);
6109 
6110  // Deserialize sourceMeasConfig
6111  bIterator = DeserializeMeasConfig(&m_asConfig.sourceMeasConfig, bIterator);
6112 
6113  // Deserialize sourceRadioResourceConfig
6114  bIterator =
6116  bIterator);
6117 
6118  // Deserialize sourceSecurityAlgorithmConfig
6119  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6120  bIterator = DeserializeEnum(8, &n, bIterator); // cipheringAlgorithm
6121  bIterator = DeserializeEnum(8, &n, bIterator); // integrityProtAlgorithm
6122 
6123  // Deserialize sourceUE-Identity
6124  std::bitset<16> cRnti;
6125  bIterator = DeserializeBitstring(&cRnti, bIterator);
6126  m_asConfig.sourceUeIdentity = cRnti.to_ulong();
6127 
6128  // Deserialize sourceMasterInformationBlock
6129  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6130  bIterator = DeserializeEnum(6, &n, bIterator); // dl-Bandwidth
6132 
6133  // phich-Config
6134  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6135  bIterator = DeserializeEnum(2, &n, bIterator); // phich-Duration
6136  bIterator = DeserializeEnum(4, &n, bIterator); // phich-Resource
6137 
6138  // systemFrameNumber
6139  std::bitset<8> systemFrameNumber;
6140  bIterator = DeserializeBitstring(&systemFrameNumber, bIterator);
6142  systemFrameNumber.to_ulong();
6143  // spare
6144  std::bitset<10> spare;
6145  bIterator = DeserializeBitstring(&spare, bIterator);
6146 
6147  // Deserialize sourceSystemInformationBlockType1
6150  bIterator);
6151 
6152  // Deserialize sourceSystemInformationBlockType2
6155  bIterator);
6156 
6157  // Deserialize antennaInfoCommon
6158  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6159  bIterator = DeserializeEnum(4, &n, bIterator); // antennaPortsCount
6160 
6161  // Deserialize sourceDl-CarrierFreq
6162  bIterator = DeserializeInteger(&n, 0, MAX_EARFCN, bIterator);
6164  }
6165  if (handoverPrepInfoOpts[2])
6166  {
6167  // Deserialize rrm-Config
6168  // ...
6169  }
6170  if (handoverPrepInfoOpts[1])
6171  {
6172  // Deserialize as-Context
6173  // ...
6174  }
6175  if (handoverPrepInfoOpts[0])
6176  {
6177  // Deserialize nonCriticalExtension
6178  // ...
6179  }
6180  }
6181  }
6182 
6183  return GetSerializedSize();
6184 }
6185 
6186 void
6188 {
6190  os << "sourceUeIdentity: " << m_asConfig.sourceUeIdentity << std::endl;
6191  os << "dlBandwidth: " << (int)m_asConfig.sourceMasterInformationBlock.dlBandwidth << std::endl;
6192  os << "systemFrameNumber: " << (int)m_asConfig.sourceMasterInformationBlock.systemFrameNumber
6193  << std::endl;
6194  os << "plmnIdentityInfo.plmnIdentity: "
6196  .plmnIdentity
6197  << std::endl;
6198  os << "cellAccessRelatedInfo.cellIdentity "
6200  << std::endl;
6201  os << "cellAccessRelatedInfo.csgIndication: "
6203  << std::endl;
6204  os << "cellAccessRelatedInfo.csgIdentity: "
6206  << std::endl;
6207  os << "sourceDlCarrierFreq: " << m_asConfig.sourceDlCarrierFreq << std::endl;
6208 }
6209 
6210 void
6212 {
6213  m_asConfig = msg.asConfig;
6214  m_isDataSerialized = false;
6215 }
6216 
6219 {
6221  msg.asConfig = m_asConfig;
6222 
6223  return msg;
6224 }
6225 
6228 {
6229  return m_asConfig;
6230 }
6231 
6233 
6235 {
6236 }
6237 
6239 {
6240 }
6241 
6242 void
6244 {
6246 
6248 
6249  // Serialize RrcConnectionReestablishmentRequest sequence:
6250  // no default or optional fields. Extension marker not present.
6251  SerializeSequence(std::bitset<0>(), false);
6252 
6253  // Serialize criticalExtensions choice
6254  // chosen: rrcConnectionReestablishmentRequest-r8
6255  SerializeChoice(2, 0, false);
6256 
6257  // Serialize RRCConnectionReestablishmentRequest-r8-IEs sequence
6258  // no default or optional fields. Extension marker not present.
6259  SerializeSequence(std::bitset<0>(), false);
6260 
6261  // Serialize ue-Identity
6262  SerializeSequence(std::bitset<0>(), false);
6263  // Serialize c-RNTI
6264  SerializeBitstring(std::bitset<16>(m_ueIdentity.cRnti));
6265  // Serialize physCellId
6267  // Serialize shortMAC-I
6268  SerializeBitstring(std::bitset<16>(0));
6269 
6270  // Serialize ReestablishmentCause
6271  switch (m_reestablishmentCause)
6272  {
6274  SerializeEnum(4, 0);
6275  break;
6277  SerializeEnum(4, 1);
6278  break;
6280  SerializeEnum(4, 2);
6281  break;
6282  default:
6283  SerializeEnum(4, 3);
6284  }
6285 
6286  // Serialize spare
6287  SerializeBitstring(std::bitset<2>(0));
6288 
6289  // Finish serialization
6291 }
6292 
6293 uint32_t
6295 {
6296  std::bitset<0> bitset0;
6297  int n;
6298 
6299  bIterator = DeserializeUlCcchMessage(bIterator);
6300 
6301  // Deserialize RrcConnectionReestablishmentRequest sequence
6302  // 0 optional fields, no extension marker
6303  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6304 
6305  // Deserialize criticalExtensions choice
6306  bIterator = DeserializeChoice(2, false, &n, bIterator);
6307  if (n == 1)
6308  {
6309  // Deserialize criticalExtensionsFuture
6310  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6311  }
6312  else if (n == 0)
6313  {
6314  // Deserialize RRCConnectionReestablishmentRequest-r8-IEs
6315  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6316 
6317  // Deserialize ReestabUE-Identity sequence
6318  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6319 
6320  // Deserialize c-RNTI
6321  std::bitset<16> cRnti;
6322  bIterator = DeserializeBitstring(&cRnti, bIterator);
6323  m_ueIdentity.cRnti = cRnti.to_ulong();
6324 
6325  // Deserialize physCellId
6326  int physCellId;
6327  bIterator = DeserializeInteger(&physCellId, 0, 503, bIterator);
6328  m_ueIdentity.physCellId = physCellId;
6329 
6330  // Deserialize shortMAC-I
6331  std::bitset<16> shortMacI;
6332  bIterator = DeserializeBitstring(&shortMacI, bIterator);
6333 
6334  // Deserialize ReestablishmentCause
6335  int reestCs;
6336  bIterator = DeserializeEnum(4, &reestCs, bIterator);
6337  switch (reestCs)
6338  {
6339  case 0:
6341  break;
6342  case 1:
6344  break;
6345  case 2:
6347  break;
6348  case 3:
6349  break;
6350  }
6351 
6352  // Deserialize spare
6353  std::bitset<2> spare;
6354  bIterator = DeserializeBitstring(&spare, bIterator);
6355  }
6356 
6357  return GetSerializedSize();
6358 }
6359 
6360 void
6362 {
6363  os << "ueIdentity.cRnti: " << (int)m_ueIdentity.cRnti << std::endl;
6364  os << "ueIdentity.physCellId: " << (int)m_ueIdentity.physCellId << std::endl;
6365  os << "m_reestablishmentCause: " << m_reestablishmentCause << std::endl;
6366 }
6367 
6368 void
6371 {
6372  m_ueIdentity = msg.ueIdentity;
6374  m_isDataSerialized = false;
6375 }
6376 
6379 {
6381  msg.ueIdentity = m_ueIdentity;
6383 
6384  return msg;
6385 }
6386 
6389 {
6390  return m_ueIdentity;
6391 }
6392 
6395 {
6396  return m_reestablishmentCause;
6397 }
6398 
6400 
6402 {
6403 }
6404 
6406 {
6407 }
6408 
6409 void
6411 {
6413 
6415 
6416  // Serialize RrcConnectionReestablishment sequence:
6417  // no default or optional fields. Extension marker not present.
6418  SerializeSequence(std::bitset<0>(), false);
6419 
6420  // Serialize rrc-TransactionIdentifier
6422 
6423  // Serialize criticalExtensions choice
6424  SerializeChoice(2, 0, false);
6425 
6426  // Serialize c1 choice
6427  SerializeChoice(8, 0, false);
6428 
6429  // Serialize RRCConnectionReestablishment-r8-IEs sequence
6430  // 1 optional field, no extension marker
6431  SerializeSequence(std::bitset<1>(0), false);
6432 
6433  // Serialize radioResourceConfigDedicated
6435 
6436  // Serialize nextHopChainingCount
6437  SerializeInteger(0, 0, 7);
6438 
6439  // Finish serialization
6441 }
6442 
6443 uint32_t
6445 {
6446  std::bitset<0> bitset0;
6447  int n;
6448 
6449  bIterator = DeserializeDlCcchMessage(bIterator);
6450 
6451  // Deserialize RrcConnectionReestablishment sequence
6452  // 0 optional fields, no extension marker
6453  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6454 
6455  // Deserialize rrc-TransactionIdentifier
6456  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
6458 
6459  // Deserialize criticalExtensions choice
6460  int criticalExtensionsChoice;
6461  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
6462  if (criticalExtensionsChoice == 1)
6463  {
6464  // Deserialize criticalExtensionsFuture
6465  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6466  }
6467  else if (criticalExtensionsChoice == 0)
6468  {
6469  // Deserialize c1
6470  int c1;
6471  bIterator = DeserializeChoice(8, false, &c1, bIterator);
6472  if (c1 > 0)
6473  {
6474  bIterator = DeserializeNull(bIterator);
6475  }
6476  else if (c1 == 0)
6477  {
6478  // Deserialize rrcConnectionReestablishment-r8
6479  // 1 optional field
6480  std::bitset<1> nonCriticalExtensionPresent;
6481  bIterator = DeserializeSequence(&nonCriticalExtensionPresent, false, bIterator);
6482 
6483  // Deserialize RadioResourceConfigDedicated
6484  bIterator =
6486 
6487  // Deserialize nextHopChainingCount
6488  bIterator = DeserializeInteger(&n, 0, 7, bIterator);
6489  }
6490  }
6491 
6492  return GetSerializedSize();
6493 }
6494 
6495 void
6497 {
6498  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
6499  os << "RadioResourceConfigDedicated: " << std::endl;
6501 }
6502 
6503 void
6505 {
6508  m_isDataSerialized = false;
6509 }
6510 
6513 {
6517  return msg;
6518 }
6519 
6520 uint8_t
6522 {
6524 }
6525 
6528 {
6530 }
6531 
6533 
6535 {
6536 }
6537 
6538 void
6540 {
6542 
6543  // Serialize DCCH message
6545 
6546  // Serialize RrcConnectionReestablishmentComplete sequence:
6547  // no default or optional fields. Extension marker not present.
6548  SerializeSequence(std::bitset<0>(), false);
6549 
6550  // Serialize rrc-TransactionIdentifier
6552 
6553  // Serialize criticalExtensions choice
6554  SerializeChoice(2, 0, false);
6555 
6556  // Serialize rrcConnectionReestablishmentComplete-r8 sequence
6557  // 1 optional field (not present), no extension marker.
6558  SerializeSequence(std::bitset<1>(0), false);
6559 
6560  // Finish serialization
6562 }
6563 
6564 uint32_t
6566 {
6567  std::bitset<0> bitset0;
6568  int n;
6569 
6570  bIterator = DeserializeUlDcchMessage(bIterator);
6571 
6572  // Deserialize RrcConnectionReestablishmentComplete sequence
6573  // 0 optional fields, no extension marker
6574  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6575 
6576  // Deserialize rrc-TransactionIdentifier
6577  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
6579 
6580  // Deserialize criticalExtensions choice
6581  int criticalExtensionsChoice;
6582  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
6583  if (criticalExtensionsChoice == 1)
6584  {
6585  // Deserialize criticalExtensionsFuture
6586  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6587  }
6588  else if (criticalExtensionsChoice == 0)
6589  {
6590  // Deserialize rrcConnectionReestablishmentComplete-r8
6591  std::bitset<1> opts;
6592  bIterator = DeserializeSequence(&opts, false, bIterator);
6593  if (opts[0])
6594  {
6595  // Deserialize RRCConnectionReestablishmentComplete-v920-IEs
6596  // ...
6597  }
6598  }
6599 
6600  return GetSerializedSize();
6601 }
6602 
6603 void
6605 {
6606  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
6607 }
6608 
6609 void
6612 {
6614  m_isDataSerialized = false;
6615 }
6616 
6619 {
6622  return msg;
6623 }
6624 
6625 uint8_t
6627 {
6629 }
6630 
6632 
6634 {
6635 }
6636 
6638 {
6639 }
6640 
6641 void
6643 {
6645 
6646  // Serialize CCCH message
6648 
6649  // Serialize RrcConnectionReestablishmentReject sequence:
6650  // no default or optional fields. Extension marker not present.
6651  SerializeSequence(std::bitset<0>(), false);
6652 
6653  // Serialize criticalExtensions choice
6654  SerializeChoice(2, 0, false);
6655 
6656  // Serialize RRCConnectionReestablishmentReject-r8-IEs sequence
6657  // 1 optional field (not present), no extension marker.
6658  SerializeSequence(std::bitset<1>(0), false);
6659 
6660  // Finish serialization
6662 }
6663 
6664 uint32_t
6666 {
6667  std::bitset<0> bitset0;
6668 
6669  bIterator = DeserializeDlCcchMessage(bIterator);
6670 
6671  // Deserialize RrcConnectionReestablishmentReject sequence
6672  // 0 optional fields, no extension marker
6673  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6674 
6675  // Deserialize criticalExtensions choice
6676  int criticalExtensionsChoice;
6677  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
6678  if (criticalExtensionsChoice == 1)
6679  {
6680  // Deserialize criticalExtensionsFuture
6681  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6682  }
6683  else if (criticalExtensionsChoice == 0)
6684  {
6685  // Deserialize rrcConnectionReestablishmentReject-r8
6686  std::bitset<1> opts;
6687  bIterator = DeserializeSequence(&opts, false, bIterator);
6688  if (opts[0])
6689  {
6690  // Deserialize RRCConnectionReestablishmentReject-v8a0-IEs
6691  // ...
6692  }
6693  }
6694 
6695  return GetSerializedSize();
6696 }
6697 
6698 void
6700 {
6701 }
6702 
6703 void
6706 {
6708  m_isDataSerialized = false;
6709 }
6710 
6713 {
6715 }
6716 
6718 
6720 {
6721 }
6722 
6724 {
6725 }
6726 
6727 void
6729 {
6731 
6732  // Serialize DCCH message
6734 
6735  // Serialize RrcConnectionRelease sequence:
6736  // no default or optional fields. Extension marker not present.
6737  SerializeSequence(std::bitset<0>(), false);
6738 
6739  // Serialize rrc-TransactionIdentifier
6741 
6742  // Serialize criticalExtensions choice
6743  SerializeChoice(2, 0, false);
6744 
6745  // Serialize c1 choice
6746  SerializeChoice(4, 0, false);
6747 
6748  // Serialize RRCConnectionRelease-r8-IEs sequence
6749  // 3 optional field (not present), no extension marker.
6750  SerializeSequence(std::bitset<3>(0), false);
6751 
6752  // Serialize ReleaseCause
6753  SerializeEnum(4, 1);
6754 
6755  // Finish serialization
6757 }
6758 
6759 uint32_t
6761 {
6762  std::bitset<0> bitset0;
6763  int n;
6764 
6765  bIterator = DeserializeDlDcchMessage(bIterator);
6766 
6767  // Deserialize RrcConnectionRelease sequence
6768  // 0 optional fields, no extension marker
6769  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6770 
6771  // Deserialize rrc-TransactionIdentifier
6772  bIterator = DeserializeInteger(&n, 0, 3, bIterator);
6774 
6775  // Deserialize criticalExtensions choice
6776  int criticalExtensionsChoice;
6777  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
6778  if (criticalExtensionsChoice == 1)
6779  {
6780  // Deserialize criticalExtensionsFuture
6781  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6782  }
6783  else if (criticalExtensionsChoice == 0)
6784  {
6785  // Deserialize c1
6786  int c1Choice;
6787  bIterator = DeserializeChoice(4, false, &c1Choice, bIterator);
6788 
6789  if (c1Choice == 0)
6790  {
6791  // Deserialize RRCConnectionRelease-r8-IEs
6792  std::bitset<3> opts;
6793  bIterator = DeserializeSequence(&opts, false, bIterator);
6794 
6795  // Deserialize releaseCause
6796  bIterator = DeserializeEnum(4, &n, bIterator);
6797 
6798  if (opts[2])
6799  {
6800  // Deserialize redirectedCarrierInfo
6801  // ...
6802  }
6803  if (opts[1])
6804  {
6805  // Deserialize idleModeMobilityControlInfo
6806  // ...
6807  }
6808  if (opts[0])
6809  {
6810  // Deserialize nonCriticalExtension
6811  // ...
6812  }
6813  }
6814 
6815  else
6816  {
6817  bIterator = DeserializeNull(bIterator);
6818  }
6819  }
6820 
6821  return GetSerializedSize();
6822 }
6823 
6824 void
6825 RrcConnectionReleaseHeader::Print(std::ostream& os) const
6826 {
6827 }
6828 
6829 void
6831 {
6832  m_rrcConnectionRelease = msg;
6833  m_isDataSerialized = false;
6834 }
6835 
6838 {
6839  return m_rrcConnectionRelease;
6840 }
6841 
6843 
6845 {
6846 }
6847 
6849 {
6850 }
6851 
6852 void
6854 {
6856 
6857  // Serialize CCCH message
6859 
6860  // Serialize RrcConnectionReject sequence:
6861  // no default or optional fields. Extension marker not present.
6862  SerializeSequence(std::bitset<0>(), false);
6863 
6864  // Serialize criticalExtensions choice
6865  SerializeChoice(2, 0, false);
6866 
6867  // Serialize c1 choice
6868  SerializeChoice(4, 0, false);
6869 
6870  // Serialize rrcConnectionReject-r8 sequence
6871  // 1 optional field (not present), no extension marker.
6872  SerializeSequence(std::bitset<1>(0), false);
6873 
6874  // Serialize waitTime
6876 
6877  // Finish serialization
6879 }
6880 
6881 uint32_t
6883 {
6884  std::bitset<0> bitset0;
6885  int n;
6886 
6887  bIterator = DeserializeDlCcchMessage(bIterator);
6888 
6889  // Deserialize RrcConnectionReject sequence
6890  // 0 optional fields, no extension marker
6891  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6892 
6893  // Deserialize criticalExtensions choice
6894  int criticalExtensionsChoice;
6895  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
6896  if (criticalExtensionsChoice == 1)
6897  {
6898  // Deserialize criticalExtensionsFuture
6899  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6900  }
6901  else if (criticalExtensionsChoice == 0)
6902  {
6903  // Deserialize c1 choice
6904  int c1Choice;
6905  bIterator = DeserializeChoice(4, false, &c1Choice, bIterator);
6906 
6907  if (c1Choice > 0)
6908  {
6909  bIterator = DeserializeNull(bIterator);
6910  }
6911  else if (c1Choice == 0)
6912  {
6913  // Deserialize rrcConnectionReject-r8
6914  std::bitset<1> opts;
6915  bIterator = DeserializeSequence(&opts, false, bIterator);
6916 
6917  bIterator = DeserializeInteger(&n, 1, 16, bIterator);
6919 
6920  if (opts[0])
6921  {
6922  // Deserialize RRCConnectionReject-v8a0-IEs
6923  // ...
6924  }
6925  }
6926  }
6927 
6928  return GetSerializedSize();
6929 }
6930 
6931 void
6932 RrcConnectionRejectHeader::Print(std::ostream& os) const
6933 {
6934  os << "wait time: " << (int)m_rrcConnectionReject.waitTime << std::endl;
6935 }
6936 
6937 void
6939 {
6940  m_rrcConnectionReject = msg;
6941  m_isDataSerialized = false;
6942 }
6943 
6946 {
6947  return m_rrcConnectionReject;
6948 }
6949 
6951 
6953 {
6954 }
6955 
6957 {
6958 }
6959 
6960 void
6962 {
6964 
6965  // Serialize DCCH message
6967 
6968  // Serialize MeasurementReport sequence:
6969  // no default or optional fields. Extension marker not present.
6970  SerializeSequence(std::bitset<0>(), false);
6971 
6972  // Serialize criticalExtensions choice:
6973  // c1 chosen
6974  SerializeChoice(2, 0, false);
6975 
6976  // Serialize c1 choice
6977  // measurementReport-r8 chosen
6978  SerializeChoice(8, 0, false);
6979 
6980  // Serialize MeasurementReport-r8-IEs sequence:
6981  // 1 optional fields, not present. Extension marker not present.
6982  SerializeSequence(std::bitset<1>(0), false);
6983 
6984  // Serialize measResults
6986 
6987  // Finish serialization
6989 }
6990 
6991 uint32_t
6993 {
6994  std::bitset<0> bitset0;
6995 
6996  bIterator = DeserializeSequence(&bitset0, false, bIterator);
6997 
6998  bIterator = DeserializeUlDcchMessage(bIterator);
6999 
7000  int criticalExtensionsChoice;
7001  bIterator = DeserializeChoice(2, false, &criticalExtensionsChoice, bIterator);
7002 
7003  if (criticalExtensionsChoice == 1)
7004  {
7005  // Deserialize criticalExtensionsFuture
7006  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7007  }
7008  else if (criticalExtensionsChoice == 0)
7009  {
7010  // Deserialize c1
7011  int c1Choice;
7012  bIterator = DeserializeChoice(8, false, &c1Choice, bIterator);
7013 
7014  if (c1Choice > 0)
7015  {
7016  bIterator = DeserializeNull(bIterator);
7017  }
7018  else
7019  {
7020  // Deserialize measurementReport-r8
7021  std::bitset<1> isNonCriticalExtensionPresent;
7022  bIterator = DeserializeSequence(&isNonCriticalExtensionPresent, false, bIterator);
7023 
7024  // Deserialize measResults
7025  bIterator = DeserializeMeasResults(&m_measurementReport.measResults, bIterator);
7026 
7027  if (isNonCriticalExtensionPresent[0])
7028  {
7029  // Deserialize nonCriticalExtension MeasurementReport-v8a0-IEs
7030  // ...
7031  }
7032  }
7033  }
7034 
7035  return GetSerializedSize();
7036 }
7037 
7038 void
7039 MeasurementReportHeader::Print(std::ostream& os) const
7040 {
7041  os << "measId = " << (int)m_measurementReport.measResults.measId << std::endl;
7042  os << "rsrpResult = " << (int)m_measurementReport.measResults.measResultPCell.rsrpResult
7043  << std::endl;
7044  os << "rsrqResult = " << (int)m_measurementReport.measResults.measResultPCell.rsrqResult
7045  << std::endl;
7046  os << "haveMeasResultNeighCells = "
7048 
7050  {
7051  std::list<LteRrcSap::MeasResultEutra> measResultListEutra =
7053  auto it = measResultListEutra.begin();
7054  for (; it != measResultListEutra.end(); it++)
7055  {
7056  os << " physCellId =" << (int)it->physCellId << std::endl;
7057  os << " haveCgiInfo =" << it->haveCgiInfo << std::endl;
7058  if (it->haveCgiInfo)
7059  {
7060  os << " plmnIdentity = " << (int)it->cgiInfo.plmnIdentity << std::endl;
7061  os << " cellIdentity = " << (int)it->cgiInfo.cellIdentity << std::endl;
7062  os << " trackingAreaCode = " << (int)it->cgiInfo.trackingAreaCode << std::endl;
7063  os << " havePlmnIdentityList = " << !it->cgiInfo.plmnIdentityList.empty()
7064  << std::endl;
7065  if (!it->cgiInfo.plmnIdentityList.empty())
7066  {
7067  for (auto it2 = it->cgiInfo.plmnIdentityList.begin();
7068  it2 != it->cgiInfo.plmnIdentityList.end();
7069  it2++)
7070  {
7071  os << " plmnId : " << *it2 << std::endl;
7072  }
7073  }
7074  }
7075 
7076  os << " haveRsrpResult =" << it->haveRsrpResult << std::endl;
7077  if (it->haveRsrpResult)
7078  {
7079  os << " rsrpResult =" << (int)it->rsrpResult << std::endl;
7080  }
7081 
7082  os << " haveRsrqResult =" << it->haveRsrqResult << std::endl;
7083  if (it->haveRsrqResult)
7084  {
7085  os << " rsrqResult =" << (int)it->rsrqResult << std::endl;
7086  }
7087  }
7088  }
7089 }
7090 
7091 void
7093 {
7094  m_measurementReport = msg;
7095  m_isDataSerialized = false;
7096 }
7097 
7100 {
7102  msg = m_measurementReport;
7103  return msg;
7104 }
7105 
7108  : RrcAsn1Header()
7109 {
7110 }
7111 
7113 {
7114 }
7115 
7116 uint32_t
7118 {
7119  DeserializeUlDcchMessage(bIterator);
7120  return 1;
7121 }
7122 
7123 void
7124 RrcUlDcchMessage::Print(std::ostream& os) const
7125 {
7126  std::cout << "UL DCCH MSG TYPE: " << m_messageType << std::endl;
7127 }
7128 
7129 void
7131 {
7133 }
7134 
7137 {
7138  std::bitset<0> bitset0;
7139  int n;
7140 
7141  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7142  bIterator = DeserializeChoice(2, false, &n, bIterator);
7143  if (n == 1)
7144  {
7145  // Deserialize messageClassExtension
7146  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7147  m_messageType = -1;
7148  }
7149  else if (n == 0)
7150  {
7151  // Deserialize c1
7152  bIterator = DeserializeChoice(16, false, &m_messageType, bIterator);
7153  }
7154 
7155  return bIterator;
7156 }
7157 
7158 void
7160 {
7161  SerializeSequence(std::bitset<0>(), false);
7162  // Choose c1
7163  SerializeChoice(2, 0, false);
7164  // Choose message type
7165  SerializeChoice(16, messageType, false);
7166 }
7167 
7170  : RrcAsn1Header()
7171 {
7172 }
7173 
7175 {
7176 }
7177 
7178 uint32_t
7180 {
7181  DeserializeDlDcchMessage(bIterator);
7182  return 1;
7183 }
7184 
7185 void
7186 RrcDlDcchMessage::Print(std::ostream& os) const
7187 {
7188  std::cout << "DL DCCH MSG TYPE: " << m_messageType << std::endl;
7189 }
7190 
7191 void
7193 {
7195 }
7196 
7199 {
7200  std::bitset<0> bitset0;
7201  int n;
7202 
7203  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7204  bIterator = DeserializeChoice(2, false, &n, bIterator);
7205  if (n == 1)
7206  {
7207  // Deserialize messageClassExtension
7208  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7209  m_messageType = -1;
7210  }
7211  else if (n == 0)
7212  {
7213  // Deserialize c1
7214  bIterator = DeserializeChoice(16, false, &m_messageType, bIterator);
7215  }
7216 
7217  return bIterator;
7218 }
7219 
7220 void
7222 {
7223  SerializeSequence(std::bitset<0>(), false);
7224  // Choose c1
7225  SerializeChoice(2, 0, false);
7226  // Choose message type
7227  SerializeChoice(16, messageType, false);
7228 }
7229 
7232  : RrcAsn1Header()
7233 {
7234 }
7235 
7237 {
7238 }
7239 
7240 uint32_t
7242 {
7243  DeserializeUlCcchMessage(bIterator);
7244  return 1;
7245 }
7246 
7247 void
7248 RrcUlCcchMessage::Print(std::ostream& os) const
7249 {
7250  std::cout << "UL CCCH MSG TYPE: " << m_messageType << std::endl;
7251 }
7252 
7253 void
7255 {
7257 }
7258 
7261 {
7262  std::bitset<0> bitset0;
7263  int n;
7264 
7265  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7266  bIterator = DeserializeChoice(2, false, &n, bIterator);
7267  if (n == 1)
7268  {
7269  // Deserialize messageClassExtension
7270  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7271  m_messageType = -1;
7272  }
7273  else if (n == 0)
7274  {
7275  // Deserialize c1
7276  bIterator = DeserializeChoice(2, false, &m_messageType, bIterator);
7277  }
7278 
7279  return bIterator;
7280 }
7281 
7282 void
7284 {
7285  SerializeSequence(std::bitset<0>(), false);
7286  // Choose c1
7287  SerializeChoice(2, 0, false);
7288  // Choose message type
7289  SerializeChoice(2, messageType, false);
7290 }
7291 
7294  : RrcAsn1Header()
7295 {
7296 }
7297 
7299 {
7300 }
7301 
7302 uint32_t
7304 {
7305  DeserializeDlCcchMessage(bIterator);
7306  return 1;
7307 }
7308 
7309 void
7310 RrcDlCcchMessage::Print(std::ostream& os) const
7311 {
7312  std::cout << "DL CCCH MSG TYPE: " << m_messageType << std::endl;
7313 }
7314 
7315 void
7317 {
7319 }
7320 
7323 {
7324  std::bitset<0> bitset0;
7325  int n;
7326 
7327  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7328  bIterator = DeserializeChoice(2, false, &n, bIterator);
7329  if (n == 1)
7330  {
7331  // Deserialize messageClassExtension
7332  bIterator = DeserializeSequence(&bitset0, false, bIterator);
7333  m_messageType = -1;
7334  }
7335  else if (n == 0)
7336  {
7337  // Deserialize c1
7338  bIterator = DeserializeChoice(4, false, &m_messageType, bIterator);
7339  }
7340 
7341  return bIterator;
7342 }
7343 
7344 void
7346 {
7347  SerializeSequence(std::bitset<0>(), false);
7348  // Choose c1
7349  SerializeChoice(2, 0, false);
7350  // Choose message type
7351  SerializeChoice(4, messageType, false);
7352 }
7353 
7354 } // namespace ns3
Buffer::Iterator DeserializeChoice(int numOptions, bool isExtensionMarkerPresent, int *selectedOption, Buffer::Iterator bIterator)
Deserialize a Choice (set of options)
Buffer::Iterator DeserializeSequenceOf(int *numElems, int nMax, int nMin, Buffer::Iterator bIterator)
Deserialize a Sequence.
Buffer::Iterator DeserializeNull(Buffer::Iterator bIterator)
Deserialize nothing (null op)
Buffer::Iterator DeserializeInteger(int *n, int nmin, int nmax, Buffer::Iterator bIterator)
Deserialize an integer.
void SerializeBitstring(std::bitset< N > bitstring) const
Serialize a bitstring.
Buffer::Iterator DeserializeEnum(int numElems, int *selectedElem, Buffer::Iterator bIterator)
Deserialize an Enum.
Buffer::Iterator DeserializeSequence(std::bitset< N > *optionalOrDefaultMask, bool isExtensionMarkerPresent, Buffer::Iterator bIterator)
Deserialize a sequence.
void SerializeSequence(std::bitset< N > optionalOrDefaultMask, bool isExtensionMarkerPresent) const
Serialize a sequence.
void SerializeChoice(int numOptions, int selectedOption, bool isExtensionMarkerPresent) const
Serialize a Choice (set of options)
Buffer m_serializationResult
serialization result
void FinalizeSerialization() const
Finalizes an in progress serialization.
void SerializeInteger(int n, int nmin, int nmax) const
Serialize an Integer.
Buffer::Iterator DeserializeBoolean(bool *value, Buffer::Iterator bIterator)
Deserialize a boolean.
uint32_t GetSerializedSize() const override
void SerializeBoolean(bool value) const
Serialize a bool.
Buffer::Iterator DeserializeBitstring(std::bitset< N > *bitstring, Buffer::Iterator bIterator)
Deserialize a bitstring.
void SerializeNull() const
Serialize nothing (null op)
bool m_isDataSerialized
true if data is serialized
void SerializeSequenceOf(int numElems, int nMax, int nMin) const
Serialize a Sequence.
void SerializeEnum(int numElems, int selectedElem) const
Serialize an Enum.
iterator in a Buffer instance
Definition: buffer.h:100
automatically resized byte buffer
Definition: buffer.h:94
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void SetMessage(LteRrcSap::HandoverPreparationInfo msg)
Receives a HandoverPreparationInfo IE and stores the contents into the class attributes.
LteRrcSap::HandoverPreparationInfo GetMessage() const
Returns a HandoverPreparationInfo IE from the values in the class attributes.
LteRrcSap::AsConfig m_asConfig
AS config.
LteRrcSap::AsConfig GetAsConfig() const
Getter for m_asConfig.
Protocol header serialization and deserialization.
Definition: header.h:44
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ReestablishmentCause
ReestablishmentCause enumeration.
Definition: lte-rrc-sap.h:614
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::MeasurementReport m_measurementReport
measurement report
LteRrcSap::MeasurementReport GetMessage() const
Returns a MeasurementReport IE from the values in the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void SetMessage(LteRrcSap::MeasurementReport msg)
Receives a MeasurementReport IE and stores the contents into the class attributes.
This class extends Asn1Header functions, adding serialization/deserialization of some Information ele...
void SerializeNonCriticalExtensionConfiguration(LteRrcSap::NonCriticalExtensionConfiguration nonCriticalExtensionConfiguration) const
Serialize non critical extension config function.
void SerializeSrbToAddModList(std::list< LteRrcSap::SrbToAddMod > srbToAddModList) const
Serialize SRB to add mod list function.
void SerializeSystemInformationBlockType2(LteRrcSap::SystemInformationBlockType2 systemInformationBlockType2) const
Serialize system information block type 2 function.
void SerializeRadioResourceConfigCommonSCell(LteRrcSap::RadioResourceConfigCommonSCell rrccsc) const
Serialize radio resource config common SCell function.
void SerializeMeasResults(LteRrcSap::MeasResults measResults) const
Serialize measure results function.
void SerializePhysicalConfigDedicated(LteRrcSap::PhysicalConfigDedicated physicalConfigDedicated) const
Serialize physical config dedicated function.
Buffer::Iterator DeserializeCellIdentification(LteRrcSap::CellIdentification *ci, Buffer::Iterator bIterator)
Deserialize cell identification function.
Buffer::Iterator DeserializeLogicalChannelConfig(LteRrcSap::LogicalChannelConfig *logicalChannelConfig, Buffer::Iterator bIterator)
Deserialize logical channel config function.
void SerializeRachConfigCommon(LteRrcSap::RachConfigCommon rachConfigCommon) const
Serialize RACH config common function.
Buffer::Iterator DeserializeMeasConfig(LteRrcSap::MeasConfig *measConfig, Buffer::Iterator bIterator)
Deserialize measure config function.
int GetMessageType() const
Get message type.
Buffer::Iterator DeserializePhysicalConfigDedicated(LteRrcSap::PhysicalConfigDedicated *physicalConfigDedicated, Buffer::Iterator bIterator)
Deserialize physical config dedicated function.
Buffer::Iterator DeserializeNonCriticalExtensionConfig(LteRrcSap::NonCriticalExtensionConfiguration *nonCriticalExtension, Buffer::Iterator bIterator)
Deserialize non critical extension config function.
void SerializeRadioResourceConfigCommonSib(LteRrcSap::RadioResourceConfigCommonSib radioResourceConfigCommonSib) const
Serialize radio resource config common SIB function.
void SerializeSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 systemInformationBlockType1) const
Serialize system information block type 1 function.
Buffer::Iterator DeserializeRachConfigCommon(LteRrcSap::RachConfigCommon *rachConfigCommon, Buffer::Iterator bIterator)
Deserialize RACH config common function.
Buffer::Iterator DeserializePlmnIdentity(uint32_t *plmnId, Buffer::Iterator bIterator)
Deserialize PLMN identity function.
uint16_t EnumToBandwidth(int n) const
Convert from ENUMERATED value to bandwidth (in RBs)
void SerializeDrbToAddModList(std::list< LteRrcSap::DrbToAddMod > drbToAddModList) const
Serialize DRB to add mod list function.
Buffer::Iterator DeserializeMeasResults(LteRrcSap::MeasResults *measResults, Buffer::Iterator bIterator)
Deserialize measure results function.
Buffer::Iterator DeserializeRadioResourceConfigCommonSCell(LteRrcSap::RadioResourceConfigCommonSCell *rrccsc, Buffer::Iterator bIterator)
Deserialize radio resource config common SCell function.
void SerializeRadioResourceDedicatedSCell(LteRrcSap::RadioResourceConfigDedicatedSCell rrcdsc) const
Serialize radio resource dedicated SCell function.
void SerializePhysicalConfigDedicatedSCell(LteRrcSap::PhysicalConfigDedicatedSCell pcdsc) const
Serialize physical config dedicated function.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Buffer::Iterator DeserializePhysicalConfigDedicatedSCell(LteRrcSap::PhysicalConfigDedicatedSCell *pcdsc, Buffer::Iterator bIterator)
Deserialize physical config dedicated SCell function.
Buffer::Iterator DeserializeThresholdEutra(LteRrcSap::ThresholdEutra *thresholdEutra, Buffer::Iterator bIterator)
Deserialize threshold eutra function.
void SerializeRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated radioResourceConfigDedicated) const
Serialize radio resource config function.
void SerializeThresholdEutra(LteRrcSap::ThresholdEutra thresholdEutra) const
Serialize threshold eutra function.
void SerializeQoffsetRange(int8_t qOffsetRange) const
Serialize Q offset range function.
Buffer::Iterator DeserializeRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated *radioResourceConfigDedicated, Buffer::Iterator bIterator)
Deserialize radio resource config dedicated function.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
int m_messageType
Stores RRC message type, according to 3GPP TS 36.331.
Buffer::Iterator DeserializeSystemInformationBlockType1(LteRrcSap::SystemInformationBlockType1 *systemInformationBlockType1, Buffer::Iterator bIterator)
Deserialize system information block type 1 function.
void SerializeLogicalChannelConfig(LteRrcSap::LogicalChannelConfig logicalChannelConfig) const
Serialize logicala channel config function.
static TypeId GetTypeId()
Get the type ID.
Buffer::Iterator DeserializeSystemInformationBlockType2(LteRrcSap::SystemInformationBlockType2 *systemInformationBlockType2, Buffer::Iterator bIterator)
Deserialize system information block type 2 function.
Buffer::Iterator DeserializeQoffsetRange(int8_t *qOffsetRange, Buffer::Iterator bIterator)
Deserialize Qoffset range function.
int BandwidthToEnum(uint16_t bandwidth) const
Convert from bandwidth (in RBs) to ENUMERATED value.
Buffer::Iterator DeserializeDrbToAddModList(std::list< LteRrcSap::DrbToAddMod > *drbToAddModLis, Buffer::Iterator bIterator)
Deserialize DRB to add mod list function.
void SerializePlmnIdentity(uint32_t plmnId) const
Serialize PLMN identity function.
Buffer::Iterator DeserializeRadioResourceConfigCommon(LteRrcSap::RadioResourceConfigCommon *radioResourceConfigCommon, Buffer::Iterator bIterator)
Deserialize radio resource config common function.
Buffer::Iterator DeserializeRadioResourceConfigDedicatedSCell(LteRrcSap::RadioResourceConfigDedicatedSCell *rrcdsc, Buffer::Iterator bIterator)
Deserialize radio resource config dedicated SCell function.
void SerializeRadioResourceConfigCommon(LteRrcSap::RadioResourceConfigCommon radioResourceConfigCommon) const
Serialize system information block type 2 function.
void SerializeMeasConfig(LteRrcSap::MeasConfig measConfig) const
Serialize measure config function.
Buffer::Iterator DeserializeSrbToAddModList(std::list< LteRrcSap::SrbToAddMod > *srbToAddModList, Buffer::Iterator bIterator)
Deserialize SRB to add mod list function.
Buffer::Iterator DeserializeRadioResourceConfigCommonSib(LteRrcSap::RadioResourceConfigCommonSib *radioResourceConfigCommonSib, Buffer::Iterator bIterator)
Deserialize radio resource config common SIB function.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::RrcConnectionReconfigurationCompleted GetMessage() const
Returns a RrcConnectionReconfigurationCompleted IE from the values in the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
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.
bool m_haveNonCriticalExtension
Have non-critical extension.
std::list< LteRrcSap::SrbToAddMod > GetSrbToAddModList() const
Gets m_radioResourceConfigDedicated.srbToAddModList.
bool m_haveMeasConfig
have measure config?
std::list< LteRrcSap::DrbToAddMod > GetDrbToAddModList() const
Gets m_radioResourceConfigDedicated.drbToAddModList.
LteRrcSap::RrcConnectionReconfiguration GetMessage() const
Returns a RrcConnectionReconfiguration IE from the values in the class attributes.
LteRrcSap::NonCriticalExtensionConfiguration GetNonCriticalExtensionConfig()
Getter for m_nonCriticalExtension.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated()
Getter for m_radioResourceConfigDedicated.
bool HavePhysicalConfigDedicated() const
Gets m_radioResourceConfigDedicated.havePhysicalConfigDedicated.
LteRrcSap::MobilityControlInfo m_mobilityControlInfo
the modility control info
LteRrcSap::MeasConfig m_measConfig
the measure config
std::list< uint8_t > GetDrbToReleaseList() const
Gets m_radioResourceConfigDedicated.drbToReleaseList.
LteRrcSap::RadioResourceConfigDedicated m_radioResourceConfigDedicated
the radio resource config dedicated
bool GetHaveNonCriticalExtensionConfig() const
Getter for m_haveNonCriticalExtension.
LteRrcSap::PhysicalConfigDedicated GetPhysicalConfigDedicated() const
Gets m_radioResourceConfigDedicated.physicalConfigDedicated.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
bool m_haveMobilityControlInfo
have mobility control info?
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.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::NonCriticalExtensionConfiguration m_nonCriticalExtension
the non-critical extension
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
bool m_haveRadioResourceConfigDedicated
have radio resource config dedicated?
bool GetHaveMeasConfig() const
Getter for m_haveMeasConfig.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
LteRrcSap::MeasConfig GetMeasConfig()
Getter for m_measConfig.
LteRrcSap::MobilityControlInfo GetMobilityControlInfo()
Getter for m_mobilityControlInfo.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
LteRrcSap::RrcConnectionReestablishmentComplete GetMessage() const
Returns a RrcConnectionReestablishmentComplete IE from the values in the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier attribute.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
LteRrcSap::RadioResourceConfigDedicated m_radioResourceConfigDedicated
radio resource config dedicated
LteRrcSap::RrcConnectionReestablishment GetMessage() const
Returns a RrcConnectionReestablishment IE from the values in the class attributes.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier attribute.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated() const
Getter for m_radioResourceConfigDedicated attribute.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void SetMessage(LteRrcSap::RrcConnectionReestablishment msg)
Receives a RrcConnectionReestablishment IE and stores the contents into the class attributes.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentReject msg)
Receives a RrcConnectionReestablishmentReject IE and stores the contents into the class attributes.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
LteRrcSap::RrcConnectionReestablishmentReject m_rrcConnectionReestablishmentReject
RRC connection reestablishmnet reject.
LteRrcSap::RrcConnectionReestablishmentReject GetMessage() const
Returns a RrcConnectionReestablishmentReject IE from the values in the class attributes.
LteRrcSap::RrcConnectionReestablishmentRequest GetMessage() const
Returns a RrcConnectionReestablishmentRequest IE from the values in the class attributes.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::ReestablishmentCause m_reestablishmentCause
reestablishment cause
LteRrcSap::ReestablishmentCause GetReestablishmentCause() const
Getter for m_reestablishmentCause.
LteRrcSap::ReestabUeIdentity m_ueIdentity
UE identity.
void SetMessage(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Receives a RrcConnectionReestablishmentRequest IE and stores the contents into the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
LteRrcSap::ReestabUeIdentity GetUeIdentity() const
Getter for m_ueIdentity.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::RrcConnectionReject GetMessage() const
Returns a RrcConnectionReject IE from the values in the class attributes.
LteRrcSap::RrcConnectionReject m_rrcConnectionReject
RRC connection reject.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void SetMessage(LteRrcSap::RrcConnectionReject msg)
Receives a RrcConnectionReject IE and stores the contents into the class attributes.
LteRrcSap::RrcConnectionRelease GetMessage() const
Returns a RrcConnectionRelease IE from the values in the class attributes.
void SetMessage(LteRrcSap::RrcConnectionRelease msg)
Receives a RrcConnectionRelease IE and stores the contents into the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::RrcConnectionRelease m_rrcConnectionRelease
RRC connection release.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
std::bitset< 8 > GetMmec() const
Get MMEC attribute.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void SetMessage(LteRrcSap::RrcConnectionRequest msg)
Receives a RrcConnectionRequest IE and stores the contents into the class attributes.
std::bitset< 1 > m_spare
spare bit
LteRrcSap::RrcConnectionRequest GetMessage() const
Returns a RrcConnectionRequest IE from the values in the class attributes.
static TypeId GetTypeId()
Get the type ID.
std::bitset< 32 > GetMtmsi() const
Get M-TMSI attribute.
std::bitset< 8 > m_mmec
MMEC.
std::bitset< 32 > m_mTmsi
TMSI.
enum ns3::RrcConnectionRequestHeader::@61 m_establishmentCause
EstablishmentCause enumeration.
LteRrcSap::RrcConnectionSetupCompleted GetMessage() const
Returns a RrcConnectionSetupCompleted IE from the values in the class attributes.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
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.
LteRrcSap::RadioResourceConfigDedicated m_radioResourceConfigDedicated
radio resource config dedicated
void SetMessage(LteRrcSap::RrcConnectionSetup msg)
Receives a RrcConnectionSetup IE and stores the contents into the class attributes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
std::list< LteRrcSap::DrbToAddMod > GetDrbToAddModList() const
Gets m_radioResourceConfigDedicated.drbToAddModList.
LteRrcSap::RrcConnectionSetup GetMessage() const
Returns a RrcConnectionSetup IE from the values in the class attributes.
std::list< uint8_t > GetDrbToReleaseList() const
Gets m_radioResourceConfigDedicated.drbToReleaseList.
uint8_t m_rrcTransactionIdentifier
RRC transaction identifier.
std::list< LteRrcSap::SrbToAddMod > GetSrbToAddModList() const
Gets m_radioResourceConfigDedicated.srbToAddModList.
bool HavePhysicalConfigDedicated() const
Gets m_radioResourceConfigDedicated.havePhysicalConfigDedicated.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
LteRrcSap::PhysicalConfigDedicated GetPhysicalConfigDedicated() const
Gets m_radioResourceConfigDedicated.physicalConfigDedicated.
uint8_t GetRrcTransactionIdentifier() const
Getter for m_rrcTransactionIdentifier.
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigDedicated() const
Getter for m_radioResourceConfigDedicated.
Buffer::Iterator DeserializeDlCcchMessage(Buffer::Iterator bIterator)
Deserialize DL CCCH message function.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void SerializeDlCcchMessage(int msgType) const
Serialize DL CCCH message function.
void SerializeDlDcchMessage(int msgType) const
Serialize DL DCCH message function.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
Buffer::Iterator DeserializeDlDcchMessage(Buffer::Iterator bIterator)
Deserialize DL DCCH message function.
This class only serves to discriminate which message type has been received in uplink (ue to eNb) for...
void SerializeUlCcchMessage(int msgType) const
Serialize UL CCCH message function.
Buffer::Iterator DeserializeUlCcchMessage(Buffer::Iterator bIterator)
Deserialize DL CCCH message function.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
Buffer::Iterator DeserializeUlDcchMessage(Buffer::Iterator bIterator)
Deserialize UL DCCH message function.
void Print(std::ostream &os) const override
This function prints the object, for debugging purposes.
void PreSerialize() const override
This function serializes class attributes to m_serializationResult local Buffer.
void SerializeUlDcchMessage(int msgType) const
Serialize UL DCCH message function.
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define MAX_CELL_REPORT
#define MAX_CELL_MEAS
#define MAX_DRB
#define MAX_SIB
#define MAX_EARFCN
#define MAX_SI_MESSAGE
#define MAX_MEAS_ID
#define MAX_OBJECT_ID
#define MAX_RAT_CAPABILITIES
#define MAX_REPORT_CONFIG_ID
#define MAX_SCELL_REPORT
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t antennaPortsCount
antenna ports count
Definition: lte-rrc-sap.h:758
uint8_t transmissionMode
transmission mode
Definition: lte-rrc-sap.h:151
AsConfig structure.
Definition: lte-rrc-sap.h:650
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
CellIdentification structure.
Definition: lte-rrc-sap.h:750
uint32_t dlCarrierFreq
ARFCN - valueEUTRA.
Definition: lte-rrc-sap.h:752
uint32_t physCellId
physical cell ID
Definition: lte-rrc-sap.h:751
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
std::list< uint32_t > plmnIdentityList
PLMN identity list.
Definition: lte-rrc-sap.h:668
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
MeasConfig structure.
Definition: lte-rrc-sap.h:553
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
uint16_t physCellId
physical cell ID
Definition: lte-rrc-sap.h:700
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
uint8_t rsrpResult
the RSRP result
Definition: lte-rrc-sap.h:693
uint8_t rsrqResult
the RSRQ result
Definition: lte-rrc-sap.h:694
MeasResultServFreq structure.
Definition: lte-rrc-sap.h:707
bool haveMeasResultSCell
have measResultSCell?
Definition: lte-rrc-sap.h:709
MeasResultBestNeighCell measResultBestNeighCell
best neighbor cell measurement results
Definition: lte-rrc-sap.h:712
bool haveMeasResultBestNeighCell
have measResultBestNeighCell?
Definition: lte-rrc-sap.h:711
uint16_t servFreqId
serving cell index
Definition: lte-rrc-sap.h:708
MeasResultSCell measResultSCell
SCell measurement results.
Definition: lte-rrc-sap.h:710
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
std::list< MeasResultServFreq > measResultServFreqList
MeasResultServFreqList-r10.
Definition: lte-rrc-sap.h:723
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
MobilityControlInfo structure.
Definition: lte-rrc-sap.h:593
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
NonCriticalExtensionConfiguration structure.
Definition: lte-rrc-sap.h:874
std::list< uint8_t > sCellToReleaseList
SCell to release list.
Definition: lte-rrc-sap.h:876
std::list< SCellToAddMod > sCellToAddModList
SCell to add mod list.
Definition: lte-rrc-sap.h:875
AntennaInfoCommon antennaInfoCommon
2: Physical configuration, general antennaInfoCommon-r10
Definition: lte-rrc-sap.h:780
PdschConfigCommon pdschConfigCommon
4: Physical configuration, physical channels pdsch-ConfigCommon-r10
Definition: lte-rrc-sap.h:784
uint16_t dlBandwidth
1: Cell characteristics
Definition: lte-rrc-sap.h:778
int8_t referenceSignalPower
INTEGER (-60..50),.
Definition: lte-rrc-sap.h:157
int8_t pb
INTEGER (0..3),.
Definition: lte-rrc-sap.h:158
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
PhysicalConfigDedicatedSCell structure.
Definition: lte-rrc-sap.h:821
AntennaInfoDedicated antennaInfoUl
antenna info UL
Definition: lte-rrc-sap.h:835
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
Definition: lte-rrc-sap.h:841
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Definition: lte-rrc-sap.h:830
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
Definition: lte-rrc-sap.h:839
bool haveUlConfiguration
have UL configuration?
Definition: lte-rrc-sap.h:833
bool haveAntennaInfoUlDedicated
have antenna info UL dedicated?
Definition: lte-rrc-sap.h:834
bool havePdschConfigDedicated
have PDSCH config dedicated?
Definition: lte-rrc-sap.h:829
bool haveNonUlConfiguration
have non UL configuration?
Definition: lte-rrc-sap.h:823
AntennaInfoDedicated antennaInfo
antenna info dedicated
Definition: lte-rrc-sap.h:825
bool haveAntennaInfoDedicated
have antenna info dedicated?
Definition: lte-rrc-sap.h:824
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
RachConfigCommon structure.
Definition: lte-rrc-sap.h:275
TxFailParam txFailParam
txFailParams
Definition: lte-rrc-sap.h:278
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
RadioResourceConfigCommon structure.
Definition: lte-rrc-sap.h:283
RachConfigCommon rachConfigCommon
RACH config common.
Definition: lte-rrc-sap.h:284
RadioResourceConfigCommonSCell.
Definition: lte-rrc-sap.h:846
NonUlConfiguration nonUlConfiguration
non UL configuration
Definition: lte-rrc-sap.h:848
bool haveUlConfiguration
have UL configuration
Definition: lte-rrc-sap.h:849
bool haveNonUlConfiguration
have non UL configuration?
Definition: lte-rrc-sap.h:847
UlConfiguration ulConfiguration
UL configuration.
Definition: lte-rrc-sap.h:850
RadioResourceConfigCommonSib structure.
Definition: lte-rrc-sap.h:289
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
RadioResourceConfigDedicatedSCell structure.
Definition: lte-rrc-sap.h:855
PhysicalConfigDedicatedSCell physicalConfigDedicatedSCell
physical config dedicated SCell
Definition: lte-rrc-sap.h:857
ReestabUeIdentity structure.
Definition: lte-rrc-sap.h:607
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
@ BOTH
Both the RSRP and RSRQ quantities are to be included in the measurement report.
Definition: lte-rrc-sap.h:434
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition.
Definition: lte-rrc-sap.h:407
uint8_t reportAmount
Number of measurement reports applicable, always assumed to be infinite.
Definition: lte-rrc-sap.h:465
ThresholdEutra threshold2
Threshold for event A5.
Definition: lte-rrc-sap.h:394
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerType
Trigger enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 reportQuantity
Report type enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@64 eventId
Event enumeration.
@ EVENT_A2
Event A2: Serving becomes worse than absolute threshold.
Definition: lte-rrc-sap.h:385
@ EVENT_A3
Event A3: Neighbour becomes amount of offset better than PCell.
Definition: lte-rrc-sap.h:386
@ EVENT_A4
Event A4: Neighbour becomes better than absolute threshold.
Definition: lte-rrc-sap.h:387
@ EVENT_A1
Event A1: Serving becomes better than absolute threshold.
Definition: lte-rrc-sap.h:384
@ EVENT_A5
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
Definition: lte-rrc-sap.h:388
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Definition: lte-rrc-sap.h:393
enum ns3::LteRrcSap::ReportConfigEutra::@67 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 triggerQuantity
Trigger type enumeration.
@ RSRP
Reference Signal Received Power.
Definition: lte-rrc-sap.h:425
@ RSRQ
Reference Signal Received Quality.
Definition: lte-rrc-sap.h:426
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
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
NonCriticalExtensionConfiguration nonCriticalExtension
3GPP TS 36.331 v.11.10 R11 Sec.
Definition: lte-rrc-sap.h:893
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
RrcConnectionReestablishmentReject structure.
Definition: lte-rrc-sap.h:925
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
RrcConnectionRelease structure.
Definition: lte-rrc-sap.h:930
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
Definition: lte-rrc-sap.h:931
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
SCellToAddMod structure.
Definition: lte-rrc-sap.h:862
RadioResourceConfigDedicatedSCell radioResourceConfigDedicatedSCell
radio resource config dedicated SCell
Definition: lte-rrc-sap.h:869
uint32_t sCellIndex
SCell index.
Definition: lte-rrc-sap.h:863
bool haveRadioResourceConfigDedicatedSCell
have radio resource config dedicated SCell?
Definition: lte-rrc-sap.h:867
CellIdentification cellIdentification
cell identification
Definition: lte-rrc-sap.h:864
RadioResourceConfigCommonSCell radioResourceConfigCommonSCell
radio resource config common SCell
Definition: lte-rrc-sap.h:866
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
SystemInformationBlockType1 structure.
Definition: lte-rrc-sap.h:629
CellAccessRelatedInfo cellAccessRelatedInfo
cell access related info
Definition: lte-rrc-sap.h:630
SystemInformationBlockType2 structure.
Definition: lte-rrc-sap.h:636
RadioResourceConfigCommonSib radioResourceConfigCommon
radio resource config common
Definition: lte-rrc-sap.h:637
Threshold for event evaluation.
Definition: lte-rrc-sap.h:360
enum ns3::LteRrcSap::ThresholdEutra::@62 choice
Threshold enumeration.
@ 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
uint8_t range
Value range used in RSRP/RSRQ threshold.
Definition: lte-rrc-sap.h:368
uint8_t connEstFailCount
Number of times that the UE detects T300 expiry on the same cell.
Definition: lte-rrc-sap.h:269
UlPowerControlCommonSCell ulPowerControlCommonSCell
3GPP TS 36.331 v.11.10 R11 pag.223
Definition: lte-rrc-sap.h:793
FreqInfo ulFreqInfo
UL frequency info.
Definition: lte-rrc-sap.h:792
PrachConfigSCell prachConfigSCell
PRACH config SCell.
Definition: lte-rrc-sap.h:795