wifi: Doxygen updates for helper files (thanks to Robert Ammon)
This commit is contained in:
@@ -38,13 +38,34 @@ class AthstatsHelper
|
||||
{
|
||||
public:
|
||||
AthstatsHelper ();
|
||||
/**
|
||||
* Enable athstats
|
||||
* \param filename the file name
|
||||
* \param nodeid the node ID
|
||||
* \param deviceid the device ID
|
||||
*/
|
||||
void EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid);
|
||||
/**
|
||||
* Enable athstats
|
||||
* \param filename the file name
|
||||
* \param nd the device
|
||||
*/
|
||||
void EnableAthstats (std::string filename, Ptr<NetDevice> nd);
|
||||
/**
|
||||
* Enable athstats
|
||||
* \param filename the file name
|
||||
* \param d the collection of devices
|
||||
*/
|
||||
void EnableAthstats (std::string filename, NetDeviceContainer d);
|
||||
/**
|
||||
* Enable athstats
|
||||
* \param filename the file name
|
||||
* \param n the collection of nodes
|
||||
*/
|
||||
void EnableAthstats (std::string filename, NodeContainer n);
|
||||
|
||||
private:
|
||||
Time m_interval;
|
||||
Time m_interval; ///< interval
|
||||
};
|
||||
|
||||
|
||||
@@ -72,6 +93,10 @@ private:
|
||||
class AthstatsWifiTraceSink : public Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
AthstatsWifiTraceSink ();
|
||||
virtual ~AthstatsWifiTraceSink ();
|
||||
@@ -183,21 +208,23 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
/// Write status function
|
||||
void WriteStats ();
|
||||
/// Reset counters function
|
||||
void ResetCounters ();
|
||||
|
||||
uint32_t m_txCount;
|
||||
uint32_t m_rxCount;
|
||||
uint32_t m_shortRetryCount;
|
||||
uint32_t m_longRetryCount;
|
||||
uint32_t m_exceededRetryCount;
|
||||
uint32_t m_phyRxOkCount;
|
||||
uint32_t m_phyRxErrorCount;
|
||||
uint32_t m_phyTxCount;
|
||||
uint32_t m_txCount; ///< transmit count
|
||||
uint32_t m_rxCount; ///< receive count
|
||||
uint32_t m_shortRetryCount; ///< short retry count
|
||||
uint32_t m_longRetryCount; ///< long retry count
|
||||
uint32_t m_exceededRetryCount; ///< exceeded retry count
|
||||
uint32_t m_phyRxOkCount; ///< phy receive ok count
|
||||
uint32_t m_phyRxErrorCount; ///< phy receive error count
|
||||
uint32_t m_phyTxCount; ///< phy transmit count
|
||||
|
||||
std::ofstream *m_writer;
|
||||
std::ofstream *m_writer; ///< output stream
|
||||
|
||||
Time m_interval;
|
||||
Time m_interval; ///< interval
|
||||
|
||||
}; //class AthstatsWifiTraceSink
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
/**
|
||||
* Create a mac helper in a default working state.
|
||||
* i.e., this is an adhoc mac by default.
|
||||
* \return NqosWifiMacHelper
|
||||
*/
|
||||
static NqosWifiMacHelper Default (void);
|
||||
/**
|
||||
@@ -95,7 +96,7 @@ public:
|
||||
std::string n9 = "", const AttributeValue &v9 = EmptyAttributeValue (),
|
||||
std::string n10 = "", const AttributeValue &v10 = EmptyAttributeValue ());
|
||||
protected:
|
||||
ObjectFactory m_mac;
|
||||
ObjectFactory m_mac; ///< MAC object
|
||||
private:
|
||||
/**
|
||||
* \returns a newly-created MAC object.
|
||||
|
||||
@@ -149,10 +149,10 @@ QosWifiMacHelper::SetBlockAckInactivityTimeoutForAc (enum AcIndex ac, uint16_t t
|
||||
}
|
||||
|
||||
void
|
||||
QosWifiMacHelper::Setup (Ptr<WifiMac> mac, enum AcIndex ac, std::string dcaAttrName) const
|
||||
QosWifiMacHelper::Setup (Ptr<WifiMac> mac, enum AcIndex ac, std::string edcaAttrName) const
|
||||
{
|
||||
PointerValue ptr;
|
||||
mac->GetAttribute (dcaAttrName, ptr);
|
||||
mac->GetAttribute (edcaAttrName, ptr);
|
||||
Ptr<EdcaTxopN> edca = ptr.Get<EdcaTxopN> ();
|
||||
|
||||
std::map<AcIndex, ObjectFactory>::const_iterator it_msdu = m_msduAggregators.find (ac);
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
ObjectFactory m_mac;
|
||||
ObjectFactory m_mac; ///< MAC object
|
||||
|
||||
|
||||
private:
|
||||
@@ -180,16 +180,22 @@ private:
|
||||
* This method implements the pure virtual method defined in \ref ns3::WifiMacHelper.
|
||||
*/
|
||||
virtual Ptr<WifiMac> Create (void) const;
|
||||
void Setup (Ptr<WifiMac> mac, enum AcIndex ac, std::string dcaAttrName) const;
|
||||
/**
|
||||
* Setup function
|
||||
* \param mac the wifi MAC
|
||||
* \param ac the access category
|
||||
* \param edcaAttrName the EDCA attribute name (VO_EdcaTxopN, VI_EdcaTxopN, BE_EdcaTxopN, BK_EdcaTxopN)
|
||||
*/
|
||||
void Setup (Ptr<WifiMac> mac, enum AcIndex ac, std::string edcaAttrName) const;
|
||||
|
||||
std::map<AcIndex, ObjectFactory> m_msduAggregators;
|
||||
std::map<AcIndex, ObjectFactory> m_mpduAggregators;
|
||||
std::map<AcIndex, ObjectFactory> m_msduAggregators; ///< A-MSDU aggregators
|
||||
std::map<AcIndex, ObjectFactory> m_mpduAggregators; ///< A-MPDU aggregators
|
||||
/*
|
||||
* Next maps contain, for every access category, the values for
|
||||
* block ack threshold and block ack inactivity timeout.
|
||||
*/
|
||||
std::map<AcIndex, uint8_t> m_bAckThresholds;
|
||||
std::map<AcIndex, uint16_t> m_bAckInactivityTimeouts;
|
||||
std::map<AcIndex, uint8_t> m_bAckThresholds; ///< Block ACK thresholds
|
||||
std::map<AcIndex, uint16_t> m_bAckInactivityTimeouts; ///< Block ACK inactivity timeouts
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
*/
|
||||
virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<NetDevice> device) const;
|
||||
|
||||
Ptr<SpectrumChannel> m_channel;
|
||||
Ptr<SpectrumChannel> m_channel; ///< the channel
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -37,14 +37,14 @@ namespace ns3 {
|
||||
* \brief create VHT-enabled MAC layers for a ns3::WifiNetDevice.
|
||||
*
|
||||
* This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac,
|
||||
* and, ns3::AdhocWifiMac, with QosSupported, HTSupported and VHTSupported attributes set to True.
|
||||
* and, ns3::AdhocWifiMac, with QosSupported, HTSupported and VHTSupported attributes set to True
|
||||
*/
|
||||
class VhtWifiMacHelper : public QosWifiMacHelper
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Create a VhtWifiMacHelper that is used to make life easier when working
|
||||
* with Wifi devices using a QOS MAC layer.
|
||||
* with Wifi devices using a QOS MAC layer
|
||||
*/
|
||||
VhtWifiMacHelper ();
|
||||
|
||||
@@ -56,11 +56,16 @@ public:
|
||||
|
||||
/**
|
||||
* Create a mac helper in a default working state.
|
||||
*
|
||||
* \returns VhtWifiMacHelper
|
||||
*/
|
||||
static VhtWifiMacHelper Default (void);
|
||||
|
||||
/**
|
||||
* Converts a VHT MCS value into a DataRate value
|
||||
*
|
||||
* \param mcs MCS Value
|
||||
* \return data rate value (StringValue)
|
||||
*/
|
||||
static StringValue DataRateForMcs (int mcs);
|
||||
};
|
||||
|
||||
@@ -35,6 +35,15 @@ namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("WifiHelper");
|
||||
|
||||
/**
|
||||
* ASCII trace Phy transmit sink with context
|
||||
* \param stream the output stream
|
||||
* \param context the context name
|
||||
* \param p the packet
|
||||
* \param mode the wifi mode
|
||||
* \param preamble the wifi preamble
|
||||
* \param txLevel the transmit power level
|
||||
*/
|
||||
static void
|
||||
AsciiPhyTransmitSinkWithContext (
|
||||
Ptr<OutputStreamWrapper> stream,
|
||||
@@ -48,6 +57,14 @@ AsciiPhyTransmitSinkWithContext (
|
||||
*stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* ASCII trace Phy transmit sink without context
|
||||
* \param stream the output stream
|
||||
* \param p the packet
|
||||
* \param mode the wifi mode
|
||||
* \param preamble the wifi preamble
|
||||
* \param txLevel the transmit power level
|
||||
*/
|
||||
static void
|
||||
AsciiPhyTransmitSinkWithoutContext (
|
||||
Ptr<OutputStreamWrapper> stream,
|
||||
@@ -60,6 +77,15 @@ AsciiPhyTransmitSinkWithoutContext (
|
||||
*stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << *p << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* ASCII trace Phy receive sink with context
|
||||
* \param stream the output stream
|
||||
* \param context the context name
|
||||
* \param p the packet
|
||||
* \param snr the SNR
|
||||
* \param mode the wifi mode
|
||||
* \param preamble the wifi preamble
|
||||
*/
|
||||
static void
|
||||
AsciiPhyReceiveSinkWithContext (
|
||||
Ptr<OutputStreamWrapper> stream,
|
||||
@@ -73,6 +99,14 @@ AsciiPhyReceiveSinkWithContext (
|
||||
*stream->GetStream () << "r " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* ASCII trace Phy receive sink without context
|
||||
* \param stream the output stream
|
||||
* \param p the packet
|
||||
* \param snr the SNR
|
||||
* \param mode the wifi mode
|
||||
* \param preamble the wifi preamble
|
||||
*/
|
||||
static void
|
||||
AsciiPhyReceiveSinkWithoutContext (
|
||||
Ptr<OutputStreamWrapper> stream,
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
* by other Wifi device variants such as WaveNetDevice.
|
||||
*/
|
||||
virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<NetDevice> device) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
* \param name the name of the attribute to set
|
||||
* \param v the value of the attribute
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
|
||||
std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
|
||||
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
|
||||
|
||||
|
||||
/**
|
||||
* An enumeration of the pcap data link types (DLTs) which this helper
|
||||
* supports. See http://wiki.wireshark.org/Development/LibpcapFileFormat
|
||||
@@ -162,10 +162,10 @@ protected:
|
||||
WifiTxVector txVector,
|
||||
MpduInfo aMpdu,
|
||||
SignalNoiseDbm signalNoise);
|
||||
|
||||
ObjectFactory m_phy;
|
||||
ObjectFactory m_errorRateModel;
|
||||
|
||||
|
||||
ObjectFactory m_phy; ///< PHY object
|
||||
ObjectFactory m_errorRateModel; ///< error rate model
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Enable pcap output the indicated net device.
|
||||
@@ -198,8 +198,8 @@ private:
|
||||
std::string prefix,
|
||||
Ptr<NetDevice> nd,
|
||||
bool explicitFilename);
|
||||
|
||||
PcapHelper::DataLinkType m_pcapDlt;
|
||||
|
||||
PcapHelper::DataLinkType m_pcapDlt; ///< PCAP data link type
|
||||
};
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
* must be set before calling ns3::WifiHelper::Install
|
||||
*
|
||||
* The default state is defined as being an Adhoc MAC layer with an ARF rate control algorithm
|
||||
* and both objects using their default attribute values.
|
||||
* and both objects using their default attribute values.
|
||||
* By default, configure MAC and PHY for 802.11a.
|
||||
*/
|
||||
WifiHelper ();
|
||||
@@ -342,8 +342,8 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
ObjectFactory m_stationManager;
|
||||
enum WifiPhyStandard m_standard;
|
||||
ObjectFactory m_stationManager; ///< station manager
|
||||
enum WifiPhyStandard m_standard; ///< wifi standard
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -31,11 +31,11 @@ class WifiMac;
|
||||
* \brief create MAC layers for a ns3::WifiNetDevice.
|
||||
*
|
||||
* This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac and ns3::AdhocWifiMac.
|
||||
* Its purpose is to allow a WifiHelper to configure and install WifiMac objects on a collection
|
||||
* of nodes. The WifiMac objects themselves are mainly composed of TxMiddle, RxMiddle, DcfManager,
|
||||
* MacLow, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper
|
||||
* offers the opportunity to configure attribute values away from their default values, on a
|
||||
* per-NodeContainer basis. By default, it creates an Adhoc MAC layer without QoS. Typically,
|
||||
* Its purpose is to allow a WifiHelper to configure and install WifiMac objects on a collection
|
||||
* of nodes. The WifiMac objects themselves are mainly composed of TxMiddle, RxMiddle, DcfManager,
|
||||
* MacLow, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper
|
||||
* offers the opportunity to configure attribute values away from their default values, on a
|
||||
* per-NodeContainer basis. By default, it creates an Adhoc MAC layer without QoS. Typically,
|
||||
* it is used to set type and attribute values, then hand this object over to the WifiHelper that
|
||||
* finishes the job of installing.
|
||||
*
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
ObjectFactory m_mac;
|
||||
ObjectFactory m_mac; ///< MAC object factory
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -105,6 +105,7 @@ private:
|
||||
/**
|
||||
* \param device Pointer to the NetDevice to install DeviceEnergyModel.
|
||||
* \param source Pointer to EnergySource to install.
|
||||
* \returns Ptr<DeviceEnergyModel>
|
||||
*
|
||||
* Implements DeviceEnergyModel::Install.
|
||||
*/
|
||||
@@ -112,10 +113,10 @@ private:
|
||||
Ptr<EnergySource> source) const;
|
||||
|
||||
private:
|
||||
ObjectFactory m_radioEnergy;
|
||||
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback;
|
||||
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback;
|
||||
ObjectFactory m_txCurrentModel;
|
||||
ObjectFactory m_radioEnergy; ///< radio energy
|
||||
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback; ///< radio energy depletion callback
|
||||
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback; ///< radio energy recharged callback
|
||||
ObjectFactory m_txCurrentModel; ///< transmit current model
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
* a channel model with a propagation delay equal to a constant, the speed of light,
|
||||
* and a propagation loss based on a log distance model with a reference loss of 46.6777 dB
|
||||
* at reference distance of 1m.
|
||||
* \returns YansWifiChannelHelper
|
||||
*/
|
||||
static YansWifiChannelHelper Default (void);
|
||||
|
||||
@@ -141,8 +142,8 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
std::vector<ObjectFactory> m_propagationLoss;
|
||||
ObjectFactory m_propagationDelay;
|
||||
std::vector<ObjectFactory> m_propagationLoss; ///< vector of propagation loss models
|
||||
ObjectFactory m_propagationDelay; ///< propagation delay model
|
||||
};
|
||||
|
||||
|
||||
@@ -193,7 +194,7 @@ private:
|
||||
*/
|
||||
virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<NetDevice> device) const;
|
||||
|
||||
Ptr<YansWifiChannel> m_channel;
|
||||
Ptr<YansWifiChannel> m_channel; ///< yans wifi channel
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user