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
snr-to-block-error-rate-manager.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008, 2009 INRIA, UDcast
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: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19
* <amine.ismail@udcast.com>
20
*/
21
22
23
#ifndef SNR_TO_BLOCK_ERROR_RATE_MANAGER_H
24
#define SNR_TO_BLOCK_ERROR_RATE_MANAGER_H
25
26
#include "ns3/snr-to-block-error-rate-record.h"
27
#include <vector>
28
#include "ns3/ptr.h"
29
30
namespace
ns3 {
31
46
class
SNRToBlockErrorRateManager
47
{
48
public
:
49
SNRToBlockErrorRateManager
();
50
~SNRToBlockErrorRateManager
(
void
);
55
void
SetTraceFilePath
(
char
*traceFilePath);
59
std::string
GetTraceFilePath
(
void
);
66
double
GetBlockErrorRate
(
double
SNR, uint8_t modulation);
67
SNRToBlockErrorRateRecord
*
74
GetSNRToBlockErrorRateRecord
(
double
SNR, uint8_t modulation);
80
void
LoadTraces
(
void
);
84
void
LoadDefaultTraces
(
void
);
88
void
ReLoadTraces
(
void
);
92
void
ActivateLoss
(
bool
loss);
93
private
:
94
void
ClearRecords
(
void
);
95
uint8_t
m_activateLoss
;
96
static
const
unsigned
int
TRACE_FILE_PATH_SIZE
= 1024;
97
char
m_traceFilePath
[
TRACE_FILE_PATH_SIZE
];
98
99
std::vector<SNRToBlockErrorRateRecord *> *
m_recordModulation
[7];
100
101
};
102
}
103
104
#endif
/* SNR_TO_BLOCK_ERROR_RATE_MANAGER_H */
ns3::SNRToBlockErrorRateManager::LoadDefaultTraces
void LoadDefaultTraces(void)
Loads the default traces from default-traces.h file.
Definition:
snr-to-block-error-rate-manager.cc:116
ns3::SNRToBlockErrorRateManager::TRACE_FILE_PATH_SIZE
static const unsigned int TRACE_FILE_PATH_SIZE
Definition:
snr-to-block-error-rate-manager.h:96
ns3::SNRToBlockErrorRateManager::GetTraceFilePath
std::string GetTraceFilePath(void)
Definition:
snr-to-block-error-rate-manager.cc:283
ns3::SNRToBlockErrorRateRecord
This class represents a record (handled by SnrToBlockErrorRate manager) that keeps a mapping between ...
Definition:
snr-to-block-error-rate-record.h:34
ns3::SNRToBlockErrorRateManager::GetSNRToBlockErrorRateRecord
SNRToBlockErrorRateRecord * GetSNRToBlockErrorRateRecord(double SNR, uint8_t modulation)
returns a record of type SNRToBlockErrorRateRecord corresponding to a given modulation and SNR value ...
Definition:
snr-to-block-error-rate-manager.cc:327
ns3::SNRToBlockErrorRateManager::ActivateLoss
void ActivateLoss(bool loss)
If activate loss is called with false, all the returned BlcER will be 0 (no losses) ...
Definition:
snr-to-block-error-rate-manager.cc:74
ns3::SNRToBlockErrorRateManager::SetTraceFilePath
void SetTraceFilePath(char *traceFilePath)
Set the path of the repository containing the traces.
Definition:
snr-to-block-error-rate-manager.cc:275
ns3::SNRToBlockErrorRateManager::LoadTraces
void LoadTraces(void)
Loads the traces form the repository specified in the constructor or setted by SetTraceFilePath funct...
Definition:
snr-to-block-error-rate-manager.cc:80
ns3::SNRToBlockErrorRateManager::GetBlockErrorRate
double GetBlockErrorRate(double SNR, uint8_t modulation)
returns the Block Error Rate for a given modulation and SNR value
Definition:
snr-to-block-error-rate-manager.cc:289
ns3::SNRToBlockErrorRateManager::m_recordModulation
std::vector< SNRToBlockErrorRateRecord * > * m_recordModulation[7]
Definition:
snr-to-block-error-rate-manager.h:99
ns3::SNRToBlockErrorRateManager::m_traceFilePath
char m_traceFilePath[TRACE_FILE_PATH_SIZE]
Definition:
snr-to-block-error-rate-manager.h:97
ns3::SNRToBlockErrorRateManager::~SNRToBlockErrorRateManager
~SNRToBlockErrorRateManager(void)
Definition:
snr-to-block-error-rate-manager.cc:45
ns3::SNRToBlockErrorRateManager::ClearRecords
void ClearRecords(void)
Definition:
snr-to-block-error-rate-manager.cc:55
ns3::SNRToBlockErrorRateManager::SNRToBlockErrorRateManager
SNRToBlockErrorRateManager()
Definition:
snr-to-block-error-rate-manager.cc:34
ns3::SNRToBlockErrorRateManager
This class handles the SNR to BlcER traces.
Definition:
snr-to-block-error-rate-manager.h:46
ns3::SNRToBlockErrorRateManager::m_activateLoss
uint8_t m_activateLoss
Definition:
snr-to-block-error-rate-manager.h:95
ns3::SNRToBlockErrorRateManager::ReLoadTraces
void ReLoadTraces(void)
Reloads the trace.
Definition:
snr-to-block-error-rate-manager.cc:236
src
wimax
model
snr-to-block-error-rate-manager.h
Generated on Sat Apr 19 2014 14:07:13 for ns-3 by
1.8.6