A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
wimax
model
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
55
class
SNRToBlockErrorRateManager
56
{
57
public
:
58
SNRToBlockErrorRateManager
();
59
~SNRToBlockErrorRateManager
(
void
);
64
void
SetTraceFilePath
(
char
*traceFilePath);
68
std::string
GetTraceFilePath
(
void
);
75
double
GetBlockErrorRate
(
double
SNR, uint8_t modulation);
76
SNRToBlockErrorRateRecord
*
83
GetSNRToBlockErrorRateRecord
(
double
SNR, uint8_t modulation);
89
void
LoadTraces
(
void
);
93
void
LoadDefaultTraces
(
void
);
97
void
ReLoadTraces
(
void
);
102
void
ActivateLoss
(
bool
loss);
103
private
:
105
void
ClearRecords
(
void
);
106
uint8_t
m_activateLoss
;
107
std::string
m_traceFilePath
;
108
109
std::vector<SNRToBlockErrorRateRecord *> *
m_recordModulation
[7];
110
111
};
112
}
113
114
#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:117
ns3::SNRToBlockErrorRateManager::GetTraceFilePath
std::string GetTraceFilePath(void)
Definition:
snr-to-block-error-rate-manager.cc:282
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:325
ns3::SNRToBlockErrorRateManager::m_traceFilePath
std::string m_traceFilePath
trace file path
Definition:
snr-to-block-error-rate-manager.h:107
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:75
ns3::SNRToBlockErrorRateManager::SetTraceFilePath
void SetTraceFilePath(char *traceFilePath)
Set the path of the repository containing the traces.
Definition:
snr-to-block-error-rate-manager.cc:276
ns3::SNRToBlockErrorRateManager::LoadTraces
void LoadTraces(void)
Loads the traces form the repository specified in the constructor or set by SetTraceFilePath function...
Definition:
snr-to-block-error-rate-manager.cc:81
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:288
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SNRToBlockErrorRateManager::m_recordModulation
std::vector< SNRToBlockErrorRateRecord * > * m_recordModulation[7]
record modulation
Definition:
snr-to-block-error-rate-manager.h:109
ns3::SNRToBlockErrorRateManager::~SNRToBlockErrorRateManager
~SNRToBlockErrorRateManager(void)
Definition:
snr-to-block-error-rate-manager.cc:46
ns3::SNRToBlockErrorRateManager::ClearRecords
void ClearRecords(void)
Clear records function.
Definition:
snr-to-block-error-rate-manager.cc:56
ns3::SNRToBlockErrorRateManager::SNRToBlockErrorRateManager
SNRToBlockErrorRateManager()
Definition:
snr-to-block-error-rate-manager.cc:35
ns3::SNRToBlockErrorRateManager
This class handles the SNR to BlcER traces.
Definition:
snr-to-block-error-rate-manager.h:55
ns3::SNRToBlockErrorRateManager::m_activateLoss
uint8_t m_activateLoss
activate loss
Definition:
snr-to-block-error-rate-manager.h:106
ns3::SNRToBlockErrorRateManager::ReLoadTraces
void ReLoadTraces(void)
Reloads the trace.
Definition:
snr-to-block-error-rate-manager.cc:237
Generated on Wed Nov 7 2018 10:02:16 for ns-3 by
1.8.14