--- a/src/lte/model/lte-enb-phy.h Sun Jul 29 14:29:41 2012 +0200
+++ b/src/lte/model/lte-enb-phy.h Tue Jul 31 19:18:23 2012 +0200
@@ -23,11 +23,15 @@
#define ENB_LTE_PHY_H
-#include "lte-phy.h"
-#include <ns3/ideal-control-messages.h>
+#include <ns3/lte-control-messages.h>
#include <ns3/lte-enb-phy-sap.h>
#include <ns3/lte-enb-cphy-sap.h>
+#include <ns3/lte-phy.h>
+
#include <map>
+#include <set>
+
+
namespace ns3 {
@@ -121,15 +125,24 @@
uint8_t GetMacChDelay (void) const;
/**
- * \brief Queue the MAC PDU to be sent
- * \param p the MAC PDU to sent
- */
- virtual void DoSendMacPdu (Ptr<Packet> p);
-
- 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 vector of integers, if the i-th value is j it means
+ * that the j-th resource block is used for transmission in the
+ * downlink. If there is no i such that the value of the i-th
+ * element is j, it means that RB j is not used.
+ */
+ void SetDownlinkSubChannels (std::vector<int> mask );
- void DoSetDownlinkSubChannels ();
+ /**
+ *
+ * \return a vector of integers, if the i-th value is j it means
+ * that the j-th resource block is used for transmission in the
+ * downlink. If there is no i such that the value of the i-th
+ * element is j, it means that RB j is not used.
+ */
+ std::vector<int> GetDownlinkSubChannels (void);
/**
* \brief Create the PSD for TX
@@ -144,36 +157,46 @@
void CalcChannelQualityForUe (std::vector <double> sinr, Ptr<LteSpectrumPhy> ue);
/**
- * \brief Send the control message
- * \param msg the message to send
- */
- // virtual void SendIdealControlMessage (Ptr<IdealControlMessage> msg); // legacy
- /**
* \brief Receive the control message
* \param msg the received message
*/
- virtual void ReceiveIdealControlMessage (Ptr<IdealControlMessage> msg);
+ virtual void ReceiveLteControlMessage (Ptr<LteControlMessage> msg);
/**
* \brief Create the UL CQI feedback from SINR values perceived at
- * the physical layer with the signal received from eNB
+ * the physical layer with the PUSCH signal received from eNB
+ * \param sinr SINR values vector
+ */
+ FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreatePuschCqiReport (const SpectrumValue& sinr);
+
+ /**
+ * \brief Create the UL CQI feedback from SINR values perceived at
+ * the physical layer with the SRS signal received from eNB
* \param sinr SINR values vector
*/
- UlCqi_s CreateUlCqiReport (const SpectrumValue& sinr);
-
+ FfMacSchedSapProvider::SchedUlCqiInfoReqParameters CreateSrsCqiReport (const SpectrumValue& sinr);
- void DoSendIdealControlMessage (Ptr<IdealControlMessage> msg);
-
+ /**
+ * \brief Send the PDCCH and PCFICH in the first 3 symbols
+ * \param ctrlMsgList the list of control messages of PDCCH
+ */
+ void SendControlChannels (std::list<Ptr<LteControlMessage> > ctrlMsgList);
+
+ /**
+ * \brief Send the PDSCH
+ * \param pb the PacketBurst to be sent
+ */
+ void SendDataChannels (Ptr<PacketBurst> pb);
/**
* \param m the UL-CQI to be queued
*/
- void QueueUlDci (UlDciIdealControlMessage m);
+ void QueueUlDci (UlDciLteControlMessage m);
/**
* \returns the list of UL-CQI to be processed
*/
- std::list<UlDciIdealControlMessage> DequeueUlDci (void);
+ std::list<UlDciLteControlMessage> DequeueUlDci (void);
/**
@@ -197,9 +220,15 @@
* \brief PhySpectrum received a new PHY-PDU
*/
void PhyPduReceived (Ptr<Packet> p);
+
+ /**
+ * \brief PhySpectrum received a new list of LteControlMessage
+ */
+ virtual void ReceiveLteControlMessageList (std::list<Ptr<LteControlMessage> >);
// inherited from LtePhy
- virtual void GenerateCqiReport (const SpectrumValue& sinr);
+ virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr);
+ virtual void GenerateDataCqiReport (const SpectrumValue& sinr);
private:
@@ -209,26 +238,43 @@
void DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn);
void DoAddUe (uint16_t rnti);
void DoSetTransmissionMode (uint16_t rnti, uint8_t txMode);
-
+
- bool AddUePhy (uint16_t rnti, Ptr<LteUePhy> phy);
+ // LteEnbPhySapProvider forwarded methods
+ void DoSendMacPdu (Ptr<Packet> p);
+ void DoSetSrsConfigurationIndex (uint16_t rnti, uint16_t srcCi);
+ void DoSendLteControlMessage (Ptr<LteControlMessage> msg);
+ uint8_t DoGetMacChTtiDelay ();
+
+ bool AddUePhy (uint16_t rnti);
bool DeleteUePhy (uint16_t rnti);
- std::map <uint16_t, Ptr<LteUePhy> > m_ueAttached;
+ std::set <uint16_t> m_ueAttached;
+
+ std::vector <int> m_listOfDownlinkSubchannel;
- std::vector< std::list<UlDciIdealControlMessage> > m_ulDciQueue; // for storing info on future receptions
+ std::vector <int> m_dlDataRbMap;
+
+ std::vector< std::list<UlDciLteControlMessage> > m_ulDciQueue; // for storing info on future receptions
LteEnbPhySapProvider* m_enbPhySapProvider;
LteEnbPhySapUser* m_enbPhySapUser;
LteEnbCphySapProvider* m_enbCphySapProvider;
LteEnbCphySapUser* m_enbCphySapUser;
+
+ std::vector <uint16_t> m_ulRntiRxed;
uint32_t m_nrFrames;
uint32_t m_nrSubFrames;
+ uint16_t m_srsPeriodicity;
+ std::map <uint16_t,uint16_t> m_srsCounter;
+ std::vector <uint16_t> m_srsUeOffset;
+ uint16_t m_currentSrsOffset;
+
};