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
mesh-wifi-interface-mac-plugin.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Pavel Boyko <boyko@iitp.ru>
7
*/
8
9
#ifndef MESH_WIFI_INTERFACE_MAC_PLUGIN_H
10
#define MESH_WIFI_INTERFACE_MAC_PLUGIN_H
11
12
#include "
mesh-wifi-beacon.h
"
13
14
#include "ns3/mac48-address.h"
15
#include "ns3/packet.h"
16
#include "ns3/simple-ref-count.h"
17
18
namespace
ns3
19
{
20
21
class
MeshWifiInterfaceMac;
22
23
/**
24
* \ingroup mesh
25
*
26
* \brief Common interface for mesh point interface MAC plugins
27
*
28
* \todo plugins description
29
*/
30
class
MeshWifiInterfaceMacPlugin
:
public
SimpleRefCount
<MeshWifiInterfaceMacPlugin>
31
{
32
public
:
33
/// This is for subclasses
34
virtual
~MeshWifiInterfaceMacPlugin
(){};
35
/**
36
* Each plugin must be installed on an interface to work
37
*
38
* \param parent the parent object
39
*/
40
virtual
void
SetParent
(
Ptr<MeshWifiInterfaceMac>
parent) = 0;
41
/**
42
* \brief Process received frame
43
* \param packet
44
* \param header
45
*
46
* \return false if (and only if) frame should be dropped
47
* \todo define when MAC call this
48
*/
49
virtual
bool
Receive
(
Ptr<Packet>
packet,
const
WifiMacHeader
& header) = 0;
50
/**
51
* \brief Update frame before it will be forwarded down
52
* \param packet
53
* \param header
54
* \param from
55
* \param to
56
* \return false if (and only if) frame should be dropped
57
* \todo define when MAC call this, preconditions & postconditions
58
*/
59
virtual
bool
UpdateOutcomingFrame
(
Ptr<Packet>
packet,
60
WifiMacHeader
& header,
61
Mac48Address
from,
62
Mac48Address
to) = 0;
63
/**
64
* \brief Update beacon before it will be formed and sent
65
* \param beacon
66
*
67
* \todo define when MAC call this
68
*/
69
virtual
void
UpdateBeacon
(
MeshWifiBeacon
& beacon)
const
= 0;
70
/**
71
* Assign a fixed random variable stream number to the random variables
72
* used by this model. Return the number of streams (possibly zero) that
73
* have been assigned.
74
*
75
* \param stream first stream index to use
76
* \return the number of stream indices assigned by this model
77
*/
78
virtual
int64_t
AssignStreams
(int64_t stream) = 0;
79
};
80
81
}
// namespace ns3
82
83
#endif
/* MESH_WIFI_INTERFACE_MAC_PLUGIN_H */
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::MeshWifiBeacon
Beacon is beacon header + list of arbitrary information elements.
Definition
mesh-wifi-beacon.h:31
ns3::MeshWifiInterfaceMacPlugin
Common interface for mesh point interface MAC plugins.
Definition
mesh-wifi-interface-mac-plugin.h:31
ns3::MeshWifiInterfaceMacPlugin::AssignStreams
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
ns3::MeshWifiInterfaceMacPlugin::Receive
virtual bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)=0
Process received frame.
ns3::MeshWifiInterfaceMacPlugin::~MeshWifiInterfaceMacPlugin
virtual ~MeshWifiInterfaceMacPlugin()
This is for subclasses.
Definition
mesh-wifi-interface-mac-plugin.h:34
ns3::MeshWifiInterfaceMacPlugin::UpdateBeacon
virtual void UpdateBeacon(MeshWifiBeacon &beacon) const =0
Update beacon before it will be formed and sent.
ns3::MeshWifiInterfaceMacPlugin::SetParent
virtual void SetParent(Ptr< MeshWifiInterfaceMac > parent)=0
Each plugin must be installed on an interface to work.
ns3::MeshWifiInterfaceMacPlugin::UpdateOutcomingFrame
virtual bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)=0
Update frame before it will be forwarded down.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SimpleRefCount
A template-based reference counting class.
Definition
simple-ref-count.h:70
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition
wifi-mac-header.h:87
mesh-wifi-beacon.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
model
mesh-wifi-interface-mac-plugin.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0