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
threshold-preamble-detection-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 University of Washington
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7
*/
8
9
#ifndef THRESHOLD_PREAMBLE_DETECTION_MODEL_H
10
#define THRESHOLD_PREAMBLE_DETECTION_MODEL_H
11
12
#include "
preamble-detection-model.h
"
13
#include "
wifi-units.h
"
14
15
namespace
ns3
16
{
17
/**
18
* \ingroup wifi
19
*
20
* A threshold-based model for detecting PHY preamble.
21
* This model assumes that a preamble is successfully detected if SNR is at or above a given
22
* threshold (set to 4 dB by default). However, if RSSI is below a minimum RSSI (set to -82 dBm by
23
* default), the PHY preamble is not detected.
24
*/
25
class
ThresholdPreambleDetectionModel
:
public
PreambleDetectionModel
26
{
27
public
:
28
/**
29
* \brief Get the type ID.
30
* \return the object TypeId
31
*/
32
static
TypeId
GetTypeId
();
33
34
ThresholdPreambleDetectionModel
();
35
~ThresholdPreambleDetectionModel
()
override
;
36
bool
IsPreambleDetected
(
dBm_u
rssi,
double
snr,
MHz_u
channelWidth)
const override
;
37
38
private
:
39
dB_u
m_threshold
;
///< SNR threshold used to decide whether a preamble is successfully received
40
dBm_u
m_rssiMin
;
///< Minimum RSSI that shall be received to start the decision
41
};
42
43
}
// namespace ns3
44
45
#endif
/* THRESHOLD_PREAMBLE_DETECTION_MODEL_H */
double
ns3::PreambleDetectionModel
the interface for Wifi's preamble detection models
Definition
preamble-detection-model.h:25
ns3::ThresholdPreambleDetectionModel
A threshold-based model for detecting PHY preamble.
Definition
threshold-preamble-detection-model.h:26
ns3::ThresholdPreambleDetectionModel::ThresholdPreambleDetectionModel
ThresholdPreambleDetectionModel()
Definition
threshold-preamble-detection-model.cc:45
ns3::ThresholdPreambleDetectionModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
threshold-preamble-detection-model.cc:24
ns3::ThresholdPreambleDetectionModel::m_threshold
dB_u m_threshold
SNR threshold used to decide whether a preamble is successfully received.
Definition
threshold-preamble-detection-model.h:39
ns3::ThresholdPreambleDetectionModel::~ThresholdPreambleDetectionModel
~ThresholdPreambleDetectionModel() override
Definition
threshold-preamble-detection-model.cc:50
ns3::ThresholdPreambleDetectionModel::IsPreambleDetected
bool IsPreambleDetected(dBm_u rssi, double snr, MHz_u channelWidth) const override
A pure virtual method that must be implemented in the subclass.
Definition
threshold-preamble-detection-model.cc:56
ns3::ThresholdPreambleDetectionModel::m_rssiMin
dBm_u m_rssiMin
Minimum RSSI that shall be received to start the decision.
Definition
threshold-preamble-detection-model.h:40
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
preamble-detection-model.h
wifi-units.h
Declaration of the SI units (as weak types aliases) used across wifi module.
src
wifi
model
threshold-preamble-detection-model.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0