Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(362)

Unified Diff: src/lte/model/lte-fr-soft-algorithm.h

Issue 130130043: GSoC 2014 LTE FFR algorithms project
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/lte/model/lte-fr-soft-algorithm.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/lte/model/lte-fr-soft-algorithm.h
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014 Piotr Gawlowicz
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
+ *
+ */
+
+#ifndef LTE_FR_SOFT_ALGORITHM_H
+#define LTE_FR_SOFT_ALGORITHM_H
+
+#include <ns3/lte-ffr-algorithm.h>
+#include <ns3/lte-ffr-sap.h>
+#include <ns3/lte-ffr-rrc-sap.h>
+#include <ns3/lte-rrc-sap.h>
+#include <map>
+
+namespace ns3 {
+
+
+/**
+ * \brief Soft Frequency Reuse algorithm implementation
+ */
+class LteFrSoftAlgorithm : public LteFfrAlgorithm
+{
+public:
+ /**
+ * \brief Creates a trivial ffr algorithm instance.
+ */
+ LteFrSoftAlgorithm ();
+
+ virtual ~LteFrSoftAlgorithm ();
+
+ // inherited from Object
+ static TypeId GetTypeId ();
+
+ // inherited from LteFfrAlgorithm
+ virtual void SetLteFfrSapUser (LteFfrSapUser* s);
+ virtual LteFfrSapProvider* GetLteFfrSapProvider ();
+
+ virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s);
+ virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider ();
+
+ // let the forwarder class access the protected and private members
+ friend class MemberLteFfrSapProvider<LteFrSoftAlgorithm>;
+ friend class MemberLteFfrRrcSapProvider<LteFrSoftAlgorithm>;
+
+protected:
+ // inherited from Object
+ virtual void DoInitialize ();
+ virtual void DoDispose ();
+
+ virtual void Reconfigure ();
+
+ // FFR SAP PROVIDER IMPLEMENTATION
+ virtual std::vector <bool> DoGetAvailableDlRbg ();
+ virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti);
+ virtual std::vector <bool> DoGetAvailableUlRbg ();
+ virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti);
+ virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params);
+ virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params);
+ virtual void DoReportUlCqiInfo ( std::map <uint16_t, std::vector <double> > ulCqiMap );
+ virtual uint8_t DoGetTpc (uint16_t rnti);
+ virtual uint8_t DoGetMinContinuousUlBandwidth ();
+
+ // FFR SAP RRC PROVIDER IMPLEMENTATION
+ virtual void DoAddUe (uint16_t rnti);
+ virtual void DoRemoveUe (uint16_t rnti);
+ virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults);
+ virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params);
+
+private:
+ void SetDownlinkConfiguration (uint16_t cellId, uint8_t bandwidth);
+ void SetUplinkConfiguration (uint16_t cellId, uint8_t bandwidth);
+ void InitializeDownlinkRbgMaps ();
+ void InitializeUplinkRbgMaps ();
+
+ // FFR SAP
+ LteFfrSapUser* m_ffrSapUser;
+ LteFfrSapProvider* m_ffrSapProvider;
+
+ // FFR RRF SAP
+ LteFfrRrcSapUser* m_ffrRrcSapUser;
+ LteFfrRrcSapProvider* m_ffrRrcSapProvider;
+
+ bool m_isEdgeSubBandForCenterUe;
+
+ uint8_t m_dlEgdeSubBandOffset;
+ uint8_t m_dlEdgeSubBandwidth;
+
+ uint8_t m_ulEgdeSubBandOffset;
+ uint8_t m_ulEdgeSubBandwidth;
+
+ std::vector <bool> m_dlRbgMap;
+ std::vector <bool> m_ulRbgMap;
+
+ std::vector <bool> m_dlEdgeRbgMap;
+ std::vector <bool> m_ulEdgeRbgMap;
+
+ enum SubBand
+ {
+ AreaUnset,
+ CellCenter,
+ CellEdge
+ };
+
+ std::map< uint16_t, uint8_t > m_ues;
+ std::vector<uint16_t> m_egdeUes;
+
+ uint8_t m_egdeSubBandThreshold;
+
+ uint8_t m_centerPowerOffset;
+ uint8_t m_edgePowerOffset;
+
+ uint8_t m_centerAreaTpc;
+ uint8_t m_edgeAreaTpc;
+
+ // The expected measurement identity
+ uint8_t m_measId;
+
+}; // end of class LteFrSoftAlgorithm
+
+
+} // end of namespace ns3
+
+
+#endif /* LTE_FR_SOFT_ALGORITHM_H */

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b