A Discrete-Event Network Simulator
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
15namespace ns3
16{
17
18class Event;
19class Time;
20
21/**
22 * \ingroup wifi
23 * \brief the interface for Wifi's frame capture models
24 *
25 */
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 */
the interface for Wifi's frame capture models
virtual bool IsInCaptureWindow(Time timePreambleDetected) const
This method returns true if the capture window duration has not elapsed yet, false otherwise.
Time m_captureWindow
Capture window duration.
static TypeId GetTypeId()
Get the type ID.
virtual bool CaptureNewFrame(Ptr< Event > currentEvent, Ptr< Event > newEvent) const =0
A pure virtual method that must be implemented in the subclass.
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:828
Every class exported by the ns3 library is enclosed in the ns3 namespace.