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 187 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 (static_cast<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 (static_cast<uint32_t>(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 (static_cast<uint16_t>(m_erabsToBeSetupList [j].erabLevelQo
sParameters.qci)); | 228 i.WriteHtonU16 (static_cast<uint16_t> (m_erabsToBeSetupList [j].erabLevelQ
osParameters.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 = static_cast<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 += static_cast<uint8_t>(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 |
(...skipping 73 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 (static_cast<uint32_t>(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 (static_cast<uint32_t>(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 += static_cast<uint8_t>(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 += static_cast<uint8_t>(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 uint8_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 uint8_t | 655 uint8_t |
(...skipping 175 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 (static_cast<uint16_t>(sz)); // number of ErabsSub
jectToStatusTransferItems | 841 i.WriteHtonU16 (static_cast<uint16_t> (sz)); // number of ErabsSu
bjectToStatusTransferItems |
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 15 matching lines...) Expand all Loading... |
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 uint16_t sz = i.ReadNtohU16 (); | 874 uint16_t sz = i.ReadNtohU16 (); |
875 | 875 |
876 m_numberOfIes = 3; | 876 m_numberOfIes = 3; |
877 m_headerLength = static_cast<uint8_t>(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 (uint16_t 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 (); |
(...skipping 66 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 += static_cast<uint8_t>(erabs.size () * (14 + (EpcX2Sap::m_maxP
dcpSn / 8))); | 964 m_headerLength += static_cast<uint8_t> (erabs.size () * (14 + (EpcX2Sap::m_max
PdcpSn / 8))); |
965 m_erabsSubjectToStatusTransferList = erabs; | 965 m_erabsSubjectToStatusTransferList = erabs; |
966 } | 966 } |
967 | 967 |
968 uint8_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 uint8_t | 974 uint8_t |
(...skipping 154 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 (static_cast<uint16_t>(sz)); // number of cellInfo
rmationItems | 1139 i.WriteHtonU16 (static_cast<uint16_t> (sz)); // number of cellInf
ormationItems |
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 (static_cast<uint16_t>(sz2)); // number of UlInterf
erenceOverloadIndicationItem | 1147 i.WriteHtonU16 (static_cast<uint16_t> (sz2)); // number of UlInter
ferenceOverloadIndicationItem |
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 (static_cast<uint8_t>(m_cellInformationList [j].ulInterferen
ceOverloadIndicationList [k])); | 1151 i.WriteU8 (static_cast<uint8_t> (m_cellInformationList [j].ulInterfere
nceOverloadIndicationList [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 (static_cast<uint16_t>(sz3)); // number of UlHighIn
terferenceInformationItem | 1156 i.WriteHtonU16 (static_cast<uint16_t> (sz3)); // number of UlHighI
nterferenceInformationItem |
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 (static_cast<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 (static_cast<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); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 cellInfoItem.relativeNarrowbandTxBand.rntpPerPrbList.push_back (i.Read
U8 ()); | 1241 cellInfoItem.relativeNarrowbandTxBand.rntpPerPrbList.push_back (i.Read
U8 ()); |
1242 } | 1242 } |
1243 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 headerLength += 8; | 1249 headerLength += 8; |
1250 | 1250 |
1251 m_headerLength = static_cast<uint8_t>(headerLength); | 1251 m_headerLength = static_cast<uint8_t> (headerLength); |
1252 | 1252 |
1253 m_cellInformationList.push_back (cellInfoItem); | 1253 m_cellInformationList.push_back (cellInfoItem); |
1254 } | 1254 } |
1255 | 1255 |
1256 return GetSerializedSize (); | 1256 return GetSerializedSize (); |
1257 } | 1257 } |
1258 | 1258 |
1259 void | 1259 void |
1260 EpcX2LoadInformationHeader::Print (std::ostream &os) const | 1260 EpcX2LoadInformationHeader::Print (std::ostream &os) const |
1261 { | 1261 { |
(...skipping 13 matching lines...) Expand all Loading... |
1275 m_cellInformationList = cellInformationList; | 1275 m_cellInformationList = cellInformationList; |
1276 headerLength += 2; | 1276 headerLength += 2; |
1277 | 1277 |
1278 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); | 1278 std::vector <EpcX2Sap::CellInformationItem>::size_type sz = m_cellInformationL
ist.size (); |
1279 for (int j = 0; j < (int) sz; j++) | 1279 for (int j = 0; j < (int) sz; j++) |
1280 { | 1280 { |
1281 headerLength += 2; | 1281 headerLength += 2; |
1282 | 1282 |
1283 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; | 1283 std::vector <EpcX2Sap::UlInterferenceOverloadIndicationItem>::size_type sz
2; |
1284 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); | 1284 sz2 = m_cellInformationList [j].ulInterferenceOverloadIndicationList.size
(); |
1285 headerLength += static_cast<int>(2 + sz2); | 1285 headerLength += static_cast<int> (2 + sz2); |
1286 | 1286 |
1287 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; | 1287 std::vector <EpcX2Sap::UlHighInterferenceInformationItem>::size_type sz3; |
1288 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); | 1288 sz3 = m_cellInformationList [j].ulHighInterferenceInformationList.size (); |
1289 headerLength += 2; | 1289 headerLength += 2; |
1290 | 1290 |
1291 for (int k = 0; k < (int) sz3; k++) | 1291 for (int k = 0; k < (int) sz3; k++) |
1292 { | 1292 { |
1293 std::vector <bool>::size_type sz4; | 1293 std::vector <bool>::size_type sz4; |
1294 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); | 1294 sz4 = m_cellInformationList [j].ulHighInterferenceInformationList [k].
ulHighInterferenceIndicationList.size (); |
1295 headerLength += static_cast<int>(2 + 2 + sz4); | 1295 headerLength += static_cast<int> (2 + 2 + sz4); |
1296 } | 1296 } |
1297 | 1297 |
1298 std::vector <bool>::size_type sz5; | 1298 std::vector <bool>::size_type sz5; |
1299 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); | 1299 sz5 = m_cellInformationList [j].relativeNarrowbandTxBand.rntpPerPrbList.si
ze (); |
1300 headerLength += static_cast<int>(2 + sz5 + 8); | 1300 headerLength += static_cast<int> (2 + sz5 + 8); |
1301 } | 1301 } |
1302 | 1302 |
1303 m_headerLength = static_cast<uint8_t>(headerLength); | 1303 m_headerLength = static_cast<uint8_t> (headerLength); |
1304 } | 1304 } |
1305 | 1305 |
1306 uint8_t | 1306 uint8_t |
1307 EpcX2LoadInformationHeader::GetLengthOfIes () const | 1307 EpcX2LoadInformationHeader::GetLengthOfIes () const |
1308 { | 1308 { |
1309 return m_headerLength; | 1309 return m_headerLength; |
1310 } | 1310 } |
1311 | 1311 |
1312 uint8_t | 1312 uint8_t |
1313 EpcX2LoadInformationHeader::GetNumberOfIes () const | 1313 EpcX2LoadInformationHeader::GetNumberOfIes () const |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 | 1362 |
1363 void | 1363 void |
1364 EpcX2ResourceStatusUpdateHeader::Serialize (Buffer::Iterator start) const | 1364 EpcX2ResourceStatusUpdateHeader::Serialize (Buffer::Iterator start) const |
1365 { | 1365 { |
1366 Buffer::Iterator i = start; | 1366 Buffer::Iterator i = start; |
1367 | 1367 |
1368 i.WriteHtonU16 (m_enb1MeasurementId); | 1368 i.WriteHtonU16 (m_enb1MeasurementId); |
1369 i.WriteHtonU16 (m_enb2MeasurementId); | 1369 i.WriteHtonU16 (m_enb2MeasurementId); |
1370 | 1370 |
1371 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); | 1371 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); |
1372 i.WriteHtonU16 (static_cast<uint16_t>(sz)); // number of CellMeas
urementResultItem | 1372 i.WriteHtonU16 (static_cast<uint16_t> (sz)); // number of CellMea
surementResultItem |
1373 | 1373 |
1374 for (int j = 0; j < (int) sz; j++) | 1374 for (int j = 0; j < (int) sz; j++) |
1375 { | 1375 { |
1376 EpcX2Sap::CellMeasurementResultItem item = m_cellMeasurementResultList [j]
; | 1376 EpcX2Sap::CellMeasurementResultItem item = m_cellMeasurementResultList [j]
; |
1377 | 1377 |
1378 i.WriteHtonU16 (item.sourceCellId); | 1378 i.WriteHtonU16 (item.sourceCellId); |
1379 i.WriteU8 (static_cast<uint8_t>(item.dlHardwareLoadIndicator)); | 1379 i.WriteU8 (static_cast<uint8_t> (item.dlHardwareLoadIndicator)); |
1380 i.WriteU8 (static_cast<uint8_t>(item.ulHardwareLoadIndicator)); | 1380 i.WriteU8 (static_cast<uint8_t> (item.ulHardwareLoadIndicator)); |
1381 i.WriteU8 (static_cast<uint8_t>(item.dlS1TnlLoadIndicator)); | 1381 i.WriteU8 (static_cast<uint8_t> (item.dlS1TnlLoadIndicator)); |
1382 i.WriteU8 (static_cast<uint8_t>(item.ulS1TnlLoadIndicator)); | 1382 i.WriteU8 (static_cast<uint8_t> (item.ulS1TnlLoadIndicator)); |
1383 | 1383 |
1384 i.WriteHtonU16 (item.dlGbrPrbUsage); | 1384 i.WriteHtonU16 (item.dlGbrPrbUsage); |
1385 i.WriteHtonU16 (item.ulGbrPrbUsage); | 1385 i.WriteHtonU16 (item.ulGbrPrbUsage); |
1386 i.WriteHtonU16 (item.dlNonGbrPrbUsage); | 1386 i.WriteHtonU16 (item.dlNonGbrPrbUsage); |
1387 i.WriteHtonU16 (item.ulNonGbrPrbUsage); | 1387 i.WriteHtonU16 (item.ulNonGbrPrbUsage); |
1388 i.WriteHtonU16 (item.dlTotalPrbUsage); | 1388 i.WriteHtonU16 (item.dlTotalPrbUsage); |
1389 i.WriteHtonU16 (item.ulTotalPrbUsage); | 1389 i.WriteHtonU16 (item.ulTotalPrbUsage); |
1390 | 1390 |
1391 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.cellCapacityClassValue); | 1391 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.cellCapacityClassValue); |
1392 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.capacityValue); | 1392 i.WriteHtonU16 (item.dlCompositeAvailableCapacity.capacityValue); |
(...skipping 29 matching lines...) Expand all Loading... |
1422 item.ulTotalPrbUsage = i.ReadNtohU16 (); | 1422 item.ulTotalPrbUsage = i.ReadNtohU16 (); |
1423 | 1423 |
1424 item.dlCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); | 1424 item.dlCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); |
1425 item.dlCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); | 1425 item.dlCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); |
1426 item.ulCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); | 1426 item.ulCompositeAvailableCapacity.cellCapacityClassValue = i.ReadNtohU16 (
); |
1427 item.ulCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); | 1427 item.ulCompositeAvailableCapacity.capacityValue = i.ReadNtohU16 (); |
1428 | 1428 |
1429 m_cellMeasurementResultList.push_back (item); | 1429 m_cellMeasurementResultList.push_back (item); |
1430 } | 1430 } |
1431 | 1431 |
1432 m_headerLength = static_cast<uint8_t>(6 + sz * 26); | 1432 m_headerLength = static_cast<uint8_t> (6 + sz * 26); |
1433 m_numberOfIes = 3; | 1433 m_numberOfIes = 3; |
1434 | 1434 |
1435 return GetSerializedSize (); | 1435 return GetSerializedSize (); |
1436 } | 1436 } |
1437 | 1437 |
1438 void | 1438 void |
1439 EpcX2ResourceStatusUpdateHeader::Print (std::ostream &os) const | 1439 EpcX2ResourceStatusUpdateHeader::Print (std::ostream &os) const |
1440 { | 1440 { |
1441 os << "Enb1MeasurementId = " << m_enb1MeasurementId | 1441 os << "Enb1MeasurementId = " << m_enb1MeasurementId |
1442 << " Enb2MeasurementId = " << m_enb2MeasurementId | 1442 << " Enb2MeasurementId = " << m_enb2MeasurementId |
(...skipping 29 matching lines...) Expand all Loading... |
1472 { | 1472 { |
1473 return m_cellMeasurementResultList; | 1473 return m_cellMeasurementResultList; |
1474 } | 1474 } |
1475 | 1475 |
1476 void | 1476 void |
1477 EpcX2ResourceStatusUpdateHeader::SetCellMeasurementResultList (std::vector <EpcX
2Sap::CellMeasurementResultItem> cellMeasurementResultList) | 1477 EpcX2ResourceStatusUpdateHeader::SetCellMeasurementResultList (std::vector <EpcX
2Sap::CellMeasurementResultItem> cellMeasurementResultList) |
1478 { | 1478 { |
1479 m_cellMeasurementResultList = cellMeasurementResultList; | 1479 m_cellMeasurementResultList = cellMeasurementResultList; |
1480 | 1480 |
1481 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); | 1481 std::vector <EpcX2Sap::CellMeasurementResultItem>::size_type sz = m_cellMeasur
ementResultList.size (); |
1482 m_headerLength += static_cast<uint8_t>(sz * 26); | 1482 m_headerLength += static_cast<uint8_t> (sz * 26); |
1483 } | 1483 } |
1484 | 1484 |
1485 uint8_t | 1485 uint8_t |
1486 EpcX2ResourceStatusUpdateHeader::GetLengthOfIes () const | 1486 EpcX2ResourceStatusUpdateHeader::GetLengthOfIes () const |
1487 { | 1487 { |
1488 return m_headerLength; | 1488 return m_headerLength; |
1489 } | 1489 } |
1490 | 1490 |
1491 uint8_t | 1491 uint8_t |
1492 EpcX2ResourceStatusUpdateHeader::GetNumberOfIes () const | 1492 EpcX2ResourceStatusUpdateHeader::GetNumberOfIes () const |
1493 { | 1493 { |
1494 return m_numberOfIes; | 1494 return m_numberOfIes; |
1495 } | 1495 } |
1496 | 1496 |
1497 } // namespace ns3 | 1497 } // namespace ns3 |
LEFT | RIGHT |