1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
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
7
* published by the Free Software Foundation;
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
* Author: Giuseppe Piro <g.piro@poliba.it>
21
#ifndef IDEAL_CONTROL_MESSAGES_H
22
#define IDEAL_CONTROL_MESSAGES_H
25
#include "ns3/simple-ref-count.h"
36
* The IdealControlMessage provides a basic implementations for
37
* control messages (such as PDCCH allocation map, CQI feedbacks)
38
* that are exchanged among eNodeB and UEs.
40
class IdealControlMessage : public SimpleRefCount<IdealControlMessage>
45
* The type of the message
49
CQI_FEEDBACKS, ALLOCATION_MAP
52
IdealControlMessage (void);
53
virtual ~IdealControlMessage (void);
56
* \brief Set the source device of the message
57
* \param src the device that sends the message
59
void SetSourceDevice (Ptr<LteNetDevice> src);
61
* \brief Set the destination device of the message
62
* \param dst the device that receives the message
64
void SetDestinationDevice (Ptr<LteNetDevice> dst);
67
* \brief Get the source device of the message
68
* \return the pointer to the device that sends the message
70
Ptr<LteNetDevice> GetSourceDevice (void);
72
* \brief Get the destination device of the message
73
* \return the pointer to the device that receives the message
75
Ptr<LteNetDevice> GetDestinationDevice (void);
78
* \brief Set the type of the message
79
* \param type the type of the message
81
void SetMessageType (MessageType type);
83
* \brief Get the type of the message
84
* \return the type of the message
86
MessageType GetMessageType (void);
89
Ptr<LteNetDevice> m_source;
90
Ptr<LteNetDevice> m_destination;
95
#endif /* IDEAL_CONTROL_MESSAGES_H */
99
// ----------------------------------------------------------------------------------------------------------
103
#ifndef PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H
104
#define PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H
106
#include "ns3/object.h"
116
* \brief The PdcchMapIdealControlMessage defines an ideal allocation map
117
* for both UL and DL sends by the eNodeB to all UE,
118
* using an ideal PDCCH control channel.
119
* IdealPdcchMessage is composed by a list of IdealPdcchRecord
120
* where is indicated the UE that can use a particular sub channel
121
* with a proper MCS scheme.
122
* This records are the same for both UL and DL, and are created by the
123
* packet scheduler at the beginning of each sub frame.
124
* When the IdealPdcchMessage is sent under an ideal control channel,
125
* all UE stores into a proper variables the informations about
126
* the resource mapping.
128
class PdcchMapIdealControlMessage : public IdealControlMessage
132
PdcchMapIdealControlMessage (void);
133
virtual ~PdcchMapIdealControlMessage (void);
136
* Direction for which the message is created
144
* The PDCCH ideal record
146
struct IdealPdcchRecord
149
Direction m_direction;
150
/** the sub channel */
152
/** the ue that receive the mapping */
153
Ptr<LteNetDevice> m_ue;
154
/** the selected msc */
159
* The PDCCH ideal message
161
typedef std::list<struct IdealPdcchRecord> IdealPdcchMessage;
164
* \brief add a PDCCH record into the message.
165
* \param direction the direction of the map
166
* \param subChannel the scheduled sub channel
167
* \param ue the ue the can use the sub channel for transmission
168
* \param mcs the selected MCS scheme
170
void AddNewRecord (Direction direction,
171
int subChannel, Ptr<LteNetDevice> ue, double mcs);
174
* \brief Get the message
175
* \return the pointer to the message
177
IdealPdcchMessage* GetMessage (void);
180
IdealPdcchMessage *m_idealPdcchMessage;
185
#endif /* PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H */
189
// ----------------------------------------------------------------------------------------------------------
193
#ifndef CQI_IDEAL_CONTROL_MESSAGES_H
194
#define CQI_IDEAL_CONTROL_MESSAGES_H
196
#include "ns3/object.h"
206
* The CqiIdealControlMessage defines an ideal list of feedback about
207
* the channel quality sent by the UE to the eNodeB.
209
class CqiIdealControlMessage : public IdealControlMessage
213
CqiIdealControlMessage (void);
214
virtual ~CqiIdealControlMessage (void);
217
* The CQI feedback ideal record
221
/** the sub channel */
223
/** the cqi feedback */
228
* The ideal CQI feedback message
230
typedef std::list<struct CqiFeedback> CqiFeedbacks;
233
* \brief add a CQI feedback record into the message.
234
* \param subChannel the scheduled sub channel
235
* \param cqi the cqi feedback
237
void AddNewRecord (int subChannel, double cqi);
240
* \brief Get cqi informations
241
* \return cqi messages
243
CqiFeedbacks* GetMessage (void);
247
CqiFeedbacks *m_cqiFeedbacks;
251
#endif /* CQI_IDEAL_CONTROL_MESSAGES_H */