-
Notifications
You must be signed in to change notification settings - Fork 0
/
psr-error-model.h
41 lines (34 loc) · 941 Bytes
/
psr-error-model.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "ns3/error-rate-model.h"
#include "ns3/wifi-module.h"
#include "ns3/type-id.h"
#include "ns3/random-variable-stream.h"
namespace ns3 {
/**
*
* A model for the error rate based on manually set PER values,
* related to simulating E-FI paper proposal.
*/
class PsrErrorRateModel : public ErrorRateModel
{
public:
static TypeId GetTypeId (void);
PsrErrorRateModel ();
virtual ~PsrErrorRateModel();
double GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const;
/**
* \returns the error rate being applied by the model
*/
double GetRate (void) const;
/**
* \param rate the error rate to be used by the model
*/
void SetRate (double rate);
/**
* \param ranvar A random variable distribution to generate random variables
*/
void SetRandomVariable (Ptr<RandomVariableStream> ranvar);
private:
double m_rate;
Ptr<RandomVariableStream> m_ranvar;
};
}