A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
adhoc-wifi-mac.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006, 2009 INRIA
3
* Copyright (c) 2009 MIRKO BANCHI
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
* Mirko Banchi <mk.banchi@gmail.com>
20
*/
21
22
#ifndef ADHOC_WIFI_MAC_H
23
#define ADHOC_WIFI_MAC_H
24
25
#include "
wifi-mac.h
"
26
27
namespace
ns3
28
{
29
35
class
AdhocWifiMac
:
public
WifiMac
36
{
37
public
:
42
static
TypeId
GetTypeId
();
43
44
AdhocWifiMac
();
45
~AdhocWifiMac
()
override
;
46
47
void
SetLinkUpCallback
(
Callback<void>
linkUp)
override
;
48
void
Enqueue
(
Ptr<Packet>
packet,
Mac48Address
to)
override
;
49
bool
CanForwardPacketsTo
(
Mac48Address
to)
const override
;
50
51
private
:
52
void
Receive
(
Ptr<const WifiMpdu>
mpdu, uint8_t linkId)
override
;
53
};
54
55
}
// namespace ns3
56
57
#endif
/* ADHOC_WIFI_MAC_H */
ns3::AdhocWifiMac
Wifi MAC high model for an ad-hoc Wifi MAC.
Definition:
adhoc-wifi-mac.h:36
ns3::AdhocWifiMac::AdhocWifiMac
AdhocWifiMac()
Definition:
adhoc-wifi-mac.cc:50
ns3::AdhocWifiMac::~AdhocWifiMac
~AdhocWifiMac() override
Definition:
adhoc-wifi-mac.cc:57
ns3::AdhocWifiMac::Receive
void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId) override
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Definition:
adhoc-wifi-mac.cc:178
ns3::AdhocWifiMac::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
adhoc-wifi-mac.cc:41
ns3::AdhocWifiMac::SetLinkUpCallback
void SetLinkUpCallback(Callback< void > linkUp) override
Definition:
adhoc-wifi-mac.cc:166
ns3::AdhocWifiMac::CanForwardPacketsTo
bool CanForwardPacketsTo(Mac48Address to) const override
Return true if packets can be forwarded to the given destination, false otherwise.
Definition:
adhoc-wifi-mac.cc:63
ns3::AdhocWifiMac::Enqueue
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
Definition:
adhoc-wifi-mac.cc:69
ns3::Callback< void >
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:46
ns3::Ptr< Packet >
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WifiMac
base class for all MAC-level wifi objects.
Definition:
wifi-mac.h:96
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-mac.h
src
wifi
model
adhoc-wifi-mac.h
Generated on Sun Mar 3 2024 17:11:10 for ns-3 by
1.9.1