Interface MAC plugin for FLAME routing protocol. More...
#include "flame-protocol-mac.h"
Inheritance diagram for ns3::flame::FlameProtocolMac:
Collaboration diagram for ns3::flame::FlameProtocolMac:Classes | |
| struct | Statistics |
| Statistics structure. More... | |
Public Member Functions | |
| FlameProtocolMac (Ptr< FlameProtocol > protocol) | |
| Constructor. | |
| ~FlameProtocolMac () override | |
| int64_t | AssignStreams (int64_t stream) override |
| AssignStreams is empty, because this model doesn't use random variables. | |
| uint16_t | GetChannelId () const |
| Get channel ID function. | |
| bool | Receive (Ptr< Packet > packet, const WifiMacHeader &header) override |
| Receive and process a packet; packets are given a FlameTag packet tag. | |
| void | Report (std::ostream &os) const |
| Report statistics. | |
| void | ResetStats () |
| Reset statistics function. | |
| void | SetParent (Ptr< MeshWifiInterfaceMac > parent) override |
| Set parent of this instance. | |
| void | UpdateBeacon (MeshWifiBeacon &beacon) const override |
| Update beacon is empty, because FLAME does not know anything about beacons. | |
| bool | UpdateOutcomingFrame (Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to) override |
| Process an outgoing frame. | |
Public Member Functions inherited from ns3::MeshWifiInterfaceMacPlugin | |
| virtual | ~MeshWifiInterfaceMacPlugin () |
| This is for subclasses. | |
| virtual int64_t | AssignStreams (int64_t stream)=0 |
| Assign a fixed random variable stream number to the random variables used by this model. | |
| virtual bool | Receive (Ptr< Packet > packet, const WifiMacHeader &header)=0 |
| Process received frame. | |
| virtual void | SetParent (Ptr< MeshWifiInterfaceMac > parent)=0 |
| Each plugin must be installed on an interface to work. | |
| virtual void | UpdateBeacon (MeshWifiBeacon &beacon) const =0 |
| Update beacon before it will be formed and sent. | |
| virtual bool | UpdateOutcomingFrame (Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)=0 |
| Update frame before it will be forwarded down. | |
Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin > | |
| SimpleRefCount () | |
| Default constructor. | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
Private Attributes | |
| Ptr< MeshWifiInterfaceMac > | m_parent |
| parent | |
| Ptr< FlameProtocol > | m_protocol |
| protocol | |
| Statistics | m_stats |
| statistics | |
Interface MAC plugin for FLAME routing protocol.
Definition at line 36 of file flame-protocol-mac.h.
| ns3::flame::FlameProtocolMac::FlameProtocolMac | ( | Ptr< FlameProtocol > | protocol | ) |
Constructor.
| protocol | flame protocol object |
Definition at line 36 of file flame-protocol-mac.cc.
|
override |
Definition at line 41 of file flame-protocol-mac.cc.
References m_parent, and m_protocol.
|
inlineoverridevirtual |
AssignStreams is empty, because this model doesn't use random variables.
| stream |
Implements ns3::MeshWifiInterfaceMacPlugin.
Definition at line 84 of file flame-protocol-mac.h.
| uint16_t ns3::flame::FlameProtocolMac::GetChannelId | ( | ) | const |
Get channel ID function.
Definition at line 109 of file flame-protocol-mac.cc.
References m_parent.
|
overridevirtual |
Receive and process a packet; packets are given a FlameTag packet tag.
| packet | the packet received |
| header | the header |
Implements ns3::MeshWifiInterfaceMacPlugin.
Definition at line 54 of file flame-protocol-mac.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::Mac48Address::GetBroadcast(), ns3::WifiMacHeader::IsData(), m_stats, NS_FATAL_ERROR, ns3::flame::FlameTag::receiver, ns3::flame::FlameProtocolMac::Statistics::rxBroadcast, ns3::flame::FlameProtocolMac::Statistics::rxBytes, ns3::flame::FlameProtocolMac::Statistics::rxUnicast, and ns3::flame::FlameTag::transmitter.
Here is the call graph for this function:| void ns3::flame::FlameProtocolMac::Report | ( | std::ostream & | os | ) | const |
Report statistics.
| os | the output stream |
Definition at line 148 of file flame-protocol-mac.cc.
References m_parent, m_stats, and ns3::flame::FlameProtocolMac::Statistics::Print().
Here is the call graph for this function:| void ns3::flame::FlameProtocolMac::ResetStats | ( | ) |
Reset statistics function.
Definition at line 157 of file flame-protocol-mac.cc.
References m_stats.
|
overridevirtual |
Set parent of this instance.
| parent | pointer to the parent MeshWifiInterfaceMac |
Implements ns3::MeshWifiInterfaceMacPlugin.
Definition at line 48 of file flame-protocol-mac.cc.
References m_parent.
|
inlineoverridevirtual |
Update beacon is empty, because FLAME does not know anything about beacons.
| beacon | the beacon |
Implements ns3::MeshWifiInterfaceMacPlugin.
Definition at line 77 of file flame-protocol-mac.h.
|
overridevirtual |
Process an outgoing frame.
Remove the FlameTag and increment stats counters.
| packet | the packet received |
| header | the header |
| from | the MAC address of the sender |
| to | the MAC address of the receiver |
Implements ns3::MeshWifiInterfaceMacPlugin.
Definition at line 81 of file flame-protocol-mac.cc.
References ns3::Mac48Address::GetBroadcast(), ns3::WifiMacHeader::IsData(), m_stats, NS_FATAL_ERROR, ns3::flame::FlameTag::receiver, 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:
|
private |
parent
Definition at line 105 of file flame-protocol-mac.h.
Referenced by ~FlameProtocolMac(), GetChannelId(), Report(), and SetParent().
|
private |
|
private |
statistics
Definition at line 126 of file flame-protocol-mac.h.
Referenced by Receive(), Report(), ResetStats(), and UpdateOutcomingFrame().