A Discrete-Event Network Simulator
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
13#include "wifi-units.h"
14
15namespace 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 */
26{
27 public:
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33
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 */
the interface for Wifi's preamble detection models
A threshold-based model for detecting PHY preamble.
dB_u m_threshold
SNR threshold used to decide whether a preamble is successfully received.
bool IsPreambleDetected(dBm_u rssi, double snr, MHz_u channelWidth) const override
A pure virtual method that must be implemented in the subclass.
dBm_u m_rssiMin
Minimum RSSI that shall be received to start the decision.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of the SI units (as weak types aliases) used across wifi module.