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
15
namespace
ns3
16
{
17
18
class
Event;
19
class
Time
;
20
21
/**
22
* \ingroup wifi
23
* \brief the interface for Wifi's frame capture models
24
*
25
*/
26
class
FrameCaptureModel
:
public
Object
27
{
28
public
:
29
/**
30
* \brief Get the type ID.
31
* \return the object TypeId
32
*/
33
static
TypeId
GetTypeId
();
34
35
/**
36
* A pure virtual method that must be implemented in the subclass.
37
* This method returns whether the reception should be switched to a
38
* new incoming frame.
39
*
40
* \param currentEvent the event of the current frame
41
* \param newEvent the event of the new incoming frame
42
*
43
* \return true if the reception should be switched to a new incoming frame,
44
* false otherwise
45
*/
46
virtual
bool
CaptureNewFrame
(
Ptr<Event>
currentEvent,
Ptr<Event>
newEvent)
const
= 0;
47
48
/**
49
* This method returns true if the capture window duration has not elapsed yet,
50
* false otherwise.
51
*
52
* \param timePreambleDetected the time the preamble was detected
53
*
54
* \return true if the capture window duration has not elapsed yet,
55
* false otherwise
56
*/
57
virtual
bool
IsInCaptureWindow
(
Time
timePreambleDetected)
const
;
58
59
private
:
60
Time
m_captureWindow
;
//!< Capture window duration
61
};
62
63
}
// namespace ns3
64
65
#endif
/* FRAME_CAPTURE_MODEL_H */
ns3::FrameCaptureModel
the interface for Wifi's frame capture models
Definition
frame-capture-model.h:27
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:60
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
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition
nstime.h:828
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
frame-capture-model.h
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0