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
simple-frame-capture-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7
*/
8
9
#ifndef SIMPLE_FRAME_CAPTURE_MODEL_H
10
#define SIMPLE_FRAME_CAPTURE_MODEL_H
11
12
#include "
frame-capture-model.h
"
13
#include "
wifi-units.h
"
14
15
namespace
ns3
16
{
17
/**
18
* \ingroup wifi
19
*
20
* A simple threshold-based model for frame capture effect.
21
* If the new incoming frame arrives while the receiver is
22
* receiving the preamble of another frame and the SIR of
23
* the new incoming frame is above a fixed margin, then
24
* the current frame is dropped and the receiver locks
25
* onto the new incoming frame.
26
*/
27
class
SimpleFrameCaptureModel
:
public
FrameCaptureModel
28
{
29
public
:
30
/**
31
* \brief Get the type ID.
32
* \return the object TypeId
33
*/
34
static
TypeId
GetTypeId
();
35
36
SimpleFrameCaptureModel
();
37
~SimpleFrameCaptureModel
()
override
;
38
39
/**
40
* Sets the frame capture margin.
41
*
42
* \param margin the frame capture margin
43
*/
44
void
SetMargin
(
dB_u
margin);
45
/**
46
* Return the frame capture margin.
47
*
48
* \return the frame capture margin
49
*/
50
dB_u
GetMargin
()
const
;
51
52
/**
53
* This method returns whether the reception should be switched to a
54
* new incoming frame.
55
*
56
* \param currentEvent the event of the current frame
57
* \param newEvent the event of the new incoming frame
58
*
59
* \return true if the reception should be switched to a new incoming frame,
60
* false otherwise
61
*/
62
bool
CaptureNewFrame
(
Ptr<Event>
currentEvent,
Ptr<Event>
newEvent)
const override
;
63
64
private
:
65
dB_u
m_margin
;
///< margin for determining if a new frame
66
};
67
68
}
// namespace ns3
69
70
#endif
/* SIMPLE_FRAME_CAPTURE_MODEL_H */
double
ns3::FrameCaptureModel
the interface for Wifi's frame capture models
Definition
frame-capture-model.h:27
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SimpleFrameCaptureModel
A simple threshold-based model for frame capture effect.
Definition
simple-frame-capture-model.h:28
ns3::SimpleFrameCaptureModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
simple-frame-capture-model.cc:26
ns3::SimpleFrameCaptureModel::~SimpleFrameCaptureModel
~SimpleFrameCaptureModel() override
Definition
simple-frame-capture-model.cc:49
ns3::SimpleFrameCaptureModel::GetMargin
dB_u GetMargin() const
Return the frame capture margin.
Definition
simple-frame-capture-model.cc:62
ns3::SimpleFrameCaptureModel::SimpleFrameCaptureModel
SimpleFrameCaptureModel()
Definition
simple-frame-capture-model.cc:44
ns3::SimpleFrameCaptureModel::m_margin
dB_u m_margin
margin for determining if a new frame
Definition
simple-frame-capture-model.h:65
ns3::SimpleFrameCaptureModel::CaptureNewFrame
bool CaptureNewFrame(Ptr< Event > currentEvent, Ptr< Event > newEvent) const override
This method returns whether the reception should be switched to a new incoming frame.
Definition
simple-frame-capture-model.cc:68
ns3::SimpleFrameCaptureModel::SetMargin
void SetMargin(dB_u margin)
Sets the frame capture margin.
Definition
simple-frame-capture-model.cc:55
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
frame-capture-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-units.h
Declaration of the SI units (as weak types aliases) used across wifi module.
src
wifi
model
simple-frame-capture-model.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0