OLD | NEW |
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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 void | 629 void |
630 RrcAsn1Header::SerializeMeasResults (LteRrcSap::MeasResults measResults) const | 630 RrcAsn1Header::SerializeMeasResults (LteRrcSap::MeasResults measResults) const |
631 { | 631 { |
632 // Watchdog: if list has 0 elements, set boolean to false | 632 // Watchdog: if list has 0 elements, set boolean to false |
633 if (measResults.measResultListEutra.empty ()) | 633 if (measResults.measResultListEutra.empty ()) |
634 { | 634 { |
635 measResults.haveMeasResultNeighCells = false; | 635 measResults.haveMeasResultNeighCells = false; |
636 } | 636 } |
637 | 637 |
638 std::bitset<4> measResultOptional; | 638 std::bitset<4> measResultOptional; |
639 measResultOptional.set (3, measResults.haveScellsMeas); | 639 measResultOptional.set (3, measResults.haveMeasResultServFreqList); |
640 measResultOptional.set (2, false); //LocationInfo-r10 | 640 measResultOptional.set (2, false); //LocationInfo-r10 |
641 measResultOptional.set (1, false); // MeasResultForECID-r9 | 641 measResultOptional.set (1, false); // MeasResultForECID-r9 |
642 measResultOptional.set (0, measResults.haveMeasResultNeighCells); | 642 measResultOptional.set (0, measResults.haveMeasResultNeighCells); |
643 SerializeSequence(measResultOptional,true); | 643 SerializeSequence (measResultOptional, true); |
644 | 644 |
645 // Serialize measId | 645 // Serialize measId |
646 SerializeInteger (measResults.measId,1,MAX_MEAS_ID); | 646 SerializeInteger (measResults.measId,1,MAX_MEAS_ID); |
647 | 647 |
648 // Serialize measResultServCell sequence | 648 // Serialize measResultPCell sequence |
649 SerializeSequence (std::bitset<0> (0),false); | 649 SerializeSequence (std::bitset<0> (0), false); |
650 | 650 |
651 // Serialize rsrpResult | 651 // Serialize rsrpResult |
652 SerializeInteger (measResults.rsrpResult,0,97); | 652 SerializeInteger (measResults.measResultPCell.rsrpResult,0,97); |
653 | 653 |
654 // Serialize rsrqResult | 654 // Serialize rsrqResult |
655 SerializeInteger (measResults.rsrqResult,0,34); | 655 SerializeInteger (measResults.measResultPCell.rsrqResult,0,34); |
656 | 656 |
657 if (measResults.haveMeasResultNeighCells) | 657 if (measResults.haveMeasResultNeighCells) |
658 { | 658 { |
659 // Serialize Choice = 0 (MeasResultListEUTRA) | 659 // Serialize Choice = 0 (MeasResultListEUTRA) |
660 SerializeChoice (4,0,false); | 660 SerializeChoice (4,0,false); |
661 | 661 |
662 // Serialize measResultNeighCells | 662 // Serialize measResultNeighCells |
663 SerializeSequenceOf (measResults.measResultListEutra.size (),MAX_CELL_REPO
RT,1); | 663 SerializeSequenceOf (measResults.measResultListEutra.size (),MAX_CELL_REPO
RT,1); |
664 | 664 |
665 // serialize MeasResultEutra elements in the list | 665 // serialize MeasResultEutra elements in the list |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 { | 706 { |
707 SerializeInteger (it->rsrpResult,0,97); | 707 SerializeInteger (it->rsrpResult,0,97); |
708 } | 708 } |
709 | 709 |
710 if (it->haveRsrqResult) | 710 if (it->haveRsrqResult) |
711 { | 711 { |
712 SerializeInteger (it->rsrqResult,0,34); | 712 SerializeInteger (it->rsrqResult,0,34); |
713 } | 713 } |
714 } | 714 } |
715 } | 715 } |
716 if (measResults.haveScellsMeas) | |
717 { | |
718 // Serialize measResultNeighCells | |
719 SerializeSequenceOf (measResults.measScellResultList.measResultScell.siz
e (),MAX_SCELL_REPORT,1); | |
720 // serialize MeasResultServFreqList-r10 elements in the list | |
721 std::list<LteRrcSap::MeasResultScell>::iterator it; | |
722 for (it = measResults.measScellResultList.measResultScell.begin (); it !
= measResults.measScellResultList.measResultScell.end (); it++) | |
723 { | |
724 // Serialize measId | |
725 SerializeInteger (it->servFreqId,0,MAX_MEAS_ID); // ToDo: change wit
h FreqId, currently is the componentCarrierId | |
726 // Serialize MeasResultServFreqList | |
727 std::bitset<2> measResultScellPresent; | |
728 measResultScellPresent[0] = measResults.measScellResultList.haveMeas
urementResultsServingSCells; | |
729 measResultScellPresent[1] = measResults.measScellResultList.haveMeas
urementResultsNeighCell; // Not implemented | |
730 SerializeSequence (measResultScellPresent,true); | |
731 | 716 |
732 // Serialize measResult | 717 // measResultServFreqList-r10 serialization |
733 std::bitset<2> measResultScellFieldsPresent; | 718 if (measResults.haveMeasResultServFreqList) |
734 measResultScellFieldsPresent[1] = it->haveRsrpResult; | 719 { |
735 measResultScellFieldsPresent[0] = it->haveRsrqResult; | 720 // Serialize measResultServFreqList-r10 |
736 SerializeSequence (measResultScellFieldsPresent,true); | 721 SerializeSequenceOf (measResults.measResultServFreqList.size (), MAX_SCELL
_REPORT, 1); |
| 722 // serialize MeasResultServFreqList-r10 elements in the list |
| 723 for (const auto &it: measResults.measResultServFreqList) |
| 724 { |
| 725 // Serialize MeasResultServFreq-r10 |
| 726 std::bitset<2> measResultServFreqPresent; |
| 727 measResultServFreqPresent[0] = it.haveMeasResultSCell; |
| 728 measResultServFreqPresent[1] = it.haveMeasResultBestNeighCell; |
| 729 SerializeSequence (measResultServFreqPresent, true); |
737 | 730 |
738 if (it->haveRsrpResult) | 731 // Serialize servFreqId-r10 |
739 { | 732 SerializeInteger (it.servFreqId, 0, 7); |
740 SerializeInteger (it->rsrpResult,0,97); | |
741 } | |
742 | 733 |
743 if (it->haveRsrqResult) | 734 if (it.haveMeasResultSCell) |
744 { | 735 { |
745 SerializeInteger (it->rsrqResult,0,34); | 736 // Serialize rsrpResultSCell-r10 |
746 } | 737 SerializeInteger (it.measResultSCell.rsrpResult, 0, 97); |
747 ············ | 738 |
748 } | 739 // Serialize rsrqResultSCell-r10 |
749 } | 740 SerializeInteger (it.measResultSCell.rsrqResult, 0, 34); |
| 741 } |
| 742 |
| 743 if (it.haveMeasResultBestNeighCell) |
| 744 { |
| 745 // Serialize physCellId-r10 |
| 746 SerializeInteger (it.measResultBestNeighCell.physCellId, 0, 503); |
| 747 |
| 748 // Serialize rsrpResultNCell-r10 |
| 749 SerializeInteger (it.measResultBestNeighCell.rsrpResult, 0, 97); |
| 750 |
| 751 // Serialize rsrqResultNCell-r10 |
| 752 SerializeInteger (it.measResultBestNeighCell.rsrqResult, 0, 34); |
| 753 } |
| 754 |
| 755 NS_ASSERT (!it.haveMeasResultBestNeighCell); // Not implemented |
| 756 } |
| 757 } |
750 } | 758 } |
751 | 759 |
752 void | 760 void |
753 RrcAsn1Header::SerializePlmnIdentity (uint32_t plmnId) const | 761 RrcAsn1Header::SerializePlmnIdentity (uint32_t plmnId) const |
754 { | 762 { |
755 // plmn-Identity sequence, mcc is optional, no extension marker | 763 // plmn-Identity sequence, mcc is optional, no extension marker |
756 SerializeSequence (std::bitset<1> (0), false); | 764 SerializeSequence (std::bitset<1> (0), false); |
757 | 765 |
758 // Serialize mnc | 766 // Serialize mnc |
759 int nDig = (plmnId > 99) ? 3 : 2; | 767 int nDig = (plmnId > 99) ? 3 : 2; |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 SerializeEnum (4, 3); | 1718 SerializeEnum (4, 3); |
1711 } | 1719 } |
1712 } | 1720 } |
1713 } | 1721 } |
1714 } | 1722 } |
1715 void | 1723 void |
1716 RrcAsn1Header::SerializeNonCriticalExtensionConfiguration (LteRrcSap::NonCriti
calExtensionConfiguration nonCriticalExtension) const | 1724 RrcAsn1Header::SerializeNonCriticalExtensionConfiguration (LteRrcSap::NonCriti
calExtensionConfiguration nonCriticalExtension) const |
1717 { | 1725 { |
1718 // 3 optional fields. Extension marker not present. | 1726 // 3 optional fields. Extension marker not present. |
1719 std::bitset<3> noncriticalExtension_v1020; | 1727 std::bitset<3> noncriticalExtension_v1020; |
1720 noncriticalExtension_v1020.set (2,0); // No sCellToRealeaseList-r10 | 1728 noncriticalExtension_v1020.set (2, !nonCriticalExtension.sCellToReleaseList.
empty ()); // sCellToReleaseList-r10 |
1721 noncriticalExtension_v1020.set (1,1); // sCellToAddModList-r10 | 1729 noncriticalExtension_v1020.set (1, !nonCriticalExtension.sCellToAddModList.e
mpty ()); // sCellToAddModList-r10 |
1722 noncriticalExtension_v1020.set (0,0); // No nonCriticalExtension RRCConnecti
onReconfiguration-v1130-IEs | 1730 noncriticalExtension_v1020.set (0, 0); // No nonCriticalExtension RRCConnect
ionReconfiguration-v1130-IEs |
1723 SerializeSequence (noncriticalExtension_v1020,false); | 1731 SerializeSequence (noncriticalExtension_v1020,false); |
1724 if (!nonCriticalExtension.sCellsToAddModList.empty ()) | 1732 |
| 1733 if (!nonCriticalExtension.sCellToReleaseList.empty ()) |
1725 { | 1734 { |
1726 SerializeSequenceOf (nonCriticalExtension.sCellsToAddModList.size (),MAX
_OBJECT_ID,1); | 1735 SerializeSequenceOf (nonCriticalExtension.sCellToReleaseList.size (), MA
X_OBJECT_ID, 1); |
1727 for (std::list<LteRrcSap::SCellToAddMod>::iterator it = nonCriticalExten
sion.sCellsToAddModList.begin (); it != nonCriticalExtension.sCellsToAddModList.
end (); it++) | 1736 for (uint8_t sCellIndex: nonCriticalExtension.sCellToReleaseList) |
| 1737 { |
| 1738 SerializeInteger (sCellIndex, 1, 7); // sCellIndex-r10 |
| 1739 } |
| 1740 } |
| 1741 |
| 1742 if (!nonCriticalExtension.sCellToAddModList.empty ()) |
| 1743 { |
| 1744 SerializeSequenceOf (nonCriticalExtension.sCellToAddModList.size (), MAX
_OBJECT_ID, 1); |
| 1745 for (auto &it: nonCriticalExtension.sCellToAddModList) |
1728 { | 1746 { |
1729 std::bitset<4> sCellToAddMod_r10; | 1747 std::bitset<4> sCellToAddMod_r10; |
1730 sCellToAddMod_r10.set (3,1); // sCellIndex | 1748 sCellToAddMod_r10.set (3,1); // sCellIndex |
1731 sCellToAddMod_r10.set (2,1); // CellIdentification | 1749 sCellToAddMod_r10.set (2,1); // CellIdentification |
1732 sCellToAddMod_r10.set (1,1); // RadioResourceConfigCommonSCell | 1750 sCellToAddMod_r10.set (1,1); // RadioResourceConfigCommonSCell |
1733 sCellToAddMod_r10.set (0,it->haveRadioResourceConfigDedicatedSCell);
// No nonCriticalExtension RRC | 1751 sCellToAddMod_r10.set (0, it.haveRadioResourceConfigDedicatedSCell);
// No nonCriticalExtension RRC |
1734 SerializeSequence (sCellToAddMod_r10, false); | 1752 SerializeSequence (sCellToAddMod_r10, false); |
1735 SerializeInteger (it->sCellIndex,1,MAX_OBJECT_ID); //sCellIndex | 1753 SerializeInteger (it.sCellIndex, 1, 7); // sCellIndex-r10 |
1736 | 1754 |
1737 // Serialize CellIdentification | 1755 // Serialize CellIdentification |
1738 std::bitset<2> cellIdentification_r10; | 1756 std::bitset<2> cellIdentification_r10; |
1739 cellIdentification_r10.set(1,1); // phyCellId-r10 | 1757 cellIdentification_r10.set(1,1); // phyCellId-r10 |
1740 cellIdentification_r10.set(0,1); // dl-CarrierFreq-r10 | 1758 cellIdentification_r10.set(0,1); // dl-CarrierFreq-r10 |
1741 SerializeSequence (cellIdentification_r10, false); | 1759 SerializeSequence (cellIdentification_r10, false); |
1742 | 1760 |
1743 SerializeInteger (it->cellIdentification.physCellId,1,65536); | 1761 SerializeInteger (it.cellIdentification.physCellId, 1, 65536); |
1744 SerializeInteger (it->cellIdentification.dlCarrierFreq,1,MAX_EARFCN)
; | 1762 SerializeInteger (it.cellIdentification.dlCarrierFreq, 1, MAX_EARFCN
); |
1745 ············ | 1763 ············ |
1746 //Serialize RadioResourceConfigCommonSCell | 1764 //Serialize RadioResourceConfigCommonSCell |
1747 SerializeRadioResourceConfigCommonSCell (it->radioResourceConfigComm
onSCell); | 1765 SerializeRadioResourceConfigCommonSCell (it.radioResourceConfigCommo
nSCell); |
1748 ············ | 1766 ············ |
1749 if (it->haveRadioResourceConfigDedicatedSCell) | 1767 if (it.haveRadioResourceConfigDedicatedSCell) |
1750 { | 1768 { |
1751 //Serialize RadioResourceConfigDedicatedSCell | 1769 //Serialize RadioResourceConfigDedicatedSCell |
1752 SerializeRadioResourceDedicatedSCell (it->radioResourceConfigDed
icateSCell); | 1770 SerializeRadioResourceDedicatedSCell (it.radioResourceConfigDedi
catedSCell); |
1753 } | 1771 } |
1754 ············ | 1772 ············ |
1755 } | 1773 } |
1756 } | 1774 } |
1757 else | |
1758 { | |
1759 // NS_ASSERT_MSG ( this << "NonCriticalExtension.sCellsToAddModLi
st cannot be empty ", false); | |
1760 } | |
1761 ·· | |
1762 } | 1775 } |
1763 void | 1776 void |
1764 RrcAsn1Header::SerializeRadioResourceConfigCommonSCell (LteRrcSap::RadioResour
ceConfigCommonSCell rrccsc) const | 1777 RrcAsn1Header::SerializeRadioResourceConfigCommonSCell (LteRrcSap::RadioResour
ceConfigCommonSCell rrccsc) const |
1765 { | 1778 { |
1766 // 2 optional fields. Extension marker not present. | 1779 // 2 optional fields. Extension marker not present. |
1767 std::bitset<2> radioResourceConfigCommonSCell_r10; | 1780 std::bitset<2> radioResourceConfigCommonSCell_r10; |
1768 radioResourceConfigCommonSCell_r10.set (1,rrccsc.haveNonUlConfiguration); //
NonUlConfiguration | 1781 radioResourceConfigCommonSCell_r10.set (1,rrccsc.haveNonUlConfiguration); //
NonUlConfiguration |
1769 radioResourceConfigCommonSCell_r10.set (0,rrccsc.haveUlConfiguration); // Ul
Configuration | 1782 radioResourceConfigCommonSCell_r10.set (0,rrccsc.haveUlConfiguration); // Ul
Configuration |
1770 SerializeSequence (radioResourceConfigCommonSCell_r10,false); | 1783 SerializeSequence (radioResourceConfigCommonSCell_r10,false); |
1771 ····· | 1784 ····· |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 std::bitset<2> nonCriticalExtension_v890; | 2594 std::bitset<2> nonCriticalExtension_v890; |
2582 bIterator = DeserializeSequence (&nonCriticalExtension_v890, false,bIterator
); | 2595 bIterator = DeserializeSequence (&nonCriticalExtension_v890, false,bIterator
); |
2583 ···· | 2596 ···· |
2584 if (nonCriticalExtension_v890[0]) | 2597 if (nonCriticalExtension_v890[0]) |
2585 { | 2598 { |
2586 // Continue to analyze future Release optional fields | 2599 // Continue to analyze future Release optional fields |
2587 std::bitset<3> nonCriticalExtension_v920; | 2600 std::bitset<3> nonCriticalExtension_v920; |
2588 bIterator = DeserializeSequence (&nonCriticalExtension_v920, false, bIte
rator); | 2601 bIterator = DeserializeSequence (&nonCriticalExtension_v920, false, bIte
rator); |
2589 if (nonCriticalExtension_v920[0]) | 2602 if (nonCriticalExtension_v920[0]) |
2590 { | 2603 { |
2591 // Continue to deserialize futere Release optional fields | 2604 // Continue to deserialize future Release optional fields |
2592 std::bitset<3> nonCriticalExtension_v1020; | 2605 std::bitset<3> nonCriticalExtension_v1020; |
2593 bIterator = DeserializeSequence (&nonCriticalExtension_v1020, false,
bIterator); | 2606 bIterator = DeserializeSequence (&nonCriticalExtension_v1020, false,
bIterator); |
2594 NS_ASSERT (!nonCriticalExtension_v1020[2]); // No sCellToRealeaseLis
t-r10 | 2607 |
2595 NS_ASSERT (nonCriticalExtension_v1020[1]); // sCellToAddModList-r10 | 2608 if (nonCriticalExtension_v1020[2]) |
| 2609 { |
| 2610 // sCellToReleaseList-r10 |
| 2611 int numElems; |
| 2612 |
| 2613 bIterator = DeserializeSequenceOf (&numElems, MAX_OBJECT_ID, 1,
bIterator); |
| 2614 nonCriticalExtension->sCellToReleaseList.clear (); |
| 2615 |
| 2616 for (int i = 0; i < numElems; i++) |
| 2617 { |
| 2618 // Deserialize SCellIndex-r10 |
| 2619 int sCellIndex; |
| 2620 bIterator = DeserializeInteger (&sCellIndex, 1, 7, bIterator
); |
| 2621 nonCriticalExtension->sCellToReleaseList.push_back (sCellInd
ex); |
| 2622 } |
| 2623 } |
| 2624 |
| 2625 if (nonCriticalExtension_v1020[1]) |
| 2626 { |
| 2627 // sCellToAddModList-r10 |
| 2628 |
| 2629 int numElems; |
| 2630 bIterator = DeserializeSequenceOf (&numElems, MAX_OBJECT_ID, 1,
bIterator); |
| 2631 nonCriticalExtension->sCellToAddModList.clear (); |
| 2632 // Deserialize SCellToAddMod |
| 2633 for (int i = 0; i < numElems; i++) |
| 2634 { |
| 2635 std::bitset<4> sCellToAddMod_r10; |
| 2636 bIterator = DeserializeSequence (&sCellToAddMod_r10, false,
bIterator); |
| 2637 |
| 2638 LteRrcSap::SCellToAddMod sctam; |
| 2639 // Deserialize sCellIndex |
| 2640 NS_ASSERT (sCellToAddMod_r10[3]); // sCellIndex |
| 2641 int n; |
| 2642 bIterator = DeserializeInteger (&n, 1, 7, bIterator); |
| 2643 sctam.sCellIndex = n; |
| 2644 // Deserialize CellIdentification |
| 2645 NS_ASSERT (sCellToAddMod_r10[2]); // CellIdentification |
| 2646 bIterator = DeserializeCellIdentification (&sctam.cellIdenti
fication, bIterator); |
| 2647 |
| 2648 // Deserialize RadioResourceConfigCommonSCell |
| 2649 NS_ASSERT (sCellToAddMod_r10[1]); |
| 2650 bIterator = DeserializeRadioResourceConfigCommonSCell (&scta
m.radioResourceConfigCommonSCell, bIterator); |
| 2651 if (sCellToAddMod_r10[0]) |
| 2652 { |
| 2653 //Deserialize RadioResourceConfigDedicatedSCell |
| 2654 bIterator = DeserializeRadioResourceConfigDedicatedSCell
(&sctam.radioResourceConfigDedicatedSCell, bIterator); |
| 2655 } |
| 2656 |
| 2657 nonCriticalExtension->sCellToAddModList.push_back (sctam); |
| 2658 } |
| 2659 } |
| 2660 |
2596 NS_ASSERT (!nonCriticalExtension_v1020[0]); // No nonCriticalExtensi
on RRCConnectionReconfiguration-v1130-IEs | 2661 NS_ASSERT (!nonCriticalExtension_v1020[0]); // No nonCriticalExtensi
on RRCConnectionReconfiguration-v1130-IEs |
2597 | |
2598 int numElems; | |
2599 bIterator = DeserializeSequenceOf (&numElems,MAX_OBJECT_ID,1,bIterat
or); | |
2600 nonCriticalExtension->sCellsToAddModList.clear (); | |
2601 // Deserialize SCellToAddMod | |
2602 for (int i = 0; i < numElems; i++) | |
2603 { | |
2604 std::bitset<4> sCellToAddMod_r10; | |
2605 bIterator = DeserializeSequence (&sCellToAddMod_r10, false, bIte
rator);· | |
2606 ················ | |
2607 LteRrcSap::SCellToAddMod sctam; | |
2608 // Deserialize sCellIndex | |
2609 NS_ASSERT (sCellToAddMod_r10[3]); // sCellIndex | |
2610 int n; | |
2611 bIterator = DeserializeInteger (&n,1,MAX_OBJECT_ID,bIterator); | |
2612 sctam.sCellIndex = n; | |
2613 // Deserialize CellIdentification | |
2614 NS_ASSERT (sCellToAddMod_r10[2]); // CellIdentification | |
2615 bIterator = DeserializeCellIdentification (&sctam.cellIdentifica
tion, bIterator); | |
2616 | |
2617 // Deserialize RadioResourceConfigCommonSCell | |
2618 NS_ASSERT (sCellToAddMod_r10[1]); | |
2619 bIterator = DeserializeRadioResourceConfigCommonSCell (&sctam.ra
dioResourceConfigCommonSCell, bIterator); | |
2620 sctam.haveRadioResourceConfigDedicatedSCell = sCellToAddMod_r10[
0]; | |
2621 if (sCellToAddMod_r10[0]) | |
2622 { | |
2623 //Deserialize RadioResourceConfigDedicatedSCell | |
2624 bIterator = DeserializeRadioResourceConfigDedicatedSCell (&s
ctam.radioResourceConfigDedicateSCell, bIterator); | |
2625 } | |
2626 | |
2627 nonCriticalExtension->sCellsToAddModList.insert (nonCriticalExte
nsion->sCellsToAddModList.end (), sctam); | |
2628 } | |
2629 } | 2662 } |
2630 } | 2663 } |
2631 | 2664 |
2632 return bIterator; | 2665 return bIterator; |
2633 } | 2666 } |
2634 | 2667 |
2635 Buffer::Iterator· | 2668 Buffer::Iterator· |
2636 RrcAsn1Header::DeserializeCellIdentification (LteRrcSap::CellIdentification *c
i, Buffer::Iterator bIterator) | 2669 RrcAsn1Header::DeserializeCellIdentification (LteRrcSap::CellIdentification *c
i, Buffer::Iterator bIterator) |
2637 { | 2670 { |
2638 NS_LOG_FUNCTION (this); | 2671 NS_LOG_FUNCTION (this); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2810 { | 2843 { |
2811 bIterator = DeserializeNull (bIterator); | 2844 bIterator = DeserializeNull (bIterator); |
2812 } | 2845 } |
2813 else if (sel == 0) | 2846 else if (sel == 0) |
2814 { | 2847 { |
2815 std::bitset<1> codebookSubsetRestrictionPresent; | 2848 std::bitset<1> codebookSubsetRestrictionPresent; |
2816 bIterator = DeserializeSequence (&codebookSubsetRestrictionPres
ent,false,bIterator); | 2849 bIterator = DeserializeSequence (&codebookSubsetRestrictionPres
ent,false,bIterator); |
2817 | 2850 |
2818 int txmode; | 2851 int txmode; |
2819 bIterator = DeserializeEnum (8,&txmode,bIterator); | 2852 bIterator = DeserializeEnum (8,&txmode,bIterator); |
2820 pcdsc->antennaInfoUl.transmissionMode = txmode; | 2853 pcdsc->antennaInfo.transmissionMode = txmode; |
2821 | 2854 |
2822 if (codebookSubsetRestrictionPresent[0]) | 2855 if (codebookSubsetRestrictionPresent[0]) |
2823 { | 2856 { |
2824 // Deserialize codebookSubsetRestriction | 2857 // Deserialize codebookSubsetRestriction |
2825 NS_FATAL_ERROR ("Not implemented yet"); | 2858 NS_FATAL_ERROR ("Not implemented yet"); |
2826 // ... | 2859 // ... |
2827 } | 2860 } |
2828 | 2861 |
2829 int txantennaselchosen; | 2862 int txantennaselchosen; |
2830 bIterator = DeserializeChoice (2,false,&txantennaselchosen,bIte
rator); | 2863 bIterator = DeserializeChoice (2,false,&txantennaselchosen,bIte
rator); |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3538 | 3571 |
3539 // Deserialize measId | 3572 // Deserialize measId |
3540 bIterator = DeserializeInteger (&n, 1, MAX_MEAS_ID, bIterator); | 3573 bIterator = DeserializeInteger (&n, 1, MAX_MEAS_ID, bIterator); |
3541 measResults->measId = n; | 3574 measResults->measId = n; |
3542 | 3575 |
3543 // Deserialize measResultServCell | 3576 // Deserialize measResultServCell |
3544 bIterator = DeserializeSequence (&b0,false,bIterator); | 3577 bIterator = DeserializeSequence (&b0,false,bIterator); |
3545 | 3578 |
3546 // Deserialize rsrpResult | 3579 // Deserialize rsrpResult |
3547 bIterator = DeserializeInteger (&n, 0, 97, bIterator); | 3580 bIterator = DeserializeInteger (&n, 0, 97, bIterator); |
3548 measResults->rsrpResult = n; | 3581 measResults->measResultPCell.rsrpResult = n; |
3549 | 3582 |
3550 // Deserialize rsrqResult | 3583 // Deserialize rsrqResult |
3551 bIterator = DeserializeInteger (&n, 0, 34, bIterator); | 3584 bIterator = DeserializeInteger (&n, 0, 34, bIterator); |
3552 measResults->rsrqResult = n; | 3585 measResults->measResultPCell.rsrqResult = n; |
3553 | 3586 |
3554 measResults->haveMeasResultNeighCells = measResultOptionalPresent[0]; | 3587 measResults->haveMeasResultNeighCells = measResultOptionalPresent[0]; |
3555 measResults->haveScellsMeas = measResultOptionalPresent[3]; | 3588 measResults->haveMeasResultServFreqList = measResultOptionalPresent[3]; |
3556 if ( measResults->haveMeasResultNeighCells) | 3589 if ( measResults->haveMeasResultNeighCells) |
3557 { | 3590 { |
3558 int measResultNeighCellsChoice; | 3591 int measResultNeighCellsChoice; |
3559 | 3592 |
3560 // Deserialize measResultNeighCells | 3593 // Deserialize measResultNeighCells |
3561 bIterator = DeserializeChoice (4,false,&measResultNeighCellsChoice,bIterat
or); | 3594 bIterator = DeserializeChoice (4,false,&measResultNeighCellsChoice,bIterat
or); |
3562 | 3595 |
3563 if (measResultNeighCellsChoice == 0) | 3596 if (measResultNeighCellsChoice == 0) |
3564 { | 3597 { |
3565 // Deserialize measResultListEUTRA | 3598 // Deserialize measResultListEUTRA |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3648 { | 3681 { |
3649 // Deserialize measResultListGERAN | 3682 // Deserialize measResultListGERAN |
3650 // ... | 3683 // ... |
3651 } | 3684 } |
3652 if (measResultNeighCellsChoice == 3) | 3685 if (measResultNeighCellsChoice == 3) |
3653 { | 3686 { |
3654 // Deserialize measResultsCDMA2000 | 3687 // Deserialize measResultsCDMA2000 |
3655 // ... | 3688 // ... |
3656 } | 3689 } |
3657 } | 3690 } |
3658 if (measResults->haveScellsMeas) | 3691 if (measResults->haveMeasResultServFreqList) |
3659 { | 3692 { |
| 3693 int numElems; |
| 3694 bIterator = DeserializeSequenceOf (&numElems, MAX_SCELL_REPORT, 1, bIterat
or); |
| 3695 for (int i = 0; i < numElems; i++) |
| 3696 { |
| 3697 LteRrcSap::MeasResultServFreq measResultServFreq; |
3660 | 3698 |
3661 int numElems; | 3699 // Deserialize MeasResultServFreq-r10 |
3662 bIterator = DeserializeSequenceOf (&numElems,MAX_SCELL_REPORT,1,bIterato
r); | 3700 std::bitset<2> measResultScellPresent; |
3663 for (int i = 0; i < numElems; i++) | 3701 bIterator = DeserializeSequence (&measResultScellPresent, true, bItera
tor); |
3664 { | 3702 measResultServFreq.haveMeasResultSCell = measResultScellPresent[0]; |
3665 LteRrcSap::MeasResultScell measResultScell; | 3703 measResultServFreq.haveMeasResultBestNeighCell = measResultScellPresen
t[1]; |
3666 int measScellId; | |
3667 // Deserialize measId | |
3668 bIterator = DeserializeInteger (&measScellId, 1,MAX_SCELL_REPORT,bIt
erator); | |
3669 measResultScell.servFreqId = measScellId; | |
3670 std::bitset<2> measResultScellPresent; | |
3671 bIterator = DeserializeSequence (&measResultScellPresent,true,bItera
tor); | |
3672 measResults->measScellResultList.haveMeasurementResultsServingSCells
= measResultScellPresent[0]; | |
3673 measResults->measScellResultList.haveMeasurementResultsNeighCell = me
asResultScellPresent[1]; | |
3674 if (measResults->measScellResultList.haveMeasurementResultsServingSCe
lls) | |
3675 { | |
3676 // Deserialize measResult | |
3677 std::bitset<2> measResultOpts; | |
3678 bIterator = DeserializeSequence (&measResultOpts, true, bIterator
); | |
3679 | 3704 |
3680 measResultScell.haveRsrpResult = measResultOpts[1]; | 3705 // Deserialize servFreqId-r10 |
3681 if (measResultOpts[1]) | 3706 int servFreqId; |
3682 { | 3707 bIterator = DeserializeInteger (&servFreqId, 0, 7, bIterator); |
3683 // Deserialize rsrpResult | 3708 measResultServFreq.servFreqId = servFreqId; |
3684 bIterator = DeserializeInteger (&n,0,97,bIterator); | |
3685 measResultScell.rsrpResult = n; | |
3686 } | |
3687 | 3709 |
3688 measResultScell.haveRsrqResult = measResultOpts[0]; | 3710 if (measResultServFreq.haveMeasResultSCell) |
3689 if (measResultOpts[0]) | 3711 { |
3690 { | 3712 // Deserialize rsrpResult |
3691 // Deserialize rsrqResult | 3713 bIterator = DeserializeInteger (&n, 0, 97, bIterator); |
3692 bIterator = DeserializeInteger (&n,0,34,bIterator); | 3714 measResultServFreq.measResultSCell.rsrpResult = n; |
3693 measResultScell.rsrqResult = n; | 3715 |
3694 } | 3716 // Deserialize rsrqResult |
3695 } | 3717 bIterator = DeserializeInteger (&n, 0, 34, bIterator); |
3696 if (measResults->measScellResultList.haveMeasurementResultsNeighCell) | 3718 measResultServFreq.measResultSCell.rsrqResult = n; |
3697 { | 3719 } |
3698 // Deserialize measResultBestNeighCell | 3720 |
3699 } | 3721 if (measResultServFreq.haveMeasResultBestNeighCell) |
3700 measResults->measScellResultList.measResultScell.push_back (measResul
tScell); | 3722 { |
3701 } | 3723 // Deserialize physCellId-r10 |
3702 ········ | 3724 bIterator = DeserializeInteger (&n, 0, 503, bIterator); |
3703 } | 3725 measResultServFreq.measResultBestNeighCell.physCellId = n; |
| 3726 |
| 3727 // Deserialize rsrpResultNCell-r10 |
| 3728 bIterator = DeserializeInteger (&n, 0, 97, bIterator); |
| 3729 measResultServFreq.measResultBestNeighCell.rsrpResult = n; |
| 3730 |
| 3731 // Deserialize rsrqResultNCell-r10 |
| 3732 bIterator = DeserializeInteger (&n, 0, 34, bIterator); |
| 3733 measResultServFreq.measResultBestNeighCell.rsrqResult = n; |
| 3734 } |
| 3735 |
| 3736 measResults->measResultServFreqList.push_back (measResultServFreq); |
| 3737 } |
| 3738 } |
3704 return bIterator; | 3739 return bIterator; |
3705 } | 3740 } |
3706 | 3741 |
3707 Buffer::Iterator | 3742 Buffer::Iterator |
3708 RrcAsn1Header::DeserializePlmnIdentity (uint32_t *plmnId, Buffer::Iterator bIter
ator) | 3743 RrcAsn1Header::DeserializePlmnIdentity (uint32_t *plmnId, Buffer::Iterator bIter
ator) |
3709 { | 3744 { |
3710 int n; | 3745 int n; |
3711 std::bitset<1> isMccPresent; | 3746 std::bitset<1> isMccPresent; |
3712 bIterator = DeserializeSequence (&isMccPresent,false,bIterator); | 3747 bIterator = DeserializeSequence (&isMccPresent,false,bIterator); |
3713 | 3748 |
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5246 // 2 optional fields. Extension marker not present. | 5281 // 2 optional fields. Extension marker not present. |
5247 std::bitset<2> noncriticalExtension_v890; | 5282 std::bitset<2> noncriticalExtension_v890; |
5248 noncriticalExtension_v890.set (1,0); // No lateNonCriticalExtension | 5283 noncriticalExtension_v890.set (1,0); // No lateNonCriticalExtension |
5249 noncriticalExtension_v890.set (0,m_haveNonCriticalExtension); // Impleme
nted nonCriticalExtension because compatibility with R10 - CA | 5284 noncriticalExtension_v890.set (0,m_haveNonCriticalExtension); // Impleme
nted nonCriticalExtension because compatibility with R10 - CA |
5250 //Enable RRCCoonectionReconfiguration-v920-IEs | 5285 //Enable RRCCoonectionReconfiguration-v920-IEs |
5251 SerializeSequence (noncriticalExtension_v890,false); | 5286 SerializeSequence (noncriticalExtension_v890,false); |
5252 ·········· | 5287 ·········· |
5253 // Serialize NonCriticalExtension RRCConnectionReconfiguration-v920-IEs
sequence: | 5288 // Serialize NonCriticalExtension RRCConnectionReconfiguration-v920-IEs
sequence: |
5254 // 3 optional fields. Extension marker not present. | 5289 // 3 optional fields. Extension marker not present. |
5255 std::bitset<3> noncriticalExtension_v920; | 5290 std::bitset<3> noncriticalExtension_v920; |
5256 noncriticalExtension_v920.set (1,0); // No otehrConfig-r9 | 5291 noncriticalExtension_v920.set (1,0); // No otherConfig-r9 |
5257 noncriticalExtension_v920.set (1,0); // No fullConfig-r9 | 5292 noncriticalExtension_v920.set (1,0); // No fullConfig-r9 |
5258 //Enable RRCCoonectionReconfiguration-v1020-IEs | 5293 //Enable RRCCoonectionReconfiguration-v1020-IEs |
5259 noncriticalExtension_v920.set (0,m_haveNonCriticalExtension); // Impleme
nted nonCriticalExtension because compatibility with R10 - CA | 5294 noncriticalExtension_v920.set (0,m_haveNonCriticalExtension); // Impleme
nted nonCriticalExtension because compatibility with R10 - CA |
5260 SerializeSequence (noncriticalExtension_v920,false); | 5295 SerializeSequence (noncriticalExtension_v920,false); |
5261 ·········· | 5296 ·········· |
5262 SerializeNonCriticalExtensionConfiguration (m_nonCriticalExtension); //S
erializing RRCConnectionReconfiguration-r8-IEs | 5297 SerializeNonCriticalExtensionConfiguration (m_nonCriticalExtension); //S
erializing RRCConnectionReconfiguration-r8-IEs |
5263 } | 5298 } |
5264 | 5299 |
5265 // Finish serialization | 5300 // Finish serialization |
5266 FinalizeSerialization (); | 5301 FinalizeSerialization (); |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6849 } | 6884 } |
6850 } | 6885 } |
6851 | 6886 |
6852 return GetSerializedSize (); | 6887 return GetSerializedSize (); |
6853 } | 6888 } |
6854 | 6889 |
6855 void | 6890 void |
6856 MeasurementReportHeader::Print (std::ostream &os) const | 6891 MeasurementReportHeader::Print (std::ostream &os) const |
6857 { | 6892 { |
6858 os << "measId = " << (int)m_measurementReport.measResults.measId << std::endl; | 6893 os << "measId = " << (int)m_measurementReport.measResults.measId << std::endl; |
6859 os << "rsrpResult = " << (int)m_measurementReport.measResults.rsrpResult << st
d::endl; | 6894 os << "rsrpResult = " << (int)m_measurementReport.measResults.measResultPCell.
rsrpResult << std::endl; |
6860 os << "rsrqResult = " << (int)m_measurementReport.measResults.rsrqResult << st
d::endl; | 6895 os << "rsrqResult = " << (int)m_measurementReport.measResults.measResultPCell.
rsrqResult << std::endl; |
6861 os << "haveMeasResultNeighCells = " << (int)m_measurementReport.measResults.ha
veMeasResultNeighCells << std::endl; | 6896 os << "haveMeasResultNeighCells = " << (int)m_measurementReport.measResults.ha
veMeasResultNeighCells << std::endl; |
6862 | 6897 |
6863 if (m_measurementReport.measResults.haveMeasResultNeighCells) | 6898 if (m_measurementReport.measResults.haveMeasResultNeighCells) |
6864 { | 6899 { |
6865 std::list<LteRrcSap::MeasResultEutra> measResultListEutra = m_measurementR
eport.measResults.measResultListEutra; | 6900 std::list<LteRrcSap::MeasResultEutra> measResultListEutra = m_measurementR
eport.measResults.measResultListEutra; |
6866 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResultListEutra.b
egin (); | 6901 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResultListEutra.b
egin (); |
6867 for (; it != measResultListEutra.end (); it++) | 6902 for (; it != measResultListEutra.end (); it++) |
6868 { | 6903 { |
6869 os << " physCellId =" << (int) it->physCellId << std::endl; | 6904 os << " physCellId =" << (int) it->physCellId << std::endl; |
6870 os << " haveCgiInfo =" << it->haveCgiInfo << std::endl; | 6905 os << " haveCgiInfo =" << it->haveCgiInfo << std::endl; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7153 { | 7188 { |
7154 SerializeSequence (std::bitset<0> (),false); | 7189 SerializeSequence (std::bitset<0> (),false); |
7155 // Choose c1 | 7190 // Choose c1 |
7156 SerializeChoice (2,0,false); | 7191 SerializeChoice (2,0,false); |
7157 // Choose message type | 7192 // Choose message type |
7158 SerializeChoice (4,messageType,false); | 7193 SerializeChoice (4,messageType,false); |
7159 } | 7194 } |
7160 | 7195 |
7161 } // namespace ns3 | 7196 } // namespace ns3 |
7162 | 7197 |
OLD | NEW |