A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lr-wpan-error-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 The Boeing Company
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Gary Pei <guangyu.pei@boeing.com>
7
*/
8
#ifndef LR_WPAN_ERROR_MODEL_H
9
#define LR_WPAN_ERROR_MODEL_H
10
11
#include <ns3/object.h>
12
13
namespace
ns3
14
{
15
namespace
lrwpan
16
{
17
18
/**
19
* @ingroup lr-wpan
20
*
21
* Model the error rate for IEEE 802.15.4 2.4 GHz AWGN channel for OQPSK
22
* the model description can be found in IEEE Std 802.15.4-2006, section
23
* E.4.1.7
24
*/
25
class
LrWpanErrorModel
:
public
Object
26
{
27
public
:
28
/**
29
* Get the type ID.
30
*
31
* @return the object TypeId
32
*/
33
static
TypeId
GetTypeId
();
34
35
LrWpanErrorModel
();
36
37
/**
38
* Return chunk success rate for given SNR.
39
*
40
* @return success rate (i.e. 1 - chunk error rate)
41
* @param snr SNR expressed as a power ratio (i.e. not in dB)
42
* @param nbits number of bits in the chunk
43
*/
44
double
GetChunkSuccessRate
(
double
snr,
uint32_t
nbits)
const
;
45
46
private
:
47
/**
48
* Array of precalculated binomial coefficients.
49
*/
50
double
m_binomialCoefficients
[17];
51
};
52
}
// namespace lrwpan
53
}
// namespace ns3
54
55
#endif
/* LR_WPAN_ERROR_MODEL_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::lrwpan::LrWpanErrorModel
Model the error rate for IEEE 802.15.4 2.4 GHz AWGN channel for OQPSK the model description can be fo...
Definition
lr-wpan-error-model.h:26
ns3::lrwpan::LrWpanErrorModel::m_binomialCoefficients
double m_binomialCoefficients[17]
Array of precalculated binomial coefficients.
Definition
lr-wpan-error-model.h:50
ns3::lrwpan::LrWpanErrorModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lr-wpan-error-model.cc:23
ns3::lrwpan::LrWpanErrorModel::GetChunkSuccessRate
double GetChunkSuccessRate(double snr, uint32_t nbits) const
Return chunk success rate for given SNR.
Definition
lr-wpan-error-model.cc:55
ns3::lrwpan::LrWpanErrorModel::LrWpanErrorModel
LrWpanErrorModel()
Definition
lr-wpan-error-model.cc:33
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lr-wpan
model
lr-wpan-error-model.h
Generated on Fri Dec 13 2024 09:20:42 for ns-3 by
1.11.0