A Discrete-Event Network Simulator
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
13namespace ns3
14{
15namespace 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 */
26{
27 public:
28 /**
29 * Get the type ID.
30 *
31 * \return the object TypeId
32 */
33 static TypeId GetTypeId();
34
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 */
51};
52} // namespace lrwpan
53} // namespace ns3
54
55#endif /* LR_WPAN_ERROR_MODEL_H */
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
Model the error rate for IEEE 802.15.4 2.4 GHz AWGN channel for OQPSK the model description can be fo...
double m_binomialCoefficients[17]
Array of precalculated binomial coefficients.
static TypeId GetTypeId()
Get the type ID.
double GetChunkSuccessRate(double snr, uint32_t nbits) const
Return chunk success rate for given SNR.
Every class exported by the ns3 library is enclosed in the ns3 namespace.