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) 2010 TELEMATICS LAB, DEE - Politecnico di Bari | 3 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 | 49 |
50 | 50 |
51 /** | 51 /** |
52 * Duration of the data portion of a UL subframe. | 52 * Duration of the data portion of a UL subframe. |
53 * Equals to "TTI length - 1 symbol length for SRS - margin". | 53 * Equals to "TTI length - 1 symbol length for SRS - margin". |
54 * The margin is 1 nanosecond and is intended to avoid overlapping simulator | 54 * The margin is 1 nanosecond and is intended to avoid overlapping simulator |
55 * events. The duration of one symbol is TTI/14 (rounded). In other words, | 55 * events. The duration of one symbol is TTI/14 (rounded). In other words, |
56 * duration of data portion of UL subframe = 1 ms * (13/14) - 1 ns. | 56 * duration of data portion of UL subframe = 1 ms * (13/14) - 1 ns. |
57 */ | 57 */ |
58 static const Time UL_DATA_DURATION = NanoSeconds (static_cast<uint64_t>(1e6 - 71
429 - 1)); | 58 static const Time UL_DATA_DURATION = NanoSeconds (1000000 - 71429 - 1); |
59 | 59 |
60 /** | 60 /** |
61 * Delay from subframe start to transmission of SRS. | 61 * Delay from subframe start to transmission of SRS. |
62 * Equals to "TTI length - 1 symbol for SRS". | 62 * Equals to "TTI length - 1 symbol for SRS". |
63 */ | 63 */ |
64 static const Time UL_SRS_DELAY_FROM_SUBFRAME_START = NanoSeconds (static_cast<ui
nt64_t>(1e6 - 71429));· | 64 static const Time UL_SRS_DELAY_FROM_SUBFRAME_START = NanoSeconds (1000000 - 7142
9);· |
65 | 65 |
66 | 66 |
67 | 67 |
68 | 68 |
69 //////////////////////////////////////// | 69 //////////////////////////////////////// |
70 // member SAP forwarders | 70 // member SAP forwarders |
71 //////////////////////////////////////// | 71 //////////////////////////////////////// |
72 | 72 |
73 /// UeMemberLteUePhySapProvider class | 73 /// UeMemberLteUePhySapProvider class |
74 class UeMemberLteUePhySapProvider : public LteUePhySapProvider | 74 class UeMemberLteUePhySapProvider : public LteUePhySapProvider |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 // CREATE DlCqiLteControlMessage | 719 // CREATE DlCqiLteControlMessage |
720 Ptr<DlCqiLteControlMessage> msg = Create<DlCqiLteControlMessage> (); | 720 Ptr<DlCqiLteControlMessage> msg = Create<DlCqiLteControlMessage> (); |
721 CqiListElement_s dlcqi; | 721 CqiListElement_s dlcqi; |
722 std::vector<int> cqi; | 722 std::vector<int> cqi; |
723 if (Simulator::Now () > m_p10CqiLast + m_p10CqiPeriodicity) | 723 if (Simulator::Now () > m_p10CqiLast + m_p10CqiPeriodicity) |
724 { | 724 { |
725 cqi = m_amc->CreateCqiFeedbacks (newSinr, m_dlBandwidth); | 725 cqi = m_amc->CreateCqiFeedbacks (newSinr, m_dlBandwidth); |
726 | 726 |
727 int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode)
; | 727 int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode)
; |
728 int nbSubChannels = cqi.size (); | 728 int nbSubChannels = static_cast<int>(cqi.size ()); |
729 double cqiSum = 0.0; | 729 double cqiSum = 0.0; |
730 int activeSubChannels = 0; | 730 int activeSubChannels = 0; |
731 // average the CQIs of the different RBs | 731 // average the CQIs of the different RBs |
732 for (int i = 0; i < nbSubChannels; i++) | 732 for (int i = 0; i < nbSubChannels; i++) |
733 { | 733 { |
734 if (cqi.at (i) != -1) | 734 if (cqi.at (i) != -1) |
735 { | 735 { |
736 cqiSum += cqi.at (i); | 736 cqiSum += cqi.at (i); |
737 activeSubChannels++; | 737 activeSubChannels++; |
738 } | 738 } |
(...skipping 17 matching lines...) Expand all Loading... |
756 } | 756 } |
757 } | 757 } |
758 //NS_LOG_DEBUG (this << " Generate P10 CQI feedback " << (uint16_t) cqiSum
/ activeSubChannels); | 758 //NS_LOG_DEBUG (this << " Generate P10 CQI feedback " << (uint16_t) cqiSum
/ activeSubChannels); |
759 dlcqi.m_wbPmi = 0; // not yet used | 759 dlcqi.m_wbPmi = 0; // not yet used |
760 // dl.cqi.m_sbMeasResult others CQI report modes: not yet implemented | 760 // dl.cqi.m_sbMeasResult others CQI report modes: not yet implemented |
761 } | 761 } |
762 else if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriodicity) | 762 else if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriodicity) |
763 { | 763 { |
764 cqi = m_amc->CreateCqiFeedbacks (newSinr, GetRbgSize ()); | 764 cqi = m_amc->CreateCqiFeedbacks (newSinr, GetRbgSize ()); |
765 int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode)
; | 765 int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode)
; |
766 int nbSubChannels = cqi.size (); | 766 int nbSubChannels = static_cast<int>(cqi.size ()); |
767 int rbgSize = GetRbgSize (); | 767 int rbgSize = GetRbgSize (); |
768 double cqiSum = 0.0; | 768 double cqiSum = 0.0; |
769 int cqiNum = 0; | 769 int cqiNum = 0; |
770 SbMeasResult_s rbgMeas; | 770 SbMeasResult_s rbgMeas; |
771 //NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << rbgSize << " c
qiNum " << nbSubChannels << " band " << (uint16_t)m_dlBandwidth); | 771 //NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << rbgSize << " c
qiNum " << nbSubChannels << " band " << (uint16_t)m_dlBandwidth); |
772 for (int i = 0; i < nbSubChannels; i++) | 772 for (int i = 0; i < nbSubChannels; i++) |
773 { | 773 { |
774 if (cqi.at (i) != -1) | 774 if (cqi.at (i) != -1) |
775 { | 775 { |
776 cqiSum += cqi.at (i); | 776 cqiSum += cqi.at (i); |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 State oldState = m_state; | 1464 State oldState = m_state; |
1465 m_state = newState; | 1465 m_state = newState; |
1466 NS_LOG_INFO (this << " cellId=" << m_cellId << " rnti=" << m_rnti | 1466 NS_LOG_INFO (this << " cellId=" << m_cellId << " rnti=" << m_rnti |
1467 << " UePhy " << ToString (oldState) | 1467 << " UePhy " << ToString (oldState) |
1468 << " --> " << ToString (newState)); | 1468 << " --> " << ToString (newState)); |
1469 m_stateTransitionTrace (m_cellId, m_rnti, oldState, newState); | 1469 m_stateTransitionTrace (m_cellId, m_rnti, oldState, newState); |
1470 } | 1470 } |
1471 | 1471 |
1472 | 1472 |
1473 } // namespace ns3 | 1473 } // namespace ns3 |
LEFT | RIGHT |