diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index b47705a8d..aa9908079 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -324,13 +324,20 @@ LteEnbPhy::PhyPduReceived (Ptr p) } void -LteEnbPhy::DoSetDownlinkSubChannels () +LteEnbPhy::SetDownlinkSubChannels (std::vector mask) { NS_LOG_FUNCTION (this); + m_listOfDownlinkSubchannel = mask; Ptr txPsd = CreateTxPowerSpectralDensity (); m_downlinkSpectrumPhy->SetTxPowerSpectralDensity (txPsd); } +std::vector +LteEnbPhy::GetDownlinkSubChannels (void) +{ + NS_LOG_FUNCTION (this); + return m_listOfDownlinkSubchannel; +} Ptr LteEnbPhy::CreateTxPowerSpectralDensity () diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index f029b556e..1ce50e585 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -118,8 +118,23 @@ public: virtual uint8_t DoGetMacChTtiDelay (); + /** + * \brief set the resource blocks (a.k.a. sub channels) to be used in the downlink for transmission + * + * \param mask a bitmask implemented as a vector. If the i-th value + * of mask is equal to 1 (0) it means that the i-th resource block + * is used (not used) for transmission in the downlink. + */ + void SetDownlinkSubChannels (std::vector mask ); - void DoSetDownlinkSubChannels (); + + /** + * + * \return a bitmask implemented as a vector. If the i-th value + * of mask is equal to 1 (0) it means that the i-th resource block + * is used (not used) for transmission in the downlink. + */ + std::vector GetDownlinkSubChannels (void); /** * \brief Create the PSD for TX @@ -218,6 +233,8 @@ public: private: std::map > m_ueAttached; + std::vector m_listOfDownlinkSubchannel; + std::vector m_dlDataRbMap; std::vector< std::list > m_ulDciQueue; // for storing info on future receptions diff --git a/src/lte/model/lte-phy.cc b/src/lte/model/lte-phy.cc index 3903ffdfc..302fc2a64 100644 --- a/src/lte/model/lte-phy.cc +++ b/src/lte/model/lte-phy.cc @@ -127,53 +127,6 @@ LtePhy::SetUplinkChannel (Ptr c) m_uplinkSpectrumPhy->SetChannel (c); } -void -LtePhy::SetDownlinkSubChannels (std::vector mask ) -{ - NS_LOG_FUNCTION (this); - m_listOfDownlinkSubchannel = mask; - DoSetDownlinkSubChannels (); -} - - -void -LtePhy::DoSetDownlinkSubChannels () -{ - NS_LOG_FUNCTION (this); -} - - -void -LtePhy::SetUplinkSubChannels (std::vector mask ) -{ - NS_LOG_FUNCTION (this); - m_listOfUplinkSubchannel = mask; - DoSetUplinkSubChannels (); -} - - -void -LtePhy::DoSetUplinkSubChannels () -{ - NS_LOG_FUNCTION (this); -} - - -std::vector -LtePhy::GetDownlinkSubChannels (void) -{ - NS_LOG_FUNCTION (this); - return m_listOfDownlinkSubchannel; -} - - -std::vector -LtePhy::GetUplinkSubChannels (void) -{ - NS_LOG_FUNCTION (this); - return m_listOfUplinkSubchannel; -} - void LtePhy::SetTti (double tti) { diff --git a/src/lte/model/lte-phy.h b/src/lte/model/lte-phy.h index 4a8916ca3..78ab028c3 100644 --- a/src/lte/model/lte-phy.h +++ b/src/lte/model/lte-phy.h @@ -111,41 +111,6 @@ public: */ void SetUplinkChannel (Ptr c); - /** - * \brief set a list of sub channel to use in the downlink. - * A sub channel is composed by a couple of resource bloks (180KHz x 1 ms) - * \param mask a vector of intefer values. Each elements of this vector carries information about - * the corresponding DL sub channel. If the i-th value of mask is equal to 1 (0) it means that the corresponding sub channel is used (not used) for the downlink. - */ - void SetDownlinkSubChannels (std::vector mask ); - /** - * \brief do some operation after the set of a list of DL sub channels - */ - virtual void DoSetDownlinkSubChannels (); - - /** - * \brief set a list of sub channel to use in the uplink. - * A sub channel is composed by a couple of resource bloks (180KHz x 1 ms) - * \param mask a vector of intefer values. Each elements of this vector carries information about - * the corresponding UL sub channel. If the i-th value of mask is equal to 1 (0) it means that the corresponding sub channel is used (not used) for the uplink. - */ - void SetUplinkSubChannels (std::vector mask); - /** - * \brief do some operation after the set of a list of UL sub channels - */ - virtual void DoSetUplinkSubChannels (); - - /** - * \brief get a list of sub channel to use in the downlink - * \return - */ - std::vector GetDownlinkSubChannels (void); - /** - * \brief get a list of sub channel to use in the downlink - * \return - */ - std::vector GetUplinkSubChannels (void); - /** * \brief Compute the TX Power Spectral Density @@ -254,9 +219,6 @@ protected: Ptr m_downlinkSpectrumPhy; Ptr m_uplinkSpectrumPhy; - std::vector m_listOfDownlinkSubchannel; - std::vector m_listOfUplinkSubchannel; - double m_txPower; double m_noiseFigure; diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index 667919721..6c3e33a22 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -290,19 +290,6 @@ LteUePhy::PhyPduReceived (Ptr p) m_uePhySapUser->ReceivePhyPdu (p); } -void -LteUePhy::DoSetUplinkSubChannels () -{ - NS_LOG_FUNCTION (this); - - /* - * XXX: the uplink scheduler is not implemented yet! - * Now, all uplink sub channels can be used for uplink transmission - */ - SetSubChannelsForTransmission (GetUplinkSubChannels ()); -} - - void LteUePhy::SetSubChannelsForTransmission (std::vector mask) { diff --git a/src/lte/model/lte-ue-phy.h b/src/lte/model/lte-ue-phy.h index 78caa271d..770b4aad5 100644 --- a/src/lte/model/lte-ue-phy.h +++ b/src/lte/model/lte-ue-phy.h @@ -118,11 +118,6 @@ public: */ virtual Ptr CreateTxPowerSpectralDensity (); - /** - * \brief Update available channel for TX - */ - virtual void DoSetUplinkSubChannels (); - /** * \brief Set a list of sub channels to use in TX * \param mask a list of sub channels