LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 void | 70 void |
71 EpcX2Header::Serialize (Buffer::Iterator start) const | 71 EpcX2Header::Serialize (Buffer::Iterator start) const |
72 { | 72 { |
73 Buffer::Iterator i = start; | 73 Buffer::Iterator i = start; |
74 | 74 |
75 i.WriteU8 (m_messageType); | 75 i.WriteU8 (m_messageType); |
76 i.WriteU8 (m_procedureCode); | 76 i.WriteU8 (m_procedureCode); |
77 | 77 |
78 i.WriteU8 (0x00); // criticality = REJECT | 78 i.WriteU8 (0x00); // criticality = REJECT |
79 i.WriteU8 ((uint8_t)(m_lengthOfIes + 3)); | 79 i.WriteU8 (m_lengthOfIes + 3); |
80 i.WriteHtonU16 (0); | 80 i.WriteHtonU16 (0); |
81 i.WriteU8 ((uint8_t)m_numberOfIes); | 81 i.WriteU8 (m_numberOfIes); |
82 } | 82 } |
83 | 83 |
84 uint32_t | 84 uint32_t |
85 EpcX2Header::Deserialize (Buffer::Iterator start) | 85 EpcX2Header::Deserialize (Buffer::Iterator start) |
86 { | 86 { |
87 Buffer::Iterator i = start; | 87 Buffer::Iterator i = start; |
88 | 88 |
89 m_messageType = i.ReadU8 (); | 89 m_messageType = i.ReadU8 (); |
90 m_procedureCode = i.ReadU8 (); | 90 m_procedureCode = i.ReadU8 (); |
91 | 91 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 | 126 |
127 void | 127 void |
128 EpcX2Header::SetProcedureCode (uint8_t procedureCode) | 128 EpcX2Header::SetProcedureCode (uint8_t procedureCode) |
129 { | 129 { |
130 m_procedureCode = procedureCode; | 130 m_procedureCode = procedureCode; |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 void | 134 void |
135 EpcX2Header::SetLengthOfIes (uint32_t lengthOfIes) | 135 EpcX2Header::SetLengthOfIes (uint8_t lengthOfIes) |
136 { | 136 { |
137 m_lengthOfIes = lengthOfIes; | 137 m_lengthOfIes = lengthOfIes; |
138 } | 138 } |
139 | 139 |
140 void | 140 void |
141 EpcX2Header::SetNumberOfIes (uint32_t numberOfIes) | 141 EpcX2Header::SetNumberOfIes (uint8_t numberOfIes) |
142 { | 142 { |
143 m_numberOfIes = numberOfIes; | 143 m_numberOfIes = numberOfIes; |
144 } | 144 } |
145 | 145 |
146 ///////////////////////////////////////////////////////////////////// | 146 ///////////////////////////////////////////////////////////////////// |
147 | 147 |
148 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverRequestHeader); | 148 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverRequestHeader); |
149 | 149 |
150 EpcX2HandoverRequestHeader::EpcX2HandoverRequestHeader () | 150 EpcX2HandoverRequestHeader::EpcX2HandoverRequestHeader () |
151 : m_numberOfIes (1 + 1 + 1 + 1), | 151 : m_numberOfIes (1 + 1 + 1 + 1), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 Buffer::Iterator i = start; | 198 Buffer::Iterator i = start; |
199 | 199 |
200 i.WriteHtonU16 (10); // id = OLD_ENB_UE_X2AP_ID | 200 i.WriteHtonU16 (10); // id = OLD_ENB_UE_X2AP_ID |
201 i.WriteU8 (0); // criticality = REJECT | 201 i.WriteU8 (0); // criticality = REJECT |
202 i.WriteU8 (2); // length of OLD_ENB_UE_X2AP_ID | 202 i.WriteU8 (2); // length of OLD_ENB_UE_X2AP_ID |
203 i.WriteHtonU16 (m_oldEnbUeX2apId); | 203 i.WriteHtonU16 (m_oldEnbUeX2apId); |
204 | 204 |
205 i.WriteHtonU16 (5); // id = CAUSE | 205 i.WriteHtonU16 (5); // id = CAUSE |
206 i.WriteU8 (1 << 6); // criticality = IGNORE | 206 i.WriteU8 (1 << 6); // criticality = IGNORE |
207 i.WriteU8 (1); // length of CAUSE | 207 i.WriteU8 (1); // length of CAUSE |
208 i.WriteU8 ((uint8_t)m_cause); | 208 i.WriteU8 (static_cast<uint8_t>(m_cause)); |
209 | 209 |
210 i.WriteHtonU16 (11); // id = TARGET_CELLID | 210 i.WriteHtonU16 (11); // id = TARGET_CELLID |
211 i.WriteU8 (0); // criticality = REJECT | 211 i.WriteU8 (0); // criticality = REJECT |
212 i.WriteU8 (8); // length of TARGET_CELLID | 212 i.WriteU8 (8); // length of TARGET_CELLID |
213 i.WriteHtonU32 (0x123456); // fake PLMN | 213 i.WriteHtonU32 (0x123456); // fake PLMN |
214 i.WriteHtonU32 (m_targetCellId << 4); | 214 i.WriteHtonU32 (m_targetCellId << 4); |
215 | 215 |
216 i.WriteHtonU16 (14); // id = UE_CONTEXT_INFORMATION | 216 i.WriteHtonU16 (14); // id = UE_CONTEXT_INFORMATION |
217 i.WriteU8 (0); // criticality = REJECT | 217 i.WriteU8 (0); // criticality = REJECT |
218 | 218 |
219 i.WriteHtonU32 (m_mmeUeS1apId); | 219 i.WriteHtonU32 (m_mmeUeS1apId); |
220 i.WriteHtonU64 (m_ueAggregateMaxBitRateDownlink); | 220 i.WriteHtonU64 (m_ueAggregateMaxBitRateDownlink); |
221 i.WriteHtonU64 (m_ueAggregateMaxBitRateUplink); | 221 i.WriteHtonU64 (m_ueAggregateMaxBitRateUplink); |
222 | 222 |
223 std::vector <EpcX2Sap::ErabToBeSetupItem>::size_type sz = m_erabsToBeSetupList
.size ();· | 223 std::vector <EpcX2Sap::ErabToBeSetupItem>::size_type sz = m_erabsToBeSetupList
.size ();· |
224 i.WriteHtonU32 (sz); // number of bearers | 224 i.WriteHtonU32 (static_cast<uint32_t>(sz)); // number of bearers |
225 for (int j = 0; j < (int) sz; j++) | 225 for (int j = 0; j < (int) sz; j++) |
226 { | 226 { |
227 i.WriteHtonU16 (m_erabsToBeSetupList [j].erabId); | 227 i.WriteHtonU16 (m_erabsToBeSetupList [j].erabId); |
228 i.WriteHtonU16 ((uint16_t)m_erabsToBeSetupList [j].erabLevelQosParameters.
qci); | 228 i.WriteHtonU16 (static_cast<uint16_t>(m_erabsToBeSetupList [j].erabLevelQo
sParameters.qci)); |
229 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.gbrDl); | 229 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.gbrDl); |
230 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.gbrUl); | 230 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.gbrUl); |
231 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.mbrDl); | 231 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.mbrDl); |
232 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.mbrUl); | 232 i.WriteHtonU64 (m_erabsToBeSetupList [j].erabLevelQosParameters.gbrQosInfo
.mbrUl); |
233 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.priorityLev
el); | 233 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.priorityLev
el); |
234 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.preemptionC
apability); | 234 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.preemptionC
apability); |
235 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.preemptionV
ulnerability); | 235 i.WriteU8 (m_erabsToBeSetupList [j].erabLevelQosParameters.arp.preemptionV
ulnerability); |
236 i.WriteU8 (m_erabsToBeSetupList [j].dlForwarding); | 236 i.WriteU8 (m_erabsToBeSetupList [j].dlForwarding); |
237 i.WriteHtonU32 (m_erabsToBeSetupList [j].transportLayerAddress.Get ()); | 237 i.WriteHtonU32 (m_erabsToBeSetupList [j].transportLayerAddress.Get ()); |
238 i.WriteHtonU32 (m_erabsToBeSetupList [j].gtpTeid); | 238 i.WriteHtonU32 (m_erabsToBeSetupList [j].gtpTeid); |
(...skipping 20 matching lines...) Expand all Loading... |
259 i.ReadU8 (); | 259 i.ReadU8 (); |
260 i.ReadU8 (); | 260 i.ReadU8 (); |
261 m_cause = i.ReadU8 (); | 261 m_cause = i.ReadU8 (); |
262 m_headerLength += 5; | 262 m_headerLength += 5; |
263 m_numberOfIes++; | 263 m_numberOfIes++; |
264 ·· | 264 ·· |
265 i.ReadNtohU16 (); | 265 i.ReadNtohU16 (); |
266 i.ReadU8 (); | 266 i.ReadU8 (); |
267 i.ReadU8 (); | 267 i.ReadU8 (); |
268 i.ReadNtohU32 (); | 268 i.ReadNtohU32 (); |
269 m_targetCellId = (uint16_t)(i.ReadNtohU32 () >> 4); | 269 m_targetCellId = static_cast<uint16_t>(i.ReadNtohU32 () >> 4); |
270 m_headerLength += 12; | 270 m_headerLength += 12; |
271 m_numberOfIes++; | 271 m_numberOfIes++; |
272 | 272 |
273 i.ReadNtohU16 (); | 273 i.ReadNtohU16 (); |
274 i.ReadU8 (); | 274 i.ReadU8 (); |
275 m_mmeUeS1apId = i.ReadNtohU32 (); | 275 m_mmeUeS1apId = i.ReadNtohU32 (); |
276 m_ueAggregateMaxBitRateDownlink = i.ReadNtohU64 (); | 276 m_ueAggregateMaxBitRateDownlink = i.ReadNtohU64 (); |
277 m_ueAggregateMaxBitRateUplink = i.ReadNtohU64 (); | 277 m_ueAggregateMaxBitRateUplink = i.ReadNtohU64 (); |
278 int sz = i.ReadNtohU32 (); | 278 int sz = i.ReadNtohU32 (); |
279 m_headerLength += 27; | 279 m_headerLength += 27; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 std::vector <EpcX2Sap::ErabToBeSetupItem> | 386 std::vector <EpcX2Sap::ErabToBeSetupItem> |
387 EpcX2HandoverRequestHeader::GetBearers () const | 387 EpcX2HandoverRequestHeader::GetBearers () const |
388 { | 388 { |
389 return m_erabsToBeSetupList; | 389 return m_erabsToBeSetupList; |
390 } | 390 } |
391 | 391 |
392 void | 392 void |
393 EpcX2HandoverRequestHeader::SetBearers (std::vector <EpcX2Sap::ErabToBeSetupItem
> bearers) | 393 EpcX2HandoverRequestHeader::SetBearers (std::vector <EpcX2Sap::ErabToBeSetupItem
> bearers) |
394 { | 394 { |
395 m_headerLength += 48 * bearers.size (); | 395 m_headerLength += static_cast<uint8_t>(48 * bearers.size ()); |
396 m_erabsToBeSetupList = bearers; | 396 m_erabsToBeSetupList = bearers; |
397 } | 397 } |
398 | 398 |
399 uint64_t | 399 uint64_t |
400 EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateDownlink () const | 400 EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateDownlink () const |
401 { | 401 { |
402 return m_ueAggregateMaxBitRateDownlink; | 402 return m_ueAggregateMaxBitRateDownlink; |
403 } | 403 } |
404 | 404 |
405 void | 405 void |
406 EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateDownlink (uint64_t bitRate) | 406 EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateDownlink (uint64_t bitRate) |
407 { | 407 { |
408 m_ueAggregateMaxBitRateDownlink = bitRate; | 408 m_ueAggregateMaxBitRateDownlink = bitRate; |
409 } | 409 } |
410 | 410 |
411 uint64_t | 411 uint64_t |
412 EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateUplink () const | 412 EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateUplink () const |
413 { | 413 { |
414 return m_ueAggregateMaxBitRateUplink; | 414 return m_ueAggregateMaxBitRateUplink; |
415 } | 415 } |
416 | 416 |
417 void | 417 void |
418 EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateUplink (uint64_t bitRate) | 418 EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateUplink (uint64_t bitRate) |
419 { | 419 { |
420 m_ueAggregateMaxBitRateUplink = bitRate; | 420 m_ueAggregateMaxBitRateUplink = bitRate; |
421 } | 421 } |
422 | 422 |
423 uint32_t | 423 uint8_t |
424 EpcX2HandoverRequestHeader::GetLengthOfIes () const | 424 EpcX2HandoverRequestHeader::GetLengthOfIes () const |
425 { | 425 { |
426 return m_headerLength; | 426 return m_headerLength; |
427 } | 427 } |
428 | 428 |
429 uint32_t | 429 uint8_t |
430 EpcX2HandoverRequestHeader::GetNumberOfIes () const | 430 EpcX2HandoverRequestHeader::GetNumberOfIes () const |
431 { | 431 { |
432 return m_numberOfIes; | 432 return m_numberOfIes; |
433 } | 433 } |
434 | 434 |
435 ///////////////////////////////////////////////////////////////////// | 435 ///////////////////////////////////////////////////////////////////// |
436 | 436 |
437 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverRequestAckHeader); | 437 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverRequestAckHeader); |
438 | 438 |
439 EpcX2HandoverRequestAckHeader::EpcX2HandoverRequestAckHeader () | 439 EpcX2HandoverRequestAckHeader::EpcX2HandoverRequestAckHeader () |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 479 |
480 void | 480 void |
481 EpcX2HandoverRequestAckHeader::Serialize (Buffer::Iterator start) const | 481 EpcX2HandoverRequestAckHeader::Serialize (Buffer::Iterator start) const |
482 { | 482 { |
483 Buffer::Iterator i = start; | 483 Buffer::Iterator i = start; |
484 | 484 |
485 i.WriteHtonU16 (m_oldEnbUeX2apId); | 485 i.WriteHtonU16 (m_oldEnbUeX2apId); |
486 i.WriteHtonU16 (m_newEnbUeX2apId); | 486 i.WriteHtonU16 (m_newEnbUeX2apId); |
487 | 487 |
488 std::vector <EpcX2Sap::ErabAdmittedItem>::size_type sz = m_erabsAdmittedList.s
ize ();· | 488 std::vector <EpcX2Sap::ErabAdmittedItem>::size_type sz = m_erabsAdmittedList.s
ize ();· |
489 i.WriteHtonU32 (sz); | 489 i.WriteHtonU32 (static_cast<uint32_t>(sz)); |
490 for (int j = 0; j < (int) sz; j++) | 490 for (int j = 0; j < (int) sz; j++) |
491 { | 491 { |
492 i.WriteHtonU16 (m_erabsAdmittedList [j].erabId); | 492 i.WriteHtonU16 (m_erabsAdmittedList [j].erabId); |
493 i.WriteHtonU32 (m_erabsAdmittedList [j].ulGtpTeid); | 493 i.WriteHtonU32 (m_erabsAdmittedList [j].ulGtpTeid); |
494 i.WriteHtonU32 (m_erabsAdmittedList [j].dlGtpTeid); | 494 i.WriteHtonU32 (m_erabsAdmittedList [j].dlGtpTeid); |
495 } | 495 } |
496 | 496 |
497 std::vector <EpcX2Sap::ErabNotAdmittedItem>::size_type sz2 = m_erabsNotAdmitte
dList.size ();· | 497 std::vector <EpcX2Sap::ErabNotAdmittedItem>::size_type sz2 = m_erabsNotAdmitte
dList.size ();· |
498 i.WriteHtonU32 (sz2); | 498 i.WriteHtonU32 (static_cast<uint32_t>(sz2)); |
499 for (int j = 0; j < (int) sz2; j++) | 499 for (int j = 0; j < (int) sz2; j++) |
500 { | 500 { |
501 i.WriteHtonU16 (m_erabsNotAdmittedList [j].erabId); | 501 i.WriteHtonU16 (m_erabsNotAdmittedList [j].erabId); |
502 i.WriteHtonU16 (m_erabsNotAdmittedList [j].cause); | 502 i.WriteHtonU16 (m_erabsNotAdmittedList [j].cause); |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
506 uint32_t | 506 uint32_t |
507 EpcX2HandoverRequestAckHeader::Deserialize (Buffer::Iterator start) | 507 EpcX2HandoverRequestAckHeader::Deserialize (Buffer::Iterator start) |
508 { | 508 { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 622 |
623 std::vector <EpcX2Sap::ErabAdmittedItem>· | 623 std::vector <EpcX2Sap::ErabAdmittedItem>· |
624 EpcX2HandoverRequestAckHeader::GetAdmittedBearers () const | 624 EpcX2HandoverRequestAckHeader::GetAdmittedBearers () const |
625 { | 625 { |
626 return m_erabsAdmittedList; | 626 return m_erabsAdmittedList; |
627 } | 627 } |
628 | 628 |
629 void | 629 void |
630 EpcX2HandoverRequestAckHeader::SetAdmittedBearers (std::vector <EpcX2Sap::ErabAd
mittedItem> bearers) | 630 EpcX2HandoverRequestAckHeader::SetAdmittedBearers (std::vector <EpcX2Sap::ErabAd
mittedItem> bearers) |
631 { | 631 { |
632 m_headerLength += 10 * bearers.size (); | 632 m_headerLength += static_cast<uint8_t>(10 * bearers.size ()); |
633 m_erabsAdmittedList = bearers; | 633 m_erabsAdmittedList = bearers; |
634 } | 634 } |
635 | 635 |
636 std::vector <EpcX2Sap::ErabNotAdmittedItem> | 636 std::vector <EpcX2Sap::ErabNotAdmittedItem> |
637 EpcX2HandoverRequestAckHeader::GetNotAdmittedBearers () const | 637 EpcX2HandoverRequestAckHeader::GetNotAdmittedBearers () const |
638 { | 638 { |
639 return m_erabsNotAdmittedList; | 639 return m_erabsNotAdmittedList; |
640 } | 640 } |
641 | 641 |
642 void | 642 void |
643 EpcX2HandoverRequestAckHeader::SetNotAdmittedBearers (std::vector <EpcX2Sap::Era
bNotAdmittedItem> bearers) | 643 EpcX2HandoverRequestAckHeader::SetNotAdmittedBearers (std::vector <EpcX2Sap::Era
bNotAdmittedItem> bearers) |
644 { | 644 { |
645 m_headerLength += 4 * bearers.size (); | 645 m_headerLength += static_cast<uint8_t>(4 * bearers.size ()); |
646 m_erabsNotAdmittedList = bearers; | 646 m_erabsNotAdmittedList = bearers; |
647 } | 647 } |
648 | 648 |
649 uint32_t | 649 uint8_t |
650 EpcX2HandoverRequestAckHeader::GetLengthOfIes () const | 650 EpcX2HandoverRequestAckHeader::GetLengthOfIes () const |
651 { | 651 { |
652 return m_headerLength; | 652 return m_headerLength; |
653 } | 653 } |
654 | 654 |
655 uint32_t | 655 uint8_t |
656 EpcX2HandoverRequestAckHeader::GetNumberOfIes () const | 656 EpcX2HandoverRequestAckHeader::GetNumberOfIes () const |
657 { | 657 { |
658 return m_numberOfIes; | 658 return m_numberOfIes; |
659 } | 659 } |
660 | 660 |
661 ///////////////////////////////////////////////////////////////////// | 661 ///////////////////////////////////////////////////////////////////// |
662 | 662 |
663 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverPreparationFailureHeader); | 663 NS_OBJECT_ENSURE_REGISTERED (EpcX2HandoverPreparationFailureHeader); |
664 | 664 |
665 EpcX2HandoverPreparationFailureHeader::EpcX2HandoverPreparationFailureHeader () | 665 EpcX2HandoverPreparationFailureHeader::EpcX2HandoverPreparationFailureHeader () |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 { | 765 { |
766 return m_criticalityDiagnostics; | 766 return m_criticalityDiagnostics; |
767 } | 767 } |
768 | 768 |
769 void | 769 void |
770 EpcX2HandoverPreparationFailureHeader::SetCriticalityDiagnostics (uint16_t criti
calityDiagnostics) | 770 EpcX2HandoverPreparationFailureHeader::SetCriticalityDiagnostics (uint16_t criti
calityDiagnostics) |
771 { | 771 { |
772 m_criticalityDiagnostics = criticalityDiagnostics; | 772 m_criticalityDiagnostics = criticalityDiagnostics; |
773 } | 773 } |
774 | 774 |
775 uint32_t | 775 uint8_t |
776 EpcX2HandoverPreparationFailureHeader::GetLengthOfIes () const | 776 EpcX2HandoverPreparationFailureHeader::GetLengthOfIes () const |
777 { | 777 { |
778 return m_headerLength; | 778 return m_headerLength; |
779 } | 779 } |
780 | 780 |
781 uint32_t | 781 uint8_t |
782 EpcX2HandoverPreparationFailureHeader::GetNumberOfIes () const | 782 EpcX2HandoverPreparationFailureHeader::GetNumberOfIes () const |
783 { | 783 { |
784 return m_numberOfIes; | 784 return m_numberOfIes; |
785 } | 785 } |
786 | 786 |
787 ///////////////////////////////////////////////////////////////////// | 787 ///////////////////////////////////////////////////////////////////// |
788 | 788 |
789 NS_OBJECT_ENSURE_REGISTERED (EpcX2SnStatusTransferHeader); | 789 NS_OBJECT_ENSURE_REGISTERED (EpcX2SnStatusTransferHeader); |
790 | 790 |
791 EpcX2SnStatusTransferHeader::EpcX2SnStatusTransferHeader () | 791 EpcX2SnStatusTransferHeader::EpcX2SnStatusTransferHeader () |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 | 831 |
832 void | 832 void |
833 EpcX2SnStatusTransferHeader::Serialize (Buffer::Iterator start) const | 833 EpcX2SnStatusTransferHeader::Serialize (Buffer::Iterator start) const |
834 { | 834 { |
835 Buffer::Iterator i = start; | 835 Buffer::Iterator i = start; |
836 | 836 |
837 i.WriteHtonU16 (m_oldEnbUeX2apId); | 837 i.WriteHtonU16 (m_oldEnbUeX2apId); |
838 i.WriteHtonU16 (m_newEnbUeX2apId); | 838 i.WriteHtonU16 (m_newEnbUeX2apId); |
839 | 839 |
840 std::vector <EpcX2Sap::ErabsSubjectToStatusTransferItem>::size_type sz = m_era
bsSubjectToStatusTransferList.size (); | 840 std::vector <EpcX2Sap::ErabsSubjectToStatusTransferItem>::size_type sz = m_era
bsSubjectToStatusTransferList.size (); |
841 i.WriteHtonU16 ((uint16_t)sz); // number of ErabsSubjectToStatusT
ransferItems | 841 i.WriteHtonU16 (static_cast<uint16_t>(sz)); // number of ErabsSub
jectToStatusTransferItems |
842 | 842 |
843 for (int j = 0; j < (int) sz; j++) | 843 for (int j = 0; j < (int) sz; j++) |
844 { | 844 { |
845 EpcX2Sap::ErabsSubjectToStatusTransferItem item = m_erabsSubjectToStatusTr
ansferList [j]; | 845 EpcX2Sap::ErabsSubjectToStatusTransferItem item = m_erabsSubjectToStatusTr
ansferList [j]; |
846 | 846 |
847 i.WriteHtonU16 (item.erabId); | 847 i.WriteHtonU16 (item.erabId); |
848 | 848 |
849 uint16_t bitsetSize = EpcX2Sap::m_maxPdcpSn / 64; | 849 uint16_t bitsetSize = EpcX2Sap::m_maxPdcpSn / 64; |
850 for (int k = 0; k < bitsetSize; k++) | 850 for (int k = 0; k < bitsetSize; k++) |
851 { | 851 { |
(...skipping 12 matching lines...) Expand all Loading... |
864 } | 864 } |
865 } | 865 } |
866 | 866 |
867 uint32_t | 867 uint32_t |
868 EpcX2SnStatusTransferHeader::Deserialize (Buffer::Iterator start) | 868 EpcX2SnStatusTransferHeader::Deserialize (Buffer::Iterator start) |
869 { | 869 { |
870 Buffer::Iterator i = start; | 870 Buffer::Iterator i = start; |
871 | 871 |
872 m_oldEnbUeX2apId = i.ReadNtohU16 (); | 872 m_oldEnbUeX2apId = i.ReadNtohU16 (); |
873 m_newEnbUeX2apId = i.ReadNtohU16 (); | 873 m_newEnbUeX2apId = i.ReadNtohU16 (); |
874 int sz = i.ReadNtohU16 (); | 874 uint16_t sz = i.ReadNtohU16 (); |
875 | 875 |
876 m_numberOfIes = 3; | 876 m_numberOfIes = 3; |
877 m_headerLength = 6 + sz * (14 + (EpcX2Sap::m_maxPdcpSn / 64)); | 877 m_headerLength = static_cast<uint8_t>(6 + sz * (14 + (EpcX2Sap::m_maxPdcpSn /
64))); |
878 | 878 |
879 for (int j = 0; j < sz; j++) | 879 for (uint16_t j = 0; j < sz; j++) |
880 { | 880 { |
881 EpcX2Sap::ErabsSubjectToStatusTransferItem ErabItem; | 881 EpcX2Sap::ErabsSubjectToStatusTransferItem ErabItem; |
882 ErabItem.erabId = i.ReadNtohU16 (); | 882 ErabItem.erabId = i.ReadNtohU16 (); |
883 | 883 |
884 uint16_t bitsetSize = EpcX2Sap::m_maxPdcpSn / 64; | 884 uint16_t bitsetSize = EpcX2Sap::m_maxPdcpSn / 64; |
885 for (int k = 0; k < bitsetSize; k++) | 885 for (int k = 0; k < bitsetSize; k++) |
886 { | 886 { |
887 uint64_t statusValue = i.ReadNtohU64 (); | 887 uint64_t statusValue = i.ReadNtohU64 (); |
888 for (int m = 0; m < 64; m++) | 888 for (int m = 0; m < 64; m++) |
889 { | 889 { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 | 954 |
955 std::vector <EpcX2Sap::ErabsSubjectToStatusTransferItem> | 955 std::vector <EpcX2Sap::ErabsSubjectToStatusTransferItem> |
956 EpcX2SnStatusTransferHeader::GetErabsSubjectToStatusTransferList () const | 956 EpcX2SnStatusTransferHeader::GetErabsSubjectToStatusTransferList () const |
957 { | 957 { |
958 return m_erabsSubjectToStatusTransferList; | 958 return m_erabsSubjectToStatusTransferList; |
959 } | 959 } |
960 | 960 |
961 void | 961 void |
962 EpcX2SnStatusTransferHeader::SetErabsSubjectToStatusTransferList (std::vector <E
pcX2Sap::ErabsSubjectToStatusTransferItem> erabs) | 962 EpcX2SnStatusTransferHeader::SetErabsSubjectToStatusTransferList (std::vector <E
pcX2Sap::ErabsSubjectToStatusTransferItem> erabs) |
963 { | 963 { |
964 m_headerLength += erabs.size () * (14 + (EpcX2Sap::m_maxPdcpSn / 8)); | 964 m_headerLength += static_cast<uint8_t>(erabs.size () * (14 + (EpcX2Sap::m_maxP
dcpSn / 8))); |
965 m_erabsSubjectToStatusTransferList = erabs; | 965 m_erabsSubjectToStatusTransferList = erabs; |
966 } | 966 } |
967 | 967 |
968 uint32_t | 968 uint8_t |
969 EpcX2SnStatusTransferHeader::GetLengthOfIes () const | 969 EpcX2SnStatusTransferHeader::GetLengthOfIes () const |
970 { | 970 { |
971 return m_headerLength; | 971 return m_headerLength; |
972 } | 972 } |
973 | 973 |
974 uint32_t | 974 uint8_t |
975 EpcX2SnStatusTransferHeader::GetNumberOfIes () const | 975 EpcX2SnStatusTransferHeader::GetNumberOfIes () const |
976 { | 976 { |
977 return m_numberOfIes; | 977 return m_numberOfIes; |
978 } | 978 } |
979 | 979 |
980 ///////////////////////////////////////////////////////////////////// | 980 ///////////////////////////////////////////////////////////////////// |
981 | 981 |
982 NS_OBJECT_ENSURE_REGISTERED (EpcX2UeContextReleaseHeader); | 982 NS_OBJECT_ENSURE_REGISTERED (EpcX2UeContextReleaseHeader); |
983 | 983 |
984 EpcX2UeContextReleaseHeader::EpcX2UeContextReleaseHeader () | 984 EpcX2UeContextReleaseHeader::EpcX2UeContextReleaseHeader () |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 { | 1066 { |
1067 return m_newEnbUeX2apId; | 1067 return m_newEnbUeX2apId; |
1068 } | 1068 } |
1069 | 1069 |
1070 void | 1070 void |
1071 EpcX2UeContextReleaseHeader::SetNewEnbUeX2apId (uint16_t x2apId) | 1071 EpcX2UeContextReleaseHeader::SetNewEnbUeX2apId (uint16_t x2apId) |
1072 { | 1072 { |
1073 m_newEnbUeX2apId = x2apId; | 1073 m_newEnbUeX2apId = x2apId; |
1074 } | 1074 } |
1075 | 1075 |
1076 uint32_t | 1076 uint8_t |
1077 EpcX2UeContextReleaseHeader::GetLengthOfIes () const | 1077 EpcX2UeContextReleaseHeader::GetLengthOfIes () const |
1078 { | 1078 { |
1079 return m_headerLength; | 1079 return m_headerLength; |
1080 } | 1080 } |
1081 | 1081 |
1082 uint32_t | 1082 uint8_t |
1083 EpcX2UeContextReleaseHeader::GetNumberOfIes () const | 1083 EpcX2UeContextReleaseHeader::GetNumberOfIes () const |
1084 { | 1084 { |
1085 return m_numberOfIes; | 1085 return m_numberOfIes; |
1086 } | 1086 } |
1087 | 1087 |
1088 ///////////////////////////////// | 1088 ///////////////////////////////// |
1089 | 1089 |
1090 NS_OBJECT_ENSURE_REGISTERED (EpcX2LoadInformationHeader); | 1090 NS_OBJECT_ENSURE_REGISTERED (EpcX2LoadInformationHeader); |
1091 | 1091 |
1092 EpcX2LoadInformationHeader::EpcX2LoadInformationHeader () | 1092 EpcX2LoadInformationHeader::EpcX2LoadInformationHeader () |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 void | 1129 void |
1130 EpcX2LoadInformationHeader::Serialize (Buffer::Iterator start) const | 1130 EpcX2LoadInformationHeader::Serialize (Buffer::Iterator start) const |
1131 { | 1131 { |
1132 Buffer::Iterator i = start; | 1132 Buffer::Iterator i = start; |
1133 | 1133 |
1134 i.WriteHtonU16 (6); // id = CELL_INFORMATION | 1134 i.WriteHtonU16 (6); // id = CELL_INFORMATION |
1135 i.WriteU8 (1 << 6); // criticality = IGNORE | 1135 i.WriteU8 (1 << 6); // criticality = IGNORE |
1136 i.WriteU8 (4); // length of CELL_INFORMATION_ID | 1136 i.WriteU8 (4); // length of CELL_INFORMATION_ID |
1137 | 1137 |
1138 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); | 1138 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); |
1139 i.WriteHtonU16 ((uint16_t)sz); // number of cellInformationItems | 1139 i.WriteHtonU16 (static_cast<uint16_t>(sz)); // number of cellInfo
rmationItems |
1140 | 1140 |
1141 for (int j = 0; j < (int) sz; j++) | 1141 for (int j = 0; j < (int) sz; j++) |
1142 { | 1142 { |
1143 i.WriteHtonU16 (m_cellInformationList [j].sourceCellId); | 1143 i.WriteHtonU16 (m_cellInformationList [j].sourceCellId); |
1144 | 1144 |
1145 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; | 1145 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; |
1146 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); | 1146 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); |
1147 i.WriteHtonU16 ((uint16_t)sz2); // number of UlInterferenceOverloa
dIndicationItem | 1147 i.WriteHtonU16 (static_cast<uint16_t>(sz2)); // number of UlInterf
erenceOverloadIndicationItem |
1148 | 1148 |
1149 for (int k = 0; k < (int) sz2; k++) | 1149 for (int k = 0; k < (int) sz2; k++) |
1150 { | 1150 { |
1151 i.WriteU8 ((uint8_t)m_cellInformationList [j].ulInterferenceOverloadIn
dicationList [k]); | 1151 i.WriteU8 (static_cast<uint8_t>(m_cellInformationList [j].ulInterferen
ceOverloadIndicationList [k])); |
1152 } | 1152 } |
1153 | 1153 |
1154 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; | 1154 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; |
1155 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); | 1155 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); |
1156 i.WriteHtonU16 ((uint16_t)sz3); // number of UlHighInterferenceInf
ormationItem | 1156 i.WriteHtonU16 (static_cast<uint16_t>(sz3)); // number of UlHighIn
terferenceInformationItem |
1157 | 1157 |
1158 for (int k = 0; k < (int) sz3; k++) | 1158 for (int k = 0; k < (int) sz3; k++) |
1159 { | 1159 { |
1160 i.WriteHtonU16 (m_cellInformationList [j].ulHighInterferenceInformatio
nList [k].targetCellId); | 1160 i.WriteHtonU16 (m_cellInformationList [j].ulHighInterferenceInformatio
nList [k].targetCellId); |
1161 | 1161 |
1162 std::vector <bool>::size_type sz4; | 1162 std::vector <bool>::size_type sz4; |
1163 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); | 1163 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); |
1164 i.WriteHtonU16 ((uint16_t)sz4); | 1164 i.WriteHtonU16 (static_cast<uint16_t>(sz4)); |
1165 | 1165 |
1166 for (int m = 0; m < (int) sz4; m++) | 1166 for (int m = 0; m < (int) sz4; m++) |
1167 { | 1167 { |
1168 i.WriteU8 (m_cellInformationList [j].ulHighInterferenceInformation
List [k].ulHighInterferenceIndicationList [m]); | 1168 i.WriteU8 (m_cellInformationList [j].ulHighInterferenceInformation
List [k].ulHighInterferenceIndicationList [m]); |
1169 } | 1169 } |
1170 } | 1170 } |
1171 | 1171 |
1172 std::vector <bool>::size_type sz5; | 1172 std::vector <bool>::size_type sz5; |
1173 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); | 1173 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); |
1174 i.WriteHtonU16 ((uint16_t)sz5); | 1174 i.WriteHtonU16 (static_cast<uint16_t>(sz5)); |
1175 | 1175 |
1176 for (int k = 0; k < (int) sz5; k++) | 1176 for (int k = 0; k < (int) sz5; k++) |
1177 { | 1177 { |
1178 i.WriteU8 (m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerP
rbList [k]); | 1178 i.WriteU8 (m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerP
rbList [k]); |
1179 } | 1179 } |
1180 | 1180 |
1181 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.rntpThr
eshold); | 1181 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.rntpThr
eshold); |
1182 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.antenna
Ports); | 1182 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.antenna
Ports); |
1183 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.pB); | 1183 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.pB); |
1184 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.pdcchIn
terferenceImpact); | 1184 i.WriteHtonU16 (m_cellInformationList [j].relativeNarrowbandTxBand.pdcchIn
terferenceImpact); |
1185 } | 1185 } |
1186 } | 1186 } |
1187 | 1187 |
1188 uint32_t | 1188 uint32_t |
1189 EpcX2LoadInformationHeader::Deserialize (Buffer::Iterator start) | 1189 EpcX2LoadInformationHeader::Deserialize (Buffer::Iterator start) |
1190 { | 1190 { |
1191 Buffer::Iterator i = start; | 1191 Buffer::Iterator i = start; |
1192 | 1192 |
1193 m_headerLength = 0; | 1193 uint16_t headerLength = 0; |
1194 m_numberOfIes = 0; | 1194 m_numberOfIes = 0; |
1195 | 1195 |
1196 i.ReadNtohU16 (); | 1196 i.ReadNtohU16 (); |
1197 i.ReadU8 (); | 1197 i.ReadU8 (); |
1198 i.ReadU8 (); | 1198 i.ReadU8 (); |
1199 int sz = i.ReadNtohU16 (); | 1199 uint16_t sz = i.ReadNtohU16 (); |
1200 m_headerLength += 6; | 1200 headerLength += 6; |
1201 m_numberOfIes++; | 1201 m_numberOfIes++; |
1202 | 1202 |
1203 for (int j = 0; j < sz; j++) | 1203 for (uint16_t j = 0; j < sz; j++) |
1204 { | 1204 { |
1205 EpcX2Sap::CellInformationItem cellInfoItem; | 1205 EpcX2Sap::CellInformationItem cellInfoItem; |
1206 cellInfoItem.sourceCellId = i.ReadNtohU16 (); | 1206 cellInfoItem.sourceCellId = i.ReadNtohU16 (); |
1207 m_headerLength += 2; | 1207 headerLength += 2; |
1208 | 1208 |
1209 int sz2 = i.ReadNtohU16 (); | 1209 uint16_t sz2 = i.ReadNtohU16 (); |
1210 m_headerLength += 2; | 1210 headerLength += 2; |
1211 for (int k = 0; k < sz2; k++) | 1211 for (uint16_t k = 0; k < sz2; k++) |
1212 { | 1212 { |
1213 EpcX2Sap::UlInterferenceOverloadIndicationItem item = (EpcX2Sap::UlInt
erferenceOverloadIndicationItem) i.ReadU8 (); | 1213 EpcX2Sap::UlInterferenceOverloadIndicationItem item = (EpcX2Sap::UlInt
erferenceOverloadIndicationItem) i.ReadU8 (); |
1214 cellInfoItem.ulInterferenceOverloadIndicationList.push_back (item); | 1214 cellInfoItem.ulInterferenceOverloadIndicationList.push_back (item); |
1215 } | 1215 } |
1216 m_headerLength += sz2; | 1216 headerLength += sz2; |
1217 | 1217 |
1218 int sz3 = i.ReadNtohU16 (); | 1218 uint16_t sz3 = i.ReadNtohU16 (); |
1219 m_headerLength += 2; | 1219 headerLength += 2; |
1220 for (int k = 0; k < sz3; k++) | 1220 for (uint16_t k = 0; k < sz3; k++) |
1221 { | 1221 { |
1222 EpcX2Sap::UlHighInterferenceInformationItem item; | 1222 EpcX2Sap::UlHighInterferenceInformationItem item; |
1223 item.targetCellId = i.ReadNtohU16 (); | 1223 item.targetCellId = i.ReadNtohU16 (); |
1224 m_headerLength += 2; | 1224 headerLength += 2; |
1225 | 1225 |
1226 int sz4 = i.ReadNtohU16 (); | 1226 uint16_t sz4 = i.ReadNtohU16 (); |
1227 m_headerLength += 2; | 1227 headerLength += 2; |
1228 for (int m = 0; m < sz4; m++) | 1228 for (uint16_t m = 0; m < sz4; m++) |
1229 { | 1229 { |
1230 item.ulHighInterferenceIndicationList.push_back (i.ReadU8 ()); | 1230 item.ulHighInterferenceIndicationList.push_back (i.ReadU8 ()); |
1231 } | 1231 } |
1232 m_headerLength += sz4; | 1232 headerLength += sz4; |
1233 | 1233 |
1234 cellInfoItem.ulHighInterferenceInformationList.push_back (item); | 1234 cellInfoItem.ulHighInterferenceInformationList.push_back (item); |
1235 } | 1235 } |
1236 | 1236 |
1237 int sz5 = i.ReadNtohU16 (); | 1237 uint16_t sz5 = i.ReadNtohU16 (); |
1238 m_headerLength += 2; | 1238 headerLength += 2; |
1239 for (int k = 0; k < sz5; k++) | 1239 for (uint16_t k = 0; k < sz5; k++) |
1240 { | 1240 { |
1241 cellInfoItem.relativeNarrowbandTxBand.rntpPerPrbList.push_back (i.Read
U8 ()); | 1241 cellInfoItem.relativeNarrowbandTxBand.rntpPerPrbList.push_back (i.Read
U8 ()); |
1242 } | 1242 } |
1243 m_headerLength += sz5; | 1243 headerLength += sz5; |
1244 | 1244 |
1245 cellInfoItem.relativeNarrowbandTxBand.rntpThreshold = i.ReadNtohU16 (); | 1245 cellInfoItem.relativeNarrowbandTxBand.rntpThreshold = i.ReadNtohU16 (); |
1246 cellInfoItem.relativeNarrowbandTxBand.antennaPorts = i.ReadNtohU16 (); | 1246 cellInfoItem.relativeNarrowbandTxBand.antennaPorts = i.ReadNtohU16 (); |
1247 cellInfoItem.relativeNarrowbandTxBand.pB = i.ReadNtohU16 (); | 1247 cellInfoItem.relativeNarrowbandTxBand.pB = i.ReadNtohU16 (); |
1248 cellInfoItem.relativeNarrowbandTxBand.pdcchInterferenceImpact = i.ReadNtoh
U16 (); | 1248 cellInfoItem.relativeNarrowbandTxBand.pdcchInterferenceImpact = i.ReadNtoh
U16 (); |
1249 m_headerLength += 8; | 1249 headerLength += 8; |
| 1250 |
| 1251 m_headerLength = static_cast<uint8_t>(headerLength); |
1250 | 1252 |
1251 m_cellInformationList.push_back (cellInfoItem); | 1253 m_cellInformationList.push_back (cellInfoItem); |
1252 } | 1254 } |
1253 | 1255 |
1254 return GetSerializedSize (); | 1256 return GetSerializedSize (); |
1255 } | 1257 } |
1256 | 1258 |
1257 void | 1259 void |
1258 EpcX2LoadInformationHeader::Print (std::ostream &os) const | 1260 EpcX2LoadInformationHeader::Print (std::ostream &os) const |
1259 { | 1261 { |
1260 os << "NumOfCellInformationItems=" << m_cellInformationList.size (); | 1262 os << "NumOfCellInformationItems=" << m_cellInformationList.size (); |
1261 } | 1263 } |
1262 | 1264 |
1263 std::vector <EpcX2Sap::CellInformationItem> | 1265 std::vector <EpcX2Sap::CellInformationItem> |
1264 EpcX2LoadInformationHeader::GetCellInformationList () const | 1266 EpcX2LoadInformationHeader::GetCellInformationList () const |
1265 { | 1267 { |
1266 return m_cellInformationList; | 1268 return m_cellInformationList; |
1267 } | 1269 } |
1268 | 1270 |
1269 void | 1271 void |
1270 EpcX2LoadInformationHeader::SetCellInformationList (std::vector <EpcX2Sap::CellI
nformationItem> cellInformationList) | 1272 EpcX2LoadInformationHeader::SetCellInformationList (std::vector <EpcX2Sap::CellI
nformationItem> cellInformationList) |
1271 { | 1273 { |
| 1274 int headerLength = m_headerLength; |
1272 m_cellInformationList = cellInformationList; | 1275 m_cellInformationList = cellInformationList; |
1273 m_headerLength += 2; | 1276 headerLength += 2; |
1274 | 1277 |
1275 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); | 1278 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); |
1276 for (int j = 0; j < (int) sz; j++) | 1279 for (int j = 0; j < (int) sz; j++) |
1277 { | 1280 { |
1278 m_headerLength += 2; | 1281 headerLength += 2; |
1279 | 1282 |
1280 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; | 1283 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; |
1281 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); | 1284 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); |
1282 m_headerLength += 2 + sz2; | 1285 headerLength += static_cast<int>(2 + sz2); |
1283 | 1286 |
1284 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; | 1287 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; |
1285 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); | 1288 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); |
1286 m_headerLength += 2; | 1289 headerLength += 2; |
1287 | 1290 |
1288 for (int k = 0; k < (int) sz3; k++) | 1291 for (int k = 0; k < (int) sz3; k++) |
1289 { | 1292 { |
1290 std::vector <bool>::size_type sz4; | 1293 std::vector <bool>::size_type sz4; |
1291 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); | 1294 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); |
1292 m_headerLength += 2 + 2 + sz4; | 1295 headerLength += static_cast<int>(2 + 2 + sz4); |
1293 } | 1296 } |
1294 | 1297 |
1295 std::vector <bool>::size_type sz5; | 1298 std::vector <bool>::size_type sz5; |
1296 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); | 1299 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); |
1297 m_headerLength += 2 + sz5 + 8; | 1300 headerLength += static_cast<int>(2 + sz5 + 8); |
1298 } | 1301 } |
1299 } | 1302 |
1300 | 1303 m_headerLength = static_cast<uint8_t>(headerLength); |
1301 uint32_t | 1304 } |
| 1305 |
| 1306 uint8_t |
1302 EpcX2LoadInformationHeader::GetLengthOfIes () const | 1307 EpcX2LoadInformationHeader::GetLengthOfIes () const |
1303 { | 1308 { |
1304 return m_headerLength; | 1309 return m_headerLength; |
1305 } | 1310 } |
1306 | 1311 |
1307 uint32_t | 1312 uint8_t |
1308 EpcX2LoadInformationHeader::GetNumberOfIes () const | 1313 EpcX2LoadInformationHeader::GetNumberOfIes () const |
1309 { | 1314 { |
1310 return m_numberOfIes; | 1315 return m_numberOfIes; |
1311 } | 1316 } |
1312 | 1317 |
1313 //////////////// | 1318 //////////////// |
1314 | 1319 |
1315 NS_OBJECT_ENSURE_REGISTERED (EpcX2ResourceStatusUpdateHeader); | 1320 NS_OBJECT_ENSURE_REGISTERED (EpcX2ResourceStatusUpdateHeader); |
1316 | 1321 |
1317 EpcX2ResourceStatusUpdateHeader::EpcX2ResourceStatusUpdateHeader () | 1322 EpcX2ResourceStatusUpdateHeader::EpcX2ResourceStatusUpdateHeader () |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 | 1362 |
1358 void | 1363 void |
1359 EpcX2ResourceStatusUpdateHeader::Serialize (Buffer::Iterator start) const | 1364 EpcX2ResourceStatusUpdateHeader::Serialize (Buffer::Iterator start) const |
1360 { | 1365 { |
1361 Buffer::Iterator i = start; | 1366 Buffer::Iterator i = start; |
1362 | 1367 |
1363 i.WriteHtonU16 (m_enb1MeasurementId); | 1368 i.WriteHtonU16 (m_enb1MeasurementId); |
1364 i.WriteHtonU16 (m_enb2MeasurementId); | 1369 i.WriteHtonU16 (m_enb2MeasurementId); |
1365 | 1370 |
1366 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); | 1371 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); |
1367 i.WriteHtonU16 ((uint16_t)sz); // number of CellMeasurementResult
Item | 1372 i.WriteHtonU16 (static_cast<uint16_t>(sz)); // number of CellMeas
urementResultItem |
1368 | 1373 |
1369 for (int j = 0; j < (int) sz; j++) | 1374 for (int j = 0; j < (int) sz; j++) |
1370 { | 1375 { |
1371 EpcX2Sap::CellMeasurementResultItem item = m_cellMeasurementResultList [j]
; | 1376 EpcX2Sap::CellMeasurementResultItem item = m_cellMeasurementResultList [j]
; |
1372 | 1377 |
1373 i.WriteHtonU16 (item.sourceCellId); | 1378 i.WriteHtonU16 (item.sourceCellId); |
1374 i.WriteU8 ((uint8_t)item.dlHardwareLoadIndicator); | 1379 i.WriteU8 (static_cast<uint8_t>(item.dlHardwareLoadIndicator)); |
1375 i.WriteU8 ((uint8_t)item.ulHardwareLoadIndicator); | 1380 i.WriteU8 (static_cast<uint8_t>(item.ulHardwareLoadIndicator)); |
1376 i.WriteU8 ((uint8_t)item.dlS1TnlLoadIndicator); | 1381 i.WriteU8 (static_cast<uint8_t>(item.dlS1TnlLoadIndicator)); |
1377 i.WriteU8 ((uint8_t)item.ulS1TnlLoadIndicator); | 1382 i.WriteU8 (static_cast<uint8_t>(item.ulS1TnlLoadIndicator)); |
1378 | 1383 |
1379 i.WriteHtonU16 (item.dlGbrPrbUsage); | 1384 i.WriteHtonU16 (item.dlGbrPrbUsage); |
1380 i.WriteHtonU16 (item.ulGbrPrbUsage); | 1385 i.WriteHtonU16 (item.ulGbrPrbUsage); |
1381 i.WriteHtonU16 (item.dlNonGbrPrbUsage); | 1386 i.WriteHtonU16 (item.dlNonGbrPrbUsage); |
1382 i.WriteHtonU16 (item.ulNonGbrPrbUsage); | 1387 i.WriteHtonU16 (item.ulNonGbrPrbUsage); |
1383 i.WriteHtonU16 (item.dlTotalPrbUsage); | 1388 i.WriteHtonU16 (item.dlTotalPrbUsage); |
1384 i.WriteHtonU16 (item.ulTotalPrbUsage); | 1389 i.WriteHtonU16 (item.ulTotalPrbUsage); |
1385 | 1390 |
1386 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.cellCapacityClassValue); | 1391 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.cellCapacityClassValue); |
1387 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.capacityValue); | 1392 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.capacityValue); |
(...skipping 29 matching lines...) Expand all Loading... |
1417 item.ulTotalPrbUsage = i.ReadNtohU16 (); | 1422 item.ulTotalPrbUsage = i.ReadNtohU16 (); |
1418 | 1423 |
1419 item.dlCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); | 1424 item.dlCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); |
1420 item.dlCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); | 1425 item.dlCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); |
1421 item.ulCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); | 1426 item.ulCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); |
1422 item.ulCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); | 1427 item.ulCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); |
1423 | 1428 |
1424 m_cellMeasurementResultList.push_back (item); | 1429 m_cellMeasurementResultList.push_back (item); |
1425 } | 1430 } |
1426 | 1431 |
1427 m_headerLength = 6 + sz * 26; | 1432 m_headerLength = static_cast<uint8_t>(6 + sz * 26); |
1428 m_numberOfIes = 3; | 1433 m_numberOfIes = 3; |
1429 | 1434 |
1430 return GetSerializedSize (); | 1435 return GetSerializedSize (); |
1431 } | 1436 } |
1432 | 1437 |
1433 void | 1438 void |
1434 EpcX2ResourceStatusUpdateHeader::Print (std::ostream &os) const | 1439 EpcX2ResourceStatusUpdateHeader::Print (std::ostream &os) const |
1435 { | 1440 { |
1436 os << "Enb1MeasurementId = " << m_enb1MeasurementId | 1441 os << "Enb1MeasurementId = " << m_enb1MeasurementId |
1437 << " Enb2MeasurementId = " << m_enb2MeasurementId | 1442 << " Enb2MeasurementId = " << m_enb2MeasurementId |
(...skipping 29 matching lines...) Expand all Loading... |
1467 { | 1472 { |
1468 return m_cellMeasurementResultList; | 1473 return m_cellMeasurementResultList; |
1469 } | 1474 } |
1470 | 1475 |
1471 void | 1476 void |
1472 EpcX2ResourceStatusUpdateHeader::SetCellMeasurementResultList (std::vector <EpcX
2Sap::CellMeasurementResultItem> cellMeasurementResultList) | 1477 EpcX2ResourceStatusUpdateHeader::SetCellMeasurementResultList (std::vector <EpcX
2Sap::CellMeasurementResultItem> cellMeasurementResultList) |
1473 { | 1478 { |
1474 m_cellMeasurementResultList = cellMeasurementResultList; | 1479 m_cellMeasurementResultList = cellMeasurementResultList; |
1475 | 1480 |
1476 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); | 1481 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); |
1477 m_headerLength += sz * 26; | 1482 m_headerLength += static_cast<uint8_t>(sz * 26); |
1478 } | 1483 } |
1479 | 1484 |
1480 uint32_t | 1485 uint8_t |
1481 EpcX2ResourceStatusUpdateHeader::GetLengthOfIes () const | 1486 EpcX2ResourceStatusUpdateHeader::GetLengthOfIes () const |
1482 { | 1487 { |
1483 return m_headerLength; | 1488 return m_headerLength; |
1484 } | 1489 } |
1485 | 1490 |
1486 uint32_t | 1491 uint8_t |
1487 EpcX2ResourceStatusUpdateHeader::GetNumberOfIes () const | 1492 EpcX2ResourceStatusUpdateHeader::GetNumberOfIes () const |
1488 { | 1493 { |
1489 return m_numberOfIes; | 1494 return m_numberOfIes; |
1490 } | 1495 } |
1491 | 1496 |
1492 } // namespace ns3 | 1497 } // namespace ns3 |
LEFT | RIGHT |