mesh: Fix doxygen warnings

This commit is contained in:
Robert Ammon
2017-09-06 05:57:39 -07:00
parent 4b66cb5ac5
commit 66208e454a
20 changed files with 505 additions and 114 deletions

View File

@@ -70,9 +70,17 @@ class MeshTest
public:
/// Init test
MeshTest ();
/// Configure test from command line arguments
/**
* Configure test from command line arguments
*
* \param argc command line argument count
* \param argv command line arguments
*/
void Configure (int argc, char ** argv);
/// Run test
/**
* Run test
* \returns the test status
*/
int Run ();
private:
int m_xSize; ///< X size

View File

@@ -51,6 +51,7 @@ public:
/**
* \brief Set the helper to the default values for the MAC type, remote
* station manager and channel policy.
* \returns the default MeshHelper
*/
static MeshHelper Default ();
@@ -117,6 +118,7 @@ public:
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
/**
* Set PHY standard
* \param standard the wifi phy standard
*/
void SetStandard (enum WifiPhyStandard standard);
/// \todo SetMeshId
@@ -135,8 +137,9 @@ public:
/**
* \brief set the channel policy
* \param policy the channel policy
*/
void SetSpreadInterfaceChannels (ChannelPolicy);
void SetSpreadInterfaceChannels (ChannelPolicy policy);
/**
* \brief Set a number of interfaces in a mesh network
* \param nInterfaces is the number of interfaces
@@ -184,13 +187,17 @@ public:
/**
* \brief Print statistics.
*
* \param device the net device
* \param os the output stream
*/
void Report (const ns3::Ptr<ns3::NetDevice>&, std::ostream& os);
void Report (const ns3::Ptr<ns3::NetDevice>& device, std::ostream& os);
/**
* \brief Reset statistics.
* \param device the net device
*/
void ResetStats (const ns3::Ptr<ns3::NetDevice>&);
void ResetStats (const ns3::Ptr<ns3::NetDevice>& device);
/**
* Assign a fixed random variable stream number to the random variables
* used by this model. Return the number of streams (possibly zero) that

View File

@@ -39,11 +39,22 @@ public:
/// \return The TypeId.
static TypeId GetTypeId (void);
///\brief Installs mesh stack. needed by helper only
/**
* \brief Installs mesh stack. needed by helper only
* \param mp the mesh point device
* \returns true if successful
*/
virtual bool InstallStack (Ptr<MeshPointDevice> mp) = 0;
/// Report statistics of a given mesh point
virtual void Report (const Ptr<MeshPointDevice> mp, std::ostream&) = 0;
/// Reset statistics of a given mesh point
/**
* Report statistics of a given mesh point
* \param mp the mesh point device
* \param os the output stream
*/
virtual void Report (const Ptr<MeshPointDevice> mp, std::ostream& os) = 0;
/**
* Reset statistics of a given mesh point
* \param mp the mesh point device
*/
virtual void ResetStats (const Ptr<MeshPointDevice> mp) = 0;
};
}

View File

@@ -63,6 +63,7 @@ public:
//\}
private:
/// allow HwmpProtocol class friend access
friend class HwmpProtocol;
/**
* \returns a path selection action header
@@ -167,7 +168,10 @@ private:
uint32_t txDataBytes; ///< transmit data bytes
uint16_t rxData; ///< receive data
uint32_t rxDataBytes; ///< receive data bytes
/// Print function
/**
* Print function
* \param os the output stream
*/
void Print (std::ostream & os) const;
Statistics ();
};

View File

@@ -78,11 +78,28 @@ public:
Mac48Address destination; ///< destination address
uint32_t seqnum; ///< sequence number
} FailedDestination;
/// Route request, inherited from MeshL2RoutingProtocol
/**
* Route request, inherited from MeshL2RoutingProtocol
*
* \param sourceIface the source interface
* \param source the source address
* \param destination the destination address
* \param packet the packet to route
* \param protocolType the protocol type
* \param routeReply the route reply
* \returns true if route exists
*/
bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
Ptr<const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply);
/**
* Clean HWMP packet tag from packet; only the packet parameter is used
*
* \param fromIface the from interface
* \param source the source address
* \param destination the destination address
* \param packet the packet to route
* \param protocolType the protocol type
* \returns true if successful
*/
bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source,
const Mac48Address destination, Ptr<Packet> packet, uint16_t& protocolType);
@@ -104,8 +121,10 @@ public:
* \param status The status of the peer link
*/
void PeerLinkStatus (Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface,bool status);
///\brief This callback is used to obtain active neighbours on a given interface
///\param cb is a callback, which returns a list of addresses on given interface (uint32_t)
/**
* \brief This callback is used to obtain active neighbours on a given interface
* \param cb is a callback, which returns a list of addresses on given interface (uint32_t)
*/
void SetNeighboursCallback (Callback<std::vector<Mac48Address>, uint32_t> cb);
///\name Proactive PREQ mechanism:
///\{
@@ -133,13 +152,21 @@ public:
Ptr<HwmpRtable> GetRoutingTable (void) const;
private:
/// allow HwmpProtocolMac class friend access
friend class HwmpProtocolMac;
virtual void DoInitialize ();
/// assignment operator
HwmpProtocol& operator= (const HwmpProtocol &);
/// type conversion
/**
* assignment operator
* \param hwmp the HWMP protocol to assign
* \returns the assigned value
*/
HwmpProtocol& operator= (const HwmpProtocol & hwmp);
/**
* type conversion
* \returns the HWMP protocol
*/
HwmpProtocol (const HwmpProtocol &);
/**
@@ -164,19 +191,63 @@ private:
QueuedPacket ();
};
typedef std::map<uint32_t, Ptr<HwmpProtocolMac> > HwmpProtocolMacMap; ///< HwmpProtocolMacMap typedef
/// Like RequestRoute, but for unicast packets
bool ForwardUnicast (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
Ptr<Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl);
/**
* Like RequestRoute, but for unicast packets
*
* \param sourceIface the source interface
* \param source the source address
* \param destination the destination address
* \param packet the packet to route
* \param protocolType the protocol type
* \param routeReply the route reply callback
* \param ttl the TTL
* \returns true if forwarded
*/
bool ForwardUnicast (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
Ptr<Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl);
///\name Interaction with HWMP MAC plugin
//\{
///\brief Handler for receiving Path Request
/**
* \brief Handler for receiving Path Request
*
* \param preq the IE preq
* \param from the from address
* \param interface the interface
* \param fromMp the 'from MP' address
* \param metric the metric
*/
void ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
///\brief Handler for receiving Path Reply
/**
* \brief Handler for receiving Path Reply
*
* \param prep the IE prep
* \param from the from address
* \param interface the interface
* \param fromMp the 'from MP' address
* \param metric the metric
*/
void ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
///\brief Handler for receiving Path Error
void ReceivePerr (std::vector<FailedDestination>, Mac48Address from, uint32_t interface, Mac48Address fromMp);
///\brief Send Path Reply
/**
* \brief Handler for receiving Path Error
*
* \param destinations the list of failed destinations
* \param from the from address
* \param interface the interface
* \param fromMp the from MP address
*/
void ReceivePerr (std::vector<FailedDestination> destinations, Mac48Address from, uint32_t interface, Mac48Address fromMp);
/**
* \brief Send Path Reply
* \param src the source address
* \param dst the destination address
* \param retransmitter the retransmitter address
* \param initMetric the initial metric
* \param originatorDsn the originator DSN
* \param destinationSN the destination DSN
* \param lifetime the lifetime
* \param interface the interface
*/
void SendPrep (
Mac48Address src,
Mac48Address dst,
@@ -194,9 +265,15 @@ private:
* \return PathError
*/
PathError MakePathError (std::vector<FailedDestination> destinations);
///\brief Forwards a received path error
/**
* \brief Forwards a received path error
* \param perr the path error
*/
void ForwardPathError (PathError perr);
///\brief Passes a self-generated PERR to interface-plugin
/**
* \brief Passes a self-generated PERR to interface-plugin
* \param perr the path error
*/
void InitiatePathError (PathError perr);
/**
* Get PERR receivers

View File

@@ -48,15 +48,29 @@ public:
uint32_t metric; ///< metric
uint32_t seqnum; ///< sequence number
Time lifetime; ///< lifetime
/// Lookup result function
/**
* Lookup result function
*
* \param r the result address
* \param i the interface
* \param m the metric
* \param s the sequence number
* \param l the lifetime
*/
LookupResult (Mac48Address r = Mac48Address::GetBroadcast (),
uint32_t i = INTERFACE_ANY,
uint32_t m = MAX_METRIC,
uint32_t s = 0,
Time l = Seconds (0.0));
/// True for valid route
/**
* \returns True for valid route
*/
bool IsValid () const;
/// Compare route lookup results, used by tests
/**
* Compare route lookup results, used by tests
* \param o the lookup result to compare
* \returns true if equal
*/
bool operator== (const LookupResult & o) const;
};
/// Path precursor = {MAC, interface ID}
@@ -109,7 +123,11 @@ public:
LookupResult LookupProactiveExpired ();
//\}
/// When peer link with a given MAC-address fails - it returns list of unreachable destination addresses
/**
* When peer link with a given MAC-address fails - it returns list of unreachable destination addresses
* \param peerAddress the peer address
* \returns the list of unreachable destinations
*/
std::vector<HwmpProtocol::FailedDestination> GetUnreachableDestinations (Mac48Address peerAddress);
private:

View File

@@ -101,6 +101,7 @@ public:
/**
* This methods are needed for beacon collision
* avoidance module:
* \returns the neighbor timing elements list
*/
NeighboursTimingUnitsList GetNeighboursTimingElementsList ();
/**

View File

@@ -62,20 +62,20 @@ public:
* Set peer open function
* \param localLinkId
*/
void SetPeerOpen (uint16_t localLinkId);
void SetPeerOpen (uint16_t localLinkId);
/**
* Set peer close function
* \param localLinkID the local link id
* \param peerLinkId the peer link id
* \param reasonCode the reason code
*/
void SetPeerClose (uint16_t localLinkID, uint16_t peerLinkId, PmpReasonCode reasonCode);
void SetPeerClose (uint16_t localLinkID, uint16_t peerLinkId, PmpReasonCode reasonCode);
/**
* Set peer confirm function
* \param localLinkID the local link id
* \param peerLinkId the peer link id
*/
void SetPeerConfirm (uint16_t localLinkID, uint16_t peerLinkId);
void SetPeerConfirm (uint16_t localLinkID, uint16_t peerLinkId);
/**
* Get reason code function
@@ -86,24 +86,27 @@ public:
* Get local link ID function
* \returns the local link id
*/
uint16_t GetLocalLinkId () const;
/// Get peer link ID function
uint16_t GetPeerLinkId () const;
uint16_t GetLocalLinkId () const;
/**
* Get peer link ID function
* \returns the peer link ID
*/
uint16_t GetPeerLinkId () const;
/**
* Subtype is open function
* \returns true if open
*/
bool SubtypeIsOpen () const;
bool SubtypeIsOpen () const;
/**
* Subtype is close function
* \returns true if closed
*/
bool SubtypeIsClose () const;
bool SubtypeIsClose () const;
/**
* Subtype is confirm function
* \returns true if the subtype is confirm
*/
bool SubtypeIsConfirm () const;
bool SubtypeIsConfirm () const;
/**
* Get subtype function
* \returns the subtype

View File

@@ -119,11 +119,17 @@ public:
Mac48Address dest_address,
uint32_t dest_seq_number
);
/// Delete a destination address unit by destination
/**
* Delete a destination address unit by destination
* \param dest_address the destination address
*/
void DelDestinationAddressElement (Mac48Address dest_address);
/// Clear PREQ: remove all destinations
void ClearDestinationAddressElements ();
/// Get all destinations, which are stored in PREQ:
/**
* Get all destinations, which are stored in PREQ:
* \returns the list of destination addresses
*/
std::vector<Ptr<DestinationAddressUnit> > GetDestinationList ();
/// Set flag indicating that PREQ is unicast
void SetUnicastPreq ();
@@ -136,7 +142,7 @@ public:
/**
* Set number of hops from originator to mesh STA transmitting this
* element
* \param hopcount
* \param hopcount the hop count
*/
void SetHopcount (uint8_t hopcount);
/**
@@ -237,6 +243,8 @@ public:
/**
* \brief Checks that preq's originator address equals to originator, and
* this preq is not proactive
* \param originator the originator address
* \returns true if it may add
*/
bool MayAddAddress (Mac48Address originator);
/**

View File

@@ -92,10 +92,17 @@ private:
*/
friend bool operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b);
/// assignment operator
PeerLinkOpenStart& operator= (const PeerLinkOpenStart &);
/// type conversion opertor
PeerLinkOpenStart (const PeerLinkOpenStart &);
/**
* assignment operator
* \param peer the peer link open start
* \returns the assigned value
*/
PeerLinkOpenStart& operator= (const PeerLinkOpenStart & peer);
/**
* constructor
* \param peer the peer link open start
*/
PeerLinkOpenStart (const PeerLinkOpenStart & peer);
};
@@ -154,8 +161,13 @@ private:
*/
friend bool operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b);
/// assignment operator
PeerLinkCloseStart& operator= (const PeerLinkCloseStart &);
/**
* assignment operator
*
* \param peer the value to assign
* \returns the assigned value
*/
PeerLinkCloseStart& operator= (const PeerLinkCloseStart & peer);
/// type conversion operator
PeerLinkCloseStart (const PeerLinkCloseStart &);
@@ -223,10 +235,17 @@ private:
*/
friend bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);
/// assignment operator
PeerLinkConfirmStart& operator= (const PeerLinkConfirmStart &);
/// type conversion operator
PeerLinkConfirmStart (const PeerLinkConfirmStart &);
/**
* assignment operator
* \param peer the peer link confirm start
* \returns the assigned value
*/
PeerLinkConfirmStart& operator= (const PeerLinkConfirmStart & peer);
/**
* constructor
* \param peer the peer link confirm start
*/
PeerLinkConfirmStart (const PeerLinkConfirmStart & peer);
};
bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);

View File

@@ -43,8 +43,12 @@ class PeerManagementProtocolMac;
class PeerLink : public Object
{
public:
/// allow PeerManagementProtocol class friend access
friend class PeerManagementProtocol;
/// Support object system
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId ();
/// C-tor create empty link
PeerLink ();
@@ -63,7 +67,12 @@ public:
* \brief Literal names of Mesh Peer Management states for use in log messages
*/
static const char* const PeerStateNames[6];
/// Process beacon received from peer
/**
* Process beacon received from peer
*
* \param lastBeacon the last beacon
* \param BeaconInterval the beacon interval
*/
void SetBeaconInformation (Time lastBeacon, Time BeaconInterval);
/**
* \brief Method used to detect peer link changes
@@ -95,7 +104,10 @@ public:
* \name MLME
* \{
*/
/// MLME-CancelPeerLink.request
/**
* MLME-CancelPeerLink.request
* \param reason the reason for the request
*/
void MLMECancelPeerLink (PmpReasonCode reason);
/// MLME-ActivePeerLinkOpen.request
void MLMEActivePeerLinkOpen ();
@@ -103,13 +115,19 @@ public:
void MLMEPeeringRequestReject ();
/// Callback type for MLME-SignalPeerLinkStatus event
typedef Callback<void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState> SignalStatusCallback;
/// Set callback
void MLMESetSignalStatusCallback (SignalStatusCallback);
/**
* Set callback
* \param cb the callback function
*/
void MLMESetSignalStatusCallback (SignalStatusCallback cb);
/// Reports about transmission success/failure
void TransmissionSuccess ();
void TransmissionFailure ();
//\}
///\brief Statistics
/**
* \brief Statistics
* \param os the output stream
*/
void Report (std::ostream & os) const;
private:
/// Peer link events, see 802.11s draft 11B.3.3.2
@@ -126,9 +144,14 @@ private:
TOR1, ///< Timeout of retry timer
TOR2, ///< also timeout of retry timer
TOC, ///< Timeout of confirm timer
TOH, ///< Timeout of holding (graceful closing) timer
TOH ///< Timeout of holding (graceful closing) timer
};
/// State transition
/**
* State transition
*
* \param event the event to update the state machine
* \param reasoncode the reason for the state transition
*/
void StateMachine (PeerEvent event, PmpReasonCode = REASON11S_RESERVED);
/**
* \name Link response to received management frames
@@ -138,13 +161,40 @@ private:
*
* \{
*/
/// Close link
/**
* Close link
*
* \param localLinkID the local link ID
* \param peerLinkID the peer link ID
* \param reason the reason to close
*/
void Close (uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason);
/// Accept open link
/**
* Accept open link
*
* \param localLinkId the local link ID
* \param conf the IE configuration
* \param peerMp the peer MP
*/
void OpenAccept (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp);
/// Reject open link
/**
* Reject open link
*
* \param localLinkId the local link ID
* \param conf the IE configuration
* \param peerMp the peer MP
* \param reason the reason to close
*/
void OpenReject (uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason);
/// Confirm accept
/**
* Confirm accept
*
* \param localLinkId the local link ID
* \param peerLinkId the peer link ID
* \param peerAid the peer AID
* \param conf the IE configuration
* \param peerMp the peer MP
*/
void ConfirmAccept (
uint16_t localLinkId,
uint16_t peerLinkId,
@@ -152,7 +202,15 @@ private:
IeConfiguration conf,
Mac48Address peerMp
);
/// Confirm reject
/**
* Confirm reject
*
* \param localLinkId the local link ID
* \param peerLinkId the peer link ID
* \param conf the IE configuration
* \param peerMp the peer MP
* \param reason the reason to close
*/
void ConfirmReject (
uint16_t localLinkId,
uint16_t peerLinkId,
@@ -161,13 +219,18 @@ private:
PmpReasonCode reason
);
//\}
/// True if link is established
/**
* \returns True if link is established
*/
bool LinkIsEstab () const;
/// True if link is idle. Link can be deleted in this state
/**
* \returns True if link is idle. Link can be deleted in this state
*/
bool LinkIsIdle () const;
/**
* Set pointer to MAC-plugin, which is responsible for sending peer
* link management frames
* \param plugin the peer management protocol MAC
*/
void SetMacPlugin (Ptr<PeerManagementProtocolMac> plugin);
/**
@@ -203,9 +266,16 @@ private:
void BeaconLoss ();
private:
/// assignment operator
PeerLink& operator= (const PeerLink &);
/// type conversion operator
/**
* assignment operator
* \param link the peer link
* \returns the peer link assigned
*/
PeerLink& operator= (const PeerLink & link);
/**
* type conversion operator
* \returns the peer link
*/
PeerLink (const PeerLink &);
/// The number of interface I am associated with

View File

@@ -95,12 +95,19 @@ public:
// \}
private:
/// assignment operator
PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac &);
/**
* assignment operator
*
* \param peer the object to assign
* \returns the assigned value
*/
PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac & peer);
/// type conversion operator
PeerManagementProtocolMac (const PeerManagementProtocolMac &);
/// allow PeerManagementProtocol class access friend access
friend class PeerManagementProtocol;
/// allow PeerLink class access friend access
friend class PeerLink;
///\name Create peer link management frames
// \{
@@ -173,7 +180,10 @@ private:
IePeerManagement peerElement,
IeConfiguration meshConfig
);
///\brief debug only, used to print established links
/**
* \brief debug only, used to print established links
* \returns the MAC address
*/
Mac48Address GetAddress () const;
/// Statistics structure
struct Statistics

View File

@@ -103,8 +103,7 @@ public:
* to peer address when only one interface)
* \param aid is association ID, which peer has assigned to us
* \param peerManagementElement is peer link management element
* \param meshConfig is mesh configuration element taken from the peer
* management frame
* \param meshConfig is mesh configuration element taken from the peer management frame
*/
void ReceivePeerLinkFrame (
uint32_t interface,
@@ -232,12 +231,24 @@ private:
typedef std::map<uint32_t, Ptr<PeerManagementProtocolMac> > PeerManagementProtocolMacMap;
private:
/// assignment operator
PeerManagementProtocol& operator= (const PeerManagementProtocol &);
/**
* assignment operator
*
* \param peer the value to assign
* \returns the assigned value
*/
PeerManagementProtocol& operator= (const PeerManagementProtocol & peer);
/// type conversion operator
PeerManagementProtocol (const PeerManagementProtocol &);
/// Initiate link functon
/**
* Initiate link functon
*
* \param interface the interface to use
* \param peerAddress the peer address
* \param peerMeshPointAddress the peer mesh point address
* \returns the peer link
*/
Ptr<PeerLink> InitiateLink (
uint32_t interface,
Mac48Address peerAddress,
@@ -245,6 +256,9 @@ private:
);
/**
* \name External peer-chooser
* \param interface the interface to use
* \param peerAddress the peer address
* \returns true is should send an open
*/
bool ShouldSendOpen (uint32_t interface, Mac48Address peerAddress);
/**
@@ -321,7 +335,10 @@ private:
* \param t
*/
Statistics (uint16_t t = 0);
/// Print function
/**
* Print function
* \param os the output stream to print to
*/
void Print (std::ostream & os) const;
};
struct Statistics m_stats; ///< statistics

View File

@@ -97,12 +97,31 @@ public:
~FlameProtocol ();
void DoDispose ();
/// Route request, inherited from MeshL2RoutingProtocol
bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
Ptr<const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply);
/// Cleanup flame headers!
/**
* Route request, inherited from MeshL2RoutingProtocol
*
* \param sourceIface the source interface
* \param source the source address
* \param destination the destination address
* \param packet the packet to route
* \param protocolType the protocol type
* \param routeReply the route reply
* \returns if route exists
*/
bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
Ptr<const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply);
/**
* Cleanup flame headers!
*
* \param fromIface the from interface
* \param source the source address
* \param destination the destination address
* \param packet the packet
* \param protocolType the protocol type
* \returns if the route removed
*/
bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source,
const Mac48Address destination, Ptr<Packet> packet, uint16_t& protocolType);
const Mac48Address destination, Ptr<Packet> packet, uint16_t& protocolType);
/**
* \brief Install FLAME on given mesh point.
* \returns true if successful
@@ -126,8 +145,13 @@ public:
/// Reset statistics function
void ResetStats ();
private:
/// assignment operator
FlameProtocol& operator= (const FlameProtocol &);
/**
* assignment operator
*
* \param flame the object to assign
* \returns the assigned value
*/
FlameProtocol& operator= (const FlameProtocol & flame);
/// type conversion operator
FlameProtocol (const FlameProtocol &);
@@ -173,7 +197,10 @@ private:
uint32_t txBytes; ///< transmit bytes
uint16_t droppedTtl; ///< dropped TTL
uint16_t totalDropped; ///< total dropped
/// Print function
/**
* Print function
* \param os the output stream to print to
*/
void Print (std::ostream & os) const;
/// constructor
Statistics ();

View File

@@ -66,9 +66,16 @@ public:
seqnum (s)
{
}
/// True for valid route
/**
* \returns True for valid route
*/
bool IsValid () const;
/// Compare route lookup results, used by tests
/**
* Compare route lookup results, used by tests
*
* \param o the object to compare
* \returns true if equal
*/
bool operator== (const LookupResult & o) const;
};
public:
@@ -81,7 +88,15 @@ public:
~FlameRtable ();
void DoDispose ();
/// Add path
/**
* Add path
*
* \param destination the destination address
* \param retransmitter the retransmitter address
* \param interface the interface
* \param cost the cost
* \param seqnum the sequence number
*/
void AddPath (
const Mac48Address destination,
const Mac48Address retransmitter,
@@ -96,8 +111,13 @@ public:
*/
LookupResult Lookup (Mac48Address destination);
private:
/// assignment operator
FlameRtable& operator= (const FlameRtable &);
/**
* assignment operator
*
* \param table the flame table to assign
* \returns the assigned value
*/
FlameRtable& operator= (const FlameRtable & table);
/// type conversion operator
FlameRtable (const FlameRtable &);

View File

@@ -44,7 +44,10 @@ class MeshPointDevice;
class MeshL2RoutingProtocol : public Object
{
public:
/// Never forget to support NS3 object model
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId ();
/// virtual D-tor for subclasses
virtual ~MeshL2RoutingProtocol ();
@@ -112,10 +115,18 @@ public:
*/
virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr<
Packet> packet, uint16_t & protocolType) = 0;
/// Set host mesh point, analog of SetNode (...) methods for upper layer protocols.
/**
* Set host mesh point, analog of SetNode (...) methods for upper layer protocols.
*
* \param mp the mesh point device
*/
void
SetMeshPoint (Ptr<MeshPointDevice> mp);
/// Each mesh protocol must be installed on the mesh point to work.
/**
* Each mesh protocol must be installed on the mesh point to work.
*
* \returns the mesh point device
*/
Ptr<MeshPointDevice>
GetMeshPoint () const;
protected:

View File

@@ -49,7 +49,10 @@ class Node;
class MeshPointDevice : public NetDevice
{
public:
/// Object type ID for NS3 object system
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId ();
/// C-tor create empty (without interfaces and protocols) mesh point
MeshPointDevice ();
@@ -124,10 +127,27 @@ public:
//\}
private:
/// Receive packet from interface
/**
* Receive packet from interface
*
* \param device the device to receive from
* \param packet the received packet
* \param protocol the protocol
* \param source the source address
* \param destination the destination address
* \param packetType the packet type
*/
void ReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet> packet, uint16_t protocol,
Address const &source, Address const &destination, PacketType packetType);
/// Forward packet down to interfaces
/**
* Forward packet down to interfaces
*
* \param incomingPort the incoming port
* \param packet the packet to forward
* \param protocol the protocol
* \param src the source MAC address
* \param dst the destination MAC address
*/
void Forward (Ptr<NetDevice> incomingPort, Ptr<const Packet> packet,
uint16_t protocol, const Mac48Address src,
const Mac48Address dst);

View File

@@ -46,22 +46,38 @@ public:
* \param us beacon interval in microseconds
*/
MeshWifiBeacon (Ssid ssid, SupportedRates rates, uint64_t us);
/// Read standard Wifi beacon header
/**
* Read standard Wifi beacon header
*
* \returns the management beacon header
*/
MgtBeaconHeader BeaconHeader () const { return m_header; }
/// Add information element
/**
* Add information element
*
* \param ie the Wifi information element
*/
void AddInformationElement (Ptr<WifiInformationElement> ie);
/**
* Create wifi header for beacon frame.
* Create Wifi header for beacon frame.
*
* \param address is sender address
* \param mpAddress is mesh point address
* \returns the WifiMacHeader
*/
WifiMacHeader CreateHeader (Mac48Address address, Mac48Address mpAddress);
/// Returns a beacon interval of wifi beacon
/**
* Returns the beacon interval of Wifi beacon
*
* \returns the beacon interval time
*/
Time GetBeaconInterval () const;
/// Create frame = { beacon header + all information elements sorted by ElementId () }
/**
* Create frame = { beacon header + all information elements sorted by ElementId () }
*
* \returns the frame
*/
Ptr<Packet> CreatePacket ();
private:

View File

@@ -43,7 +43,11 @@ class MeshWifiInterfaceMacPlugin : public SimpleRefCount<MeshWifiInterfaceMacPlu
public:
/// This is for subclasses
virtual ~MeshWifiInterfaceMacPlugin (){};
/// Each plugin must be installed on interface to work
/**
* Each plugin must be installed on an interface to work
*
* \param parent the parent object
*/
virtual void SetParent (Ptr<MeshWifiInterfaceMac> parent) = 0;
/**
* \brief Process received frame

View File

@@ -54,7 +54,10 @@ class UniformRandomVariable;
class MeshWifiInterfaceMac : public RegularWifiMac
{
public:
/// Never forget to support typeid
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId ();
/// C-tor
MeshWifiInterfaceMac ();
@@ -112,7 +115,11 @@ public:
*
* Number of channels to use must be limited elsewhere.
*/
/// Current channel Id
/**
* Current channel Id
* \returns the frequency channel
*/
uint16_t GetFrequencyChannel () const;
/**
* Switch frequency channel.
@@ -121,7 +128,12 @@ public:
*/
void SwitchFrequencyChannel (uint16_t new_id);
/// To be used by plugins sending management frames.
/**
* To be used by plugins sending management frames.
*
* \param frame the management frame
* \param hdr the wifi MAC header
*/
void SendManagementFrame (Ptr<Packet> frame, const WifiMacHeader& hdr);
/**
* Check supported rates.
@@ -141,10 +153,23 @@ public:
void Report (std::ostream &) const;
/// Reset statistics
void ResetStats ();
/// Enable/disable beacons
/**
* Enable/disable beacons
*
* \param enable enable / disable flag
*/
void SetBeaconGeneration (bool enable);
/// Get phy standard in use
/**
* Get phy standard in use
*
* \returns the wifi phy standard
*/
WifiPhyStandard GetPhyStandard () const;
/**
* Finish configuration based on the WifiPhyStandard being provided
*
* \param standard the WifiPhyStandard being configured
*/
virtual void FinishConfigureStandard (enum WifiPhyStandard standard);
/**
* Assign a fixed random variable stream number to the random variables
@@ -156,15 +181,30 @@ public:
*/
int64_t AssignStreams (int64_t stream);
private:
/// Frame receive handler
void Receive (Ptr<Packet> packet, WifiMacHeader const *hdr);
/// Send frame. Frame is supposed to be tagged by routing information.
void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to);
/**
* Frame receive handler
*
* \param packet the received packet
* \param hdr the wifi MAC header
*/
void Receive (Ptr<Packet> packet, WifiMacHeader const *hdr);
/**
* Send frame. Frame is supposed to be tagged by routing information.
*
* \param packet the packet to forward
* \param from the from address
* \param to the to address
*/
void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to);
/// Send beacon
void SendBeacon ();
/// Schedule next beacon
void ScheduleNextBeacon ();
/// Get current beaconing status
/**
* Get current beaconing status
*
* \returns true if beacon active
*/
bool GetBeaconGeneration () const;
/// Real d-tor
virtual void DoDispose ();