A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
38
typedef
Callback<void, const SpectrumValue&>
LteChunkProcessorCallback
;
39
45
class
LteChunkProcessor
:
public
SimpleRefCount
<LteChunkProcessor>
46
{
47
public
:
48
LteChunkProcessor
();
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
:
90
Ptr<SpectrumValue>
m_sumValues
;
91
Time
m_totDuration
;
92
93
std::vector<LteChunkProcessorCallback>
94
m_lteChunkProcessorCallbacks
;
95
};
96
102
class
LteSpectrumValueCatcher
103
{
104
public
:
110
void
ReportValue
(
const
SpectrumValue
& value);
111
117
Ptr<SpectrumValue>
GetValue
();
118
119
private
:
120
Ptr<SpectrumValue>
m_value
;
121
};
122
123
}
// namespace ns3
124
125
#endif
/* LTE_CHUNK_PROCESSOR_H */
ns3::Callback
Callback template class.
Definition:
callback.h:438
ns3::LteChunkProcessor
This abstract class is used to process the time-vs-frequency SINR/interference/power chunk of a recei...
Definition:
lte-chunk-processor.h:46
ns3::LteChunkProcessor::Start
virtual void Start()
Clear internal variables.
Definition:
lte-chunk-processor.cc:50
ns3::LteChunkProcessor::AddCallback
virtual void AddCallback(LteChunkProcessorCallback c)
Add callback to list.
Definition:
lte-chunk-processor.cc:43
ns3::LteChunkProcessor::~LteChunkProcessor
virtual ~LteChunkProcessor()
Definition:
lte-chunk-processor.cc:37
ns3::LteChunkProcessor::EvaluateChunk
virtual void EvaluateChunk(const SpectrumValue &sinr, Time duration)
Collect SpectrumValue and duration of signal.
Definition:
lte-chunk-processor.cc:58
ns3::LteChunkProcessor::m_sumValues
Ptr< SpectrumValue > m_sumValues
sum values
Definition:
lte-chunk-processor.h:90
ns3::LteChunkProcessor::LteChunkProcessor
LteChunkProcessor()
Definition:
lte-chunk-processor.cc:32
ns3::LteChunkProcessor::m_totDuration
Time m_totDuration
total duration
Definition:
lte-chunk-processor.h:91
ns3::LteChunkProcessor::m_lteChunkProcessorCallbacks
std::vector< LteChunkProcessorCallback > m_lteChunkProcessorCallbacks
chunk processor callback
Definition:
lte-chunk-processor.h:94
ns3::LteChunkProcessor::End
virtual void End()
Finish calculation and inform interested objects about calculated value.
Definition:
lte-chunk-processor.cc:70
ns3::LteSpectrumValueCatcher
A sink to be plugged to the callback of LteChunkProcessor allowing to save and later retrieve the lat...
Definition:
lte-chunk-processor.h:103
ns3::LteSpectrumValueCatcher::m_value
Ptr< SpectrumValue > m_value
spectrum value
Definition:
lte-chunk-processor.h:120
ns3::LteSpectrumValueCatcher::GetValue
Ptr< SpectrumValue > GetValue()
Definition:
lte-chunk-processor.cc:95
ns3::LteSpectrumValueCatcher::ReportValue
void ReportValue(const SpectrumValue &value)
function to be plugged to LteChunkProcessor::AddCallback ()
Definition:
lte-chunk-processor.cc:89
ns3::Ptr< SpectrumValue >
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:81
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:61
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteChunkProcessorCallback
Callback< void, const SpectrumValue & > LteChunkProcessorCallback
Chunk processor callback typedef.
Definition:
lte-chunk-processor.h:35
src
lte
model
lte-chunk-processor.h
Generated on Sun Mar 3 2024 17:11:02 for ns-3 by
1.9.1