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
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 FRAME_CAPTURE_MODEL_H
10
#define FRAME_CAPTURE_MODEL_H
11
12
#include "ns3/nstime.h"
13
#include "ns3/object.h"
14
#include "ns3/wifi-export.h"
15
16
namespace
ns3
17
{
18
19
class
Event
;
20
class
Time
;
21
22
/**
23
* @ingroup wifi
24
* @brief the interface for Wifi's frame capture models
25
*
26
*/
27
class
WIFI_EXPORT
FrameCaptureModel
:
public
Object
28
{
29
public
:
30
/**
31
* @brief Get the type ID.
32
* @return the object TypeId
33
*/
34
static
TypeId
GetTypeId
();
35
36
/**
37
* A pure virtual method that must be implemented in the subclass.
38
* This method returns whether the reception should be switched to a
39
* new incoming frame.
40
*
41
* @param currentEvent the event of the current frame
42
* @param newEvent the event of the new incoming frame
43
*
44
* @return true if the reception should be switched to a new incoming frame,
45
* false otherwise
46
*/
47
virtual
bool
CaptureNewFrame
(
Ptr<Event>
currentEvent,
Ptr<Event>
newEvent)
const
= 0;
48
49
/**
50
* This method returns true if the capture window duration has not elapsed yet,
51
* false otherwise.
52
*
53
* @param timePreambleDetected the time the preamble was detected
54
*
55
* @return true if the capture window duration has not elapsed yet,
56
* false otherwise
57
*/
58
virtual
bool
IsInCaptureWindow
(
Time
timePreambleDetected)
const
;
59
60
private
:
61
Time
m_captureWindow
;
//!< Capture window duration
62
};
63
64
}
// namespace ns3
65
66
#endif
/* FRAME_CAPTURE_MODEL_H */
ns3::Event
handles interference calculations
Definition
interference-helper.h:38
ns3::FrameCaptureModel
the interface for Wifi's frame capture models
Definition
frame-capture-model.h:28
ns3::FrameCaptureModel::IsInCaptureWindow
virtual bool IsInCaptureWindow(Time timePreambleDetected) const
This method returns true if the capture window duration has not elapsed yet, false otherwise.
Definition
frame-capture-model.cc:34
ns3::FrameCaptureModel::m_captureWindow
Time m_captureWindow
Capture window duration.
Definition
frame-capture-model.h:61
ns3::FrameCaptureModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
frame-capture-model.cc:20
ns3::FrameCaptureModel::CaptureNewFrame
virtual bool CaptureNewFrame(Ptr< Event > currentEvent, Ptr< Event > newEvent) const =0
A pure virtual method that must be implemented in the subclass.
ns3::Object::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:70
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:95
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
frame-capture-model.h
Generated on
for ns-3 by
1.16.1