A Discrete-Event Network Simulator
API
lte-chunk-processor.h
Go to the documentation of this file.
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  * Modified by : Piotr Gawlowicz <gawlowicz.p@gmail.com>
22  * (removed all Lte***ChunkProcessor implementations
23  * and created generic LteChunkProcessor)
24  */
25 
26 
27 #ifndef LTE_CHUNK_PROCESSOR_H
28 #define LTE_CHUNK_PROCESSOR_H
29 
30 #include <ns3/ptr.h>
31 #include <ns3/nstime.h>
32 #include <ns3/object.h>
33 
34 namespace ns3 {
35 
36 class SpectrumValue;
37 
40 
46 class LteChunkProcessor : public SimpleRefCount<LteChunkProcessor>
47 {
48 public:
50  virtual ~LteChunkProcessor ();
51 
61  virtual void AddCallback (LteChunkProcessorCallback c);
62 
69  virtual void Start ();
70 
79  virtual void EvaluateChunk (const SpectrumValue& sinr, Time duration);
80 
88  virtual void End ();
89 
90 private:
93 
94  std::vector<LteChunkProcessorCallback> m_lteChunkProcessorCallbacks;
95 };
96 
97 
104 {
105 public:
106 
112  void ReportValue (const SpectrumValue& value);
113 
120 
121 private:
123 };
124 
125 } // namespace ns3
126 
127 
128 
129 #endif /* LTE_CHUNK_PROCESSOR_H */
Callback template class.
Definition: callback.h:1279
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:103
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< void, const SpectrumValue & > LteChunkProcessorCallback
Chunk processor callback typedef.