A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
lte-sinr-chunk-processor.h
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009, 2010 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Nicola Baldo <nbaldo@cttc.es>
19  * Modified by : Marco Miozzo <mmiozzo@cttc.es>
20  * (move from CQI to Ctrl and Data SINR Chunk processors)
21  */
22 
23 
24 #ifndef LTE_SINR_CHUNK_PROCESSOR_H
25 #define LTE_SINR_CHUNK_PROCESSOR_H
26 
27 #include <ns3/spectrum-value.h>
28 #include <ns3/ptr.h>
29 #include <ns3/packet.h>
30 #include <ns3/nstime.h>
31 #include <ns3/object.h>
32 #include <ns3/lte-phy.h>
33 #include <ns3/lte-spectrum-phy.h>
34 
35 namespace ns3 {
36 
37 
38 
45 class LteSinrChunkProcessor : public SimpleRefCount<LteSinrChunkProcessor>
46 {
47 public:
48  virtual ~LteSinrChunkProcessor ();
49  virtual void Start () = 0;
50  virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration) = 0;
51  virtual void End () = 0;
52 };
53 
54 
55 
56 
65 {
66 public:
67  virtual ~LteCtrlSinrChunkProcessor ();
70  virtual void Start ();
71  virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration);
72  virtual void End ();
73 private:
74  Ptr<SpectrumValue> m_sumSinr;
75  Time m_totDuration;
76  Ptr<LtePhy> m_phy;
77  Ptr<LteSpectrumPhy> m_spectrumPhy;
78 };
79 
80 
81 
90 {
91  public:
92  virtual ~LteDataSinrChunkProcessor ();
95  virtual void Start ();
96  virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration);
97  virtual void End ();
98  private:
99  Ptr<SpectrumValue> m_sumSinr;
100  Time m_totDuration;
101  Ptr<LteSpectrumPhy> m_spectrumPhy;
102  Ptr<LtePhy> m_phy;
103 };
104 
105 
113 {
114  public:
117  virtual void Start ();
118  virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration);
119  virtual void End ();
120  private:
121  Ptr<SpectrumValue> m_sumSinr;
122  Time m_totDuration;
123  Ptr<LtePhy> m_phy;
124 };
125 
126 
127 
128 
137 {
138  public:
141  virtual void Start ();
142  virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration);
143  virtual void End ();
144  private:
145  Ptr<SpectrumValue> m_sumSinr;
146  Time m_totDuration;
147  Ptr<LtePhy> m_phy;
148 };
149 
150 
151 
152 
153 
154 } // namespace ns3
155 
156 
157 
158 #endif /* LTE_SINR_PROCESSOR_H */
keep track of time unit.
Definition: nstime.h:149
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
Set of values corresponding to a given SpectrumModel.
A template-based reference counting class.