A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
flame-protocol-mac.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 IITP RAS
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
* Author: Kirill Andreev <andreev@iitp.ru>
19
*/
20
21
#ifndef FLAME_PROTOCOL_MAC_H
22
#define FLAME_PROTOCOL_MAC_H
23
24
#include "ns3/mesh-wifi-interface-mac.h"
25
26
namespace
ns3 {
27
namespace
flame {
28
class
FlameProtocol;
34
class
FlameProtocolMac
:
public
MeshWifiInterfaceMacPlugin
35
{
36
public
:
37
FlameProtocolMac
(
Ptr<FlameProtocol>
);
38
~FlameProtocolMac
();
40
//\{
41
void
SetParent
(
Ptr<MeshWifiInterfaceMac>
parent);
42
bool
Receive
(
Ptr<Packet>
packet,
const
WifiMacHeader
& header);
43
bool
UpdateOutcomingFrame
(
Ptr<Packet>
packet,
WifiMacHeader
& header,
Mac48Address
from,
Mac48Address
to);
45
void
UpdateBeacon
(
MeshWifiBeacon
& beacon)
const
{};
47
int64_t
AssignStreams
(int64_t stream) {
return
0; }
48
//\}
49
uint16_t
GetChannelId
()
const
;
51
void
Report
(std::ostream &)
const
;
52
void
ResetStats
();
53
private
:
58
Ptr<FlameProtocol>
m_protocol
;
59
Ptr<MeshWifiInterfaceMac>
m_parent
;
63
struct
Statistics
64
{
65
uint16_t
txUnicast
;
66
uint16_t
txBroadcast
;
67
uint32_t
txBytes
;
68
uint16_t
rxUnicast
;
69
uint16_t
rxBroadcast
;
70
uint32_t
rxBytes
;
71
72
void
Print
(std::ostream & os)
const
;
73
Statistics
();
74
};
75
Statistics
m_stats
;
77
78
};
79
}
// namespace flame
80
}
// namespace ns3
81
#endif
/* FLAME_PROTOCOL_MAC_H */
ns3::flame::FlameProtocolMac::Statistics::Statistics
Statistics()
Definition:
flame-protocol-mac.cc:99
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::flame::FlameProtocolMac::Statistics::rxBytes
uint32_t rxBytes
Definition:
flame-protocol-mac.h:70
ns3::flame::FlameProtocolMac::Statistics::Print
void Print(std::ostream &os) const
Definition:
flame-protocol-mac.cc:104
ns3::flame::FlameProtocolMac::Statistics::txBytes
uint32_t txBytes
Definition:
flame-protocol-mac.h:67
ns3::flame::FlameProtocolMac::Report
void Report(std::ostream &) const
Report statistics.
Definition:
flame-protocol-mac.cc:115
ns3::flame::FlameProtocolMac::Statistics
Definition:
flame-protocol-mac.h:63
ns3::flame::FlameProtocolMac::m_stats
Statistics m_stats
Definition:
flame-protocol-mac.h:75
ns3::flame::FlameProtocolMac::ResetStats
void ResetStats()
Definition:
flame-protocol-mac.cc:124
ns3::flame::FlameProtocolMac::m_parent
Ptr< MeshWifiInterfaceMac > m_parent
Definition:
flame-protocol-mac.h:59
ns3::flame::FlameProtocolMac::UpdateOutcomingFrame
bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
Update beacon is empty, because HWMP does not know anything about beacons.
Definition:
flame-protocol-mac.cc:70
ns3::flame::FlameProtocolMac
Interface MAC plugin FLAME routing protocol.
Definition:
flame-protocol-mac.h:34
ns3::MeshWifiInterfaceMacPlugin
Common interface for mesh point interface MAC plugins.
Definition:
mesh-wifi-interface-mac-plugin.h:41
ns3::flame::FlameProtocolMac::Statistics::txBroadcast
uint16_t txBroadcast
Definition:
flame-protocol-mac.h:66
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:41
ns3::flame::FlameProtocolMac::Statistics::rxBroadcast
uint16_t rxBroadcast
Definition:
flame-protocol-mac.h:69
ns3::MeshWifiBeacon
Beacon is beacon header + list of arbitrary information elements.
Definition:
mesh-wifi-beacon.h:38
ns3::flame::FlameProtocolMac::~FlameProtocolMac
~FlameProtocolMac()
Definition:
flame-protocol-mac.cc:32
ns3::flame::FlameProtocolMac::FlameProtocolMac
FlameProtocolMac(Ptr< FlameProtocol >)
Definition:
flame-protocol-mac.cc:28
ns3::flame::FlameProtocolMac::m_protocol
Ptr< FlameProtocol > m_protocol
Definition:
flame-protocol-mac.h:58
ns3::flame::FlameProtocolMac::SetParent
void SetParent(Ptr< MeshWifiInterfaceMac > parent)
Update beacon is empty, because HWMP does not know anything about beacons.
Definition:
flame-protocol-mac.cc:38
ns3::flame::FlameProtocolMac::UpdateBeacon
void UpdateBeacon(MeshWifiBeacon &beacon) const
Update beacon is empty, because HWMP does not know anything about beacons.
Definition:
flame-protocol-mac.h:45
ns3::flame::FlameProtocolMac::AssignStreams
int64_t AssignStreams(int64_t stream)
AssignStreams is empty, because this model doesn't use random variables.
Definition:
flame-protocol-mac.h:47
ns3::flame::FlameProtocolMac::Statistics::rxUnicast
uint16_t rxUnicast
Definition:
flame-protocol-mac.h:68
ns3::flame::FlameProtocolMac::Statistics::txUnicast
uint16_t txUnicast
Definition:
flame-protocol-mac.h:65
ns3::flame::FlameProtocolMac::GetChannelId
uint16_t GetChannelId() const
Definition:
flame-protocol-mac.cc:95
ns3::flame::FlameProtocolMac::Receive
bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)
Update beacon is empty, because HWMP does not know anything about beacons.
Definition:
flame-protocol-mac.cc:44
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition:
wifi-mac-header.h:80
src
mesh
model
flame
flame-protocol-mac.h
Generated on Sat Apr 19 2014 14:07:03 for ns-3 by
1.8.6