A Discrete-Event Network Simulator
API
lte-rrc-header.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Lluis Parcerisa <lparcerisa@cttc.cat>
19  * Modified by:
20  * Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
21  * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
22  */
23 
24 #include "ns3/log.h"
25 #include "ns3/lte-rrc-header.h"
26 
27 #include <stdio.h>
28 #include <sstream>
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 namespace ns3 {
45 
46 NS_LOG_COMPONENT_DEFINE ("RrcHeader");
47 
50 {
51 }
52 
53 TypeId
55 {
56  static TypeId tid = TypeId ("ns3::RrcAsn1Header")
57  .SetParent<Header> ()
58  .SetGroupName("Lte")
59  ;
60  return tid;
61 }
62 
63 TypeId
65 {
66  return GetTypeId ();
67 }
68 
69 int
71 {
72  return m_messageType;
73 }
74 
75 void
76 RrcAsn1Header::SerializeDrbToAddModList (std::list<LteRrcSap::DrbToAddMod> drbToAddModList) const
77 {
78  // Serialize DRB-ToAddModList sequence-of
79  SerializeSequenceOf (drbToAddModList.size (),MAX_DRB,1);
80 
81  // Serialize the elements in the sequence-of list
82  std::list<LteRrcSap::DrbToAddMod>::iterator it = drbToAddModList.begin ();
83  for (; it != drbToAddModList.end (); it++)
84  {
85  // Serialize DRB-ToAddMod sequence
86  // 5 otional fields. Extension marker is present.
87  std::bitset<5> drbToAddModListOptionalFieldsPresent = std::bitset<5> ();
88  drbToAddModListOptionalFieldsPresent.set (4,1); // eps-BearerIdentity present
89  drbToAddModListOptionalFieldsPresent.set (3,0); // pdcp-Config not present
90  drbToAddModListOptionalFieldsPresent.set (2,1); // rlc-Config present
91  drbToAddModListOptionalFieldsPresent.set (1,1); // logicalChannelIdentity present
92  drbToAddModListOptionalFieldsPresent.set (0,1); // logicalChannelConfig present
93  SerializeSequence (drbToAddModListOptionalFieldsPresent,true);
94 
95  // Serialize eps-BearerIdentity::=INTEGER (0..15)
96  SerializeInteger (it->epsBearerIdentity,0,15);
97 
98  // Serialize drb-Identity ::= INTEGER (1..32)
99  SerializeInteger (it->drbIdentity,1,32);
100 
101  switch (it->rlcConfig.choice)
102  {
104  // Serialize rlc-Config choice
105  SerializeChoice (4,1,true);
106 
107  // Serialize UL-UM-RLC
108  SerializeSequence (std::bitset<0> (),false);
109  SerializeEnum (2,0); // sn-FieldLength
110 
111  // Serialize DL-UM-RLC
112  SerializeSequence (std::bitset<0> (),false);
113  SerializeEnum (2,0); // sn-FieldLength
114  SerializeEnum (32,0); // t-Reordering
115  break;
116 
118  // Serialize rlc-Config choice
119  SerializeChoice (4,2,true);
120 
121  // Serialize UL-UM-RLC
122  SerializeSequence (std::bitset<0> (),false);
123  SerializeEnum (2,0); // sn-FieldLength
124  break;
125 
127  // Serialize rlc-Config choice
128  SerializeChoice (4,3,true);
129 
130  // Serialize DL-UM-RLC
131  SerializeSequence (std::bitset<0> (),false);
132  SerializeEnum (2,0); // sn-FieldLength
133  SerializeEnum (32,0); // t-Reordering
134  break;
135 
137  default:
138  // Serialize rlc-Config choice
139  SerializeChoice (4,0,true);
140 
141  // Serialize UL-AM-RLC
142  SerializeSequence (std::bitset<0> (),false);
143  SerializeEnum (64,0); // t-PollRetransmit
144  SerializeEnum (8,0); // pollPDU
145  SerializeEnum (16,0); // pollByte
146  SerializeEnum (8,0); // maxRetxThreshold
147 
148  // Serialize DL-AM-RLC
149  SerializeSequence (std::bitset<0> (),false);
150  SerializeEnum (32,0); // t-Reordering
151  SerializeEnum (64,0); // t-StatusProhibit
152  break;
153  }
154 
155  // Serialize logicalChannelIdentity ::=INTEGER (3..10)
156  SerializeInteger (it->logicalChannelIdentity,3,10);
157 
158  // Serialize logicalChannelConfig
159  SerializeLogicalChannelConfig (it->logicalChannelConfig);
160  }
161 }
162 
163 void
164 RrcAsn1Header::SerializeSrbToAddModList (std::list<LteRrcSap::SrbToAddMod> srbToAddModList) const
165 {
166  // Serialize SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod
167  SerializeSequenceOf (srbToAddModList.size (),2,1);
168 
169  // Serialize the elements in the sequence-of list
170  std::list<LteRrcSap::SrbToAddMod>::iterator it = srbToAddModList.begin ();
171  for (; it != srbToAddModList.end (); it++)
172  {
173  // Serialize SRB-ToAddMod sequence
174  // 2 otional fields. Extension marker is present.
175  std::bitset<2> srbToAddModListOptionalFieldsPresent = std::bitset<2> ();
176  srbToAddModListOptionalFieldsPresent.set (1,0); // rlc-Config not present
177  srbToAddModListOptionalFieldsPresent.set (0,1); // logicalChannelConfig present
178  SerializeSequence (srbToAddModListOptionalFieldsPresent,true);
179 
180  // Serialize srb-Identity ::= INTEGER (1..2)
181  SerializeInteger (it->srbIdentity,1,2);
182 
183  // Serialize logicalChannelConfig choice
184  // 2 options, selected option 0 (var "explicitValue", of type LogicalChannelConfig)
185  SerializeChoice (2,0,false);
186 
187  // Serialize LogicalChannelConfig
188  SerializeLogicalChannelConfig (it->logicalChannelConfig);
189  }
190 }
191 
192 void
194 {
195  // Serialize LogicalChannelConfig sequence
196  // 1 optional field (ul-SpecificParameters), which is present. Extension marker present.
197  SerializeSequence (std::bitset<1> (1),true);
198 
199  // Serialize ul-SpecificParameters sequence
200  // 1 optional field (logicalChannelGroup), which is present. No extension marker.
201  SerializeSequence (std::bitset<1> (1),false);
202 
203  // Serialize priority ::= INTEGER (1..16)
204  SerializeInteger (logicalChannelConfig.priority,1,16);
205 
206  // Serialize prioritisedBitRate
207  int prioritizedBitRate;
208  switch (logicalChannelConfig.prioritizedBitRateKbps)
209  {
210  case 0:
211  prioritizedBitRate = 0;
212  break;
213  case 8:
214  prioritizedBitRate = 1;
215  break;
216  case 16:
217  prioritizedBitRate = 2;
218  break;
219  case 32:
220  prioritizedBitRate = 3;
221  break;
222  case 64:
223  prioritizedBitRate = 4;
224  break;
225  case 128:
226  prioritizedBitRate = 5;
227  break;
228  case 256:
229  prioritizedBitRate = 6;
230  break;
231  default:
232  prioritizedBitRate = 7; // Infinity
233  }
234  SerializeEnum (16,prioritizedBitRate);
235 
236  // Serialize bucketSizeDuration
237  int bucketSizeDuration;
238  switch (logicalChannelConfig.bucketSizeDurationMs)
239  {
240  case 50:
241  bucketSizeDuration = 0;
242  break;
243  case 100:
244  bucketSizeDuration = 1;
245  break;
246  case 150:
247  bucketSizeDuration = 2;
248  break;
249  case 300:
250  bucketSizeDuration = 3;
251  break;
252  case 500:
253  bucketSizeDuration = 4;
254  break;
255  case 1000:
256  bucketSizeDuration = 5;
257  break;
258  default:
259  bucketSizeDuration = 5;
260  }
261  SerializeEnum (8,bucketSizeDuration);
262 
263  // Serialize logicalChannelGroup ::= INTEGER (0..3)
264  SerializeInteger (logicalChannelConfig.logicalChannelGroup,0,3);
265 }
266 
267 void
269 {
270  // Serialize PhysicalConfigDedicated Sequence
271  std::bitset<10> optionalFieldsPhysicalConfigDedicated;
272  optionalFieldsPhysicalConfigDedicated.set (9,physicalConfigDedicated.havePdschConfigDedicated); // pdsch-ConfigDedicated
273  optionalFieldsPhysicalConfigDedicated.set (8,0); // pucch-ConfigDedicated not present
274  optionalFieldsPhysicalConfigDedicated.set (7,0); // pusch-ConfigDedicated not present
275  optionalFieldsPhysicalConfigDedicated.set (6,0); // uplinkPowerControlDedicated not present
276  optionalFieldsPhysicalConfigDedicated.set (5,0); // tpc-PDCCH-ConfigPUCCH not present
277  optionalFieldsPhysicalConfigDedicated.set (4,0); // tpc-PDCCH-ConfigPUSCH not present
278  optionalFieldsPhysicalConfigDedicated.set (3,0); // cqi-ReportConfig not present
279  optionalFieldsPhysicalConfigDedicated.set (2,physicalConfigDedicated.haveSoundingRsUlConfigDedicated); // soundingRS-UL-ConfigDedicated
280  optionalFieldsPhysicalConfigDedicated.set (1,physicalConfigDedicated.haveAntennaInfoDedicated); // antennaInfo
281  optionalFieldsPhysicalConfigDedicated.set (0,0); // schedulingRequestConfig not present
282  SerializeSequence (optionalFieldsPhysicalConfigDedicated,true);
283 
284  if (physicalConfigDedicated.havePdschConfigDedicated)
285  {
286  // Serialize Pdsch-ConfigDedicated Sequence:
287  // 0 optional / default fields, no extension marker.
288  SerializeSequence (std::bitset<0> (),false);
289 
290  // Serialize p-a
291  // Assuming the value in the struct is the enum index
292  SerializeEnum (8,physicalConfigDedicated.pdschConfigDedicated.pa);
293 
294  // Serialize release
295  SerializeNull ();
296  }
297 
298  if (physicalConfigDedicated.haveSoundingRsUlConfigDedicated)
299  {
300  // Serialize SoundingRS-UL-ConfigDedicated choice:
301  switch (physicalConfigDedicated.soundingRsUlConfigDedicated.type)
302  {
304  SerializeChoice (2,0,false);
305  SerializeNull ();
306  break;
307 
309  default:
310  // 2 options, selected: 1 (setup)
311  SerializeChoice (2,1,false);
312 
313  // Serialize setup sequence
314  // 0 optional / default fields, no extension marker.
315  SerializeSequence (std::bitset<0> (),false);
316 
317  // Serialize srs-Bandwidth
318  SerializeEnum (4,physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth);
319 
320  // Serialize srs-HoppingBandwidth
321  SerializeEnum (4,0);
322 
323  // Serialize freqDomainPosition
324  SerializeInteger (0,0,23);
325 
326  // Serialize duration
327  SerializeBoolean (false);
328 
329  // Serialize srs-ConfigIndex
330  SerializeInteger (physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex,0,1023);
331 
332  // Serialize transmissionComb
333  SerializeInteger (0,0,1);
334 
335  // Serialize cyclicShift
336  SerializeEnum (8,0);
337 
338  break;
339  }
340  }
341 
342  if (physicalConfigDedicated.haveAntennaInfoDedicated)
343  {
344  // Serialize antennaInfo choice
345  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
346  SerializeChoice (2,0,false);
347 
348  // Serialize AntennaInfoDedicated sequence
349  // 1 optional parameter, not present. No extension marker.
350  SerializeSequence (std::bitset<1> (0),false);
351 
352  // Serialize transmissionMode
353  // Assuming the value in the struct is the enum index
354  SerializeEnum (8,physicalConfigDedicated.antennaInfo.transmissionMode);
355 
356  // Serialize ue-TransmitAntennaSelection choice
357  SerializeChoice (2,0,false);
358 
359  // Serialize release
360  SerializeNull ();
361  }
362 }
363 
364 void
366 {
367  bool isSrbToAddModListPresent = !radioResourceConfigDedicated.srbToAddModList.empty ();
368  bool isDrbToAddModListPresent = !radioResourceConfigDedicated.drbToAddModList.empty ();
369  bool isDrbToReleaseListPresent = !radioResourceConfigDedicated.drbToReleaseList.empty ();
370 
371  // 6 optional fields. Extension marker is present.
372  std::bitset<6> optionalFieldsPresent = std::bitset<6> ();
373  optionalFieldsPresent.set (5,isSrbToAddModListPresent); // srb-ToAddModList present
374  optionalFieldsPresent.set (4,isDrbToAddModListPresent); // drb-ToAddModList present
375  optionalFieldsPresent.set (3,isDrbToReleaseListPresent); // drb-ToReleaseList present
376  optionalFieldsPresent.set (2,0); // mac-MainConfig not present
377  optionalFieldsPresent.set (1,0); // sps-Config not present
378  optionalFieldsPresent.set (0,(radioResourceConfigDedicated.havePhysicalConfigDedicated) ? 1 : 0);
379  SerializeSequence (optionalFieldsPresent,true);
380 
381  // Serialize srbToAddModList
382  if (isSrbToAddModListPresent)
383  {
384  SerializeSrbToAddModList (radioResourceConfigDedicated.srbToAddModList);
385  }
386 
387  // Serialize drbToAddModList
388  if (isDrbToAddModListPresent)
389  {
390  SerializeDrbToAddModList (radioResourceConfigDedicated.drbToAddModList);
391  }
392 
393  // Serialize drbToReleaseList
394  if (isDrbToReleaseListPresent)
395  {
396  SerializeSequenceOf (radioResourceConfigDedicated.drbToReleaseList.size (),MAX_DRB,1);
397  std::list<uint8_t>::iterator it = radioResourceConfigDedicated.drbToReleaseList.begin ();
398  for (; it != radioResourceConfigDedicated.drbToReleaseList.end (); it++)
399  {
400  // DRB-Identity ::= INTEGER (1..32)
401  SerializeInteger (*it,1,32);
402  }
403  }
404 
405  if (radioResourceConfigDedicated.havePhysicalConfigDedicated)
406  {
407  SerializePhysicalConfigDedicated (radioResourceConfigDedicated.physicalConfigDedicated);
408  }
409 }
410 
411 void
413 {
414  // 3 optional fields, no extension marker.
415  std::bitset<3> sysInfoBlk1Opts;
416  sysInfoBlk1Opts.set (2,0); // p-Max absent
417  sysInfoBlk1Opts.set (1,0); // tdd-Config absent
418  sysInfoBlk1Opts.set (0,0); // nonCriticalExtension absent
419  SerializeSequence (sysInfoBlk1Opts,false);
420 
421  // Serialize cellAccessRelatedInfo
422  // 1 optional field (csgIdentity) which is present, no extension marker.
423  SerializeSequence (std::bitset<1> (1),false);
424 
425  // Serialize plmn-IdentityList
426  SerializeSequenceOf (1,6,1);
427 
428  // PLMN-IdentityInfo
429  SerializeSequence (std::bitset<0> (),false);
430 
432 
433  // Serialize trackingAreaCode
434  SerializeBitstring (std::bitset<16> (0));
435  // Serialize cellIdentity
436  SerializeBitstring (std::bitset<28> (systemInformationBlockType1.cellAccessRelatedInfo.cellIdentity));
437  // Serialize cellBarred
438  SerializeEnum (2,0);
439  // Serialize intraFreqReselection
440  SerializeEnum (2,0);
441  // Serialize csg-Indication
442  SerializeBoolean (systemInformationBlockType1.cellAccessRelatedInfo.csgIndication);
443  // Serialize csg-Identity
444  SerializeBitstring (std::bitset<27> (systemInformationBlockType1.cellAccessRelatedInfo.csgIdentity));
445 
446  // Serialize cellSelectionInfo
447  SerializeSequence (std::bitset<1> (0),false);
448  // Serialize q-RxLevMin
449  SerializeInteger (-50,-70,-22);
450 
451  // Serialize freqBandIndicator
452  SerializeInteger (1,1,64);
453 
454  // Serialize schedulingInfoList
456  // SchedulingInfo
457  SerializeSequence (std::bitset<0> (),false);
458  // si-Periodicity
459  SerializeEnum (7,0);
460  // sib-MappingInfo
461  SerializeSequenceOf (0,MAX_SIB - 1,0);
462 
463  // Serialize si-WindowLength
464  SerializeEnum (7,0);
465 
466  // Serialize systemInfoValueTag
467  SerializeInteger (0,0,31);
468 }
469 
470 void
472 {
473  // 9 optional fields. Extension marker yes.
474  std::bitset<9> rrCfgCmmOpts;
475  rrCfgCmmOpts.set (8,1); // rach-ConfigCommon is present
476  rrCfgCmmOpts.set (7,0); // pdsch-ConfigCommon not present
477  rrCfgCmmOpts.set (6,0); // phich-Config not present
478  rrCfgCmmOpts.set (5,0); // pucch-ConfigCommon not present
479  rrCfgCmmOpts.set (4,0); // soundingRS-UL-ConfigCommon not present
480  rrCfgCmmOpts.set (3,0); // uplinkPowerControlCommon not present
481  rrCfgCmmOpts.set (2,0); // antennaInfoCommon not present
482  rrCfgCmmOpts.set (1,0); // p-Max not present
483  rrCfgCmmOpts.set (0,0); // tdd-Config not present
484 
485  SerializeSequence (rrCfgCmmOpts,true);
486 
487  if (rrCfgCmmOpts[8])
488  {
489  // Serialize RACH-ConfigCommon
490  SerializeRachConfigCommon (radioResourceConfigCommon.rachConfigCommon);
491  }
492 
493  // Serialize PRACH-Config
494  // 1 optional, 0 extension marker.
495  SerializeSequence (std::bitset<1> (0),false);
496 
497  // Serialize PRACH-Config rootSequenceIndex
498  SerializeInteger (0,0,1023);
499 
500  // Serialize PUSCH-ConfigCommon
501  SerializeSequence (std::bitset<0> (),false);
502 
503  // Serialize pusch-ConfigBasic
504  SerializeSequence (std::bitset<0> (),false);
505  SerializeInteger (1,1,4);
506  SerializeEnum (2,0);
507  SerializeInteger (0,0,98);
508  SerializeBoolean (false);
509 
510  // Serialize UL-ReferenceSignalsPUSCH
511  SerializeSequence (std::bitset<0> (),false);
512  SerializeBoolean (false);
513  SerializeInteger (0,0,29);
514  SerializeBoolean (false);
515  SerializeInteger (4,0,7);
516 
517  // Serialize UL-CyclicPrefixLength
518  SerializeEnum (2,0);
519 }
520 
521 void
523 {
524  SerializeSequence (std::bitset<0> (0),true);
525 
526  // rach-ConfigCommon
527  SerializeRachConfigCommon (radioResourceConfigCommonSib.rachConfigCommon);
528 
529  // bcch-Config
530  SerializeSequence (std::bitset<0> (0),false);
531  SerializeEnum (4,0); // modificationPeriodCoeff
532  // pcch-Config
533  SerializeSequence (std::bitset<0> (0),false);
534  SerializeEnum (4,0); // defaultPagingCycle
535  SerializeEnum (8,0); // nB
536  // prach-Config
537  SerializeSequence (std::bitset<1> (0),false);
538  SerializeInteger (0,0,1023); // rootSequenceIndex
539  // pdsch-ConfigCommon
540  SerializeSequence (std::bitset<0> (0),false);
541  SerializeInteger (0,-60,50); // referenceSignalPower
542  SerializeInteger (0,0,3); // p-b
543  // pusch-ConfigCommon
544  SerializeSequence (std::bitset<0> (0),false);
545  SerializeSequence (std::bitset<0> (0),false); // pusch-ConfigBasic
546  SerializeInteger (1,1,4); // n-SB
547  SerializeEnum (2,0); // hoppingMode
548  SerializeInteger (0,0,98); // pusch-HoppingOffset
549  SerializeBoolean (false); // enable64QAM
550  SerializeSequence (std::bitset<0> (0),false); // UL-ReferenceSignalsPUSCH
551  SerializeBoolean (false); // groupHoppingEnabled
552  SerializeInteger (0,0,29); // groupAssignmentPUSCH
553  SerializeBoolean (false); // sequenceHoppingEnabled
554  SerializeInteger (0,0,7); // cyclicShift
555  // pucch-ConfigCommon
556  SerializeSequence (std::bitset<0> (0),false);
557  SerializeEnum (3,0); // deltaPUCCH-Shift
558  SerializeInteger (0,0,98); // nRB-CQI
559  SerializeInteger (0,0,7); // nCS-AN
560  SerializeInteger (0,0,2047); // n1PUCCH-AN
561  // soundingRS-UL-ConfigCommon
562  SerializeChoice (2,0,false);
563  SerializeNull (); // release
564  // uplinkPowerControlCommon
565  SerializeSequence (std::bitset<0> (0),false);
566  SerializeInteger (0,-126,24); // p0-NominalPUSCH
567  SerializeEnum (8,0); // alpha
568  SerializeInteger (-50,-127,-96); // p0-NominalPUCCH
569  SerializeSequence (std::bitset<0> (0),false); // deltaFList-PUCCH
570  SerializeEnum (3,0); // deltaF-PUCCH-Format1
571  SerializeEnum (3,0); // deltaF-PUCCH-Format1b
572  SerializeEnum (4,0); // deltaF-PUCCH-Format2
573  SerializeEnum (3,0); // deltaF-PUCCH-Format2a
574  SerializeEnum (3,0); // deltaF-PUCCH-Format2b
575  SerializeInteger (0,-1,6);
576  // ul-CyclicPrefixLength
577  SerializeEnum (2,0);
578 }
579 
580 void
582 {
583  SerializeSequence (std::bitset<2> (0),true);
584 
585  // RadioResourceConfigCommonSib
587 
588  // ue-TimersAndConstants
589  SerializeSequence (std::bitset<0> (0),true);
590  SerializeEnum (8,0); // t300
591  SerializeEnum (8,0); // t301
592  SerializeEnum (7,0); // t310
593  SerializeEnum (8,0); // n310
594  SerializeEnum (7,0); // t311
595  SerializeEnum (8,0); // n311
596 
597  // freqInfo
598  SerializeSequence (std::bitset<2> (3),false);
599  SerializeInteger ((int) systemInformationBlockType2.freqInfo.ulCarrierFreq, 0, MAX_EARFCN);
600  switch (systemInformationBlockType2.freqInfo.ulBandwidth)
601  {
602  case 6:
603  SerializeEnum (6,0);
604  break;
605  case 15:
606  SerializeEnum (6,1);
607  break;
608  case 25:
609  SerializeEnum (6,2);
610  break;
611  case 50:
612  SerializeEnum (6,3);
613  break;
614  case 75:
615  SerializeEnum (6,4);
616  break;
617  case 100:
618  SerializeEnum (6,5);
619  break;
620  default:
621  SerializeEnum (6,0);
622  }
623 
624  SerializeInteger (29,1,32); // additionalSpectrumEmission
625  // timeAlignmentTimerCommon
626  SerializeEnum (8,0);
627 }
628 
629 void
631 {
632  // Watchdog: if list has 0 elements, set boolean to false
633  if (measResults.measResultListEutra.empty ())
634  {
635  measResults.haveMeasResultNeighCells = false;
636  }
637 
638  std::bitset<4> measResultOptional;
639  measResultOptional.set (3, measResults.haveScellsMeas);
640  measResultOptional.set (2, false); //LocationInfo-r10
641  measResultOptional.set (1, false); // MeasResultForECID-r9
642  measResultOptional.set (0, measResults.haveMeasResultNeighCells);
643  SerializeSequence(measResultOptional,true);
644 
645  // Serialize measId
646  SerializeInteger (measResults.measId,1,MAX_MEAS_ID);
647 
648  // Serialize measResultServCell sequence
649  SerializeSequence (std::bitset<0> (0),false);
650 
651  // Serialize rsrpResult
652  SerializeInteger (measResults.rsrpResult,0,97);
653 
654  // Serialize rsrqResult
655  SerializeInteger (measResults.rsrqResult,0,34);
656 
657  if (measResults.haveMeasResultNeighCells)
658  {
659  // Serialize Choice = 0 (MeasResultListEUTRA)
660  SerializeChoice (4,0,false);
661 
662  // Serialize measResultNeighCells
664 
665  // serialize MeasResultEutra elements in the list
666  std::list<LteRrcSap::MeasResultEutra>::iterator it;
667  for (it = measResults.measResultListEutra.begin (); it != measResults.measResultListEutra.end (); it++)
668  {
669  SerializeSequence (std::bitset<1> (it->haveCgiInfo),false);
670 
671  // Serialize PhysCellId
672  SerializeInteger (it->physCellId, 0, 503);
673 
674  // Serialize CgiInfo
675  if (it->haveCgiInfo)
676  {
677  SerializeSequence (std::bitset<1> (it->cgiInfo.plmnIdentityList.size ()),false);
678 
679  // Serialize cellGlobalId
680  SerializeSequence (std::bitset<0> (0),false);
681  SerializePlmnIdentity (it->cgiInfo.plmnIdentity);
682  SerializeBitstring (std::bitset<28> (it->cgiInfo.cellIdentity));
683 
684  // Serialize trackingAreaCode
685  SerializeBitstring (std::bitset<16> (it->cgiInfo.trackingAreaCode));
686 
687  // Serialize plmn-IdentityList
688  if (!it->cgiInfo.plmnIdentityList.empty ())
689  {
690  SerializeSequenceOf (it->cgiInfo.plmnIdentityList.size (),5,1);
691  std::list<uint32_t>::iterator it2;
692  for (it2 = it->cgiInfo.plmnIdentityList.begin (); it2 != it->cgiInfo.plmnIdentityList.end (); it2++)
693  {
694  SerializePlmnIdentity (*it2);
695  }
696  }
697  }
698 
699  // Serialize measResult
700  std::bitset<2> measResultFieldsPresent;
701  measResultFieldsPresent[1] = it->haveRsrpResult;
702  measResultFieldsPresent[0] = it->haveRsrqResult;
703  SerializeSequence (measResultFieldsPresent,true);
704 
705  if (it->haveRsrpResult)
706  {
707  SerializeInteger (it->rsrpResult,0,97);
708  }
709 
710  if (it->haveRsrqResult)
711  {
712  SerializeInteger (it->rsrqResult,0,34);
713  }
714  }
715  }
716  if (measResults.haveScellsMeas)
717  {
718  // Serialize measResultNeighCells
720  // serialize MeasResultServFreqList-r10 elements in the list
721  std::list<LteRrcSap::MeasResultScell>::iterator it;
722  for (it = measResults.measScellResultList.measResultScell.begin (); it != measResults.measScellResultList.measResultScell.end (); it++)
723  {
724  // Serialize measId
725  SerializeInteger (it->servFreqId,0,MAX_MEAS_ID); // ToDo: change with FreqId, currently is the componentCarrierId
726  // Serialize MeasResultServFreqList
727  std::bitset<2> measResultScellPresent;
728  measResultScellPresent[0] = measResults.measScellResultList.haveMeasurementResultsServingSCells;
729  measResultScellPresent[1] = measResults.measScellResultList.haveMeasurementResultsNeighCell; // Not implemented
730  SerializeSequence (measResultScellPresent,true);
731 
732  // Serialize measResult
733  std::bitset<2> measResultScellFieldsPresent;
734  measResultScellFieldsPresent[1] = it->haveRsrpResult;
735  measResultScellFieldsPresent[0] = it->haveRsrqResult;
736  SerializeSequence (measResultScellFieldsPresent,true);
737 
738  if (it->haveRsrpResult)
739  {
740  SerializeInteger (it->rsrpResult,0,97);
741  }
742 
743  if (it->haveRsrqResult)
744  {
745  SerializeInteger (it->rsrqResult,0,34);
746  }
747 
748  }
749  }
750 }
751 
752 void
754 {
755  // plmn-Identity sequence, mcc is optional, no extension marker
756  SerializeSequence (std::bitset<1> (0), false);
757 
758  // Serialize mnc
759  int nDig = (plmnId > 99) ? 3 : 2;
760 
761  SerializeSequenceOf (nDig,3,2);
762  for (int i = nDig - 1; i >= 0; i--)
763  {
764  int n = floor (plmnId / pow (10,i));
765  SerializeInteger (n,0,9);
766  plmnId -= n * pow (10,i);
767  }
768 
769  // cellReservedForOperatorUse
770  SerializeEnum (2,0);
771 }
772 
773 void
775 {
776  // rach-ConfigCommon
777  SerializeSequence (std::bitset<0> (0),true);
778 
779  // preambleInfo
780  SerializeSequence (std::bitset<1> (0),false);
781 
782  // numberOfRA-Preambles
783  switch (rachConfigCommon.preambleInfo.numberOfRaPreambles)
784  {
785  case 4:
786  SerializeEnum (16,0);
787  break;
788  case 8:
789  SerializeEnum (16,1);
790  break;
791  case 12:
792  SerializeEnum (16,2);
793  break;
794  case 16:
795  SerializeEnum (16,3);
796  break;
797  case 20:
798  SerializeEnum (16,4);
799  break;
800  case 24:
801  SerializeEnum (16,5);
802  break;
803  case 28:
804  SerializeEnum (16,6);
805  break;
806  case 32:
807  SerializeEnum (16,7);
808  break;
809  case 36:
810  SerializeEnum (16,8);
811  break;
812  case 40:
813  SerializeEnum (16,9);
814  break;
815  case 44:
816  SerializeEnum (16,10);
817  break;
818  case 48:
819  SerializeEnum (16,11);
820  break;
821  case 52:
822  SerializeEnum (16,12);
823  break;
824  case 56:
825  SerializeEnum (16,13);
826  break;
827  case 60:
828  SerializeEnum (16,14);
829  break;
830  case 64:
831  SerializeEnum (16,15);
832  break;
833  default:
834  SerializeEnum (16,0);
835  }
836 
837  SerializeSequence (std::bitset<0> (0),false); // powerRampingParameters
838  SerializeEnum (4,0); // powerRampingStep
839  SerializeEnum (16,0); // preambleInitialReceivedTargetPower
840  SerializeSequence (std::bitset<0> (0),false); // ra-SupervisionInfo
841 
842  // preambleTransMax
843  switch (rachConfigCommon.raSupervisionInfo.preambleTransMax)
844  {
845  case 3:
846  SerializeEnum (11,0);
847  break;
848  case 4:
849  SerializeEnum (11,1);
850  break;
851  case 5:
852  SerializeEnum (11,2);
853  break;
854  case 6:
855  SerializeEnum (11,3);
856  break;
857  case 7:
858  SerializeEnum (11,4);
859  break;
860  case 8:
861  SerializeEnum (11,5);
862  break;
863  case 10:
864  SerializeEnum (11,6);
865  break;
866  case 20:
867  SerializeEnum (11,7);
868  break;
869  case 50:
870  SerializeEnum (11,8);
871  break;
872  case 100:
873  SerializeEnum (11,9);
874  break;
875  case 200:
876  SerializeEnum (11,10);
877  break;
878  default:
879  SerializeEnum (11,0);
880  }
881 
882  // ra-ResponseWindowSize
883  switch (rachConfigCommon.raSupervisionInfo.raResponseWindowSize)
884  {
885  case 2:
886  SerializeEnum (8,0);
887  break;
888  case 3:
889  SerializeEnum (8,1);
890  break;
891  case 4:
892  SerializeEnum (8,2);
893  break;
894  case 5:
895  SerializeEnum (8,3);
896  break;
897  case 6:
898  SerializeEnum (8,4);
899  break;
900  case 7:
901  SerializeEnum (8,5);
902  break;
903  case 8:
904  SerializeEnum (8,6);
905  break;
906  case 10:
907  SerializeEnum (8,7);
908  break;
909  default:
910  SerializeEnum (8,0);
911  }
912 
913  SerializeEnum (8,0); // mac-ContentionResolutionTimer
914  SerializeInteger (1,1,8); // maxHARQ-Msg3Tx
915 }
916 
917 void
918 RrcAsn1Header::SerializeQoffsetRange (int8_t qOffsetRange) const
919 {
920  switch (qOffsetRange)
921  {
922  case -24:
923  SerializeEnum (31,0);
924  break;
925  case -22:
926  SerializeEnum (31,1);
927  break;
928  case -20:
929  SerializeEnum (31,2);
930  break;
931  case -18:
932  SerializeEnum (31,3);
933  break;
934  case -16:
935  SerializeEnum (31,4);
936  break;
937  case -14:
938  SerializeEnum (31,5);
939  break;
940  case -12:
941  SerializeEnum (31,6);
942  break;
943  case -10:
944  SerializeEnum (31,7);
945  break;
946  case -8:
947  SerializeEnum (31,8);
948  break;
949  case -6:
950  SerializeEnum (31,9);
951  break;
952  case -5:
953  SerializeEnum (31,10);
954  break;
955  case -4:
956  SerializeEnum (31,11);
957  break;
958  case -3:
959  SerializeEnum (31,12);
960  break;
961  case -2:
962  SerializeEnum (31,13);
963  break;
964  case -1:
965  SerializeEnum (31,14);
966  break;
967  case 0:
968  SerializeEnum (31,15);
969  break;
970  case 1:
971  SerializeEnum (31,16);
972  break;
973  case 2:
974  SerializeEnum (31,17);
975  break;
976  case 3:
977  SerializeEnum (31,18);
978  break;
979  case 4:
980  SerializeEnum (31,19);
981  break;
982  case 5:
983  SerializeEnum (31,20);
984  break;
985  case 6:
986  SerializeEnum (31,21);
987  break;
988  case 8:
989  SerializeEnum (31,22);
990  break;
991  case 10:
992  SerializeEnum (31,23);
993  break;
994  case 12:
995  SerializeEnum (31,24);
996  break;
997  case 14:
998  SerializeEnum (31,25);
999  break;
1000  case 16:
1001  SerializeEnum (31,26);
1002  break;
1003  case 18:
1004  SerializeEnum (31,27);
1005  break;
1006  case 20:
1007  SerializeEnum (31,28);
1008  break;
1009  case 22:
1010  SerializeEnum (31,29);
1011  break;
1012  case 24:
1013  SerializeEnum (31,30);
1014  break;
1015  default:
1016  SerializeEnum (31,15);
1017  }
1018 }
1019 
1020 void
1022 {
1023  switch (thresholdEutra.choice)
1024  {
1026  SerializeChoice (2,0,false);
1027  SerializeInteger (thresholdEutra.range, 0, 97);
1028  break;
1030  default:
1031  SerializeChoice (2,1,false);
1032  SerializeInteger (thresholdEutra.range, 0, 34);
1033  }
1034 }
1035 
1036 void
1038 {
1039  // Serialize MeasConfig sequence
1040  // 11 optional fields, extension marker present
1041  std::bitset<11> measConfigOptional;
1042  measConfigOptional.set (10, !measConfig.measObjectToRemoveList.empty () );
1043  measConfigOptional.set (9, !measConfig.measObjectToAddModList.empty () );
1044  measConfigOptional.set (8, !measConfig.reportConfigToRemoveList.empty () );
1045  measConfigOptional.set (7, !measConfig.reportConfigToAddModList.empty () );
1046  measConfigOptional.set (6, !measConfig.measIdToRemoveList.empty () );
1047  measConfigOptional.set (5, !measConfig.measIdToAddModList.empty () );
1048  measConfigOptional.set (4, measConfig.haveQuantityConfig );
1049  measConfigOptional.set (3, measConfig.haveMeasGapConfig );
1050  measConfigOptional.set (2, measConfig.haveSmeasure );
1051  measConfigOptional.set (1, false ); // preRegistrationInfoHRPD
1052  measConfigOptional.set (0, measConfig.haveSpeedStatePars );
1053  SerializeSequence (measConfigOptional,true);
1054 
1055  if (!measConfig.measObjectToRemoveList.empty ())
1056  {
1058  for (std::list<uint8_t>::iterator it = measConfig.measObjectToRemoveList.begin (); it != measConfig.measObjectToRemoveList.end (); it++)
1059  {
1060  SerializeInteger (*it, 1, MAX_OBJECT_ID);
1061  }
1062  }
1063 
1064  if (!measConfig.measObjectToAddModList.empty ())
1065  {
1067  for (std::list<LteRrcSap::MeasObjectToAddMod>::iterator it = measConfig.measObjectToAddModList.begin (); it != measConfig.measObjectToAddModList.end (); it++)
1068  {
1069  SerializeSequence (std::bitset<0> (), false);
1070  SerializeInteger (it->measObjectId, 1, MAX_OBJECT_ID);
1071  SerializeChoice (4, 0, true); // Select MeasObjectEUTRA
1072 
1073  // Serialize measObjectEutra
1074  std::bitset<5> measObjOpts;
1075  measObjOpts.set (4,!it->measObjectEutra.cellsToRemoveList.empty () );
1076  measObjOpts.set (3,!it->measObjectEutra.cellsToAddModList.empty () );
1077  measObjOpts.set (2,!it->measObjectEutra.blackCellsToRemoveList.empty () );
1078  measObjOpts.set (1,!it->measObjectEutra.blackCellsToAddModList.empty () );
1079  measObjOpts.set (0,it->measObjectEutra.haveCellForWhichToReportCGI);
1080  SerializeSequence (measObjOpts, true);
1081 
1082  // Serialize carrierFreq
1083  SerializeInteger (it->measObjectEutra.carrierFreq, 0, MAX_EARFCN);
1084 
1085  // Serialize allowedMeasBandwidth
1086  switch (it->measObjectEutra.allowedMeasBandwidth)
1087  {
1088  case 6:
1089  SerializeEnum (6,0);
1090  break;
1091  case 15:
1092  SerializeEnum (6,1);
1093  break;
1094  case 25:
1095  SerializeEnum (6,2);
1096  break;
1097  case 50:
1098  SerializeEnum (6,3);
1099  break;
1100  case 75:
1101  SerializeEnum (6,4);
1102  break;
1103  case 100:
1104  SerializeEnum (6,5);
1105  break;
1106  default:
1107  SerializeEnum (6,0);
1108  }
1109 
1110  SerializeBoolean (it->measObjectEutra.presenceAntennaPort1);
1111  SerializeBitstring (std::bitset<2> (it->measObjectEutra.neighCellConfig));
1112  SerializeQoffsetRange (it->measObjectEutra.offsetFreq);
1113 
1114  if (!it->measObjectEutra.cellsToRemoveList.empty ())
1115  {
1116  SerializeSequenceOf (it->measObjectEutra.cellsToRemoveList.size (),MAX_CELL_MEAS,1);
1117  for (std::list<uint8_t>::iterator it2 = it->measObjectEutra.cellsToRemoveList.begin (); it2 != it->measObjectEutra.cellsToRemoveList.end (); it2++)
1118  {
1119  SerializeInteger (*it2, 1, MAX_CELL_MEAS);
1120  }
1121  }
1122 
1123  if (!it->measObjectEutra.cellsToAddModList.empty ())
1124  {
1125  SerializeSequenceOf (it->measObjectEutra.cellsToAddModList.size (), MAX_CELL_MEAS, 1);
1126  for (std::list<LteRrcSap::CellsToAddMod>::iterator it2 = it->measObjectEutra.cellsToAddModList.begin (); it2 != it->measObjectEutra.cellsToAddModList.end (); it2++)
1127  {
1128  SerializeSequence (std::bitset<0> (), false);
1129 
1130  // Serialize cellIndex
1131  SerializeInteger (it2->cellIndex, 1, MAX_CELL_MEAS);
1132 
1133  // Serialize PhysCellId
1134  SerializeInteger (it2->physCellId,0,503);
1135 
1136  // Serialize cellIndividualOffset
1137  SerializeQoffsetRange (it2->cellIndividualOffset);
1138  }
1139  }
1140 
1141  if (!it->measObjectEutra.blackCellsToRemoveList.empty () )
1142  {
1143  SerializeSequenceOf (it->measObjectEutra.blackCellsToRemoveList.size (),MAX_CELL_MEAS,1);
1144  for (std::list<uint8_t>::iterator it2 = it->measObjectEutra.blackCellsToRemoveList.begin (); it2 != it->measObjectEutra.blackCellsToRemoveList.end (); it2++)
1145  {
1146  SerializeInteger (*it2, 1, MAX_CELL_MEAS);
1147  }
1148  }
1149 
1150  if (!it->measObjectEutra.blackCellsToAddModList.empty () )
1151  {
1152  SerializeSequenceOf (it->measObjectEutra.blackCellsToAddModList.size (), MAX_CELL_MEAS, 1);
1153  for (std::list<LteRrcSap::BlackCellsToAddMod>::iterator it2 = it->measObjectEutra.blackCellsToAddModList.begin (); it2 != it->measObjectEutra.blackCellsToAddModList.end (); it2++)
1154  {
1155  SerializeSequence (std::bitset<0> (),false);
1156  SerializeInteger (it2->cellIndex, 1, MAX_CELL_MEAS);
1157 
1158  // Serialize PhysCellIdRange
1159  // range optional
1160  std::bitset<1> rangePresent = std::bitset<1> (it2->physCellIdRange.haveRange);
1161  SerializeSequence (rangePresent,false);
1162  SerializeInteger (it2->physCellIdRange.start,0,503);
1163  if (it2->physCellIdRange.haveRange)
1164  {
1165  switch (it2->physCellIdRange.range)
1166  {
1167  case 4:
1168  SerializeEnum (16, 0);
1169  break;
1170  case 8:
1171  SerializeEnum (16, 1);
1172  break;
1173  case 12:
1174  SerializeEnum (16, 2);
1175  break;
1176  case 16:
1177  SerializeEnum (16, 3);
1178  break;
1179  case 24:
1180  SerializeEnum (16, 4);
1181  break;
1182  case 32:
1183  SerializeEnum (16, 5);
1184  break;
1185  case 48:
1186  SerializeEnum (16, 6);
1187  break;
1188  case 64:
1189  SerializeEnum (16, 7);
1190  break;
1191  case 84:
1192  SerializeEnum (16, 8);
1193  break;
1194  case 96:
1195  SerializeEnum (16, 9);
1196  break;
1197  case 128:
1198  SerializeEnum (16, 10);
1199  break;
1200  case 168:
1201  SerializeEnum (16, 11);
1202  break;
1203  case 252:
1204  SerializeEnum (16, 12);
1205  break;
1206  case 504:
1207  SerializeEnum (16, 13);
1208  break;
1209  default:
1210  SerializeEnum (16, 0);
1211  }
1212  }
1213  }
1214 
1215  }
1216 
1217  if (it->measObjectEutra.haveCellForWhichToReportCGI)
1218  {
1219  SerializeInteger (it->measObjectEutra.cellForWhichToReportCGI,0,503);
1220  }
1221  }
1222  }
1223 
1224 
1225  if (!measConfig.reportConfigToRemoveList.empty () )
1226  {
1228  for (std::list<uint8_t>::iterator it = measConfig.reportConfigToRemoveList.begin (); it != measConfig.reportConfigToRemoveList.end (); it++)
1229  {
1231  }
1232  }
1233 
1234  if (!measConfig.reportConfigToAddModList.empty () )
1235  {
1237  for (std::list<LteRrcSap::ReportConfigToAddMod>::iterator it = measConfig.reportConfigToAddModList.begin (); it != measConfig.reportConfigToAddModList.end (); it++)
1238  {
1239  SerializeSequence (std::bitset<0> (), false);
1240  SerializeInteger (it->reportConfigId,1,MAX_REPORT_CONFIG_ID);
1241  SerializeChoice (2,0,false); // reportConfigEUTRA
1242 
1243  // Serialize ReportConfigEUTRA
1244  SerializeSequence (std::bitset<0> (), true);
1245  switch (it->reportConfigEutra.triggerType)
1246  {
1248  SerializeChoice (2, 1, false);
1249  SerializeSequence (std::bitset<0> (),false);
1250  switch (it->reportConfigEutra.purpose)
1251  {
1253  SerializeEnum (2,1);
1254  break;
1256  default:
1257  SerializeEnum (2,0);
1258  }
1259  break;
1261  default:
1262  SerializeChoice (2, 0, false);
1263  SerializeSequence (std::bitset<0> (),false);
1264  switch (it->reportConfigEutra.eventId)
1265  {
1267  SerializeChoice (5, 0, true);
1268  SerializeSequence (std::bitset<0> (),false);
1269  SerializeThresholdEutra (it->reportConfigEutra.threshold1);
1270  break;
1272  SerializeChoice (5, 1, true);
1273  SerializeSequence (std::bitset<0> (),false);
1274  SerializeThresholdEutra (it->reportConfigEutra.threshold1);
1275  break;
1277  SerializeChoice (5, 2, true);
1278  SerializeSequence (std::bitset<0> (),false);
1279  SerializeInteger (it->reportConfigEutra.a3Offset,-30,30);
1280  SerializeBoolean (it->reportConfigEutra.reportOnLeave);
1281  break;
1283  SerializeChoice (5, 3, true);
1284  SerializeSequence (std::bitset<0> (),false);
1285  SerializeThresholdEutra (it->reportConfigEutra.threshold1);
1286  break;
1288  default:
1289  SerializeChoice (5, 4, true);
1290  SerializeSequence (std::bitset<0> (),false);
1291  SerializeThresholdEutra (it->reportConfigEutra.threshold1);
1292  SerializeThresholdEutra (it->reportConfigEutra.threshold2);
1293  }
1294 
1295  SerializeInteger (it->reportConfigEutra.hysteresis, 0, 30);
1296 
1297  switch (it->reportConfigEutra.timeToTrigger)
1298  {
1299  case 0:
1300  SerializeEnum (16, 0);
1301  break;
1302  case 40:
1303  SerializeEnum (16, 1);
1304  break;
1305  case 64:
1306  SerializeEnum (16, 2);
1307  break;
1308  case 80:
1309  SerializeEnum (16, 3);
1310  break;
1311  case 100:
1312  SerializeEnum (16, 4);
1313  break;
1314  case 128:
1315  SerializeEnum (16, 5);
1316  break;
1317  case 160:
1318  SerializeEnum (16, 6);
1319  break;
1320  case 256:
1321  SerializeEnum (16, 7);
1322  break;
1323  case 320:
1324  SerializeEnum (16, 8);
1325  break;
1326  case 480:
1327  SerializeEnum (16, 9);
1328  break;
1329  case 512:
1330  SerializeEnum (16, 10);
1331  break;
1332  case 640:
1333  SerializeEnum (16, 11);
1334  break;
1335  case 1024:
1336  SerializeEnum (16, 12);
1337  break;
1338  case 1280:
1339  SerializeEnum (16, 13);
1340  break;
1341  case 2560:
1342  SerializeEnum (16, 14);
1343  break;
1344  case 5120:
1345  default:
1346  SerializeEnum (16, 15);
1347  }
1348  } // end trigger type
1349 
1350  // Serialize triggerQuantity
1351  if (it->reportConfigEutra.triggerQuantity == LteRrcSap::ReportConfigEutra::RSRP)
1352  {
1353  SerializeEnum (2, 0);
1354  }
1355  else
1356  {
1357  SerializeEnum (2, 1);
1358  }
1359 
1360  // Serialize reportQuantity
1361  if (it->reportConfigEutra.reportQuantity == LteRrcSap::ReportConfigEutra::SAME_AS_TRIGGER_QUANTITY)
1362  {
1363  SerializeEnum (2, 0);
1364  }
1365  else
1366  {
1367  SerializeEnum (2, 1);
1368  }
1369 
1370  // Serialize maxReportCells
1371  SerializeInteger (it->reportConfigEutra.maxReportCells, 1, MAX_CELL_REPORT);
1372 
1373  // Serialize reportInterval
1374  switch (it->reportConfigEutra.reportInterval)
1375  {
1377  SerializeEnum (16, 0);
1378  break;
1380  SerializeEnum (16, 1);
1381  break;
1383  SerializeEnum (16, 2);
1384  break;
1386  SerializeEnum (16, 3);
1387  break;
1389  SerializeEnum (16, 4);
1390  break;
1392  SerializeEnum (16, 5);
1393  break;
1395  SerializeEnum (16, 6);
1396  break;
1398  SerializeEnum (16, 7);
1399  break;
1401  SerializeEnum (16, 8);
1402  break;
1404  SerializeEnum (16, 9);
1405  break;
1407  SerializeEnum (16, 10);
1408  break;
1410  SerializeEnum (16, 11);
1411  break;
1413  SerializeEnum (16, 12);
1414  break;
1416  SerializeEnum (16, 13);
1417  break;
1419  SerializeEnum (16, 14);
1420  break;
1422  default:
1423  SerializeEnum (16, 15);
1424  }
1425 
1426  // Serialize reportAmount
1427  switch (it->reportConfigEutra.reportAmount)
1428  {
1429  case 1:
1430  SerializeEnum (8, 0);
1431  break;
1432  case 2:
1433  SerializeEnum (8, 1);
1434  break;
1435  case 4:
1436  SerializeEnum (8, 2);
1437  break;
1438  case 8:
1439  SerializeEnum (8, 3);
1440  break;
1441  case 16:
1442  SerializeEnum (8, 4);
1443  break;
1444  case 32:
1445  SerializeEnum (8, 5);
1446  break;
1447  case 64:
1448  SerializeEnum (8, 6);
1449  break;
1450  default:
1451  SerializeEnum (8, 7);
1452  }
1453  }
1454  }
1455 
1456  if (!measConfig.measIdToRemoveList.empty () )
1457  {
1458  SerializeSequenceOf (measConfig.measIdToRemoveList.size (), MAX_MEAS_ID, 1);
1459  for (std::list<uint8_t>::iterator it = measConfig.measIdToRemoveList.begin (); it != measConfig.measIdToRemoveList.end (); it++)
1460  {
1461  SerializeInteger (*it, 1, MAX_MEAS_ID);
1462  }
1463  }
1464 
1465  if (!measConfig.measIdToAddModList.empty () )
1466  {
1467  SerializeSequenceOf ( measConfig.measIdToAddModList.size (), MAX_MEAS_ID, 1);
1468  for (std::list<LteRrcSap::MeasIdToAddMod>::iterator it = measConfig.measIdToAddModList.begin (); it != measConfig.measIdToAddModList.end (); it++)
1469  {
1470  SerializeInteger (it->measId, 1, MAX_MEAS_ID);
1471  SerializeInteger (it->measObjectId, 1, MAX_OBJECT_ID);
1472  SerializeInteger (it->reportConfigId, 1, MAX_REPORT_CONFIG_ID);
1473  }
1474  }
1475 
1476  if (measConfig.haveQuantityConfig )
1477  {
1478  // QuantityConfig sequence
1479  // 4 optional fields, only first (EUTRA) present. Extension marker yes.
1480  std::bitset<4> quantityConfigOpts (0);
1481  quantityConfigOpts.set (3,1);
1482  SerializeSequence (quantityConfigOpts, true);
1483  SerializeSequence (std::bitset<0> (), false);
1484 
1485  switch (measConfig.quantityConfig.filterCoefficientRSRP)
1486  {
1487  case 0:
1488  SerializeEnum (16, 0);
1489  break;
1490  case 1:
1491  SerializeEnum (16, 1);
1492  break;
1493  case 2:
1494  SerializeEnum (16, 2);
1495  break;
1496  case 3:
1497  SerializeEnum (16, 3);
1498  break;
1499  case 4:
1500  SerializeEnum (16, 4);
1501  break;
1502  case 5:
1503  SerializeEnum (16, 5);
1504  break;
1505  case 6:
1506  SerializeEnum (16, 6);
1507  break;
1508  case 7:
1509  SerializeEnum (16, 7);
1510  break;
1511  case 8:
1512  SerializeEnum (16, 8);
1513  break;
1514  case 9:
1515  SerializeEnum (16, 9);
1516  break;
1517  case 11:
1518  SerializeEnum (16, 10);
1519  break;
1520  case 13:
1521  SerializeEnum (16, 11);
1522  break;
1523  case 15:
1524  SerializeEnum (16, 12);
1525  break;
1526  case 17:
1527  SerializeEnum (16, 13);
1528  break;
1529  case 19:
1530  SerializeEnum (16, 14);
1531  break;
1532  default:
1533  SerializeEnum (16, 4);
1534  }
1535 
1536  switch (measConfig.quantityConfig.filterCoefficientRSRQ)
1537  {
1538  case 0:
1539  SerializeEnum (16, 0);
1540  break;
1541  case 1:
1542  SerializeEnum (16, 1);
1543  break;
1544  case 2:
1545  SerializeEnum (16, 2);
1546  break;
1547  case 3:
1548  SerializeEnum (16, 3);
1549  break;
1550  case 4:
1551  SerializeEnum (16, 4);
1552  break;
1553  case 5:
1554  SerializeEnum (16, 5);
1555  break;
1556  case 6:
1557  SerializeEnum (16, 6);
1558  break;
1559  case 7:
1560  SerializeEnum (16, 7);
1561  break;
1562  case 8:
1563  SerializeEnum (16, 8);
1564  break;
1565  case 9:
1566  SerializeEnum (16, 9);
1567  break;
1568  case 11:
1569  SerializeEnum (16, 10);
1570  break;
1571  case 13:
1572  SerializeEnum (16, 11);
1573  break;
1574  case 15:
1575  SerializeEnum (16, 12);
1576  break;
1577  case 17:
1578  SerializeEnum (16, 13);
1579  break;
1580  case 19:
1581  SerializeEnum (16, 14);
1582  break;
1583  default:
1584  SerializeEnum (16, 4);
1585  }
1586  }
1587 
1588  if (measConfig.haveMeasGapConfig )
1589  {
1590  switch (measConfig.measGapConfig.type)
1591  {
1593  SerializeChoice (2, 0, false);
1594  SerializeNull ();
1595  break;
1597  default:
1598  SerializeChoice (2, 1, false);
1599  SerializeSequence (std::bitset<0> (),false);
1600  switch (measConfig.measGapConfig.gapOffsetChoice)
1601  {
1603  SerializeChoice (2, 0, true);
1604  SerializeInteger (measConfig.measGapConfig.gapOffsetValue, 0, 39);
1605  break;
1607  default:
1608  SerializeChoice (2, 1, true);
1609  SerializeInteger (measConfig.measGapConfig.gapOffsetValue, 0, 79);
1610  }
1611  }
1612  }
1613 
1614  if (measConfig.haveSmeasure )
1615  {
1616  SerializeInteger (measConfig.sMeasure, 0, 97);
1617  }
1618 
1619  // ...Here preRegistrationInfoHRPD would be serialized
1620 
1621  if (measConfig.haveSpeedStatePars )
1622  {
1623  switch (measConfig.speedStatePars.type)
1624  {
1626  SerializeChoice (2, 0, false);
1627  SerializeNull ();
1628  break;
1630  default:
1631  SerializeChoice (2, 1, false);
1632  SerializeSequence (std::bitset<0> (), false);
1634  {
1635  case 30:
1636  SerializeEnum (8, 0);
1637  break;
1638  case 60:
1639  SerializeEnum (8, 1);
1640  break;
1641  case 120:
1642  SerializeEnum (8, 2);
1643  break;
1644  case 180:
1645  SerializeEnum (8, 3);
1646  break;
1647  case 240:
1648  SerializeEnum (8, 4);
1649  break;
1650  default:
1651  SerializeEnum (8, 5);
1652  break;
1653  }
1654 
1656  {
1657  case 30:
1658  SerializeEnum (8, 0);
1659  break;
1660  case 60:
1661  SerializeEnum (8, 1);
1662  break;
1663  case 120:
1664  SerializeEnum (8, 2);
1665  break;
1666  case 180:
1667  SerializeEnum (8, 3);
1668  break;
1669  case 240:
1670  SerializeEnum (8, 4);
1671  break;
1672  default:
1673  SerializeEnum (8, 5);
1674  break;
1675  }
1676 
1679 
1680  SerializeSequence (std::bitset<0> (), false);
1681  switch (measConfig.speedStatePars.timeToTriggerSf.sfMedium)
1682  {
1683  case 25:
1684  SerializeEnum (4, 0);
1685  break;
1686  case 50:
1687  SerializeEnum (4, 1);
1688  break;
1689  case 75:
1690  SerializeEnum (4, 2);
1691  break;
1692  case 100:
1693  default:
1694  SerializeEnum (4, 3);
1695  }
1696 
1697  switch (measConfig.speedStatePars.timeToTriggerSf.sfHigh)
1698  {
1699  case 25:
1700  SerializeEnum (4, 0);
1701  break;
1702  case 50:
1703  SerializeEnum (4, 1);
1704  break;
1705  case 75:
1706  SerializeEnum (4, 2);
1707  break;
1708  case 100:
1709  default:
1710  SerializeEnum (4, 3);
1711  }
1712  }
1713  }
1714 }
1715  void
1717  {
1718  // 3 optional fields. Extension marker not present.
1719  std::bitset<3> noncriticalExtension_v1020;
1720  noncriticalExtension_v1020.set (2,0); // No sCellToRealeaseList-r10
1721  noncriticalExtension_v1020.set (1,1); // sCellToAddModList-r10
1722  noncriticalExtension_v1020.set (0,0); // No nonCriticalExtension RRCConnectionReconfiguration-v1130-IEs
1723  SerializeSequence (noncriticalExtension_v1020,false);
1724  if (!nonCriticalExtension.sCellsToAddModList.empty ())
1725  {
1726  SerializeSequenceOf (nonCriticalExtension.sCellsToAddModList.size (),MAX_OBJECT_ID,1);
1727  for (std::list<LteRrcSap::SCellToAddMod>::iterator it = nonCriticalExtension.sCellsToAddModList.begin (); it != nonCriticalExtension.sCellsToAddModList.end (); it++)
1728  {
1729  std::bitset<4> sCellToAddMod_r10;
1730  sCellToAddMod_r10.set (3,1); // sCellIndex
1731  sCellToAddMod_r10.set (2,1); // CellIdentification
1732  sCellToAddMod_r10.set (1,1); // RadioResourceConfigCommonSCell
1733  sCellToAddMod_r10.set (0,it->haveRadioResourceConfigDedicatedSCell); // No nonCriticalExtension RRC
1734  SerializeSequence (sCellToAddMod_r10, false);
1735  SerializeInteger (it->sCellIndex,1,MAX_OBJECT_ID); //sCellIndex
1736 
1737  // Serialize CellIdentification
1738  std::bitset<2> cellIdentification_r10;
1739  cellIdentification_r10.set(1,1); // phyCellId-r10
1740  cellIdentification_r10.set(0,1); // dl-CarrierFreq-r10
1741  SerializeSequence (cellIdentification_r10, false);
1742 
1743  SerializeInteger (it->cellIdentification.physCellId,1,65536);
1744  SerializeInteger (it->cellIdentification.dlCarrierFreq,1,MAX_EARFCN);
1745 
1746  //Serialize RadioResourceConfigCommonSCell
1747  SerializeRadioResourceConfigCommonSCell (it->radioResourceConfigCommonSCell);
1748 
1749  if (it->haveRadioResourceConfigDedicatedSCell)
1750  {
1751  //Serialize RadioResourceConfigDedicatedSCell
1752  SerializeRadioResourceDedicatedSCell (it->radioResourceConfigDedicateSCell);
1753  }
1754 
1755  }
1756  }
1757  else
1758  {
1759  // NS_ASSERT_MSG ( this << "NonCriticalExtension.sCellsToAddModList cannot be empty ", false);
1760  }
1761 
1762  }
1763  void
1765  {
1766  // 2 optional fields. Extension marker not present.
1767  std::bitset<2> radioResourceConfigCommonSCell_r10;
1768  radioResourceConfigCommonSCell_r10.set (1,rrccsc.haveNonUlConfiguration); // NonUlConfiguration
1769  radioResourceConfigCommonSCell_r10.set (0,rrccsc.haveUlConfiguration); // UlConfiguration
1770  SerializeSequence (radioResourceConfigCommonSCell_r10,false);
1771 
1772  if (rrccsc.haveNonUlConfiguration)
1773  {
1774  // 5 optional fields. Extension marker not present.
1775  std::bitset<5> nonUlConfiguration_r10;
1776  nonUlConfiguration_r10.set (4,1); // Dl- bandwidth --> convert in enum
1777  nonUlConfiguration_r10.set (3,1); // AntennaInfoCommon-r10
1778  nonUlConfiguration_r10.set (2,0); // phich-Config-r10 Not Implemented
1779  nonUlConfiguration_r10.set (1,1); // pdschConfigCommon
1780  nonUlConfiguration_r10.set (0,0); // Tdd-Config-r10 Not Implemented
1781  SerializeSequence (nonUlConfiguration_r10,false);
1782 
1784 
1785  std::bitset<1> antennaInfoCommon_r10;
1786  antennaInfoCommon_r10.set (0,1);
1787  SerializeSequence (antennaInfoCommon_r10,false);
1789 
1790  std::bitset<2> pdschConfigCommon_r10;
1791  pdschConfigCommon_r10.set (1,1);
1792  pdschConfigCommon_r10.set (0,1);
1793  SerializeSequence (pdschConfigCommon_r10,false);
1794 
1797 
1798  }
1799  if (rrccsc.haveUlConfiguration)
1800  {
1801  //Serialize Ul Configuration
1802  // 7 optional fields. Extension marker present.
1803  std::bitset<7> UlConfiguration_r10;
1804  UlConfiguration_r10.set (6,1); // ul-Configuration-r10
1805  UlConfiguration_r10.set (5,0); // p-Max-r10 Not Implemented
1806  UlConfiguration_r10.set (4,1); // uplinkPowerControlCommonSCell-r10
1807  UlConfiguration_r10.set (3,0); // soundingRS-UL-ConfigCommon-r10
1808  UlConfiguration_r10.set (2,0); // ul-CyclicPrefixLength-r10
1809  UlConfiguration_r10.set (1,1); // prach-ConfigSCell-r10
1810  UlConfiguration_r10.set (0,0); // pusch-ConfigCommon-r10 Not Implemented
1811  SerializeSequence (UlConfiguration_r10,true);
1812 
1813  //Serialize ulFreqInfo
1814  std::bitset<3> FreqInfo_r10;
1815  FreqInfo_r10.set (2,1); // ulCarrierFreq
1816  FreqInfo_r10.set (1,1); // UlBandwidth
1817  FreqInfo_r10.set (0,0); // additionalSpectrumEmissionSCell-r10 Not Implemented
1818  SerializeSequence (FreqInfo_r10,false);
1819 
1822 
1823  //Serialize UlPowerControllCommonSCell
1824  std::bitset<2> UlPowerControlCommonSCell_r10;
1825  UlPowerControlCommonSCell_r10.set (1,0); // p0-NominalPUSCH-r10 Not Implemented
1826  UlPowerControlCommonSCell_r10.set (0,1); // alpha
1827  SerializeSequence (UlPowerControlCommonSCell_r10,false);
1828 
1830 
1831  //Serialize soundingRs-UlConfigCommon
1832  //Not Implemented
1833 
1834  //Serialize PrachConfigSCell
1835  std::bitset<1> prachConfigSCell_r10;
1836  prachConfigSCell_r10.set(0,1);
1837  SerializeSequence(prachConfigSCell_r10,false);
1839  }
1840 
1841 
1842  }
1843  void
1845  {
1846  //Serialize RadioResourceConfigDedicatedSCell
1847  std::bitset<1> RadioResourceConfigDedicatedSCell_r10;
1848  RadioResourceConfigDedicatedSCell_r10.set (0,1);
1849  SerializeSequence (RadioResourceConfigDedicatedSCell_r10,false);
1850 
1853  }
1854 
1855  void
1857  {
1858  std::bitset<2> pcdscOpt;
1859  pcdscOpt.set (1,pcdsc.haveNonUlConfiguration);
1860  pcdscOpt.set (0,pcdsc.haveUlConfiguration);
1861  SerializeSequence (pcdscOpt, true);
1862 
1863  if (pcdsc.haveNonUlConfiguration)
1864  {
1865  //Serialize NonUl configuration
1866  std::bitset<4> nulOpt;
1867  nulOpt.set (3,pcdsc.haveAntennaInfoDedicated);
1868  nulOpt.set (2,0); // crossCarrierSchedulingConfig-r10 Not Implemented
1869  nulOpt.set (1,0); // csi-RS-Config-r10 Not Implemented
1870  nulOpt.set (0, pcdsc.havePdschConfigDedicated); // pdsch-ConfigDedicated-r10
1871  SerializeSequence (nulOpt,false);
1872 
1873  if (pcdsc.haveAntennaInfoDedicated)
1874  {
1875  // Serialize antennaInfo choice
1876  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
1877  SerializeChoice (2,0,false);
1878 
1879  // Serialize AntennaInfoDedicated sequence
1880  // 1 optional parameter, not present. No extension marker.
1881  SerializeSequence (std::bitset<1> (0),false);
1882 
1883  // Serialize transmissionMode
1884  // Assuming the value in the struct is the enum index
1886 
1887  // Serialize ue-TransmitAntennaSelection choice
1888  SerializeChoice (2,0,false);
1889 
1890  // Serialize release
1891  SerializeNull ();
1892  }
1893  if (pcdsc.havePdschConfigDedicated)
1894  {
1895  // Serialize Pdsch-ConfigDedicated Sequence:
1896  // 0 optional / default fields, no extension marker.
1897  SerializeSequence (std::bitset<0> (),false);
1898 
1899  // Serialize p-a
1900  // Assuming the value in the struct is the enum index
1902 
1903  // Serialize release
1904  SerializeNull ();
1905  }
1906 
1907 
1908  }
1909  if (pcdsc.haveUlConfiguration)
1910  {
1911  //Serialize Ul Configuration
1912  std::bitset<7> ulOpt;
1913  ulOpt.set (6, pcdsc.haveAntennaInfoUlDedicated);// antennaInfoUL-r10
1914  ulOpt.set (5,0); // pusch-ConfigDedicatedSCell-r10 not present
1915  ulOpt.set (4,0); // uplinkPowerControlDedicatedSCell-r10 not present
1916  ulOpt.set (3,0); // cqi-ReportConfigSCell-r10 not present
1917  ulOpt.set (2,pcdsc.haveSoundingRsUlConfigDedicated);// soundingRS-UL-ConfigDedicated-r10
1918  ulOpt.set (1,0); // soundingRS-UL-ConfigDedicated-v1020 not present
1919  ulOpt.set (0,0); // soundingRS-UL-ConfigDedicatedAperiodic-r10 not present
1920  SerializeSequence (ulOpt,false);
1921 
1922  if (pcdsc.haveAntennaInfoUlDedicated)
1923  {
1924  // Serialize antennaInfo choice
1925  // 2 options. Selected: 0 ("explicitValue" of type "AntennaInfoDedicated")
1926  SerializeChoice (2,0,false);
1927 
1928  // Serialize AntennaInfoDedicated sequence
1929  // 1 optional parameter, not present. No extension marker.
1930  SerializeSequence (std::bitset<1> (0),false);
1931 
1932  // Serialize transmissionMode
1933  // Assuming the value in the struct is the enum index
1935 
1936  // Serialize ue-TransmitAntennaSelection choice
1937  SerializeChoice (2,0,false);
1938 
1939  // Serialize release
1940  SerializeNull ();
1941  }
1943  {
1944  // Serialize SoundingRS-UL-ConfigDedicated choice:
1945  switch (pcdsc.soundingRsUlConfigDedicated.type)
1946  {
1948  SerializeChoice (2,0,false);
1949  SerializeNull ();
1950  break;
1951 
1953  default:
1954  // 2 options, selected: 1 (setup)
1955  SerializeChoice (2,1,false);
1956 
1957  // Serialize setup sequence
1958  // 0 optional / default fields, no extension marker.
1959  SerializeSequence (std::bitset<0> (),false);
1960 
1961  // Serialize srs-Bandwidth
1963 
1964  // Serialize srs-HoppingBandwidth
1965  SerializeEnum (4,0);
1966 
1967  // Serialize freqDomainPosition
1968  SerializeInteger (0,0,23);
1969 
1970  // Serialize duration
1971  SerializeBoolean (false);
1972 
1973  // Serialize srs-ConfigIndex
1975 
1976  // Serialize transmissionComb
1977  SerializeInteger (0,0,1);
1978 
1979  // Serialize cyclicShift
1980  SerializeEnum (8,0);
1981 
1982  break;
1983  }
1984 
1985  }
1986 
1987 
1988  }
1989  }
1990 
1993 {
1994  int thresholdEutraChoice, range;
1995  bIterator = DeserializeChoice (2, false, &thresholdEutraChoice, bIterator);
1996 
1997  switch (thresholdEutraChoice)
1998  {
1999  case 0:
2001  bIterator = DeserializeInteger (&range, 0, 97, bIterator);
2002  thresholdEutra->range = range;
2003  break;
2004  case 1:
2005  default:
2007  bIterator = DeserializeInteger (&range, 0, 34, bIterator);
2008  thresholdEutra->range = range;
2009  }
2010 
2011  return bIterator;
2012 }
2013 
2016 {
2017  int n;
2018  bIterator = DeserializeEnum (31, &n, bIterator);
2019  switch (n)
2020  {
2021  case 0:
2022  *qOffsetRange = -24;
2023  break;
2024  case 1:
2025  *qOffsetRange = -22;
2026  break;
2027  case 2:
2028  *qOffsetRange = -20;
2029  break;
2030  case 3:
2031  *qOffsetRange = -18;
2032  break;
2033  case 4:
2034  *qOffsetRange = -16;
2035  break;
2036  case 5:
2037  *qOffsetRange = -14;
2038  break;
2039  case 6:
2040  *qOffsetRange = -12;
2041  break;
2042  case 7:
2043  *qOffsetRange = -10;
2044  break;
2045  case 8:
2046  *qOffsetRange = -8;
2047  break;
2048  case 9:
2049  *qOffsetRange = -6;
2050  break;
2051  case 10:
2052  *qOffsetRange = -5;
2053  break;
2054  case 11:
2055  *qOffsetRange = -4;
2056  break;
2057  case 12:
2058  *qOffsetRange = -3;
2059  break;
2060  case 13:
2061  *qOffsetRange = -2;
2062  break;
2063  case 14:
2064  *qOffsetRange = -1;
2065  break;
2066  case 15:
2067  *qOffsetRange = 0;
2068  break;
2069  case 16:
2070  *qOffsetRange = 1;
2071  break;
2072  case 17:
2073  *qOffsetRange = 2;
2074  break;
2075  case 18:
2076  *qOffsetRange = 3;
2077  break;
2078  case 19:
2079  *qOffsetRange = 4;
2080  break;
2081  case 20:
2082  *qOffsetRange = 5;
2083  break;
2084  case 21:
2085  *qOffsetRange = 6;
2086  break;
2087  case 22:
2088  *qOffsetRange = 8;
2089  break;
2090  case 23:
2091  *qOffsetRange = 10;
2092  break;
2093  case 24:
2094  *qOffsetRange = 12;
2095  break;
2096  case 25:
2097  *qOffsetRange = 14;
2098  break;
2099  case 26:
2100  *qOffsetRange = 16;
2101  break;
2102  case 27:
2103  *qOffsetRange = 18;
2104  break;
2105  case 28:
2106  *qOffsetRange = 20;
2107  break;
2108  case 29:
2109  *qOffsetRange = 22;
2110  break;
2111  case 30:
2112  default:
2113  *qOffsetRange = 24;
2114  }
2115  return bIterator;
2116 }
2117 
2120 {
2121  // Deserialize RadioResourceConfigDedicated sequence
2122  std::bitset<6> optionalFieldsPresent = std::bitset<6> ();
2123  bIterator = DeserializeSequence (&optionalFieldsPresent,true,bIterator);
2124 
2125  if (optionalFieldsPresent[5])
2126  {
2127  // Deserialize srb-ToAddModList
2128  bIterator = DeserializeSrbToAddModList (&(radioResourceConfigDedicated->srbToAddModList),bIterator);
2129  }
2130 
2131  if (optionalFieldsPresent[4])
2132  {
2133  // Deserialize drb-ToAddModList
2134  bIterator = DeserializeDrbToAddModList (&(radioResourceConfigDedicated->drbToAddModList),bIterator);
2135  }
2136 
2137  if (optionalFieldsPresent[3])
2138  {
2139  // Deserialize drb-ToReleaseList
2140  int n;
2141  int val;
2142  bIterator = DeserializeSequenceOf (&n,MAX_DRB,1,bIterator);
2143  for (int i = 0; i < n; i++)
2144  {
2145  bIterator = DeserializeInteger (&val,1,32,bIterator);
2146  radioResourceConfigDedicated->drbToReleaseList.push_back (val);
2147  }
2148  }
2149 
2150  if (optionalFieldsPresent[2])
2151  {
2152  // Deserialize mac-MainConfig
2153  // ...
2154  }
2155 
2156  if (optionalFieldsPresent[1])
2157  {
2158  // Deserialize sps-Config
2159  // ...
2160  }
2161 
2162  radioResourceConfigDedicated->havePhysicalConfigDedicated = optionalFieldsPresent[0];
2163  if (optionalFieldsPresent[0])
2164  {
2165  // Deserialize physicalConfigDedicated
2166  bIterator = DeserializePhysicalConfigDedicated (&radioResourceConfigDedicated->physicalConfigDedicated,bIterator);
2167  }
2168 
2169  return bIterator;
2170 }
2171 
2173 RrcAsn1Header::DeserializeSrbToAddModList (std::list<LteRrcSap::SrbToAddMod> *srbToAddModList, Buffer::Iterator bIterator)
2174 {
2175  int numElems;
2176  bIterator = DeserializeSequenceOf (&numElems,2,1,bIterator);
2177 
2178  srbToAddModList->clear ();
2179 
2180  // Deserialize SRB-ToAddMod elements
2181  for (int i = 0; i < numElems; i++)
2182  {
2183  LteRrcSap::SrbToAddMod srbToAddMod;
2184  // Deserialize SRB-ToAddMod sequence
2185  // 2 optional fields, extension marker present
2186  std::bitset<2> optionalFields;
2187  bIterator = DeserializeSequence (&optionalFields,true,bIterator);
2188 
2189  // Deserialize srbIdentity
2190  int n;
2191  bIterator = DeserializeInteger (&n,1,2,bIterator);
2192  srbToAddMod.srbIdentity = n;
2193 
2194  if (optionalFields[1])
2195  {
2196  // Deserialize rlcConfig choice
2197  // ...
2198  }
2199 
2200  if (optionalFields[0])
2201  {
2202  // Deserialize logicalChannelConfig choice
2203  int sel;
2204  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2205 
2206  // Deserialize logicalChannelConfig defaultValue
2207  if (sel == 1)
2208  {
2209  bIterator = DeserializeNull (bIterator);
2210  }
2211 
2212  // Deserialize logicalChannelConfig explicitValue
2213  else if (sel == 0)
2214  {
2215  bIterator = DeserializeLogicalChannelConfig (&srbToAddMod.logicalChannelConfig,bIterator);
2216  }
2217  }
2218  srbToAddModList->insert (srbToAddModList->end (),srbToAddMod);
2219  }
2220 
2221  return bIterator;
2222 }
2223 
2225 RrcAsn1Header::DeserializeDrbToAddModList (std::list<LteRrcSap::DrbToAddMod> *drbToAddModList, Buffer::Iterator bIterator)
2226 {
2227  int n;
2228  int val;
2229  bIterator = DeserializeSequenceOf (&n,MAX_DRB,1,bIterator);
2230 
2231  drbToAddModList->clear ();
2232 
2233  for (int i = 0; i < n; i++)
2234  {
2235  LteRrcSap::DrbToAddMod drbToAddMod;
2236 
2237  std::bitset<5> optionalFields;
2238  bIterator = DeserializeSequence (&optionalFields,true,bIterator);
2239 
2240  if (optionalFields[4])
2241  {
2242  // Deserialize epsBearerIdentity
2243  bIterator = DeserializeInteger (&val,0,15,bIterator);
2244  drbToAddMod.epsBearerIdentity = val;
2245  }
2246 
2247  bIterator = DeserializeInteger (&val,1,32,bIterator);
2248  drbToAddMod.drbIdentity = val;
2249 
2250  if (optionalFields[3])
2251  {
2252  // Deserialize pdcp-Config
2253  // ...
2254  }
2255 
2256  if (optionalFields[2])
2257  {
2258  // Deserialize RLC-Config
2259  int chosen;
2260  bIterator = DeserializeChoice (4,true,&chosen,bIterator);
2261 
2262  int sel;
2263  std::bitset<0> bitset0;
2264  switch (chosen)
2265  {
2266  case 0:
2268 
2269  // Deserialize UL-AM-RLC
2270  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2271  bIterator = DeserializeEnum (64,&sel, bIterator); // t-PollRetransmit
2272  bIterator = DeserializeEnum (8,&sel, bIterator); // pollPDU
2273  bIterator = DeserializeEnum (16,&sel, bIterator); // pollByte
2274  bIterator = DeserializeEnum (8,&sel, bIterator); // maxRetxThreshold
2275 
2276  // Deserialize DL-AM-RLC
2277  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2278  bIterator = DeserializeEnum (32,&sel, bIterator); // t-Reordering
2279  bIterator = DeserializeEnum (64,&sel, bIterator); // t-StatusProhibit
2280  break;
2281 
2282  case 1:
2284 
2285  // Deserialize UL-UM-RLC
2286  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2287  bIterator = DeserializeEnum (2,&sel, bIterator); // sn-FieldLength
2288 
2289  // Deserialize DL-UM-RLC
2290  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2291  bIterator = DeserializeEnum (2,&sel, bIterator); // sn-FieldLength
2292  bIterator = DeserializeEnum (32,&sel, bIterator); // t-Reordering
2293  break;
2294 
2295  case 2:
2297 
2298  // Deserialize UL-UM-RLC
2299  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2300  bIterator = DeserializeEnum (2,&sel, bIterator); // sn-FieldLength
2301  break;
2302 
2303  case 3:
2305 
2306  // Deserialize DL-UM-RLC
2307  bIterator = DeserializeSequence (&bitset0,false, bIterator);
2308  bIterator = DeserializeEnum (2,&sel, bIterator); // sn-FieldLength
2309  bIterator = DeserializeEnum (32,&sel, bIterator); // t-Reordering
2310  break;
2311  }
2312 
2313  }
2314 
2315  if (optionalFields[1])
2316  {
2317  bIterator = DeserializeInteger (&val,3,10,bIterator);
2318  drbToAddMod.logicalChannelIdentity = val;
2319  }
2320 
2321  if (optionalFields[0])
2322  {
2323  bIterator = DeserializeLogicalChannelConfig (&drbToAddMod.logicalChannelConfig,bIterator);
2324  }
2325 
2326  drbToAddModList->insert (drbToAddModList->end (),drbToAddMod);
2327  }
2328  return bIterator;
2329 }
2330 
2333 {
2334  int n;
2335 
2336  // Deserialize LogicalChannelConfig sequence
2337  // 1 optional field, extension marker is present.
2338  std::bitset<1> bitset1;
2339  bIterator = DeserializeSequence (&bitset1,true,bIterator);
2340 
2341  if (bitset1[0])
2342  {
2343  // Deserialize ul-SpecificParameters sequence
2344  bIterator = DeserializeSequence (&bitset1,false,bIterator);
2345 
2346  // Deserialize priority
2347  bIterator = DeserializeInteger (&n,1,16,bIterator);
2348  logicalChannelConfig->priority = n;
2349 
2350  // Deserialize prioritisedBitRate
2351  bIterator = DeserializeEnum (16,&n,bIterator);
2352  uint16_t prioritizedBitRateKbps;
2353 
2354  switch (n)
2355  {
2356  case 0:
2357  prioritizedBitRateKbps = 0;
2358  break;
2359  case 1:
2360  prioritizedBitRateKbps = 8;
2361  break;
2362  case 2:
2363  prioritizedBitRateKbps = 16;
2364  break;
2365  case 3:
2366  prioritizedBitRateKbps = 32;
2367  break;
2368  case 4:
2369  prioritizedBitRateKbps = 64;
2370  break;
2371  case 5:
2372  prioritizedBitRateKbps = 128;
2373  break;
2374  case 6:
2375  prioritizedBitRateKbps = 256;
2376  break;
2377  case 7:
2378  prioritizedBitRateKbps = 10000;
2379  break;
2380  default:
2381  prioritizedBitRateKbps = 10000;
2382  }
2383  logicalChannelConfig->prioritizedBitRateKbps = prioritizedBitRateKbps;
2384 
2385  // Deserialize bucketSizeDuration
2386  bIterator = DeserializeEnum (8,&n,bIterator);
2387  uint16_t bucketSizeDurationMs;
2388  switch (n)
2389  {
2390  case 0:
2391  bucketSizeDurationMs = 50;
2392  break;
2393  case 1:
2394  bucketSizeDurationMs = 100;
2395  break;
2396  case 2:
2397  bucketSizeDurationMs = 150;
2398  break;
2399  case 3:
2400  bucketSizeDurationMs = 300;
2401  break;
2402  case 4:
2403  bucketSizeDurationMs = 500;
2404  break;
2405  case 5:
2406  bucketSizeDurationMs = 1000;
2407  break;
2408  default:
2409  bucketSizeDurationMs = 1000;
2410  }
2411  logicalChannelConfig->bucketSizeDurationMs = bucketSizeDurationMs;
2412 
2413  if (bitset1[0])
2414  {
2415  // Deserialize logicalChannelGroup
2416  bIterator = DeserializeInteger (&n,0,3,bIterator);
2417  logicalChannelConfig->logicalChannelGroup = n;
2418  }
2419  }
2420  return bIterator;
2421 }
2422 
2425 {
2426  std::bitset<10> optionalFieldPresent;
2427  bIterator = DeserializeSequence (&optionalFieldPresent,true,bIterator);
2428 
2429  physicalConfigDedicated->havePdschConfigDedicated = optionalFieldPresent[9];
2430  if (optionalFieldPresent[9])
2431  {
2432  // Deserialize pdsch-ConfigDedicated
2433  std::bitset<0> bitset0;
2434  bIterator = DeserializeSequence (&bitset0,false,bIterator);
2435 
2436  int slct;
2437 
2438  // Deserialize p-a
2439  bIterator = DeserializeEnum (8,&slct,bIterator);
2440  physicalConfigDedicated->pdschConfigDedicated.pa = slct;
2441 
2442  bIterator = DeserializeNull (bIterator);
2443 
2444  }
2445  if (optionalFieldPresent[8])
2446  {
2447  // Deserialize pucch-ConfigDedicated
2448  // ...
2449  }
2450  if (optionalFieldPresent[7])
2451  {
2452  // Deserialize pusch-ConfigDedicated
2453  // ...
2454  }
2455  if (optionalFieldPresent[6])
2456  {
2457  // Deserialize uplinkPowerControlDedicated
2458  // ...
2459  }
2460  if (optionalFieldPresent[5])
2461  {
2462  // Deserialize tpc-PDCCH-ConfigPUCCH
2463  // ...
2464  }
2465  if (optionalFieldPresent[4])
2466  {
2467  // Deserialize tpc-PDCCH-ConfigPUSCH
2468  // ...
2469  }
2470  if (optionalFieldPresent[3])
2471  {
2472  // Deserialize cqi-ReportConfig
2473  // ...
2474  }
2475  physicalConfigDedicated->haveSoundingRsUlConfigDedicated = optionalFieldPresent[2];
2476  if (optionalFieldPresent[2])
2477  {
2478  // Deserialize soundingRS-UL-ConfigDedicated
2479  int sel;
2480  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2481 
2482  if (sel == 0)
2483  {
2485 
2486  bIterator = DeserializeNull (bIterator);
2487  }
2488 
2489  else if (sel == 1)
2490  {
2492 
2493  std::bitset<0> bitset0;
2494  bIterator = DeserializeSequence (&bitset0,false,bIterator);
2495 
2496  int slct;
2497 
2498  // Deserialize srs-Bandwidth
2499  bIterator = DeserializeEnum (4,&slct,bIterator);
2500  physicalConfigDedicated->soundingRsUlConfigDedicated.srsBandwidth = slct;
2501 
2502  // Deserialize srs-HoppingBandwidth
2503  bIterator = DeserializeEnum (4,&slct,bIterator);
2504 
2505  // Deserialize freqDomainPosition
2506  bIterator = DeserializeInteger (&slct,0,23,bIterator);
2507 
2508  // Deserialize duration
2509  bool duration;
2510  bIterator = DeserializeBoolean (&duration,bIterator);
2511 
2512  // Deserialize srs-ConfigIndex
2513  bIterator = DeserializeInteger (&slct,0,1023,bIterator);
2514  physicalConfigDedicated->soundingRsUlConfigDedicated.srsConfigIndex = slct;
2515 
2516  // Deserialize transmissionComb
2517  bIterator = DeserializeInteger (&slct,0,1,bIterator);
2518 
2519  // Deserialize cyclicShift
2520  bIterator = DeserializeEnum (8,&slct,bIterator);
2521  }
2522  }
2523  physicalConfigDedicated->haveAntennaInfoDedicated = optionalFieldPresent[1];
2524  if (optionalFieldPresent[1])
2525  {
2526  // Deserialize antennaInfo
2527  int sel;
2528  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2529  if (sel == 1)
2530  {
2531  bIterator = DeserializeNull (bIterator);
2532  }
2533  else if (sel == 0)
2534  {
2535  std::bitset<1> codebookSubsetRestrictionPresent;
2536  bIterator = DeserializeSequence (&codebookSubsetRestrictionPresent,false,bIterator);
2537 
2538  int txmode;
2539  bIterator = DeserializeEnum (8,&txmode,bIterator);
2540  physicalConfigDedicated->antennaInfo.transmissionMode = txmode;
2541 
2542  if (codebookSubsetRestrictionPresent[0])
2543  {
2544  // Deserialize codebookSubsetRestriction
2545  // ...
2546  }
2547 
2548  int txantennaselchosen;
2549  bIterator = DeserializeChoice (2,false,&txantennaselchosen,bIterator);
2550  if (txantennaselchosen == 0)
2551  {
2552  // Deserialize ue-TransmitAntennaSelection release
2553  bIterator = DeserializeNull (bIterator);
2554  }
2555  else if (txantennaselchosen == 1)
2556  {
2557  // Deserialize ue-TransmitAntennaSelection setup
2558  // ...
2559  }
2560  }
2561  }
2562  if (optionalFieldPresent[0])
2563  {
2564  // Deserialize schedulingRequestConfig
2565  // ...
2566  }
2567  return bIterator;
2568 }
2569 
2570 void
2571 RrcAsn1Header::Print (std::ostream &os) const
2572 {
2573  NS_LOG_FUNCTION (this << &os);
2574  NS_FATAL_ERROR ("RrcAsn1Header Print() function must also specify LteRrcSap::RadioResourceConfigDedicated as a second argument");
2575 }
2576 
2579  {
2580  NS_LOG_FUNCTION (this);
2581  std::bitset<2> nonCriticalExtension_v890;
2582  bIterator = DeserializeSequence (&nonCriticalExtension_v890, false,bIterator);
2583 
2584  if (nonCriticalExtension_v890[0])
2585  {
2586  // Continue to analyze future Release optional fields
2587  std::bitset<3> nonCriticalExtension_v920;
2588  bIterator = DeserializeSequence (&nonCriticalExtension_v920, false, bIterator);
2589  if (nonCriticalExtension_v920[0])
2590  {
2591  // Continue to deserialize futere Release optional fields
2592  std::bitset<3> nonCriticalExtension_v1020;
2593  bIterator = DeserializeSequence (&nonCriticalExtension_v1020, false, bIterator);
2594  NS_ASSERT (!nonCriticalExtension_v1020[2]); // No sCellToRealeaseList-r10
2595  NS_ASSERT (nonCriticalExtension_v1020[1]); // sCellToAddModList-r10
2596  NS_ASSERT (!nonCriticalExtension_v1020[0]); // No nonCriticalExtension RRCConnectionReconfiguration-v1130-IEs
2597 
2598  int numElems;
2599  bIterator = DeserializeSequenceOf (&numElems,MAX_OBJECT_ID,1,bIterator);
2600  nonCriticalExtension->sCellsToAddModList.clear ();
2601  // Deserialize SCellToAddMod
2602  for (int i = 0; i < numElems; i++)
2603  {
2604  std::bitset<4> sCellToAddMod_r10;
2605  bIterator = DeserializeSequence (&sCellToAddMod_r10, false, bIterator);
2606 
2608  // Deserialize sCellIndex
2609  NS_ASSERT (sCellToAddMod_r10[3]); // sCellIndex
2610  int n;
2611  bIterator = DeserializeInteger (&n,1,MAX_OBJECT_ID,bIterator);
2612  sctam.sCellIndex = n;
2613  // Deserialize CellIdentification
2614  NS_ASSERT (sCellToAddMod_r10[2]); // CellIdentification
2615  bIterator = DeserializeCellIdentification (&sctam.cellIdentification, bIterator);
2616 
2617  // Deserialize RadioResourceConfigCommonSCell
2618  NS_ASSERT (sCellToAddMod_r10[1]);
2620  sctam.haveRadioResourceConfigDedicatedSCell = sCellToAddMod_r10[0];
2621  if (sCellToAddMod_r10[0])
2622  {
2623  //Deserialize RadioResourceConfigDedicatedSCell
2625  }
2626 
2627  nonCriticalExtension->sCellsToAddModList.insert (nonCriticalExtension->sCellsToAddModList.end (), sctam);
2628  }
2629  }
2630  }
2631 
2632  return bIterator;
2633  }
2634 
2637  {
2638  NS_LOG_FUNCTION (this);
2639  std::bitset<2> cellIdentification_r10;
2640  bIterator = DeserializeSequence (&cellIdentification_r10,false,bIterator);
2641  NS_ASSERT(cellIdentification_r10[1]); // phyCellId-r10
2642  int n1;
2643  bIterator = DeserializeInteger (&n1,1,65536,bIterator);
2644  ci->physCellId = n1;
2645  int n2;
2646  NS_ASSERT (cellIdentification_r10[0]); // dl-CarrierFreq-r10
2647  bIterator = DeserializeInteger (&n2,1,MAX_EARFCN,bIterator);
2648  ci->dlCarrierFreq = n2;
2649 
2650  return bIterator;
2651  }
2652 
2655  {
2656  NS_LOG_FUNCTION (this);
2657  std::bitset<2> radioResourceConfigCommonSCell_r10;
2658  bIterator = DeserializeSequence (&radioResourceConfigCommonSCell_r10,false,bIterator);
2659  rrccsc->haveNonUlConfiguration = radioResourceConfigCommonSCell_r10[1];
2660  rrccsc->haveUlConfiguration = radioResourceConfigCommonSCell_r10[0];
2661  if (rrccsc->haveNonUlConfiguration)
2662  {
2663  std::bitset<5> nonUlConfiguration_r10;
2664  bIterator = DeserializeSequence (&nonUlConfiguration_r10,false,bIterator);
2665  int n;
2666  bIterator = DeserializeInteger (&n,6,100,bIterator);
2667  rrccsc->nonUlConfiguration.dlBandwidth = n;
2668 
2669  std::bitset<1> antennaInfoCommon_r10;
2670  bIterator = DeserializeSequence (&antennaInfoCommon_r10,false,bIterator);
2671  bIterator = DeserializeInteger (&n,0,65536,bIterator);
2673 
2674  std::bitset<2> pdschConfigCommon_r10;
2675  bIterator = DeserializeSequence (&pdschConfigCommon_r10,false,bIterator);
2676  bIterator = DeserializeInteger (&n,-60,50,bIterator);
2678  bIterator = DeserializeInteger (&n,0,3,bIterator);
2680  }
2681  if (rrccsc->haveUlConfiguration)
2682  {
2683  std::bitset<7> UlConfiguration_r10;
2684  bIterator = DeserializeSequence (&UlConfiguration_r10,true,bIterator);
2685 
2686  std::bitset<3> FreqInfo_r10;
2687  bIterator = DeserializeSequence (&FreqInfo_r10,false,bIterator);
2688  int n;
2689  bIterator = DeserializeInteger (&n,0,MAX_EARFCN,bIterator);
2691  bIterator = DeserializeInteger (&n,6,100,bIterator);
2693 
2694  std::bitset<2> UlPowerControlCommonSCell_r10;
2695  bIterator = DeserializeSequence (&UlPowerControlCommonSCell_r10,false,bIterator);
2696  bIterator = DeserializeInteger (&n,0,65536,bIterator);
2698 
2699  std::bitset<1> prachConfigSCell_r10;
2700  bIterator = DeserializeSequence (&prachConfigSCell_r10,false,bIterator);
2701  bIterator = DeserializeInteger (&n,0,256,bIterator);
2703  }
2704 
2705  return bIterator;
2706  }
2707 
2710  {
2711  NS_LOG_FUNCTION (this);
2712  std::bitset<1> RadioResourceConfigDedicatedSCell_r10;
2713  bIterator = DeserializeSequence (&RadioResourceConfigDedicatedSCell_r10,false,bIterator);
2715 
2716  return bIterator;
2717  }
2718 
2721  {
2722  NS_LOG_FUNCTION (this);
2723  std::bitset<2> pcdscOpt;
2724  bIterator = DeserializeSequence (&pcdscOpt,true,bIterator);
2725  pcdsc->haveNonUlConfiguration = pcdscOpt[1];
2726  pcdsc->haveUlConfiguration = pcdscOpt[0];
2727  if (pcdsc->haveNonUlConfiguration)
2728  {
2729  std::bitset<4> nulOpt;
2730  bIterator = DeserializeSequence (&nulOpt,false,bIterator);
2731  pcdsc->haveAntennaInfoDedicated = nulOpt[3];
2732  NS_ASSERT(!nulOpt[2]); // crossCarrierSchedulingConfig-r10 Not Implemented
2733  NS_ASSERT(!nulOpt[1]); // csi-RS-Config-r10 Not Implemented
2734  pcdsc->havePdschConfigDedicated = nulOpt[0];
2735 
2736  if (pcdsc->haveAntennaInfoDedicated)
2737  {
2738  // Deserialize antennaInfo
2739  int sel;
2740  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2741  if (sel == 1)
2742  {
2743  bIterator = DeserializeNull (bIterator);
2744  }
2745  else if (sel == 0)
2746  {
2747  std::bitset<1> codebookSubsetRestrictionPresent;
2748  bIterator = DeserializeSequence (&codebookSubsetRestrictionPresent,false,bIterator);
2749 
2750  int txmode;
2751  bIterator = DeserializeEnum (8,&txmode,bIterator);
2752  pcdsc->antennaInfo.transmissionMode = txmode;
2753 
2754  if (codebookSubsetRestrictionPresent[0])
2755  {
2756  // Deserialize codebookSubsetRestriction
2757  NS_FATAL_ERROR ("Not implemented yet");
2758  // ...
2759  }
2760 
2761  int txantennaselchosen;
2762  bIterator = DeserializeChoice (2,false,&txantennaselchosen,bIterator);
2763  if (txantennaselchosen == 0)
2764  {
2765  // Deserialize ue-TransmitAntennaSelection release
2766  bIterator = DeserializeNull (bIterator);
2767  }
2768  else if (txantennaselchosen == 1)
2769  {
2770  // Deserialize ue-TransmitAntennaSelection setup
2771  NS_FATAL_ERROR ("Not implemented yet");
2772  // ...
2773  }
2774  }
2775  }
2776  if (pcdsc->havePdschConfigDedicated)
2777  {
2778  // Deserialize pdsch-ConfigDedicated
2779  std::bitset<0> bitset0;
2780  bIterator = DeserializeSequence (&bitset0,false,bIterator);
2781 
2782  int slct;
2783 
2784  // Deserialize p-a
2785  bIterator = DeserializeEnum (8,&slct,bIterator);
2786  pcdsc->pdschConfigDedicated.pa = slct;
2787 
2788  bIterator = DeserializeNull (bIterator);
2789  }
2790 
2791  }
2792  if (pcdsc->haveUlConfiguration)
2793  {
2794  std::bitset<7> ulOpt;
2795  bIterator = DeserializeSequence (&ulOpt,false,bIterator);
2796  pcdsc->haveAntennaInfoUlDedicated = ulOpt[6];
2797  NS_ASSERT(!ulOpt[5]); // pusch-ConfigDedicatedSCell-r10 not present
2798  NS_ASSERT(!ulOpt[4]); // uplinkPowerControlDedicatedSCell-r10 not present
2799  NS_ASSERT(!ulOpt[3]); // cqi-ReportConfigSCell-r10 not present
2800  pcdsc->haveSoundingRsUlConfigDedicated = ulOpt[2];
2801  NS_ASSERT(!ulOpt[1]); // soundingRS-UL-ConfigDedicated-v1020 not present
2802  NS_ASSERT(!ulOpt[0]); // soundingRS-UL-ConfigDedicatedAperiodic-r10 not present
2803 
2804  if (pcdsc->haveAntennaInfoUlDedicated)
2805  {
2806  // Deserialize antennaInfo
2807  int sel;
2808  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2809  if (sel == 1)
2810  {
2811  bIterator = DeserializeNull (bIterator);
2812  }
2813  else if (sel == 0)
2814  {
2815  std::bitset<1> codebookSubsetRestrictionPresent;
2816  bIterator = DeserializeSequence (&codebookSubsetRestrictionPresent,false,bIterator);
2817 
2818  int txmode;
2819  bIterator = DeserializeEnum (8,&txmode,bIterator);
2820  pcdsc->antennaInfoUl.transmissionMode = txmode;
2821 
2822  if (codebookSubsetRestrictionPresent[0])
2823  {
2824  // Deserialize codebookSubsetRestriction
2825  NS_FATAL_ERROR ("Not implemented yet");
2826  // ...
2827  }
2828 
2829  int txantennaselchosen;
2830  bIterator = DeserializeChoice (2,false,&txantennaselchosen,bIterator);
2831  if (txantennaselchosen == 0)
2832  {
2833  // Deserialize ue-TransmitAntennaSelection release
2834  bIterator = DeserializeNull (bIterator);
2835  }
2836  else if (txantennaselchosen == 1)
2837  {
2838  // Deserialize ue-TransmitAntennaSelection setup
2839  NS_FATAL_ERROR ("Not implemented yet");
2840  // ...
2841  }
2842  }
2843  }
2845  {
2846  // Deserialize soundingRS-UL-ConfigDedicated
2847  int sel;
2848  bIterator = DeserializeChoice (2,false,&sel,bIterator);
2849 
2850  if (sel == 0)
2851  {
2853 
2854  bIterator = DeserializeNull (bIterator);
2855  }
2856 
2857  else if (sel == 1)
2858  {
2860 
2861  std::bitset<0> bitset0;
2862  bIterator = DeserializeSequence (&bitset0,false,bIterator);
2863 
2864  int slct;
2865 
2866  // Deserialize srs-Bandwidth
2867  bIterator = DeserializeEnum (4,&slct,bIterator);
2869 
2870  // Deserialize srs-HoppingBandwidth
2871  bIterator = DeserializeEnum (4,&slct,bIterator);
2872 
2873  // Deserialize freqDomainPosition
2874  bIterator = DeserializeInteger (&slct,0,23,bIterator);
2875 
2876  // Deserialize duration
2877  bool duration;
2878  bIterator = DeserializeBoolean (&duration,bIterator);
2879 
2880  // Deserialize srs-ConfigIndex
2881  bIterator = DeserializeInteger (&slct,0,1023,bIterator);
2883 
2884  // Deserialize transmissionComb
2885  bIterator = DeserializeInteger (&slct,0,1,bIterator);
2886 
2887  // Deserialize cyclicShift
2888  bIterator = DeserializeEnum (8,&slct,bIterator);
2889  }
2890  }
2891 
2892 
2893  }
2894 
2895  return bIterator;
2896  }
2897 void
2898 RrcAsn1Header::Print (std::ostream &os, LteRrcSap::RadioResourceConfigDedicated radioResourceConfigDedicated) const
2899 {
2900  os << " srbToAddModList: " << std::endl;
2901  std::list<LteRrcSap::SrbToAddMod>::iterator it = radioResourceConfigDedicated.srbToAddModList.begin ();
2902  for (; it != radioResourceConfigDedicated.srbToAddModList.end (); it++)
2903  {
2904  os << " srbIdentity: " << (int)it->srbIdentity << std::endl;
2905  os << " logicalChannelConfig: " << std::endl;
2906  os << " priority: " << (int)it->logicalChannelConfig.priority << std::endl;
2907  os << " prioritizedBitRateKbps: " << (int)it->logicalChannelConfig.prioritizedBitRateKbps << std::endl;
2908  os << " bucketSizeDurationMs: " << (int)it->logicalChannelConfig.bucketSizeDurationMs << std::endl;
2909  os << " logicalChannelGroup: " << (int)it->logicalChannelConfig.logicalChannelGroup << std::endl;
2910  }
2911  os << std::endl;
2912 
2913  os << " drbToAddModList: " << std::endl;
2914  std::list<LteRrcSap::DrbToAddMod>::iterator it2 = radioResourceConfigDedicated.drbToAddModList.begin ();
2915  for (; it2 != radioResourceConfigDedicated.drbToAddModList.end (); it2++)
2916  {
2917  os << " epsBearerIdentity: " << (int)it2->epsBearerIdentity << std::endl;
2918  os << " drbIdentity: " << (int)it2->drbIdentity << std::endl;
2919  os << " rlcConfig: " << it2->rlcConfig.choice << std::endl;
2920  os << " logicalChannelIdentity: " << (int)it2->logicalChannelIdentity << std::endl;
2921  os << " logicalChannelConfig: " << std::endl;
2922  os << " priority: " << (int)it2->logicalChannelConfig.priority << std::endl;
2923  os << " prioritizedBitRateKbps: " << (int)it2->logicalChannelConfig.prioritizedBitRateKbps << std::endl;
2924  os << " bucketSizeDurationMs: " << (int)it2->logicalChannelConfig.bucketSizeDurationMs << std::endl;
2925  os << " logicalChannelGroup: " << (int)it2->logicalChannelConfig.logicalChannelGroup << std::endl;
2926  }
2927  os << std::endl;
2928 
2929  os << " drbToReleaseList: ";
2930  std::list<uint8_t>::iterator it3 = radioResourceConfigDedicated.drbToReleaseList.begin ();
2931  for (; it3 != radioResourceConfigDedicated.drbToReleaseList.end (); it3++)
2932  {
2933  os << (int)*it3 << ", ";
2934  }
2935  os << std::endl;
2936 
2937  os << " havePhysicalConfigDedicated: " << radioResourceConfigDedicated.havePhysicalConfigDedicated << std::endl;
2938 
2939  if (radioResourceConfigDedicated.havePhysicalConfigDedicated)
2940  {
2941  os << " physicalConfigDedicated: " << std::endl;
2942 
2943  os << " haveSoundingRsUlConfigDedicated: " << radioResourceConfigDedicated.physicalConfigDedicated.haveSoundingRsUlConfigDedicated << std::endl;
2944  if (radioResourceConfigDedicated.physicalConfigDedicated.haveSoundingRsUlConfigDedicated)
2945  {
2946  os << " soundingRsUlConfigDedicated: " << std::endl;
2947  os << " type: " << radioResourceConfigDedicated.physicalConfigDedicated.soundingRsUlConfigDedicated.type << std::endl;
2948  os << " srsBandwidth: " << (int)radioResourceConfigDedicated.physicalConfigDedicated.soundingRsUlConfigDedicated.srsBandwidth << std::endl;
2949  os << " srsConfigIndex: " << (int)radioResourceConfigDedicated.physicalConfigDedicated.soundingRsUlConfigDedicated.srsConfigIndex << std::endl;
2950  }
2951 
2952  os << " haveAntennaInfoDedicated: " << radioResourceConfigDedicated.physicalConfigDedicated.haveAntennaInfoDedicated << std::endl;
2953  if (radioResourceConfigDedicated.physicalConfigDedicated.haveAntennaInfoDedicated)
2954  {
2955  os << " antennaInfo Tx mode: " << (int)radioResourceConfigDedicated.physicalConfigDedicated.antennaInfo.transmissionMode << std::endl;
2956  }
2957  }
2958 }
2959 
2962 {
2963  std::bitset<0> bitset0;
2964  int n;
2965 
2966  std::bitset<3> sysInfoBlkT1Opts;
2967  bIterator = DeserializeSequence (&sysInfoBlkT1Opts,false,bIterator);
2968 
2969  // Deserialize cellAccessRelatedInfo
2970  std::bitset<1> cellAccessRelatedInfoOpts;
2971  bIterator = DeserializeSequence (&cellAccessRelatedInfoOpts,false,bIterator);
2972 
2973  // Deserialize plmn-IdentityList
2974  int numPlmnIdentityInfoElements;
2975  bIterator = DeserializeSequenceOf (&numPlmnIdentityInfoElements,6,1,bIterator);
2976  for (int i = 0; i < numPlmnIdentityInfoElements; i++)
2977  {
2978  bIterator = DeserializeSequence (&bitset0,false,bIterator);
2979 
2980  // plmn-Identity
2981  bIterator = DeserializePlmnIdentity (&systemInformationBlockType1->cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity,bIterator);
2982  }
2983 
2984  // Deserialize trackingAreaCode
2985  std::bitset<16> trackingAreaCode;
2986  bIterator = DeserializeBitstring (&trackingAreaCode,bIterator);
2987 
2988  // Deserialize cellIdentity
2989  std::bitset<28> cellIdentity;
2990  bIterator = DeserializeBitstring (&cellIdentity,bIterator);
2991  systemInformationBlockType1->cellAccessRelatedInfo.cellIdentity = cellIdentity.to_ulong ();
2992 
2993  // Deserialize cellBarred
2994  bIterator = DeserializeEnum (2,&n,bIterator);
2995 
2996  // Deserialize intraFreqReselection
2997  bIterator = DeserializeEnum (2,&n,bIterator);
2998 
2999  // Deserialize csg-Indication
3000  bIterator = DeserializeBoolean (&systemInformationBlockType1->cellAccessRelatedInfo.csgIndication,bIterator);
3001 
3002  if (cellAccessRelatedInfoOpts[0])
3003  {
3004  // Deserialize csg-Identity
3005  std::bitset<27> csgIdentity;
3006  bIterator = DeserializeBitstring (&csgIdentity,bIterator);
3007  systemInformationBlockType1->cellAccessRelatedInfo.csgIdentity = csgIdentity.to_ulong ();
3008  }
3009 
3010  // Deserialize cellSelectionInfo
3011  std::bitset<1> qRxLevMinOffsetPresent;
3012  bIterator = DeserializeSequence (&qRxLevMinOffsetPresent,false,bIterator);
3013  bIterator = DeserializeInteger (&n,-70,-22,bIterator); //q-RxLevMin
3014  if (qRxLevMinOffsetPresent[0])
3015  {
3016  // Deserialize qRxLevMinOffset
3017  // ...
3018  }
3019 
3020  if (sysInfoBlkT1Opts[2])
3021  {
3022  // Deserialize p-Max
3023  // ...
3024  }
3025 
3026  // freqBandIndicator
3027  bIterator = DeserializeInteger (&n,1,64,bIterator);
3028 
3029  // schedulingInfoList
3030  int numSchedulingInfo;
3031  bIterator = DeserializeSequenceOf (&numSchedulingInfo,MAX_SI_MESSAGE,1,bIterator);
3032  for (int i = 0; i < numSchedulingInfo; i++)
3033  {
3034  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3035  bIterator = DeserializeEnum (7,&n,bIterator); // si-Periodicity
3036  int numSibType;
3037  bIterator = DeserializeSequenceOf (&numSibType,MAX_SIB - 1,0, bIterator); // sib-MappingInfo
3038  for (int j = 0; j < numSibType; j++)
3039  {
3040  bIterator = DeserializeEnum (16,&n,bIterator); // SIB-Type
3041  }
3042  }
3043 
3044  if (sysInfoBlkT1Opts[1])
3045  {
3046  // tdd-Config
3047  // ...
3048  }
3049 
3050  // si-WindowLength
3051  bIterator = DeserializeEnum (7,&n,bIterator);
3052 
3053  // systemInfoValueTag
3054  bIterator = DeserializeInteger (&n,0,31,bIterator);
3055 
3056  if (sysInfoBlkT1Opts[0])
3057  {
3058  // Deserialize nonCriticalExtension
3059  // ...
3060  }
3061  return bIterator;
3062 }
3063 
3066 {
3067  std::bitset<0> bitset0;
3068  int n;
3069 
3070  std::bitset<2> sysInfoBlkT2Opts;
3071  bIterator = DeserializeSequence (&sysInfoBlkT2Opts,true,bIterator);
3072  if (sysInfoBlkT2Opts[1])
3073  {
3074  // Deserialize ac-BarringInfo
3075  // ...
3076  }
3077 
3078  // Deserialize radioResourceConfigCommon
3079  bIterator = DeserializeRadioResourceConfigCommonSib (&systemInformationBlockType2->radioResourceConfigCommon, bIterator);
3080 
3081  // Deserialize ue-TimersAndConstants
3082  bIterator = DeserializeSequence (&bitset0,true,bIterator);
3083  bIterator = DeserializeEnum (8,&n,bIterator); // t300
3084  bIterator = DeserializeEnum (8,&n,bIterator); // t301
3085  bIterator = DeserializeEnum (7,&n,bIterator); // t310
3086  bIterator = DeserializeEnum (8,&n,bIterator); // n310
3087  bIterator = DeserializeEnum (7,&n,bIterator); // t311
3088  bIterator = DeserializeEnum (8,&n,bIterator); // n311
3089 
3090  // Deserialize freqInfo
3091  std::bitset<2> freqInfoOpts;
3092  bIterator = DeserializeSequence (&freqInfoOpts,false,bIterator);
3093  if (freqInfoOpts[1])
3094  {
3095  // Deserialize ul-CarrierFreq
3096  bIterator = DeserializeInteger (&n, 0, MAX_EARFCN, bIterator);
3097  systemInformationBlockType2->freqInfo.ulCarrierFreq = n;
3098  }
3099  if (freqInfoOpts[0])
3100  {
3101  // Deserialize ul-Bandwidth
3102  bIterator = DeserializeEnum (6, &n, bIterator);
3103  switch (n)
3104  {
3105  case 0:
3106  systemInformationBlockType2->freqInfo.ulBandwidth = 6;
3107  break;
3108  case 1:
3109  systemInformationBlockType2->freqInfo.ulBandwidth = 15;
3110  break;
3111  case 2:
3112  systemInformationBlockType2->freqInfo.ulBandwidth = 25;
3113  break;
3114  case 3:
3115  systemInformationBlockType2->freqInfo.ulBandwidth = 50;
3116  break;
3117  case 4:
3118  systemInformationBlockType2->freqInfo.ulBandwidth = 75;
3119  break;
3120  case 5:
3121  systemInformationBlockType2->freqInfo.ulBandwidth = 100;
3122  break;
3123  default:
3124  systemInformationBlockType2->freqInfo.ulBandwidth = 6;
3125  }
3126  }
3127 
3128  // additionalSpectrumEmission
3129  bIterator = DeserializeInteger (&n,1,32,bIterator);
3130 
3131  if (sysInfoBlkT2Opts[0])
3132  {
3133  // Deserialize mbsfn-SubframeConfigList
3134  // ...
3135  }
3136 
3137  // Deserialize timeAlignmentTimerCommon
3138  bIterator = DeserializeEnum (8,&n,bIterator);
3139 
3140  return bIterator;
3141 }
3142 
3143 
3146 {
3147  std::bitset<0> bitset0;
3148  int n;
3149 
3150  std::bitset<9> rrCfgCommOptions;
3151  bIterator = DeserializeSequence (&rrCfgCommOptions,true,bIterator);
3152 
3153  // rach-ConfigCommon
3154  if (rrCfgCommOptions[8])
3155  {
3156  bIterator = DeserializeRachConfigCommon (&radioResourceConfigCommon->rachConfigCommon, bIterator);
3157  }
3158 
3159  // prach-Config
3160  std::bitset<1> prachConfigInfoPresent;
3161  bIterator = DeserializeSequence (&prachConfigInfoPresent,false,bIterator);
3162 
3163  // prach-Config -> rootSequenceIndex
3164  bIterator = DeserializeInteger (&n,0,1023,bIterator);
3165 
3166  // prach-Config -> prach-ConfigInfo
3167  if (prachConfigInfoPresent[0])
3168  {
3169  // ...
3170  }
3171 
3172  // pdsch-ConfigCommon
3173  if (rrCfgCommOptions[7])
3174  {
3175  // ...
3176  }
3177 
3178  // pusch-ConfigCommon
3179  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3180 
3181  // pusch-ConfigCommon -> pusch-ConfigBasic
3182  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3183 
3184  // pusch-ConfigCommon -> pusch-ConfigBasic -> n-SB
3185  bIterator = DeserializeInteger (&n,1,4,bIterator);
3186 
3187  // pusch-ConfigCommon -> pusch-ConfigBasic -> hoppingMode
3188  bIterator = DeserializeEnum (2,&n,bIterator);
3189 
3190  // pusch-ConfigCommon -> pusch-ConfigBasic -> pusch-HoppingOffset
3191  bIterator = DeserializeInteger (&n,0,98,bIterator);
3192 
3193  // pusch-ConfigCommon -> pusch-ConfigBasic -> enable64QAM
3194  bool enable64QAM;
3195  bIterator = DeserializeBoolean (&enable64QAM,bIterator);
3196 
3197  // ul-ReferenceSignalsPUSCH
3198  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3199 
3200  // groupHoppingEnabled
3201  bool dummyBool;
3202  bIterator = DeserializeBoolean (&dummyBool,bIterator);
3203 
3204  // groupAssignmentPUSCH
3205  bIterator = DeserializeInteger (&n,0,29,bIterator);
3206 
3207  // sequenceHoppingEnabled
3208  bIterator = DeserializeBoolean (&dummyBool,bIterator);
3209 
3210  // cyclicShift
3211  bIterator = DeserializeInteger (&n,0,7,bIterator);
3212 
3213  // phich-Config
3214  if (rrCfgCommOptions[6])
3215  {
3216  // ...
3217  }
3218 
3219  // pucch-ConfigCommon
3220  if (rrCfgCommOptions[5])
3221  {
3222  // ...
3223  }
3224 
3225  // soundingRS-UL-ConfigCommon
3226  if (rrCfgCommOptions[4])
3227  {
3228  // ...
3229  }
3230 
3231  // uplinkPowerControlCommon
3232  if (rrCfgCommOptions[3])
3233  {
3234  // ...
3235  }
3236 
3237  // antennaInfoCommon
3238  if (rrCfgCommOptions[2])
3239  {
3240  // ...
3241  }
3242 
3243  // p-Max
3244  if (rrCfgCommOptions[1])
3245  {
3246  // ...
3247  }
3248 
3249  // tdd-Config
3250  if (rrCfgCommOptions[0])
3251  {
3252  // ...
3253  }
3254 
3255  // ul-CyclicPrefixLength
3256  bIterator = DeserializeEnum (2,&n,bIterator);
3257 
3258  return bIterator;
3259 }
3260 
3263 {
3264  std::bitset<0> bitset0;
3265  int n;
3266 
3267  bIterator = DeserializeSequence (&bitset0,true,bIterator);
3268 
3269  // preambleInfo
3270  std::bitset<1> preamblesGroupAConfigPresent;
3271  bIterator = DeserializeSequence (&preamblesGroupAConfigPresent,false,bIterator);
3272 
3273  // numberOfRA-Preambles
3274  bIterator = DeserializeEnum (16,&n,bIterator);
3275  switch (n)
3276  {
3277  case 0:
3278  rachConfigCommon->preambleInfo.numberOfRaPreambles = 4;
3279  break;
3280  case 1:
3281  rachConfigCommon->preambleInfo.numberOfRaPreambles = 8;
3282  break;
3283  case 2:
3284  rachConfigCommon->preambleInfo.numberOfRaPreambles = 12;
3285  break;
3286  case 3:
3287  rachConfigCommon->preambleInfo.numberOfRaPreambles = 16;
3288  break;
3289  case 4:
3290  rachConfigCommon->preambleInfo.numberOfRaPreambles = 20;
3291  break;
3292  case 5:
3293  rachConfigCommon->preambleInfo.numberOfRaPreambles = 24;
3294  break;
3295  case 6:
3296  rachConfigCommon->preambleInfo.numberOfRaPreambles = 28;
3297  break;
3298  case 7:
3299  rachConfigCommon->preambleInfo.numberOfRaPreambles = 32;
3300  break;
3301  case 8:
3302  rachConfigCommon->preambleInfo.numberOfRaPreambles = 36;
3303  break;
3304  case 9:
3305  rachConfigCommon->preambleInfo.numberOfRaPreambles = 40;
3306  break;
3307  case 10:
3308  rachConfigCommon->preambleInfo.numberOfRaPreambles = 44;
3309  break;
3310  case 11:
3311  rachConfigCommon->preambleInfo.numberOfRaPreambles = 48;
3312  break;
3313  case 12:
3314  rachConfigCommon->preambleInfo.numberOfRaPreambles = 52;
3315  break;
3316  case 13:
3317  rachConfigCommon->preambleInfo.numberOfRaPreambles = 56;
3318  break;
3319  case 14:
3320  rachConfigCommon->preambleInfo.numberOfRaPreambles = 60;
3321  break;
3322  case 15:
3323  rachConfigCommon->preambleInfo.numberOfRaPreambles = 64;
3324  break;
3325  default:
3326  rachConfigCommon->preambleInfo.numberOfRaPreambles = 0;
3327  }
3328 
3329  rachConfigCommon->preambleInfo.numberOfRaPreambles = n;
3330 
3331  if (preamblesGroupAConfigPresent[0])
3332  {
3333  // Deserialize preamblesGroupAConfig
3334  // ...
3335  }
3336 
3337  // powerRampingParameters
3338  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3339  bIterator = DeserializeEnum (4,&n,bIterator); // powerRampingStep
3340  bIterator = DeserializeEnum (16,&n,bIterator); // preambleInitialReceivedTargetPower
3341 
3342  // ra-SupervisionInfo
3343  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3344  bIterator = DeserializeEnum (11,&n,bIterator); // preambleTransMax
3345  switch (n)
3346  {
3347  case 0:
3348  rachConfigCommon->raSupervisionInfo.preambleTransMax = 3;
3349  break;
3350  case 1:
3351  rachConfigCommon->raSupervisionInfo.preambleTransMax = 4;
3352  break;
3353  case 2:
3354  rachConfigCommon->raSupervisionInfo.preambleTransMax = 5;
3355  break;
3356  case 3:
3357  rachConfigCommon->raSupervisionInfo.preambleTransMax = 6;
3358  break;
3359  case 4:
3360  rachConfigCommon->raSupervisionInfo.preambleTransMax = 7;
3361  break;
3362  case 5:
3363  rachConfigCommon->raSupervisionInfo.preambleTransMax = 8;
3364  break;
3365  case 6:
3366  rachConfigCommon->raSupervisionInfo.preambleTransMax = 10;
3367  break;
3368  case 7:
3369  rachConfigCommon->raSupervisionInfo.preambleTransMax = 20;
3370  break;
3371  case 8:
3372  rachConfigCommon->raSupervisionInfo.preambleTransMax = 50;
3373  break;
3374  case 9:
3375  rachConfigCommon->raSupervisionInfo.preambleTransMax = 100;
3376  break;
3377  case 10:
3378  rachConfigCommon->raSupervisionInfo.preambleTransMax = 200;
3379  break;
3380  default:
3381  rachConfigCommon->raSupervisionInfo.preambleTransMax = 0;
3382  }
3383 
3384  // ra-ResponseWindowSize
3385  bIterator = DeserializeEnum (8,&n,bIterator);
3386  switch (n)
3387  {
3388  case 0:
3389  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 2;
3390  break;
3391  case 1:
3392  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 3;
3393  break;
3394  case 2:
3395  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 4;
3396  break;
3397  case 3:
3398  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 5;
3399  break;
3400  case 4:
3401  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 6;
3402  break;
3403  case 5:
3404  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 7;
3405  break;
3406  case 6:
3407  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 8;
3408  break;
3409  case 7:
3410  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 10;
3411  break;
3412  default:
3413  rachConfigCommon->raSupervisionInfo.raResponseWindowSize = 0;
3414  }
3415 
3416  bIterator = DeserializeEnum (8,&n,bIterator); // mac-ContentionResolutionTimer
3417  bIterator = DeserializeInteger (&n,1,8,bIterator); //maxHARQ-Msg3Tx
3418  return bIterator;
3419 }
3420 
3423 {
3424  std::bitset<0> bitset0;
3425  int n;
3426 
3427  bIterator = DeserializeSequence (&bitset0,true,bIterator);
3428 
3429  // rach-ConfigCommon
3430  bIterator = DeserializeRachConfigCommon (&radioResourceConfigCommonSib->rachConfigCommon, bIterator);
3431 
3432  // bcch-Config
3433  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3434  bIterator = DeserializeEnum (4,&n,bIterator); // modificationPeriodCoeff
3435 
3436  // pcch-Config
3437  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3438  bIterator = DeserializeEnum (4,&n,bIterator); // defaultPagingCycle
3439  bIterator = DeserializeEnum (8,&n,bIterator); // nB
3440 
3441  // prach-Config
3442  std::bitset<1> prachConfigInfoPresent;
3443  bIterator = DeserializeSequence (&prachConfigInfoPresent,false,bIterator);
3444  // prach-Config -> rootSequenceIndex
3445  bIterator = DeserializeInteger (&n,0,1023,bIterator);
3446  // prach-Config -> prach-ConfigInfo
3447  if (prachConfigInfoPresent[0])
3448  {
3449  // ...
3450  }
3451 
3452  // pdsch-ConfigCommon
3453  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3454  bIterator = DeserializeInteger (&n,-60,50,bIterator); // referenceSignalPower
3455  bIterator = DeserializeInteger (&n,0,3,bIterator); // p-b
3456 
3457  // pusch-ConfigCommon
3458  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3459 
3460  // pusch-ConfigCommon -> pusch-ConfigBasic
3461  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3462 
3463  // pusch-ConfigCommon -> pusch-ConfigBasic -> n-SB
3464  bIterator = DeserializeInteger (&n,1,4,bIterator);
3465 
3466  // pusch-ConfigCommon -> pusch-ConfigBasic -> hoppingMode
3467  bIterator = DeserializeEnum (2,&n,bIterator);
3468 
3469  // pusch-ConfigCommon -> pusch-ConfigBasic -> pusch-HoppingOffset
3470  bIterator = DeserializeInteger (&n,0,98,bIterator);
3471 
3472  // pusch-ConfigCommon -> pusch-ConfigBasic -> enable64QAM
3473  bool dummyBoolean;
3474  bIterator = DeserializeBoolean (&dummyBoolean,bIterator);
3475 
3476  // ul-ReferenceSignalsPUSCH
3477  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3478 
3479  // groupHoppingEnabled
3480  bIterator = DeserializeBoolean (&dummyBoolean,bIterator);
3481 
3482  // groupAssignmentPUSCH
3483  bIterator = DeserializeInteger (&n,0,29,bIterator);
3484 
3485  // sequenceHoppingEnabled
3486  bIterator = DeserializeBoolean (&dummyBoolean,bIterator);
3487 
3488  // cyclicShift
3489  bIterator = DeserializeInteger (&n,0,7,bIterator);
3490 
3491  // pucch-ConfigCommon
3492  bIterator = DeserializeEnum (3,&n,bIterator); // deltaPUCCH-Shift
3493  bIterator = DeserializeInteger (&n,0,98,bIterator); // nRB-CQI
3494  bIterator = DeserializeInteger (&n,0,7,bIterator); // nCS-AN
3495  bIterator = DeserializeInteger (&n,0,2047,bIterator); // n1PUCCH-AN
3496 
3497  // soundingRS-UL-ConfigCommon
3498  int choice;
3499  bIterator = DeserializeChoice (2,false,&choice,bIterator);
3500  if (choice == 0)
3501  {
3502  bIterator = DeserializeNull (bIterator); // release
3503  }
3504  if (choice == 1)
3505  {
3506  // setup
3507  // ...
3508  }
3509 
3510  // uplinkPowerControlCommon
3511  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3512  bIterator = DeserializeInteger (&n,-126,24,bIterator); // p0-NominalPUSCH
3513  bIterator = DeserializeEnum (8,&n,bIterator); // alpha
3514  bIterator = DeserializeInteger (&n,-127,-96,bIterator); // p0-NominalPUCCH
3515  //deltaFList-PUCCH
3516  bIterator = DeserializeSequence (&bitset0,false,bIterator);
3517  bIterator = DeserializeEnum (3,&n,bIterator); // deltaF-PUCCH-Format1
3518  bIterator = DeserializeEnum (3,&n,bIterator); // deltaF-PUCCH-Format1b
3519  bIterator = DeserializeEnum (4,&n,bIterator); // deltaF-PUCCH-Format2
3520  bIterator = DeserializeEnum (3,&n,bIterator); // deltaF-PUCCH-Format2a
3521  bIterator = DeserializeEnum (3,&n,bIterator); // deltaF-PUCCH-Format2b
3522  bIterator = DeserializeInteger (&n,-1,6,bIterator); // deltaPreambleMsg3
3523 
3524  // ul-CyclicPrefixLength
3525  bIterator = DeserializeEnum (2,&n,bIterator);
3526 
3527  return bIterator;
3528 }
3529 
3532 {
3533  int n;
3534  std::bitset<0> b0;
3535  std::bitset<4> measResultOptionalPresent;
3536  // bIterator = DeserializeSequence (&measResultNeighCellsPresent,true,bIterator);
3537  bIterator = DeserializeSequence (&measResultOptionalPresent,true,bIterator);
3538 
3539  // Deserialize measId
3540  bIterator = DeserializeInteger (&n, 1, MAX_MEAS_ID, bIterator);
3541  measResults->measId = n;
3542 
3543  // Deserialize measResultServCell
3544  bIterator = DeserializeSequence (&b0,false,bIterator);
3545 
3546  // Deserialize rsrpResult
3547  bIterator = DeserializeInteger (&n, 0, 97, bIterator);
3548  measResults->rsrpResult = n;
3549 
3550  // Deserialize rsrqResult
3551  bIterator = DeserializeInteger (&n, 0, 34, bIterator);
3552  measResults->rsrqResult = n;
3553 
3554  measResults->haveMeasResultNeighCells = measResultOptionalPresent[0];
3555  measResults->haveScellsMeas = measResultOptionalPresent[3];
3556  if ( measResults->haveMeasResultNeighCells)
3557  {
3558  int measResultNeighCellsChoice;
3559 
3560  // Deserialize measResultNeighCells
3561  bIterator = DeserializeChoice (4,false,&measResultNeighCellsChoice,bIterator);
3562 
3563  if (measResultNeighCellsChoice == 0)
3564  {
3565  // Deserialize measResultListEUTRA
3566  int numElems;
3567  bIterator = DeserializeSequenceOf (&numElems,MAX_CELL_REPORT,1,bIterator);
3568 
3569  for (int i = 0; i < numElems; i++)
3570  {
3571  LteRrcSap::MeasResultEutra measResultEutra;
3572 
3573  std::bitset<1> isCgiInfoPresent;
3574  bIterator = DeserializeSequence (&isCgiInfoPresent,false,bIterator);
3575 
3576  // PhysCellId
3577  bIterator = DeserializeInteger (&n,0,503,bIterator);
3578  measResultEutra.physCellId = n;
3579 
3580  measResultEutra.haveCgiInfo = isCgiInfoPresent[0];
3581  if (isCgiInfoPresent[0])
3582  {
3583  std::bitset<1> havePlmnIdentityList;
3584  bIterator = DeserializeSequence (&havePlmnIdentityList,false,bIterator);
3585 
3586  // Deserialize cellGlobalId
3587  bIterator = DeserializeSequence (&b0,false,bIterator);
3588 
3589  // Deserialize plmn-Identity
3590  bIterator = DeserializePlmnIdentity (&measResultEutra.cgiInfo.plmnIdentity,bIterator);
3591 
3592  // Deserialize CellIdentity
3593  std::bitset<28> cellId;
3594  bIterator = DeserializeBitstring (&cellId,bIterator);
3595  measResultEutra.cgiInfo.cellIdentity = cellId.to_ulong ();
3596 
3597  // Deserialize trackingAreaCode
3598  std::bitset<16> trArCo;
3599  bIterator = DeserializeBitstring (&trArCo,bIterator);
3600  measResultEutra.cgiInfo.trackingAreaCode = trArCo.to_ulong ();
3601 
3602  // Deserialize plmn-IdentityList
3603  if (havePlmnIdentityList[0])
3604  {
3605  int numPlmnElems;
3606  bIterator = DeserializeSequenceOf (&numPlmnElems, 5, 1, bIterator);
3607 
3608  for ( int j = 0; j < numPlmnElems; j++)
3609  {
3610  uint32_t plmnId;
3611  bIterator = DeserializePlmnIdentity (&plmnId,bIterator);
3612  measResultEutra.cgiInfo.plmnIdentityList.push_back (plmnId);
3613  }
3614  }
3615  }
3616 
3617  // Deserialize measResult
3618  std::bitset<2> measResultOpts;
3619  bIterator = DeserializeSequence (&measResultOpts, true, bIterator);
3620 
3621  measResultEutra.haveRsrpResult = measResultOpts[1];
3622  if (measResultOpts[1])
3623  {
3624  // Deserialize rsrpResult
3625  bIterator = DeserializeInteger (&n,0,97,bIterator);
3626  measResultEutra.rsrpResult = n;
3627  }
3628 
3629  measResultEutra.haveRsrqResult = measResultOpts[0];
3630  if (measResultOpts[0])
3631  {
3632  // Deserialize rsrqResult
3633  bIterator = DeserializeInteger (&n,0,34,bIterator);
3634  measResultEutra.rsrqResult = n;
3635  }
3636 
3637  measResults->measResultListEutra.push_back (measResultEutra);
3638  }
3639  }
3640 
3641  if (measResultNeighCellsChoice == 1)
3642  {
3643  // Deserialize measResultListUTRA
3644  // ...
3645  }
3646 
3647  if (measResultNeighCellsChoice == 2)
3648  {
3649  // Deserialize measResultListGERAN
3650  // ...
3651  }
3652  if (measResultNeighCellsChoice == 3)
3653  {
3654  // Deserialize measResultsCDMA2000
3655  // ...
3656  }
3657  }
3658  if (measResults->haveScellsMeas)
3659  {
3660 
3661  int numElems;
3662  bIterator = DeserializeSequenceOf (&numElems,MAX_SCELL_REPORT,1,bIterator);
3663  for (int i = 0; i < numElems; i++)
3664  {
3665  LteRrcSap::MeasResultScell measResultScell;
3666  int measScellId;
3667  // Deserialize measId
3668  bIterator = DeserializeInteger (&measScellId, 1,MAX_SCELL_REPORT,bIterator);
3669  measResultScell.servFreqId = measScellId;
3670  std::bitset<2> measResultScellPresent;
3671  bIterator = DeserializeSequence (&measResultScellPresent,true,bIterator);
3672  measResults->measScellResultList.haveMeasurementResultsServingSCells = measResultScellPresent[0];
3673  measResults->measScellResultList.haveMeasurementResultsNeighCell = measResultScellPresent[1];
3675  {
3676  // Deserialize measResult
3677  std::bitset<2> measResultOpts;
3678  bIterator = DeserializeSequence (&measResultOpts, true, bIterator);
3679 
3680  measResultScell.haveRsrpResult = measResultOpts[1];
3681  if (measResultOpts[1])
3682  {
3683  // Deserialize rsrpResult
3684  bIterator = DeserializeInteger (&n,0,97,bIterator);
3685  measResultScell.rsrpResult = n;
3686  }
3687 
3688  measResultScell.haveRsrqResult = measResultOpts[0];
3689  if (measResultOpts[0])
3690  {
3691  // Deserialize rsrqResult
3692  bIterator = DeserializeInteger (&n,0,34,bIterator);
3693  measResultScell.rsrqResult = n;
3694  }
3695  }
3697  {
3698  // Deserialize measResultBestNeighCell
3699  }
3700  measResults->measScellResultList.measResultScell.push_back (measResultScell);
3701  }
3702 
3703  }
3704  return bIterator;
3705 }
3706 
3709 {
3710  int n;
3711  std::bitset<1> isMccPresent;
3712  bIterator = DeserializeSequence (&isMccPresent,false,bIterator);
3713 
3714  if (isMccPresent[0])
3715  {
3716  // Deserialize mcc
3717  // ...
3718  }
3719 
3720  // Deserialize mnc
3721  int mncDigits;
3722  int mnc = 0;
3723  bIterator = DeserializeSequenceOf (&mncDigits,3,2,bIterator);
3724 
3725  for (int j = mncDigits - 1; j >= 0; j--)
3726  {
3727  bIterator = DeserializeInteger (&n,0,9,bIterator);
3728  mnc += n * pow (10,j);
3729  }
3730 
3731  *plmnId = mnc;
3732 
3733  // cellReservedForOperatorUse
3734  bIterator = DeserializeEnum (2,&n,bIterator);
3735  return bIterator;
3736 }
3737 
3740 {
3741  std::bitset<0> bitset0;
3742  std::bitset<2> bitset2;
3743  std::bitset<11> bitset11;
3744  int n;
3745 
3746  // measConfig
3747  bIterator = DeserializeSequence (&bitset11,true,bIterator);
3748 
3749  if (bitset11[10])
3750  {
3751  // measObjectToRemoveList
3752  int measObjectToRemoveListElems;
3753  bIterator = DeserializeSequenceOf (&measObjectToRemoveListElems, MAX_OBJECT_ID, 1, bIterator);
3754 
3755  for (int i = 0; i < measObjectToRemoveListElems; i++)
3756  {
3757  bIterator = DeserializeInteger (&n, 1, MAX_OBJECT_ID, bIterator);
3758  measConfig->measObjectToRemoveList.push_back (n);
3759  }
3760  }
3761 
3762  if (bitset11[9])
3763  {
3764  // measObjectToAddModList
3765  int measObjectToAddModListElems;
3766  bIterator = DeserializeSequenceOf (&measObjectToAddModListElems, MAX_OBJECT_ID, 1, bIterator);
3767 
3768  for (int i = 0; i < measObjectToAddModListElems; i++)
3769  {
3771 
3772  bIterator = DeserializeSequence (&bitset0, false, bIterator);
3773 
3774  bIterator = DeserializeInteger (&n, 1, MAX_OBJECT_ID, bIterator);
3775  elem.measObjectId = n;
3776 
3777  int measObjectChoice;
3778  bIterator = DeserializeChoice (4, true, &measObjectChoice, bIterator);
3779 
3780  switch (measObjectChoice)
3781  {
3782  case 1:
3783  // Deserialize measObjectUTRA
3784  // ...
3785  break;
3786 
3787  case 2:
3788  // Deserialize measObjectGERAN
3789  // ...
3790  break;
3791 
3792  case 3:
3793  // Deserialize measObjectCDMA2000
3794  // ...
3795  break;
3796 
3797  case 0:
3798  default:
3799  // Deserialize measObjectEUTRA
3800  std::bitset<5> measObjectEutraOpts;
3801  bIterator = DeserializeSequence (&measObjectEutraOpts, true, bIterator);
3802 
3803  // carrierFreq
3804  bIterator = DeserializeInteger (&n, 0, MAX_EARFCN, bIterator);
3805  elem.measObjectEutra.carrierFreq = n;
3806 
3807  // allowedMeasBandwidth
3808  bIterator = DeserializeEnum (6, &n, bIterator);
3809  switch (n)
3810  {
3811  case 0:
3813  break;
3814  case 1:
3816  break;
3817  case 2:
3819  break;
3820  case 3:
3822  break;
3823  case 4:
3825  break;
3826  case 5:
3827  default:
3829  break;
3830  }
3831 
3832  // presenceAntennaPort1
3833  bIterator = DeserializeBoolean (&elem.measObjectEutra.presenceAntennaPort1, bIterator);
3834 
3835  // neighCellConfig
3836  bIterator = DeserializeBitstring (&bitset2, bIterator);
3837  elem.measObjectEutra.neighCellConfig = bitset2.to_ulong ();
3838 
3839  // offsetFreq
3840  bIterator = DeserializeQoffsetRange (&elem.measObjectEutra.offsetFreq, bIterator);
3841 
3842  if (measObjectEutraOpts[4])
3843  {
3844  // cellsToRemoveList
3845  int numElems;
3846  bIterator = DeserializeSequenceOf (&numElems, MAX_CELL_MEAS, 1, bIterator);
3847 
3848  for (int i = 0; i < numElems; i++)
3849  {
3850  bIterator = DeserializeInteger (&n, 1, MAX_CELL_MEAS, bIterator);
3851  elem.measObjectEutra.cellsToRemoveList.push_back (n);
3852  }
3853  }
3854 
3855  if (measObjectEutraOpts[3])
3856  {
3857  // cellsToAddModList
3858  int numElems;
3859  bIterator = DeserializeSequenceOf (&numElems, MAX_CELL_MEAS, 1, bIterator);
3860 
3861  for (int i = 0; i < numElems; i++)
3862  {
3863  LteRrcSap::CellsToAddMod cellsToAddMod;
3864 
3865  bIterator = DeserializeSequence (&bitset0, false, bIterator);
3866 
3867  // cellIndex
3868  bIterator = DeserializeInteger (&n, 1, MAX_CELL_MEAS, bIterator);
3869  cellsToAddMod.cellIndex = n;
3870 
3871  // PhysCellId
3872  bIterator = DeserializeInteger (&n, 0, 503, bIterator);
3873  cellsToAddMod.physCellId = n;
3874 
3875  // cellIndividualOffset
3876  bIterator = DeserializeQoffsetRange ( &cellsToAddMod.cellIndividualOffset, bIterator);
3877 
3878  elem.measObjectEutra.cellsToAddModList.push_back (cellsToAddMod);
3879  }
3880  }
3881 
3882  if (measObjectEutraOpts[2])
3883  {
3884  // blackCellsToRemoveList
3885  int numElems;
3886  bIterator = DeserializeSequenceOf (&numElems, MAX_CELL_MEAS, 1, bIterator);
3887 
3888  for (int i = 0; i < numElems; i++)
3889  {
3890  bIterator = DeserializeInteger (&n, 1, MAX_CELL_MEAS, bIterator);
3891  elem.measObjectEutra.blackCellsToRemoveList.push_back (n);
3892  }
3893  }
3894 
3895 
3896  if (measObjectEutraOpts[1])
3897  {
3898  // blackCellsToAddModList
3899  int numElems;
3900  bIterator = DeserializeSequenceOf (&numElems, MAX_CELL_MEAS, 1, bIterator);
3901 
3902  for (int i = 0; i < numElems; i++)
3903  {
3904  LteRrcSap::BlackCellsToAddMod blackCellsToAddMod;
3905  bIterator = DeserializeSequence (&bitset0, false, bIterator);
3906 
3907  bIterator = DeserializeInteger (&n, 1, MAX_CELL_MEAS, bIterator);
3908  blackCellsToAddMod.cellIndex = n;
3909 
3910  // PhysCellIdRange
3911  std::bitset<1> isRangePresent;
3912  bIterator = DeserializeSequence (&isRangePresent, false, bIterator);
3913 
3914  // start
3915  bIterator = DeserializeInteger (&n, 0, 503, bIterator);
3916  blackCellsToAddMod.physCellIdRange.start = n;
3917 
3918  blackCellsToAddMod.physCellIdRange.haveRange = isRangePresent[0];
3919  // initialize range to silence compiler warning
3920  blackCellsToAddMod.physCellIdRange.range = 0;
3921  if (blackCellsToAddMod.physCellIdRange.haveRange)
3922  {
3923  // range
3924  bIterator = DeserializeEnum (16, &n, bIterator);
3925  switch (n)
3926  {
3927  case 0:
3928  blackCellsToAddMod.physCellIdRange.range = 4;
3929  break;
3930  case 1:
3931  blackCellsToAddMod.physCellIdRange.range = 8;
3932  break;
3933  case 2:
3934  blackCellsToAddMod.physCellIdRange.range = 12;
3935  break;
3936  case 3:
3937  blackCellsToAddMod.physCellIdRange.range = 16;
3938  break;
3939  case 4:
3940  blackCellsToAddMod.physCellIdRange.range = 24;
3941  break;
3942  case 5:
3943  blackCellsToAddMod.physCellIdRange.range = 32;
3944  break;
3945  case 6:
3946  blackCellsToAddMod.physCellIdRange.range = 48;
3947  break;
3948  case 7:
3949  blackCellsToAddMod.physCellIdRange.range = 64;
3950  break;
3951  case 8:
3952  blackCellsToAddMod.physCellIdRange.range = 84;
3953  break;
3954  case 9:
3955  blackCellsToAddMod.physCellIdRange.range = 96;
3956  break;
3957  case 10:
3958  blackCellsToAddMod.physCellIdRange.range = 128;
3959  break;
3960  case 11:
3961  blackCellsToAddMod.physCellIdRange.range = 168;
3962  break;
3963  case 12:
3964  blackCellsToAddMod.physCellIdRange.range = 252;
3965  break;
3966  case 13:
3967  blackCellsToAddMod.physCellIdRange.range = 504;
3968  break;
3969  default:
3970  blackCellsToAddMod.physCellIdRange.range = 0;
3971  }
3972  }
3973 
3974  elem.measObjectEutra.blackCellsToAddModList.push_back (blackCellsToAddMod);
3975  }
3976  }
3977 
3978  elem.measObjectEutra.haveCellForWhichToReportCGI = measObjectEutraOpts[0];
3979  if (measObjectEutraOpts[0])
3980  {
3981  // cellForWhichToReportCGI
3982  bIterator = DeserializeInteger (&n, 0, 503, bIterator);
3984  }
3985  }
3986  measConfig->measObjectToAddModList.push_back (elem);
3987  }
3988  }
3989 
3990  if (bitset11[8])
3991  {
3992  // reportConfigToRemoveList
3993  int reportConfigToRemoveListElems;
3994  bIterator = DeserializeSequenceOf (&reportConfigToRemoveListElems, MAX_REPORT_CONFIG_ID, 1, bIterator);
3995 
3996  for (int i = 0; i < reportConfigToRemoveListElems; i++)
3997  {
3998  bIterator = DeserializeInteger (&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
3999  measConfig->reportConfigToRemoveList.push_back (n);
4000  }
4001  }
4002 
4003  if (bitset11[7])
4004  {
4005  // reportConfigToAddModList
4006  int reportConfigToAddModListElems;
4007  bIterator = DeserializeSequenceOf (&reportConfigToAddModListElems, MAX_REPORT_CONFIG_ID, 1, bIterator);
4008 
4009  for (int i = 0; i < reportConfigToAddModListElems; i++)
4010  {
4012 
4013  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4014  bIterator = DeserializeInteger (&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
4015  elem.reportConfigId = n;
4016 
4017  // Deserialize reportConfig
4018  int reportConfigChoice;
4019  bIterator = DeserializeChoice (2, false, &reportConfigChoice, bIterator);
4020 
4021  if (reportConfigChoice == 0)
4022  {
4023  // reportConfigEUTRA
4024  bIterator = DeserializeSequence (&bitset0, true, bIterator);
4025 
4026  // triggerType
4027  int triggerTypeChoice;
4028  bIterator = DeserializeChoice (2, false, &triggerTypeChoice, bIterator);
4029 
4030  if (triggerTypeChoice == 0)
4031  {
4032  // event
4034  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4035 
4036  // eventId
4037  int eventIdChoice;
4038  bIterator = DeserializeChoice (5, true, &eventIdChoice, bIterator);
4039 
4040  switch (eventIdChoice)
4041  {
4042  case 0:
4044  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4045  bIterator = DeserializeThresholdEutra (&elem.reportConfigEutra.threshold1, bIterator);
4046  break;
4047 
4048  case 1:
4050  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4051  bIterator = DeserializeThresholdEutra (&elem.reportConfigEutra.threshold1, bIterator);
4052  break;
4053 
4054  case 2:
4056  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4057  bIterator = DeserializeInteger (&n, -30, 30, bIterator);
4058  elem.reportConfigEutra.a3Offset = n;
4059  bIterator = DeserializeBoolean (&elem.reportConfigEutra.reportOnLeave, bIterator);
4060  break;
4061 
4062  case 3:
4064  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4065  bIterator = DeserializeThresholdEutra (&elem.reportConfigEutra.threshold1, bIterator);
4066  break;
4067 
4068  case 4:
4069  default:
4071  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4072  bIterator = DeserializeThresholdEutra (&elem.reportConfigEutra.threshold1, bIterator);
4073  bIterator = DeserializeThresholdEutra (&elem.reportConfigEutra.threshold2, bIterator);
4074  }
4075 
4076  bIterator = DeserializeInteger (&n, 0, 30, bIterator);
4077  elem.reportConfigEutra.hysteresis = n;
4078 
4079  bIterator = DeserializeEnum (16, &n, bIterator);
4080  switch (n)
4081  {
4082  case 0:
4084  break;
4085  case 1:
4086  elem.reportConfigEutra.timeToTrigger = 40;
4087  break;
4088  case 2:
4089  elem.reportConfigEutra.timeToTrigger = 64;
4090  break;
4091  case 3:
4092  elem.reportConfigEutra.timeToTrigger = 80;
4093  break;
4094  case 4:
4095  elem.reportConfigEutra.timeToTrigger = 100;
4096  break;
4097  case 5:
4098  elem.reportConfigEutra.timeToTrigger = 128;
4099  break;
4100  case 6:
4101  elem.reportConfigEutra.timeToTrigger = 160;
4102  break;
4103  case 7:
4104  elem.reportConfigEutra.timeToTrigger = 256;
4105  break;
4106  case 8:
4107  elem.reportConfigEutra.timeToTrigger = 320;
4108  break;
4109  case 9:
4110  elem.reportConfigEutra.timeToTrigger = 480;
4111  break;
4112  case 10:
4113  elem.reportConfigEutra.timeToTrigger = 512;
4114  break;
4115  case 11:
4116  elem.reportConfigEutra.timeToTrigger = 640;
4117  break;
4118  case 12:
4119  elem.reportConfigEutra.timeToTrigger = 1024;
4120  break;
4121  case 13:
4122  elem.reportConfigEutra.timeToTrigger = 1280;
4123  break;
4124  case 14:
4125  elem.reportConfigEutra.timeToTrigger = 2560;
4126  break;
4127  case 15:
4128  default:
4129  elem.reportConfigEutra.timeToTrigger = 5120;
4130  break;
4131  }
4132  }
4133 
4134  if (triggerTypeChoice == 1)
4135  {
4136  // periodical
4138 
4139  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4140  bIterator = DeserializeEnum (2, &n, bIterator);
4141  if (n == 0)
4142  {
4144  }
4145  else
4146  {
4148  }
4149  }
4150 
4151  // triggerQuantity
4152  bIterator = DeserializeEnum (2, &n, bIterator);
4153  if (n == 0)
4154  {
4156  }
4157  else
4158  {
4160  }
4161 
4162  // reportQuantity
4163  bIterator = DeserializeEnum (2, &n, bIterator);
4164  if (n == 0)
4165  {
4167  }
4168  else
4169  {
4171  }
4172 
4173  // maxReportCells
4174  bIterator = DeserializeInteger (&n, 1, MAX_CELL_REPORT, bIterator);
4176 
4177  // reportInterval
4178  bIterator = DeserializeEnum (16, &n, bIterator);
4179  switch (n)
4180  {
4181  case 0:
4183  break;
4184  case 1:
4186  break;
4187  case 2:
4189  break;
4190  case 3:
4192  break;
4193  case 4:
4195  break;
4196  case 5:
4198  break;
4199  case 6:
4201  break;
4202  case 7:
4204  break;
4205  case 8:
4207  break;
4208  case 9:
4210  break;
4211  case 10:
4213  break;
4214  case 11:
4216  break;
4217  case 12:
4219  break;
4220  case 13:
4222  break;
4223  case 14:
4225  break;
4226  case 15:
4227  default:
4229  }
4230 
4231  // reportAmount
4232  bIterator = DeserializeEnum (8, &n, bIterator);
4233  switch (n)
4234  {
4235  case 0:
4237  break;
4238  case 1:
4240  break;
4241  case 2:
4243  break;
4244  case 3:
4246  break;
4247  case 4:
4248  elem.reportConfigEutra.reportAmount = 16;
4249  break;
4250  case 5:
4251  elem.reportConfigEutra.reportAmount = 32;
4252  break;
4253  case 6:
4254  elem.reportConfigEutra.reportAmount = 64;
4255  break;
4256  default:
4258  }
4259  }
4260 
4261  if (reportConfigChoice == 1)
4262  {
4263  // ReportConfigInterRAT
4264  // ...
4265  }
4266 
4267  measConfig->reportConfigToAddModList.push_back (elem);
4268  }
4269  }
4270 
4271  if (bitset11[6])
4272  {
4273  // measIdToRemoveList
4274  int measIdToRemoveListElems;
4275  bIterator = DeserializeSequenceOf (&measIdToRemoveListElems, MAX_MEAS_ID, 1, bIterator);
4276 
4277  for (int i = 0; i < measIdToRemoveListElems; i++)
4278  {
4279  bIterator = DeserializeInteger (&n, 1, MAX_MEAS_ID, bIterator);
4280  measConfig->measIdToRemoveList.push_back (n);
4281  }
4282  }
4283 
4284  if (bitset11[5])
4285  {
4286  // measIdToAddModList
4287  int measIdToAddModListElems;
4288  bIterator = DeserializeSequenceOf (&measIdToAddModListElems, MAX_MEAS_ID, 1, bIterator);
4289 
4290  for (int i = 0; i < measIdToAddModListElems; i++)
4291  {
4293 
4294  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4295 
4296  bIterator = DeserializeInteger (&n, 1, MAX_MEAS_ID, bIterator);
4297  elem.measId = n;
4298 
4299  bIterator = DeserializeInteger (&n, 1, MAX_OBJECT_ID, bIterator);
4300  elem.measObjectId = n;
4301 
4302  bIterator = DeserializeInteger (&n, 1, MAX_REPORT_CONFIG_ID, bIterator);
4303  elem.reportConfigId = n;
4304 
4305  measConfig->measIdToAddModList.push_back (elem);
4306  }
4307  }
4308 
4309  measConfig->haveQuantityConfig = bitset11[4];
4310  if (measConfig->haveQuantityConfig)
4311  {
4312  // quantityConfig
4313  std::bitset<4> quantityConfigOpts;
4314  bIterator = DeserializeSequence (&quantityConfigOpts, true, bIterator);
4315 
4316  if (quantityConfigOpts[3])
4317  {
4318  // quantityConfigEUTRA
4319  bIterator = DeserializeSequence (&bitset0,false,bIterator);
4320  bIterator = DeserializeEnum (16, &n, bIterator);
4321  switch (n)
4322  {
4323  case 0:
4324  measConfig->quantityConfig.filterCoefficientRSRP = 0;
4325  break;
4326  case 1:
4327  measConfig->quantityConfig.filterCoefficientRSRP = 1;
4328  break;
4329  case 2:
4330  measConfig->quantityConfig.filterCoefficientRSRP = 2;
4331  break;
4332  case 3:
4333  measConfig->quantityConfig.filterCoefficientRSRP = 3;
4334  break;
4335  case 4:
4336  measConfig->quantityConfig.filterCoefficientRSRP = 4;
4337  break;
4338  case 5:
4339  measConfig->quantityConfig.filterCoefficientRSRP = 5;
4340  break;
4341  case 6:
4342  measConfig->quantityConfig.filterCoefficientRSRP = 6;
4343  break;
4344  case 7:
4345  measConfig->quantityConfig.filterCoefficientRSRP = 7;
4346  break;
4347  case 8:
4348  measConfig->quantityConfig.filterCoefficientRSRP = 8;
4349  break;
4350  case 9:
4351  measConfig->quantityConfig.filterCoefficientRSRP = 9;
4352  break;
4353  case 10:
4354  measConfig->quantityConfig.filterCoefficientRSRP = 11;
4355  break;
4356  case 11:
4357  measConfig->quantityConfig.filterCoefficientRSRP = 13;
4358  break;
4359  case 12:
4360  measConfig->quantityConfig.filterCoefficientRSRP = 15;
4361  break;
4362  case 13:
4363  measConfig->quantityConfig.filterCoefficientRSRP = 17;
4364  break;
4365  case 14:
4366  measConfig->quantityConfig.filterCoefficientRSRP = 19;
4367  break;
4368  case 15:
4369  measConfig->quantityConfig.filterCoefficientRSRP = 0;
4370  break;
4371  default:
4372  measConfig->quantityConfig.filterCoefficientRSRP = 4;
4373  }
4374  bIterator = DeserializeEnum (16, &n, bIterator);
4375  switch (n)
4376  {
4377  case 0:
4378  measConfig->quantityConfig.filterCoefficientRSRQ = 0;
4379  break;
4380  case 1:
4381  measConfig->quantityConfig.filterCoefficientRSRQ = 1;
4382  break;
4383  case 2:
4384  measConfig->quantityConfig.filterCoefficientRSRQ = 2;
4385  break;
4386  case 3:
4387  measConfig->quantityConfig.filterCoefficientRSRQ = 3;
4388  break;
4389  case 4:
4390  measConfig->quantityConfig.filterCoefficientRSRQ = 4;
4391  break;
4392  case 5:
4393  measConfig->quantityConfig.filterCoefficientRSRQ = 5;
4394  break;
4395  case 6:
4396  measConfig->quantityConfig.filterCoefficientRSRQ = 6;
4397  break;
4398  case 7:
4399  measConfig->quantityConfig.filterCoefficientRSRQ = 7;
4400  break;
4401  case 8:
4402  measConfig->quantityConfig.filterCoefficientRSRQ = 8;
4403  break;
4404  case 9:
4405  measConfig->quantityConfig.filterCoefficientRSRQ = 9;
4406  break;
4407  case 10:
4408  measConfig->quantityConfig.filterCoefficientRSRQ = 11;
4409  break;
4410  case 11:
4411  measConfig->quantityConfig.filterCoefficientRSRQ = 13;
4412  break;
4413  case 12:
4414  measConfig->quantityConfig.filterCoefficientRSRQ = 15;
4415  break;
4416  case 13:
4417  measConfig->quantityConfig.filterCoefficientRSRQ = 17;
4418  break;
4419  case 14:
4420  measConfig->quantityConfig.filterCoefficientRSRQ = 19;
4421  break;
4422  case 15:
4423  measConfig->quantityConfig.filterCoefficientRSRQ = 0;
4424  break;
4425  default:
4426  measConfig->quantityConfig.filterCoefficientRSRQ = 4;
4427  }
4428  }
4429  if (quantityConfigOpts[2])
4430  {
4431  // quantityConfigUTRA
4432  // ...
4433  }
4434  if (quantityConfigOpts[1])
4435  {
4436  // quantityConfigGERAN
4437  // ...
4438  }
4439  if (quantityConfigOpts[0])
4440  {
4441  // quantityConfigCDMA2000
4442  // ...
4443  }
4444  }
4445 
4446  measConfig->haveMeasGapConfig = bitset11[3];
4447  if (measConfig->haveMeasGapConfig)
4448  {
4449  // measGapConfig
4450  int measGapConfigChoice;
4451  bIterator = DeserializeChoice (2, false, &measGapConfigChoice, bIterator);
4452  switch (measGapConfigChoice)
4453  {
4454  case 0:
4456  bIterator = DeserializeNull (bIterator);
4457  break;
4458  case 1:
4459  default:
4461  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4462 
4463  int gapOffsetChoice;
4464  bIterator = DeserializeChoice (2, true, &gapOffsetChoice, bIterator);
4465  switch (gapOffsetChoice)
4466  {
4467  case 0:
4469  bIterator = DeserializeInteger (&n, 0, 39, bIterator);
4470  measConfig->measGapConfig.gapOffsetValue = n;
4471  break;
4472  case 1:
4473  default:
4475  bIterator = DeserializeInteger (&n, 0, 79, bIterator);
4476  measConfig->measGapConfig.gapOffsetValue = n;
4477  }
4478  }
4479  }
4480 
4481  measConfig->haveSmeasure = bitset11[2];
4482  if (measConfig->haveSmeasure)
4483  {
4484  // s-Measure
4485  bIterator = DeserializeInteger (&n, 0, 97, bIterator);
4486  measConfig->sMeasure = n;
4487  }
4488 
4489  if (bitset11[1])
4490  {
4491  // preRegistrationInfoHRPD
4492  // ...
4493  }
4494 
4495  measConfig->haveSpeedStatePars = bitset11[0];
4496  if (measConfig->haveSpeedStatePars)
4497  {
4498  // speedStatePars
4499  int speedStateParsChoice;
4500  bIterator = DeserializeChoice (2, false, &speedStateParsChoice, bIterator);
4501  switch (speedStateParsChoice)
4502  {
4503  case 0:
4505  bIterator = DeserializeNull (bIterator);
4506  break;
4507  case 1:
4508  default:
4510  bIterator = DeserializeSequence (&bitset0, false, bIterator);
4511 
4512  // Deserialize mobilityStateParameters
4513  // Deserialize t-Evaluation
4514  bIterator = DeserializeEnum (8, &n, bIterator);
4515  switch (n)
4516  {
4517  case 0:
4519  break;
4520  case 1:
4522  break;
4523  case 2:
4525  break;
4526  case 3:
4528  break;
4529  case 4:
4531  break;
4532  default:
4534  }
4535  // Deserialize t-HystNormal
4536  bIterator = DeserializeEnum (8, &n, bIterator);
4537  switch (n)
4538  {
4539  case 0:
4541  break;
4542  case 1:
4544  break;
4545  case 2:
4547  break;
4548  case 3:
4550  break;
4551  case 4:
4553  break;
4554  default:
4556  }
4557 
4558  bIterator = DeserializeInteger (&n, 1, 16, bIterator);
4560 
4561  bIterator = DeserializeInteger (&n, 1, 16, bIterator);
4563 
4564  // Deserialize timeToTriggerSf
4565  bIterator = DeserializeEnum (4, &n, bIterator);
4566  measConfig->speedStatePars.timeToTriggerSf.sfMedium = (n + 1) * 25;
4567  bIterator = DeserializeEnum (4, &n, bIterator);
4568  measConfig->speedStatePars.timeToTriggerSf.sfHigh = (n + 1) * 25;
4569  }
4570  }
4571  return bIterator;
4572 }
4574 
4575 // Constructor
4577 {
4578  m_mmec = std::bitset<8> (0ul);
4579  m_mTmsi = std::bitset<32> (0ul);
4581  m_spare = std::bitset<1> (0ul);
4582 }
4583 
4584 // Destructor
4586 {
4587 }
4588 
4589 TypeId
4591 {
4592  static TypeId tid = TypeId ("ns3::RrcConnectionRequestHeader")
4593  .SetParent<Header> ()
4594  .SetGroupName("Lte")
4595  ;
4596  return tid;
4597 }
4598 
4599 void
4600 RrcConnectionRequestHeader::Print (std::ostream &os) const
4601 {
4602  os << "MMEC:" << m_mmec << std::endl;
4603  os << "MTMSI:" << m_mTmsi << std::endl;
4604  os << "EstablishmentCause:" << m_establishmentCause << std::endl;
4605  os << "Spare: " << m_spare << std::endl;
4606 }
4607 
4608 void
4610 {
4612 
4614 
4615  // Serialize RRCConnectionRequest sequence:
4616  // no default or optional fields. Extension marker not present.
4617  SerializeSequence (std::bitset<0> (),false);
4618 
4619  // Serialize criticalExtensions choice:
4620  // 2 options, selected: 0 (option: rrcConnectionRequest-r8)
4621  SerializeChoice (2,0,false);
4622 
4623  // Serialize RRCConnectionRequest-r8-IEs sequence:
4624  // no default or optional fields. Extension marker not present.
4625  SerializeSequence (std::bitset<0> (),false);
4626 
4627  // Serialize InitialUE-Identity choice:
4628  // 2 options, selected: 0 (option: s-TMSI)
4629  SerializeChoice (2,0,false);
4630 
4631  // Serialize S-TMSI sequence:
4632  // no default or optional fields. Extension marker not present.
4633  SerializeSequence (std::bitset<0> (),false);
4634 
4635  // Serialize mmec : MMEC ::= BIT STRING (SIZE (8))
4637 
4638  // Serialize m-TMSI ::= BIT STRING (SIZE (32))
4640 
4641  // Serialize establishmentCause : EstablishmentCause ::= ENUMERATED
4643 
4644  // Serialize spare : BIT STRING (SIZE (1))
4645  SerializeBitstring (std::bitset<1> ());
4646 
4647  // Finish serialization
4649 }
4650 
4651 uint32_t
4653 {
4654  std::bitset<1> dummy;
4655  std::bitset<0> optionalOrDefaultMask;
4656  int selectedOption;
4657 
4658  bIterator = DeserializeUlCcchMessage (bIterator);
4659 
4660  // Deserialize RCConnectionRequest sequence
4661  bIterator = DeserializeSequence (&optionalOrDefaultMask,false,bIterator);
4662 
4663  // Deserialize criticalExtensions choice:
4664  bIterator = DeserializeChoice (2,false,&selectedOption,bIterator);
4665 
4666  // Deserialize RRCConnectionRequest-r8-IEs sequence
4667  bIterator = DeserializeSequence (&optionalOrDefaultMask,false,bIterator);
4668 
4669  // Deserialize InitialUE-Identity choice
4670  bIterator = DeserializeChoice (2,false,&selectedOption,bIterator);
4671 
4672  // Deserialize S-TMSI sequence
4673  bIterator = DeserializeSequence (&optionalOrDefaultMask,false,bIterator);
4674 
4675  // Deserialize mmec
4676  bIterator = DeserializeBitstring (&m_mmec,bIterator);
4677 
4678  // Deserialize m-TMSI
4679  bIterator = DeserializeBitstring (&m_mTmsi,bIterator);
4680 
4681  // Deserialize establishmentCause
4682  bIterator = DeserializeEnum (8,&selectedOption,bIterator);
4683 
4684  // Deserialize spare
4685  bIterator = DeserializeBitstring (&dummy,bIterator);
4686 
4687  return GetSerializedSize ();
4688 }
4689 
4690 void
4692 {
4693  m_mTmsi = std::bitset<32> ((uint32_t)msg.ueIdentity);
4694  m_mmec = std::bitset<8> ((uint32_t)(msg.ueIdentity >> 32));
4695  m_isDataSerialized = false;
4696 }
4697 
4700 {
4702  msg.ueIdentity = (((uint64_t) m_mmec.to_ulong ()) << 32) | (m_mTmsi.to_ulong ());
4703 
4704  return msg;
4705 }
4706 
4707 std::bitset<8>
4709 {
4710  return m_mmec;
4711 }
4712 
4713 std::bitset<32>
4715 {
4716  return m_mTmsi;
4717 }
4718 
4719 
4722 {
4723 }
4724 
4726 {
4727 }
4728 
4729 void
4730 RrcConnectionSetupHeader::Print (std::ostream &os) const
4731 {
4732  os << "rrcTransactionIdentifier: " << (int)m_rrcTransactionIdentifier << std::endl;
4733  os << "radioResourceConfigDedicated:" << std::endl;
4735 }
4736 
4737 void
4739 {
4741 
4743 
4744  SerializeInteger (15,0,15);
4745 
4746  // Serialize RRCConnectionSetup sequence:
4747  // no default or optional fields. Extension marker not present.
4748  SerializeSequence (std::bitset<0> (),false);
4749 
4750  // Serialize rrc-TransactionIdentifier ::=INTEGER (0..3)
4752 
4753  // Serialize criticalExtensions choice:
4754  // 2 options, selected: 0 (option: c1)
4755  SerializeChoice (2,0,false);
4756 
4757  // Serialize c1 choice:
4758  // 8 options, selected: 0 (option: rrcConnectionSetup-r8)
4759  SerializeChoice (8,0,false);
4760 
4761  // Serialize rrcConnectionSetup-r8 sequence
4762  // 1 optional fields (not present). Extension marker not present.
4763  SerializeSequence (std::bitset<1> (0),false);
4764 
4765  // Serialize RadioResourceConfigDedicated sequence
4767 
4768  // Serialize nonCriticalExtension sequence
4769  // 2 optional fields, none present. No extension marker.
4770  SerializeSequence (std::bitset<2> (0),false);
4771 
4772  // Finish serialization
4774 }
4775 
4776 
4777 uint32_t
4779 {
4780  int n;
4781 
4782  std::bitset<0> bitset0;
4783  std::bitset<1> bitset1;
4784  std::bitset<2> bitset2;
4785 
4786  bIterator = DeserializeDlCcchMessage (bIterator);
4787 
4788  bIterator = DeserializeInteger (&n,0,15,bIterator);
4789 
4790  // Deserialize RRCConnectionSetup sequence
4791  bIterator = DeserializeSequence (&bitset0,false,bIterator);
4792 
4793  // Deserialize rrc-TransactionIdentifier ::=INTEGER (0..3)
4794  bIterator = DeserializeInteger (&n,0,3,bIterator);
4796 
4797  // Deserialize criticalExtensions choice
4798  int criticalExtensionChoice;
4799  bIterator = DeserializeChoice (2,false,&criticalExtensionChoice,bIterator);
4800  if (criticalExtensionChoice == 1)
4801  {
4802  // Deserialize criticalExtensionsFuture
4803  bIterator = DeserializeSequence (&bitset0,false,bIterator);
4804  }
4805  else if (criticalExtensionChoice == 0)
4806  {
4807  // Deserialize c1
4808  int c1;
4809  bIterator = DeserializeChoice (8,false,&c1,bIterator);
4810 
4811  if (c1 > 0)
4812  {
4813  // Deserialize spareX , X:=7..1
4814  bIterator = DeserializeNull (bIterator);
4815  }
4816  else if (c1 == 0)
4817  {
4818  // Deserialize rrcConnectionSetup-r8
4819  // 1 optional fields, no extension marker.
4820  bIterator = DeserializeSequence (&bitset1,false,bIterator);
4821 
4822  // Deserialize radioResourceConfigDedicated
4824 
4825  if (bitset1[0])
4826  {
4827  // Deserialize nonCriticalExtension
4828  // 2 optional fields, no extension marker.
4829  bIterator = DeserializeSequence (&bitset2,false,bIterator);
4830 
4831  // Deserialization of lateR8NonCriticalExtension and nonCriticalExtension
4832  // ...
4833  }
4834  }
4835  }
4836  return GetSerializedSize ();
4837 }
4838 
4839 void
4841 {
4844  m_isDataSerialized = false;
4845 }
4846 
4849 {
4853  return msg;
4854 }
4855 
4856 uint8_t
4858 {
4860 }
4861 
4862 bool
4864 {
4866 }
4867 
4868 std::list<LteRrcSap::SrbToAddMod>
4870 {
4872 }
4873 
4874 std::list<LteRrcSap::DrbToAddMod>
4876 {
4878 }
4879 
4880 std::list<uint8_t>
4882 {
4884 }
4885 
4888 {
4890 }
4891 
4894 {
4896 }
4897 
4899 
4901 {
4902 }
4903 
4905 {
4906 }
4907 
4908 void
4910 {
4912 
4913  // Serialize DCCH message
4915 
4916  // Serialize RRCConnectionSetupComplete sequence:
4917  // no default or optional fields. Extension marker not present.
4918  SerializeSequence (std::bitset<0> (),false);
4919 
4920  // Serialize rrc-TransactionIdentifier
4922 
4923  // Serialize criticalExtensions choice
4924  // 2 options, selected 0 (c1)
4925  SerializeChoice (2,0,false);
4926 
4927  // Choose spare3 NULL
4928  SerializeChoice (4,1,false);
4929 
4930  // Serialize spare3 NULL
4931  SerializeNull ();
4932 
4933  // Finish serialization
4935 }
4936 
4937 uint32_t
4939 {
4940  std::bitset<0> bitset0;
4941 
4942  bIterator = DeserializeUlDcchMessage (bIterator);
4943 
4944  bIterator = DeserializeSequence (&bitset0,false,bIterator);
4945 
4946  int n;
4947  bIterator = DeserializeInteger (&n,0,3,bIterator);
4949 
4950  bIterator = DeserializeChoice (2,false,&n,bIterator);
4951 
4952  if (n == 1)
4953  {
4954  // Deserialize criticalExtensionsFuture
4955  bIterator = DeserializeSequence (&bitset0,false,bIterator);
4956  }
4957  else if (n == 0)
4958  {
4959  // Deserialize c1
4960  int c1Chosen;
4961  bIterator = DeserializeChoice (4,false,&c1Chosen,bIterator);
4962 
4963  if (c1Chosen == 0)
4964  {
4965  // Deserialize rrcConnectionSetupComplete-r8
4966  // ...
4967  }
4968  else
4969  {
4970  bIterator = DeserializeNull (bIterator);
4971  }
4972  }
4973 
4974  return GetSerializedSize ();
4975 }
4976 
4977 void
4979 {
4980  os << "rrcTransactionIdentifier: " << (int) m_rrcTransactionIdentifier << std::endl;
4981 }
4982 
4983 void
4985 {
4987  m_isDataSerialized = false;
4988 }
4989 
4990 uint8_t
4992 {
4994 }
4995 
4998 {
5001  return msg;
5002 }
5003 
5005 
5007 {
5008 }
5009 
5011 {
5012 }
5013 
5014 void
5016 {
5018 
5019  // Serialize DCCH message
5021 
5022  // Serialize RRCConnectionSetupComplete sequence:
5023  // no default or optional fields. Extension marker not present.
5024  SerializeSequence (std::bitset<0> (),false);
5025 
5026  // Serialize rrc-TransactionIdentifier
5028 
5029  // Serialize criticalExtensions choice
5030  // 2 options, selected 1 (criticalExtensionsFuture)
5031  SerializeChoice (2,1,false);
5032 
5033  // Choose criticalExtensionsFuture
5034  SerializeSequence (std::bitset<0> (),false);
5035 
5036  // Finish serialization
5038 }
5039 
5040 uint32_t
5042 {
5043  std::bitset<0> bitset0;
5044  int n;
5045 
5046  bIterator = DeserializeUlDcchMessage (bIterator);
5047  bIterator = DeserializeSequence (&bitset0,false,bIterator);
5048 
5049  bIterator = DeserializeInteger (&n,0,3,bIterator);
5051 
5052  bIterator = DeserializeChoice (2,false,&n,bIterator);
5053 
5054  if (n == 1)
5055  {
5056  // Deserialize criticalExtensionsFuture
5057  bIterator = DeserializeSequence (&bitset0,false,bIterator);
5058  }
5059  else if (n == 0)
5060  {
5061  // Deserialize rrcConnectionReconfigurationComplete-r8
5062  // ...
5063  }
5064 
5065  return GetSerializedSize ();
5066 }
5067 
5068 void
5070 {
5071  os << "rrcTransactionIdentifier: " << (int) m_rrcTransactionIdentifier << std::endl;
5072 }
5073 
5074 void
5076 {
5078  m_isDataSerialized = false;
5079 }
5080 
5083 {
5086  return msg;
5087 }
5088 
5089 uint8_t
5091 {
5093 }
5094 
5096 
5098 {
5099 }
5100 
5102 {
5103 }
5104 
5105 void
5107 {
5109 
5111 
5112  // Serialize RRCConnectionSetupComplete sequence:
5113  // no default or optional fields. Extension marker not present.
5114  SerializeSequence (std::bitset<0> (),false);
5115 
5116  // Serialize rrc-TransactionIdentifier
5118 
5119  // Serialize criticalExtensions choice
5120  // 2 options, selected 0 (c1)
5121  SerializeChoice (2,0,false);
5122 
5123  // Serialize c1 choice
5124  // 8 options, selected 0 (rrcConnectionReconfiguration-r8)
5125  SerializeChoice (8,0,false);
5126 
5127  // Serialize RRCConnectionReconfiguration-r8-IEs sequence:
5128  // 6 optional fields. Extension marker not present.
5129  std::bitset<6> options;
5130  options.set (5,m_haveMeasConfig);
5131  options.set (4,m_haveMobilityControlInfo);
5132  options.set (3,0); // No dedicatedInfoNASList
5133  options.set (2,m_haveRadioResourceConfigDedicated);
5134  options.set (1,0); // No securityConfigHO
5135  options.set (0,m_haveNonCriticalExtension); // Implemented nonCriticalExtension because compatibility with R10 - CA
5136  SerializeSequence (options,false);
5137 
5138  if (m_haveMeasConfig)
5139  {
5141  }
5142 
5144  {
5145  // Serialize MobilityControlInfo
5146 
5147  // 4 optional fields, extension marker present.
5148  std::bitset<4> mobCtrlIntoOptional;
5149  mobCtrlIntoOptional.set (3,m_mobilityControlInfo.haveCarrierFreq);
5150  mobCtrlIntoOptional.set (2,m_mobilityControlInfo.haveCarrierBandwidth);
5151  mobCtrlIntoOptional.set (1,0); // No additionalSpectrumEmission
5152  mobCtrlIntoOptional.set (0,m_mobilityControlInfo.haveRachConfigDedicated);
5153  SerializeSequence (mobCtrlIntoOptional,true);
5154 
5155  // Serialize targetPhysCellId
5157 
5159  {
5160  SerializeSequence (std::bitset<1> (1),false);
5163  }
5164 
5166  {
5167  SerializeSequence (std::bitset<1> (1),false);
5168 
5169  // Serialize dl-Bandwidth
5171  {
5172  case 6:
5173  SerializeEnum (16,0);
5174  break;
5175  case 15:
5176  SerializeEnum (16,1);
5177  break;
5178  case 25:
5179  SerializeEnum (16,2);
5180  break;
5181  case 50:
5182  SerializeEnum (16,3);
5183  break;
5184  case 75:
5185  SerializeEnum (16,4);
5186  break;
5187  case 100:
5188  SerializeEnum (16,5);
5189  break;
5190  default:
5191  SerializeEnum (16,6);
5192  }
5193 
5194  // Serialize ul-Bandwidth
5196  {
5197  case 6:
5198  SerializeEnum (16,0);
5199  break;
5200  case 15:
5201  SerializeEnum (16,1);
5202  break;
5203  case 25:
5204  SerializeEnum (16,2);
5205  break;
5206  case 50:
5207  SerializeEnum (16,3);
5208  break;
5209  case 75:
5210  SerializeEnum (16,4);
5211  break;
5212  case 100:
5213  SerializeEnum (16,5);
5214  break;
5215  default:
5216  SerializeEnum (16,6);
5217  }
5218  }
5219 
5220  // Serialize t304
5221  SerializeEnum (8,0);
5222 
5223  // Serialize newUE-Identitiy
5225 
5226  // Serialize radioResourceConfigCommon
5228 
5230  {
5231  SerializeSequence (std::bitset<0> (),false);
5234  }
5235  }
5236 
5238  {
5239  // Serialize RadioResourceConfigDedicated
5241  }
5242 
5244  {
5245  // Serialize NonCriticalExtension RRCConnectionReconfiguration-v890-IEs sequence:
5246  // 2 optional fields. Extension marker not present.
5247  std::bitset<2> noncriticalExtension_v890;
5248  noncriticalExtension_v890.set (1,0); // No lateNonCriticalExtension
5249  noncriticalExtension_v890.set (0,m_haveNonCriticalExtension); // Implemented nonCriticalExtension because compatibility with R10 - CA
5250  //Enable RRCCoonectionReconfiguration-v920-IEs
5251  SerializeSequence (noncriticalExtension_v890,false);
5252 
5253  // Serialize NonCriticalExtension RRCConnectionReconfiguration-v920-IEs sequence:
5254  // 3 optional fields. Extension marker not present.
5255  std::bitset<3> noncriticalExtension_v920;
5256  noncriticalExtension_v920.set (1,0); // No otehrConfig-r9
5257  noncriticalExtension_v920.set (1,0); // No fullConfig-r9
5258  //Enable RRCCoonectionReconfiguration-v1020-IEs
5259  noncriticalExtension_v920.set (0,m_haveNonCriticalExtension); // Implemented nonCriticalExtension because compatibility with R10 - CA
5260  SerializeSequence (noncriticalExtension_v920,false);
5261 
5262  SerializeNonCriticalExtensionConfiguration (m_nonCriticalExtension); //Serializing RRCConnectionReconfiguration-r8-IEs
5263  }
5264 
5265  // Finish serialization
5267 }
5268 
5269 uint32_t
5271 {
5272  std::bitset<0> bitset0;
5273 
5274  bIterator = DeserializeDlDcchMessage (bIterator);
5275 
5276  // RRCConnectionReconfiguration sequence
5277  bIterator = DeserializeSequence (&bitset0,false,bIterator);
5278 
5279  // rrc-TransactionIdentifier
5280  int n;
5281  bIterator = DeserializeInteger (&n,0,3,bIterator);
5283 
5284  // criticalExtensions
5285  int sel;
5286  bIterator = DeserializeChoice (2,false,&sel,bIterator);
5287  if (sel == 1)
5288  {
5289  // criticalExtensionsFuture
5290  bIterator = DeserializeSequence (&bitset0,false,bIterator);
5291  }
5292  else if (sel == 0)
5293  {
5294  // c1
5295  int c1Chosen;
5296  bIterator = DeserializeChoice (8,false,&c1Chosen,bIterator);
5297  if (c1Chosen > 0)
5298  {
5299  bIterator = DeserializeNull (bIterator);
5300  }
5301  else if (c1Chosen == 0)
5302  {
5303  // rrcConnectionReconfiguration-r8
5304  std::bitset<6> rrcConnRecOpts;
5305  bIterator = DeserializeSequence (&rrcConnRecOpts,false,bIterator);
5306 
5307  m_haveMeasConfig = rrcConnRecOpts[5];
5308  if (m_haveMeasConfig)
5309  {
5310  bIterator = DeserializeMeasConfig (&m_measConfig, bIterator);
5311  }
5312 
5313  m_haveMobilityControlInfo = rrcConnRecOpts[4];
5315  {
5316  // mobilityControlInfo
5317  std::bitset<4> mobCtrlOpts;
5318  bIterator = DeserializeSequence (&mobCtrlOpts,true,bIterator);
5319 
5320  // PhysCellId
5321  bIterator = DeserializeInteger (&n,0,503,bIterator);
5323 
5324  // carrierFreq
5325  m_mobilityControlInfo.haveCarrierFreq = mobCtrlOpts[3];
5327  {
5328  std::bitset<1> ulCarrierFreqPresent;
5329  bIterator = DeserializeSequence (&ulCarrierFreqPresent,false,bIterator);
5330 
5331  bIterator = DeserializeInteger (&n,0,MAX_EARFCN,bIterator);
5333 
5334  if (ulCarrierFreqPresent[0])
5335  {
5336  bIterator = DeserializeInteger (&n,0,MAX_EARFCN,bIterator);
5338  }
5339  }
5340 
5341  // carrierBandwidth
5344  {
5345  std::bitset<1> ulBandwidthPresent;
5346  bIterator = DeserializeSequence (&ulBandwidthPresent,false,bIterator);
5347 
5348  bIterator = DeserializeEnum (16,&n,bIterator);
5349  switch (n)
5350  {
5351  case 0:
5353  break;
5354  case 1:
5356  break;
5357  case 2:
5359  break;
5360  case 3:
5362  break;
5363  case 4:
5365  break;
5366  case 5:
5368  break;
5369  case 6:
5371  break;
5372  }
5373 
5374  if (ulBandwidthPresent[0])
5375  {
5376  bIterator = DeserializeEnum (16,&n,bIterator);
5377  switch (n)
5378  {
5379  case 0:
5381  break;
5382  case 1:
5384  break;
5385  case 2:
5387  break;
5388  case 3:
5390  break;
5391  case 4:
5393  break;
5394  case 5:
5396  break;
5397  case 6:
5399  break;
5400  }
5401  }
5402  }
5403 
5404  // additionalSpectrumEmission
5405  if (mobCtrlOpts[1])
5406  {
5407  // ...
5408  }
5409 
5410  // t304
5411  bIterator = DeserializeEnum (8,&n,bIterator);
5412 
5413  // newUE-Identity
5414  std::bitset<16> cRnti;
5415  bIterator = DeserializeBitstring (&cRnti, bIterator);
5416  m_mobilityControlInfo.newUeIdentity = cRnti.to_ulong ();
5417 
5418  // radioResourceConfigCommon
5420 
5423  {
5424  bIterator = DeserializeSequence (&bitset0, false, bIterator);
5425  bIterator = DeserializeInteger (&n,0,63, bIterator);
5427  bIterator = DeserializeInteger (&n,0,15, bIterator);
5429  }
5430  }
5431 
5432  // dedicatedInfoNASList
5433  if (rrcConnRecOpts[3])
5434  {
5435  // ...
5436  }
5437 
5438  // radioResourceConfigDedicated
5439  m_haveRadioResourceConfigDedicated = rrcConnRecOpts[2];
5441  {
5443  }
5444 
5445  // securityConfigHO
5446  if (rrcConnRecOpts[1])
5447  {
5448  // ...
5449  }
5450 
5451  // nonCriticalExtension
5452  m_haveNonCriticalExtension = rrcConnRecOpts[0];
5454  {
5456  // ...
5457  }
5458  }
5459  }
5460 
5461  return GetSerializedSize ();
5462 }
5463 
5464 void
5466 {
5467  os << "rrcTransactionIdentifier: " << (int) m_rrcTransactionIdentifier << std::endl;
5468  os << "haveMeasConfig: " << m_haveMeasConfig << std::endl;
5469  if (m_haveMeasConfig)
5470  {
5471  if (!m_measConfig.measObjectToRemoveList.empty ())
5472  {
5473  os << " measObjectToRemoveList: ";
5474  std::list<uint8_t> auxList = m_measConfig.measObjectToRemoveList;
5475  std::list<uint8_t>::iterator it = auxList.begin ();
5476  for (; it != auxList.end (); it++)
5477  {
5478  os << (int) *it << ", ";
5479  }
5480  os << std::endl;
5481  }
5482  if (!m_measConfig.reportConfigToRemoveList.empty ())
5483  {
5484  os << " reportConfigToRemoveList: ";
5485  std::list<uint8_t> auxList = m_measConfig.reportConfigToRemoveList;
5486  std::list<uint8_t>::iterator it = auxList.begin ();
5487  for (; it != auxList.end (); it++)
5488  {
5489  os << (int) *it << ", ";
5490  }
5491  os << std::endl;
5492  }
5493  if (!m_measConfig.measIdToRemoveList.empty ())
5494  {
5495  os << " measIdToRemoveList: ";
5496  std::list<uint8_t> auxList = m_measConfig.measIdToRemoveList;
5497  std::list<uint8_t>::iterator it = auxList.begin ();
5498  for (; it != auxList.end (); it++)
5499  {
5500  os << (int) *it << ", ";
5501  }
5502  os << std::endl;
5503  }
5504 
5505  if (!m_measConfig.measObjectToAddModList.empty ())
5506  {
5507  os << " measObjectToAddMod: " << std::endl;
5508  std::list<LteRrcSap::MeasObjectToAddMod> auxList = m_measConfig.measObjectToAddModList;
5509  std::list<LteRrcSap::MeasObjectToAddMod>::iterator it = auxList.begin ();
5510  for (; it != auxList.end (); it++)
5511  {
5512  os << " measObjectId: " << (int)it->measObjectId << std::endl;
5513  os << " carrierFreq: " << (int)it->measObjectEutra.carrierFreq << std::endl;
5514  os << " allowedMeasBandwidth: " << (int)it->measObjectEutra.allowedMeasBandwidth << std::endl;
5515  os << " presenceAntennaPort1: " << it->measObjectEutra.presenceAntennaPort1 << std::endl;
5516  os << " neighCellConfig: " << (int) it->measObjectEutra.neighCellConfig << std::endl;
5517  os << " offsetFreq: " << (int)it->measObjectEutra.offsetFreq << std::endl;
5518 
5519 
5520  if (!it->measObjectEutra.cellsToRemoveList.empty ())
5521  {
5522  os << " cellsToRemoveList: ";
5523  std::list<uint8_t> auxList = it->measObjectEutra.cellsToRemoveList;
5524  std::list<uint8_t>::iterator it = auxList.begin ();
5525  for (; it != auxList.end (); it++)
5526  {
5527  os << (int) *it << ", ";
5528  }
5529  os << std::endl;
5530  }
5531 
5532  if (!it->measObjectEutra.blackCellsToRemoveList.empty ())
5533  {
5534  os << " blackCellsToRemoveList: ";
5535  std::list<uint8_t> auxList = it->measObjectEutra.blackCellsToRemoveList;
5536  std::list<uint8_t>::iterator it = auxList.begin ();
5537  for (; it != auxList.end (); it++)
5538  {
5539  os << (int) *it << ", ";
5540  }
5541  os << std::endl;
5542  }
5543 
5544  if (!it->measObjectEutra.cellsToAddModList.empty ())
5545  {
5546  os << " cellsToAddModList: " << std::endl;
5547  std::list<LteRrcSap::CellsToAddMod> auxList = it->measObjectEutra.cellsToAddModList;
5548  std::list<LteRrcSap::CellsToAddMod>::iterator it = auxList.begin ();
5549  for (; it != auxList.end (); it++)
5550  {
5551  os << " cellIndex: " << (int)it->cellIndex << std::endl;
5552  os << " physCellId: " << (int)it->physCellId << std::endl;
5553  os << " cellIndividualOffset: " << (int)it->cellIndividualOffset << std::endl;
5554  os << " ------ " << std::endl;
5555  }
5556  }
5557 
5558  if (!it->measObjectEutra.blackCellsToAddModList.empty ())
5559  {
5560  os << " blackCellsToAddModList: " << std::endl;
5561  std::list<LteRrcSap::BlackCellsToAddMod> auxList = it->measObjectEutra.blackCellsToAddModList;
5562  std::list<LteRrcSap::BlackCellsToAddMod>::iterator it = auxList.begin ();
5563  for (; it != auxList.end (); it++)
5564  {
5565  os << " cellIndex: " << (int)it->cellIndex << std::endl;
5566  os << " physCellIdRange.start: " << (int)it->physCellIdRange.start << std::endl;
5567  os << " physCellIdRange.haveRange: " << it->physCellIdRange.haveRange << std::endl;
5568  os << " physCellIdRange.range: " << (int)it->physCellIdRange.range << std::endl;
5569  os << " ------ " << std::endl;
5570  }
5571  }
5572 
5573  os << " haveCellForWhichToReportCGI: " << it->measObjectEutra.haveCellForWhichToReportCGI << std::endl;
5574  os << " cellForWhichToReportCGI: " << (int)it->measObjectEutra.cellForWhichToReportCGI << std::endl;
5575  os << " ------------- " << std::endl;
5576  }
5577 
5578  }
5579 
5580  if (!m_measConfig.reportConfigToAddModList.empty ())
5581  {
5582  os << " reportConfigToAddModList: " << std::endl;
5583  std::list<LteRrcSap::ReportConfigToAddMod> auxList = m_measConfig.reportConfigToAddModList;
5584  std::list<LteRrcSap::ReportConfigToAddMod>::iterator it = auxList.begin ();
5585  for (; it != auxList.end (); it++)
5586  {
5587  os << " reportConfigId: " << (int)it->reportConfigId << std::endl;
5588  os << " reportConfigEutra.triggerType " << (int)it->reportConfigEutra.triggerType << std::endl;
5589  if (it->reportConfigEutra.triggerType == LteRrcSap::ReportConfigEutra::EVENT)
5590  {
5591  os << " reportConfigEutra.eventId " << (int)it->reportConfigEutra.eventId << std::endl;
5592  if (it->reportConfigEutra.eventId == LteRrcSap::ReportConfigEutra::EVENT_A3)
5593  {
5594  os << " reportConfigEutra.reportOnLeave " << (int)it->reportConfigEutra.reportOnLeave << std::endl;
5595  os << " reportConfigEutra.a3Offset " << (int)it->reportConfigEutra.a3Offset << std::endl;
5596  }
5597  else
5598  {
5599  os << " reportConfigEutra.threshold1.choice " << (int)it->reportConfigEutra.threshold1.choice << std::endl;
5600  os << " reportConfigEutra.threshold1.range " << (int)it->reportConfigEutra.threshold1.range << std::endl;
5601  if (it->reportConfigEutra.eventId == LteRrcSap::ReportConfigEutra::EVENT_A5)
5602  {
5603  os << " reportConfigEutra.threshold2.choice " << (int)it->reportConfigEutra.threshold2.choice << std::endl;
5604  os << " reportConfigEutra.threshold2.range " << (int)it->reportConfigEutra.threshold2.range << std::endl;
5605  }
5606  }
5607  os << " reportConfigEutra.hysteresis " << (int)it->reportConfigEutra.hysteresis << std::endl;
5608  os << " reportConfigEutra.timeToTrigger " << (int)it->reportConfigEutra.timeToTrigger << std::endl;
5609  }
5610  else
5611  {
5612  os << " reportConfigEutra.purpose " << (int)it->reportConfigEutra.purpose << std::endl;
5613  }
5614  os << " reportConfigEutra.triggerQuantity " << (int)it->reportConfigEutra.triggerQuantity << std::endl;
5615  os << " reportConfigEutra.reportQuantity " << (int)it->reportConfigEutra.reportQuantity << std::endl;
5616  os << " reportConfigEutra.maxReportCells " << (int)it->reportConfigEutra.maxReportCells << std::endl;
5617  os << " reportConfigEutra.reportInterval " << (int)it->reportConfigEutra.reportInterval << std::endl;
5618  os << " reportConfigEutra.reportAmount " << (int)it->reportConfigEutra.reportAmount << std::endl;
5619  }
5620  }
5621 
5622  if (!m_measConfig.measIdToAddModList.empty ())
5623  {
5624  os << " measIdToAddModList: " << std::endl;
5625  std::list<LteRrcSap::MeasIdToAddMod> auxList = m_measConfig.measIdToAddModList;
5626  std::list<LteRrcSap::MeasIdToAddMod>::iterator it = auxList.begin ();
5627  for (; it != auxList.end (); it++)
5628  {
5629  os << " measId: " << (int)it->measId << std::endl;
5630  os << " measObjectId: " << (int)it->measObjectId << std::endl;
5631  os << " reportConfigId: " << (int)it->reportConfigId << std::endl;
5632  os << " ------ " << std::endl;
5633  }
5634  }
5635 
5636  os << " haveQuantityConfig: " << m_measConfig.haveQuantityConfig << std::endl;
5638  {
5639  os << " filterCoefficientRSRP: " << (int)m_measConfig.quantityConfig.filterCoefficientRSRP << std::endl;
5640  os << " filterCoefficientRSRQ:" << (int)m_measConfig.quantityConfig.filterCoefficientRSRQ << std::endl;
5641  }
5642 
5643  os << " haveMeasGapConfig: " << m_measConfig.haveMeasGapConfig << std::endl;
5645  {
5646  os << " measGapConfig.type: " << m_measConfig.measGapConfig.type << std::endl;
5647  os << " measGapConfig.gap (gap0/1,value): (" << m_measConfig.measGapConfig.gapOffsetChoice
5648  << "," << (int) m_measConfig.measGapConfig.gapOffsetValue << ")" << std::endl;
5649  }
5650 
5651  os << " haveSmeasure: " << m_measConfig.haveSmeasure << std::endl;
5653  {
5654  os << " sMeasure: " << (int) m_measConfig.sMeasure << std::endl;
5655  }
5656 
5657  os << " haveSpeedStatePars: " << m_measConfig.haveSpeedStatePars << std::endl;
5659  {
5660  os << " speedStatePars.type: " << m_measConfig.speedStatePars.type << std::endl;
5661  os << " speedStatePars.mobilityStateParameters.tEvaluation: " << (int)m_measConfig.speedStatePars.mobilityStateParameters.tEvaluation << std::endl;
5662  os << " speedStatePars.mobilityStateParameters.tHystNormal: " << (int)m_measConfig.speedStatePars.mobilityStateParameters.tHystNormal << std::endl;
5663  os << " speedStatePars.mobilityStateParameters.nCellChangeMedium: " << (int)m_measConfig.speedStatePars.mobilityStateParameters.nCellChangeMedium << std::endl;
5664  os << " speedStatePars.mobilityStateParameters.nCellChangeHigh: " << (int)m_measConfig.speedStatePars.mobilityStateParameters.nCellChangeHigh << std::endl;
5665  os << " speedStatePars.timeToTriggerSf.sfMedium: " << (int)m_measConfig.speedStatePars.timeToTriggerSf.sfMedium << std::endl;
5666  os << " speedStatePars.timeToTriggerSf.sfHigh: " << (int)m_measConfig.speedStatePars.timeToTriggerSf.sfHigh << std::endl;
5667  }
5668  }
5669 
5670  os << "haveMobilityControlInfo: " << m_haveMobilityControlInfo << std::endl;
5672  {
5673  os << "targetPhysCellId: " << (int)m_mobilityControlInfo.targetPhysCellId << std::endl;