A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
adhoc-wifi-mac.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006, 2009 INRIA
4
* Copyright (c) 2009 MIRKO BANCHI
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
* Mirko Banchi <mk.banchi@gmail.com>
21
*/
22
23
#ifndef ADHOC_WIFI_MAC_H
24
#define ADHOC_WIFI_MAC_H
25
26
#include "
wifi-mac.h
"
27
28
namespace
ns3
{
29
35
class
AdhocWifiMac
:
public
WifiMac
36
{
37
public
:
42
static
TypeId
GetTypeId
(
void
);
43
44
AdhocWifiMac
();
45
virtual
~AdhocWifiMac
();
46
47
void
SetAddress
(
Mac48Address
address
)
override
;
48
void
SetLinkUpCallback
(
Callback<void>
linkUp)
override
;
49
void
Enqueue
(
Ptr<Packet>
packet,
Mac48Address
to)
override
;
50
bool
CanForwardPacketsTo
(
Mac48Address
to)
const override
;
51
52
private
:
53
void
Receive
(
Ptr<WifiMacQueueItem>
mpdu)
override
;
54
};
55
56
}
//namespace ns3
57
58
#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::Receive
void Receive(Ptr< WifiMacQueueItem > mpdu) 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:177
ns3::AdhocWifiMac::SetAddress
void SetAddress(Mac48Address address) override
Definition:
adhoc-wifi-mac.cc:61
ns3::AdhocWifiMac::AdhocWifiMac
AdhocWifiMac()
Definition:
adhoc-wifi-mac.cc:48
ns3::AdhocWifiMac::~AdhocWifiMac
virtual ~AdhocWifiMac()
Definition:
adhoc-wifi-mac.cc:55
ns3::AdhocWifiMac::SetLinkUpCallback
void SetLinkUpCallback(Callback< void > linkUp) override
Definition:
adhoc-wifi-mac.cc:165
ns3::AdhocWifiMac::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
adhoc-wifi-mac.cc:38
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:75
ns3::AdhocWifiMac::Enqueue
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
Definition:
adhoc-wifi-mac.cc:81
ns3::Callback< void >
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:44
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:85
first.address
address
Definition:
first.py:44
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 Tue Feb 6 2024 19:21:28 for ns-3 by
1.9.1