A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8 * Mirko Banchi <mk.banchi@gmail.com>
9 */
10
11#ifndef ADHOC_WIFI_MAC_H
12#define ADHOC_WIFI_MAC_H
13
14#include "wifi-mac.h"
15
16namespace ns3
17{
18
19/**
20 * @ingroup wifi
21 *
22 * @brief Wifi MAC high model for an ad-hoc Wifi MAC
23 */
24class AdhocWifiMac : public WifiMac
25{
26 public:
27 /**
28 * @brief Get the type ID.
29 * @return the object TypeId
30 */
31 static TypeId GetTypeId();
32
34 ~AdhocWifiMac() override;
35
36 void SetLinkUpCallback(Callback<void> linkUp) override;
37 bool CanForwardPacketsTo(Mac48Address to) const override;
38
39 private:
40 void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId) override;
41 void DoCompleteConfig() override;
42 void Enqueue(Ptr<WifiMpdu> mpdu, Mac48Address to, Mac48Address from) override;
43};
44
45} // namespace ns3
46
47#endif /* ADHOC_WIFI_MAC_H */
Wifi MAC high model for an ad-hoc Wifi MAC.
void Enqueue(Ptr< WifiMpdu > mpdu, Mac48Address to, Mac48Address from) override
void DoCompleteConfig() override
Allow subclasses to complete the configuration of the MAC layer components.
~AdhocWifiMac() override
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...
static TypeId GetTypeId()
Get the type ID.
void SetLinkUpCallback(Callback< void > linkUp) override
bool CanForwardPacketsTo(Mac48Address to) const override
Return true if packets can be forwarded to the given destination, false otherwise.
Callback template class.
Definition callback.h:422
an EUI-48 address
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
base class for all MAC-level wifi objects.
Definition wifi-mac.h:89
Every class exported by the ns3 library is enclosed in the ns3 namespace.