~ubuntu-branches/ubuntu/quantal/ns3/quantal

« back to all changes in this revision

Viewing changes to ns-3.12.1/src/lte/model/ideal-control-messages.h

  • Committer: Package Import Robot
  • Author(s): YunQiang Su, Aron Xu, YunQiang Su, Upstream
  • Date: 2012-01-06 00:35:42 UTC
  • mfrom: (10.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120106003542-vcn5g03mhapm991h
Tags: 3.13+dfsg-1
[ Aron Xu ]:
        add tag binary and binary-indep, 
  for not build doc when --binary-arch (Closes: #654493).
[ YunQiang Su ]
        add waf 1.5/1.6 source to debian directory, 
  and build waf from there (Closes: #642217).
[ Upstream ]
  Successfully link with --as-needed option (Closes: #642225).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
 
/*
3
 
 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
4
 
 *
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;
8
 
 *
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.
13
 
 *
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
17
 
 *
18
 
 * Author: Giuseppe Piro  <g.piro@poliba.it>
19
 
 */
20
 
 
21
 
#ifndef IDEAL_CONTROL_MESSAGES_H
22
 
#define IDEAL_CONTROL_MESSAGES_H
23
 
 
24
 
#include "ns3/ptr.h"
25
 
#include "ns3/simple-ref-count.h"
26
 
#include <list>
27
 
 
28
 
namespace ns3 {
29
 
 
30
 
class LteNetDevice;
31
 
 
32
 
 
33
 
/**
34
 
 * \ingroup lte
35
 
 *
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.
39
 
 */
40
 
class IdealControlMessage : public SimpleRefCount<IdealControlMessage>
41
 
{
42
 
public:
43
 
 
44
 
  /**
45
 
   * The type of the message
46
 
   */
47
 
  enum MessageType
48
 
  {
49
 
    CQI_FEEDBACKS, ALLOCATION_MAP
50
 
  };
51
 
 
52
 
  IdealControlMessage (void);
53
 
  virtual ~IdealControlMessage (void);
54
 
 
55
 
  /**
56
 
   * \brief Set the source  device of the message
57
 
   * \param src the device that sends the message
58
 
   */
59
 
  void SetSourceDevice (Ptr<LteNetDevice> src);
60
 
  /**
61
 
   * \brief Set the destination  device of the message
62
 
   * \param dst the device that receives the message
63
 
   */
64
 
  void SetDestinationDevice (Ptr<LteNetDevice> dst);
65
 
 
66
 
  /**
67
 
   * \brief Get the source  device of the message
68
 
   * \return the pointer to the device that sends the message
69
 
   */
70
 
  Ptr<LteNetDevice> GetSourceDevice (void);
71
 
  /**
72
 
   * \brief Get the destination device of the message
73
 
   * \return the pointer to the device that receives the message
74
 
   */
75
 
  Ptr<LteNetDevice> GetDestinationDevice (void);
76
 
 
77
 
  /**
78
 
   * \brief Set the type of the message
79
 
   * \param type the type of the message
80
 
   */
81
 
  void SetMessageType (MessageType type);
82
 
  /**
83
 
   * \brief Get the type of the message
84
 
   * \return the type of the message
85
 
   */
86
 
  MessageType GetMessageType (void);
87
 
 
88
 
private:
89
 
  Ptr<LteNetDevice> m_source;
90
 
  Ptr<LteNetDevice> m_destination;
91
 
  MessageType m_type;
92
 
};
93
 
} // namespace ns3
94
 
 
95
 
#endif /* IDEAL_CONTROL_MESSAGES_H */
96
 
 
97
 
 
98
 
 
99
 
// ----------------------------------------------------------------------------------------------------------
100
 
 
101
 
 
102
 
 
103
 
#ifndef PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H
104
 
#define PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H
105
 
 
106
 
#include "ns3/object.h"
107
 
#include <list>
108
 
 
109
 
namespace ns3 {
110
 
 
111
 
class LteNetDevice;
112
 
 
113
 
/**
114
 
 * \ingroup lte
115
 
 *
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.
127
 
 */
128
 
class PdcchMapIdealControlMessage : public IdealControlMessage
129
 
{
130
 
public:
131
 
 
132
 
  PdcchMapIdealControlMessage (void);
133
 
  virtual ~PdcchMapIdealControlMessage (void);
134
 
 
135
 
  /**
136
 
   * Direction for which the message is created 
137
 
   */
138
 
  enum Direction
139
 
  {
140
 
    DOWNLINK, UPLINK
141
 
  };
142
 
 
143
 
  /**
144
 
   * The PDCCH ideal record
145
 
   */
146
 
  struct IdealPdcchRecord
147
 
  {
148
 
    /** the direction */
149
 
    Direction m_direction;
150
 
    /** the sub channel */ 
151
 
    int m_idSubChannel;
152
 
    /** the ue that receive the mapping */
153
 
    Ptr<LteNetDevice> m_ue;
154
 
    /** the selected msc */
155
 
    double m_mcsIndex;
156
 
  };
157
 
 
158
 
  /**
159
 
   * The PDCCH ideal message
160
 
   */
161
 
  typedef std::list<struct IdealPdcchRecord>  IdealPdcchMessage;
162
 
 
163
 
  /**
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
169
 
   */
170
 
  void AddNewRecord (Direction direction,
171
 
                     int subChannel, Ptr<LteNetDevice> ue, double mcs);
172
 
 
173
 
  /**
174
 
   * \brief Get the message
175
 
   * \return the pointer to the message
176
 
   */
177
 
  IdealPdcchMessage* GetMessage (void);
178
 
 
179
 
private:
180
 
  IdealPdcchMessage *m_idealPdcchMessage;
181
 
};
182
 
 
183
 
} // namespace ns3
184
 
 
185
 
#endif /* PDCCH_MAP_IDEAL_CONTROL_MESSAGES_H */
186
 
 
187
 
 
188
 
 
189
 
// ----------------------------------------------------------------------------------------------------------
190
 
 
191
 
 
192
 
 
193
 
#ifndef CQI_IDEAL_CONTROL_MESSAGES_H
194
 
#define CQI_IDEAL_CONTROL_MESSAGES_H
195
 
 
196
 
#include "ns3/object.h"
197
 
#include <list>
198
 
 
199
 
namespace ns3 {
200
 
 
201
 
class LteNetDevice;
202
 
 
203
 
/**
204
 
 * \ingroup lte
205
 
 *
206
 
 * The CqiIdealControlMessage defines an ideal list of feedback about
207
 
 * the channel quality sent by the UE to the eNodeB.
208
 
 */
209
 
class CqiIdealControlMessage : public IdealControlMessage
210
 
{
211
 
public:
212
 
 
213
 
  CqiIdealControlMessage (void);
214
 
  virtual ~CqiIdealControlMessage (void);
215
 
 
216
 
  /**
217
 
   * The CQI feedback ideal record
218
 
   */
219
 
  struct CqiFeedback
220
 
  {
221
 
    /** the sub channel */
222
 
    int m_idSubChannel; 
223
 
    /** the cqi feedback */
224
 
    double m_cqi;
225
 
  };
226
 
 
227
 
  /**
228
 
   * The ideal CQI feedback message
229
 
   */
230
 
  typedef std::list<struct CqiFeedback>  CqiFeedbacks;
231
 
 
232
 
  /**
233
 
   * \brief add a CQI feedback record into the message.
234
 
   * \param subChannel the scheduled sub channel
235
 
   * \param cqi the cqi feedback
236
 
   */
237
 
  void AddNewRecord (int subChannel, double cqi);
238
 
 
239
 
  /**
240
 
   * \brief Get cqi informations
241
 
   * \return cqi messages
242
 
   */
243
 
  CqiFeedbacks* GetMessage (void);
244
 
 
245
 
 
246
 
private:
247
 
  CqiFeedbacks *m_cqiFeedbacks;
248
 
};
249
 
} // namespace ns3
250
 
 
251
 
#endif /* CQI_IDEAL_CONTROL_MESSAGES_H */