A Discrete-Event Network Simulator
API
lte-chunk-processor.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009, 2010 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Nicola Baldo <nbaldo@cttc.es>
18  * Modified by : Marco Miozzo <mmiozzo@cttc.es>
19  * (move from CQI to Ctrl and Data SINR Chunk processors)
20  * Modified by : Piotr Gawlowicz <gawlowicz.p@gmail.com>
21  * (removed all Lte***ChunkProcessor implementations
22  * and created generic LteChunkProcessor)
23  */
24 
25 #ifndef LTE_CHUNK_PROCESSOR_H
26 #define LTE_CHUNK_PROCESSOR_H
27 
28 #include <ns3/nstime.h>
29 #include <ns3/object.h>
30 #include <ns3/ptr.h>
31 
32 namespace ns3
33 {
34 
35 class SpectrumValue;
36 
39 
45 class LteChunkProcessor : public SimpleRefCount<LteChunkProcessor>
46 {
47  public:
49  virtual ~LteChunkProcessor();
50 
60  virtual void AddCallback(LteChunkProcessorCallback c);
61 
68  virtual void Start();
69 
78  virtual void EvaluateChunk(const SpectrumValue& sinr, Time duration);
79 
87  virtual void End();
88 
89  private:
92 
93  std::vector<LteChunkProcessorCallback>
95 };
96 
103 {
104  public:
110  void ReportValue(const SpectrumValue& value);
111 
118 
119  private:
121 };
122 
123 } // namespace ns3
124 
125 #endif /* LTE_CHUNK_PROCESSOR_H */
Callback template class.
Definition: callback.h:438
This abstract class is used to process the time-vs-frequency SINR/interference/power chunk of a recei...
virtual void Start()
Clear internal variables.
virtual void AddCallback(LteChunkProcessorCallback c)
Add callback to list.
virtual void EvaluateChunk(const SpectrumValue &sinr, Time duration)
Collect SpectrumValue and duration of signal.
Ptr< SpectrumValue > m_sumValues
sum values
Time m_totDuration
total duration
std::vector< LteChunkProcessorCallback > m_lteChunkProcessorCallbacks
chunk processor callback
virtual void End()
Finish calculation and inform interested objects about calculated value.
A sink to be plugged to the callback of LteChunkProcessor allowing to save and later retrieve the lat...
Ptr< SpectrumValue > m_value
spectrum value
Ptr< SpectrumValue > GetValue()
void ReportValue(const SpectrumValue &value)
function to be plugged to LteChunkProcessor::AddCallback ()
A template-based reference counting class.
Set of values corresponding to a given SpectrumModel.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< void, const SpectrumValue & > LteChunkProcessorCallback
Chunk processor callback typedef.