A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
spectrum-error-model.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 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
*/
20
21
22
#ifndef SPECTRUM_ERROR_MODEL_H
23
#define SPECTRUM_ERROR_MODEL_H
24
25
#include <ns3/spectrum-value.h>
26
#include <ns3/ptr.h>
27
#include <ns3/packet.h>
28
#include <ns3/nstime.h>
29
#include <ns3/object.h>
30
31
namespace
ns3 {
32
33
34
39
class
SpectrumErrorModel
:
public
Object
40
{
41
public
:
42
43
static
TypeId
GetTypeId
();
44
virtual
~SpectrumErrorModel
();
45
virtual
void
StartRx
(
Ptr<const Packet>
p) = 0;
46
virtual
void
EvaluateChunk
(
const
SpectrumValue
& sinr,
Time
duration) = 0;
47
virtual
bool
IsRxCorrect
() = 0;
48
};
49
50
59
class
ShannonSpectrumErrorModel
:
public
SpectrumErrorModel
60
{
61
protected
:
62
virtual
void
DoDispose
();
63
64
public
:
65
// inherited from SpectrumErrorModel
66
void
StartRx
(
Ptr<const Packet>
p);
67
void
EvaluateChunk
(
const
SpectrumValue
& sinr,
Time
duration);
68
bool
IsRxCorrect
();
69
70
private
:
71
uint32_t
m_bytes
;
72
uint32_t
m_deliverableBytes
;
73
74
};
75
76
77
}
// namespace ns3
78
79
80
81
#endif
/* SPECTRUM_ERROR_MODEL_H */
ns3::ShannonSpectrumErrorModel::StartRx
void StartRx(Ptr< const Packet > p)
Definition:
spectrum-error-model.cc:53
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::Ptr< const Packet >
ns3::SpectrumErrorModel::EvaluateChunk
virtual void EvaluateChunk(const SpectrumValue &sinr, Time duration)=0
ns3::ShannonSpectrumErrorModel::EvaluateChunk
void EvaluateChunk(const SpectrumValue &sinr, Time duration)
Definition:
spectrum-error-model.cc:62
ns3::ShannonSpectrumErrorModel::DoDispose
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
spectrum-error-model.cc:46
ns3::SpectrumErrorModel::GetTypeId
static TypeId GetTypeId()
Definition:
spectrum-error-model.cc:33
ns3::ShannonSpectrumErrorModel::m_deliverableBytes
uint32_t m_deliverableBytes
Definition:
spectrum-error-model.h:72
ns3::SpectrumErrorModel::StartRx
virtual void StartRx(Ptr< const Packet > p)=0
ns3::ShannonSpectrumErrorModel
This class implements the error model described in this paper: N.
Definition:
spectrum-error-model.h:59
ns3::ShannonSpectrumErrorModel::m_bytes
uint32_t m_bytes
Definition:
spectrum-error-model.h:71
ns3::SpectrumErrorModel::IsRxCorrect
virtual bool IsRxCorrect()=0
ns3::SpectrumErrorModel::~SpectrumErrorModel
virtual ~SpectrumErrorModel()
Definition:
spectrum-error-model.cc:41
ns3::SpectrumErrorModel
Doxygen introspection did not find any typical Config paths.
Definition:
spectrum-error-model.h:39
ns3::ShannonSpectrumErrorModel::IsRxCorrect
bool IsRxCorrect()
Definition:
spectrum-error-model.cc:86
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:57
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
src
spectrum
model
spectrum-error-model.h
Generated on Sat Apr 19 2014 14:07:08 for ns-3 by
1.8.6