src/lte/model/lte-spectrum-phy.h
changeset 8726 f6f0e2531457
parent 8693 478733ab87b7
parent 8718 26110c369b1c
child 8731 9314383def49
--- a/src/lte/model/lte-spectrum-phy.h	Thu Apr 19 17:43:47 2012 +0200
+++ b/src/lte/model/lte-spectrum-phy.h	Mon Apr 23 13:16:03 2012 +0200
@@ -41,7 +41,20 @@
 
 namespace ns3 {
 
+struct TbId_t
+{
+  uint16_t m_rnti;
+  uint8_t m_layer;
+  
+  public:
+  TbId_t ();
+  TbId_t (const uint16_t a, const uint8_t b);
+  
+  friend bool operator == (const TbId_t &a, const TbId_t &b);
+  friend bool operator < (const TbId_t &a, const TbId_t &b);
+};
 
+  
 struct tbInfo_t
 {
   uint16_t size;
@@ -50,7 +63,7 @@
   bool corrupt;
 };
 
-typedef std::map<uint16_t, tbInfo_t> expectedTbs_t;
+typedef std::map<TbId_t, tbInfo_t> expectedTbs_t;
 
 class LteNetDevice;
 
@@ -176,8 +189,9 @@
   * \param size the size of the TB
   * \param mcs the MCS of the TB
   * \param map the map of RB(s) used
+  * \param layer the layer (in case of MIMO tx)
   */
-  void AddExpectedTb (uint16_t  rnti, uint16_t size, uint8_t mcs, std::vector<int> map);
+  void AddExpectedTb (uint16_t  rnti, uint16_t size, uint8_t mcs, std::vector<int> map, uint8_t layer);
   
   /** 
   * 
@@ -185,11 +199,24 @@
   * \param sinr vector of sinr perceived per each RB
   */
   void UpdateSinrPerceived (const SpectrumValue& sinr);
+  
+  /** 
+  * 
+  * 
+  * \param txMode UE transmission mode (SISO, MIMO tx diversity, ...)
+  */
+  void SetTransmissionMode (uint8_t txMode);
+  
+  friend class LteUePhy;
+  
 
 private:
   void ChangeState (State newState);
   void EndTx ();
   void EndRx ();
+  
+  void SetTxModeGain (uint8_t txMode, double gain);
+  
 
   Ptr<MobilityModel> m_mobility;
   Ptr<AntennaModel> m_antenna;
@@ -225,6 +252,10 @@
   
   UniformVariable m_random;
   bool m_pemEnabled; // when true (default) the phy error model is enabled
+  
+  uint8_t m_transmissionMode; // for UEs: store the transmission mode
+  std::vector <double> m_txModeGain; // duplicate value of LteUePhy
+  
 };