wifi: Doxygen updates for example files (thanks to Robert Ammon)

This commit is contained in:
Sébastien Deronne
2017-02-14 08:19:33 +01:00
parent 0e539c329b
commit a0fbc2e22d
3 changed files with 104 additions and 52 deletions

View File

@@ -58,34 +58,42 @@
using namespace ns3;
/// InterferenceExperiment
class InterferenceExperiment
{
public:
/// Input atructure
struct Input
{
Input ();
Time interval;
double xA;
double xB;
std::string txModeA;
std::string txModeB;
uint32_t txPowerLevelA;
uint32_t txPowerLevelB;
uint32_t packetSizeA;
uint32_t packetSizeB;
WifiPhyStandard standard;
WifiPreamble preamble;
Time interval; ///< interval
double xA; ///< x A
double xB; ///< x B
std::string txModeA; ///< transmit mode A
std::string txModeB; ///< transmit mode B
uint32_t txPowerLevelA; ///< transmit power level A
uint32_t txPowerLevelB; ///< transmit power level B
uint32_t packetSizeA; ///< packet size A
uint32_t packetSizeB; ///< packet size B
WifiPhyStandard standard; ///< standard
WifiPreamble preamble; ///< preamble
};
InterferenceExperiment ();
/**
* Run function
* \param input the interference experiment data
*/
void Run (struct InterferenceExperiment::Input input);
private:
/// Send A function
void SendA (void) const;
/// Send B function
void SendB (void) const;
Ptr<YansWifiPhy> m_txA;
Ptr<YansWifiPhy> m_txB;
struct Input m_input;
Ptr<YansWifiPhy> m_txA; ///< transmit A function
Ptr<YansWifiPhy> m_txB; ///< transmit B function
struct Input m_input; ///< input
};
void

View File

@@ -76,18 +76,32 @@ RateChangeMinstrelHt (uint64_t newVal, Mac48Address dest)
g_intervalRate = newVal;
}
/// Step structure
struct Step
{
double stepSize;
double stepTime;
double stepSize; ///< step size in dBm
double stepTime; ///< step size in seconds
};
/// StandardInfo structure
struct StandardInfo
{
StandardInfo ()
{
m_name = "none";
}
/**
* Constructor
*
* \param name reference name
* \param standard wifi phy standard
* \param width channel width
* \param snrLow SNR low
* \param snrHigh SNR high
* \param xMin x minimum
* \param xMax x maximum
* \param yMax y maximum
*/
StandardInfo (std::string name, enum WifiPhyStandard standard, uint16_t width, double snrLow, double snrHigh, double xMin, double xMax, double yMax)
: m_name (name),
m_standard (standard),
@@ -99,14 +113,14 @@ struct StandardInfo
m_yMax (yMax)
{
}
std::string m_name;
enum WifiPhyStandard m_standard;
uint16_t m_width;
double m_snrLow;
double m_snrHigh;
double m_xMin;
double m_xMax;
double m_yMax;
std::string m_name; ///< name
enum WifiPhyStandard m_standard; ///< standard
uint16_t m_width; ///< channel width
double m_snrLow; ///< lowest SNR
double m_snrHigh; ///< highest SNR
double m_xMin; ///< X minimum
double m_xMax; ///< X maximum
double m_yMax; ///< Y maximum
};
void

View File

@@ -29,32 +29,47 @@
using namespace ns3;
/// PsrExperiment
class PsrExperiment
{
public:
/// Input structure
struct Input
{
Input ();
double distance;
std::string txMode;
uint8_t txPowerLevel;
uint32_t packetSize;
uint32_t nPackets;
double distance; ///< distance
std::string txMode; ///< transmit mode
uint8_t txPowerLevel; ///< transmit power level
uint32_t packetSize; ///< packet size
uint32_t nPackets; ///< number of packets
};
/// Output structure
struct Output
{
uint32_t received;
uint32_t received; ///< received
};
PsrExperiment ();
/**
* Run function
* \param input the PSR experiment
* \returns the PSR experiment output
*/
struct PsrExperiment::Output Run (struct PsrExperiment::Input input);
private:
/// Send function
void Send (void);
/**
* Send receive function
* \param p the packet
* \param snr the SNR
* \param txVector the wifi transmit vector
*/
void Receive (Ptr<Packet> p, double snr, WifiTxVector txVector);
Ptr<WifiPhy> m_tx;
struct Input m_input;
struct Output m_output;
Ptr<WifiPhy> m_tx; ///< transmit
struct Input m_input; ///< input
struct Output m_output; ///< output
};
void
@@ -128,42 +143,57 @@ PsrExperiment::Run (struct PsrExperiment::Input input)
return m_output;
}
/// CollisionExperiment
class CollisionExperiment
{
public:
/// Input structure
struct Input
{
Input ();
Time interval;
double xA;
double xB;
std::string txModeA;
std::string txModeB;
uint8_t txPowerLevelA;
uint8_t txPowerLevelB;
uint32_t packetSizeA;
uint32_t packetSizeB;
uint32_t nPackets;
Time interval; ///< interval
double xA; ///< x A
double xB; ///< x B
std::string txModeA; ///< transmit mode A
std::string txModeB; ///< transmit mode B
uint8_t txPowerLevelA; ///< transmit power level A
uint8_t txPowerLevelB; ///< transmit power level B
uint32_t packetSizeA; ///< packet size A
uint32_t packetSizeB; ///< packet size B
uint32_t nPackets; ///< number of packets
};
/// Output struture
struct Output
{
uint32_t receivedA;
uint32_t receivedB;
uint32_t receivedA; ///< received A
uint32_t receivedB; ///< received B
};
CollisionExperiment ();
/**
* Run function
* \param input the collision experiment data
* \returns the experiment output
*/
struct CollisionExperiment::Output Run (struct CollisionExperiment::Input input);
private:
/// Send A function
void SendA (void) const;
/// Send B function
void SendB (void) const;
/**
* Receive function
* \param p the packet
* \param snr the SNR
* \param txVector the wifi transmit vector
*/
void Receive (Ptr<Packet> p, double snr, WifiTxVector txVector);
Ptr<WifiPhy> m_txA;
Ptr<WifiPhy> m_txB;
uint32_t m_flowIdA;
uint32_t m_flowIdB;
struct Input m_input;
struct Output m_output;
Ptr<WifiPhy> m_txA; ///< transmit A
Ptr<WifiPhy> m_txB; ///< transmit B
uint32_t m_flowIdA; ///< flow ID A
uint32_t m_flowIdB; ///< flow ID B
struct Input m_input; ///< input
struct Output m_output; ///< output
};
void