A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::flame::FlameProtocolMac Class Reference

Interface MAC plugin FLAME routing protocol. More...

#include <flame-protocol-mac.h>

+ Inheritance diagram for ns3::flame::FlameProtocolMac:
+ Collaboration diagram for ns3::flame::FlameProtocolMac:

Classes

struct  Statistics

Public Member Functions

 FlameProtocolMac (uint32_t, Ptr< FlameProtocol >)
 ~FlameProtocolMac ()
uint16_t GetChannelId () const
void Report (std::ostream &) const
 Report statistics.
void ResetStats ()
Inherited from MAC plugin
void SetParent (Ptr< MeshWifiInterfaceMac > parent)
 Each plugin must be installed on interface to work.
bool Receive (Ptr< Packet > packet, const WifiMacHeader &header)
 Process received frame.
bool UpdateOutcomingFrame (Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
 Update frame before it will be forwarded down.
void UpdateBeacon (MeshWifiBeacon &beacon) const
 Update beacon is empty, because HWMP does not know anything about beacons.
int64_t AssignStreams (int64_t stream)
 AssignStreams is empty, because this model doesn't use random variables.
- Public Member Functions inherited from ns3::MeshWifiInterfaceMacPlugin
virtual ~MeshWifiInterfaceMacPlugin ()
 This is for subclasses.
- Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const

Private Attributes

MeshPointDevice parameters:
Ptr< FlameProtocolm_protocol
uint32_t m_ifIndex
Ptr< MeshWifiInterfaceMacm_parent
Statistics:
Statistics m_stats

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin >
static void Cleanup (void)

Detailed Description

Interface MAC plugin FLAME routing protocol.

Definition at line 34 of file flame-protocol-mac.h.

Constructor & Destructor Documentation

ns3::flame::FlameProtocolMac::FlameProtocolMac ( uint32_t  ifIndex,
Ptr< FlameProtocol protocol 
)

Definition at line 28 of file flame-protocol-mac.cc.

ns3::flame::FlameProtocolMac::~FlameProtocolMac ( )

Definition at line 32 of file flame-protocol-mac.cc.

References m_parent, and m_protocol.

Member Function Documentation

int64_t ns3::flame::FlameProtocolMac::AssignStreams ( int64_t  stream)
inlinevirtual

AssignStreams is empty, because this model doesn't use random variables.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 47 of file flame-protocol-mac.h.

uint16_t ns3::flame::FlameProtocolMac::GetChannelId ( ) const

Definition at line 95 of file flame-protocol-mac.cc.

References ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), and m_parent.

+ Here is the call graph for this function:

void ns3::flame::FlameProtocolMac::Report ( std::ostream &  os) const

Report statistics.

Definition at line 115 of file flame-protocol-mac.cc.

References ns3::RegularWifiMac::GetAddress(), m_parent, m_stats, and ns3::flame::FlameProtocolMac::Statistics::Print().

+ Here is the call graph for this function:

void ns3::flame::FlameProtocolMac::ResetStats ( )

Definition at line 124 of file flame-protocol-mac.cc.

References m_stats.

void ns3::flame::FlameProtocolMac::SetParent ( Ptr< MeshWifiInterfaceMac parent)
virtual

Each plugin must be installed on interface to work.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 38 of file flame-protocol-mac.cc.

References m_parent.

void ns3::flame::FlameProtocolMac::UpdateBeacon ( MeshWifiBeacon beacon) const
inlinevirtual

Update beacon is empty, because HWMP does not know anything about beacons.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 45 of file flame-protocol-mac.h.

bool ns3::flame::FlameProtocolMac::UpdateOutcomingFrame ( Ptr< Packet packet,
WifiMacHeader header,
Mac48Address  from,
Mac48Address  to 
)
virtual

Update frame before it will be forwarded down.

Returns
false if (and only if) frame should be dropped TODO define when MAC call this, preconditions & postconditions

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 70 of file flame-protocol-mac.cc.

References ns3::Mac48Address::GetBroadcast(), ns3::Packet::GetSize(), ns3::WifiMacHeader::IsData(), m_stats, NS_FATAL_ERROR, ns3::flame::FlameTag::receiver, ns3::Packet::RemovePacketTag(), ns3::WifiMacHeader::SetAddr1(), ns3::flame::FlameProtocolMac::Statistics::txBroadcast, ns3::flame::FlameProtocolMac::Statistics::txBytes, and ns3::flame::FlameProtocolMac::Statistics::txUnicast.

+ Here is the call graph for this function:

Member Data Documentation

uint32_t ns3::flame::FlameProtocolMac::m_ifIndex
private

Definition at line 59 of file flame-protocol-mac.h.

Ptr<MeshWifiInterfaceMac> ns3::flame::FlameProtocolMac::m_parent
private

Definition at line 60 of file flame-protocol-mac.h.

Referenced by GetChannelId(), Report(), SetParent(), and ~FlameProtocolMac().

Ptr<FlameProtocol> ns3::flame::FlameProtocolMac::m_protocol
private

Definition at line 58 of file flame-protocol-mac.h.

Referenced by ~FlameProtocolMac().

Statistics ns3::flame::FlameProtocolMac::m_stats
private

Definition at line 76 of file flame-protocol-mac.h.

Referenced by Receive(), Report(), ResetStats(), and UpdateOutcomingFrame().


The documentation for this class was generated from the following files: