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