[Doxygen] csma module
This commit is contained in:
@@ -34,6 +34,7 @@ namespace ns3 {
|
||||
class Packet;
|
||||
|
||||
/**
|
||||
* \ingroup csma
|
||||
* \brief build a set of CsmaNetDevice objects
|
||||
*
|
||||
* Normally we eschew multiple inheritance, however, the classes
|
||||
@@ -206,6 +207,15 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* This method creates an ns3::CsmaNetDevice with the attributes configured by
|
||||
* CsmaHelper::SetDeviceAttribute and then adds the device to the node and
|
||||
* attaches the provided channel to the device.
|
||||
*
|
||||
* \param node The node to install the device in
|
||||
* \param channel The channel to attach to the device.
|
||||
* \returns A container holding the added net device.
|
||||
*/
|
||||
Ptr<NetDevice> InstallPriv (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
|
||||
|
||||
/**
|
||||
@@ -237,9 +247,9 @@ private:
|
||||
Ptr<NetDevice> nd,
|
||||
bool explicitFilename);
|
||||
|
||||
ObjectFactory m_queueFactory;
|
||||
ObjectFactory m_deviceFactory;
|
||||
ObjectFactory m_channelFactory;
|
||||
ObjectFactory m_queueFactory; //!< factory for the queues
|
||||
ObjectFactory m_deviceFactory; //!< factory for the NetDevices
|
||||
ObjectFactory m_channelFactory; //!< factory for the channel
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -29,9 +29,9 @@ Transmi */
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup csma
|
||||
* \brief The backoff class is used for calculating backoff times
|
||||
* when many net devices can write to the same channel
|
||||
*
|
||||
*/
|
||||
|
||||
class Backoff {
|
||||
@@ -62,6 +62,14 @@ public:
|
||||
Time m_slotTime;
|
||||
|
||||
Backoff (void);
|
||||
/**
|
||||
* \brief Constructor
|
||||
* \param slotTime Length of one slot
|
||||
* \param minSlots Minimum number of backoff slots
|
||||
* \param maxSlots Maximum number of backoff slots
|
||||
* \param ceiling Cap to the exponential function
|
||||
* \param maxRetries Maximum number of transmission retries
|
||||
*/
|
||||
Backoff (Time slotTime, uint32_t minSlots, uint32_t maxSlots, uint32_t ceiling, uint32_t maxRetries);
|
||||
|
||||
/**
|
||||
@@ -103,6 +111,10 @@ private:
|
||||
* Number of times that the transmitter has tried to unsuccessfully transmit the current packet.
|
||||
*/
|
||||
uint32_t m_numBackoffRetries;
|
||||
|
||||
/**
|
||||
* Random number generator
|
||||
*/
|
||||
Ptr<UniformRandomVariable> m_rng;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class Packet;
|
||||
class CsmaNetDevice;
|
||||
|
||||
/**
|
||||
* \ingroup csma
|
||||
* \brief CsmaNetDevice Record
|
||||
*
|
||||
* Stores the information related to each net device that is
|
||||
@@ -40,12 +41,24 @@ class CsmaNetDevice;
|
||||
*/
|
||||
class CsmaDeviceRec {
|
||||
public:
|
||||
Ptr< CsmaNetDevice > devicePtr; /// Pointer to the net device
|
||||
bool active; /// Is net device enabled to TX/RX
|
||||
Ptr< CsmaNetDevice > devicePtr; //!< Pointer to the net device
|
||||
bool active; //!< Is net device enabled to TX/RX
|
||||
|
||||
CsmaDeviceRec();
|
||||
|
||||
/**
|
||||
* \brief Constructor
|
||||
* Builds a record of the given NetDevice, its status is initialized to enabled.
|
||||
*
|
||||
* \param device the device to record
|
||||
*/
|
||||
CsmaDeviceRec(Ptr< CsmaNetDevice > device);
|
||||
CsmaDeviceRec (CsmaDeviceRec const &);
|
||||
|
||||
/**
|
||||
* Copy constructor
|
||||
* \param o the object to copy
|
||||
*/
|
||||
CsmaDeviceRec (CsmaDeviceRec const &o);
|
||||
|
||||
/**
|
||||
* \return If the net device pointed to by the devicePtr is active
|
||||
@@ -65,6 +78,7 @@ enum WireState
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup csma
|
||||
* \brief Csma Channel.
|
||||
*
|
||||
* This class represents a simple Csma channel that can be used
|
||||
@@ -76,6 +90,11 @@ enum WireState
|
||||
class CsmaChannel : public Channel
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
/**
|
||||
@@ -274,9 +293,20 @@ public:
|
||||
Time GetDelay (void);
|
||||
|
||||
private:
|
||||
// Avoid implicit copy constructor and assignment (python bindings issues)
|
||||
CsmaChannel (CsmaChannel const &);
|
||||
CsmaChannel &operator = (CsmaChannel const &);
|
||||
/**
|
||||
* Copy constructor is declared but not implemented. This disables the
|
||||
* copy constructor for CsmaChannel objects.
|
||||
* \param o object to copy
|
||||
*/
|
||||
CsmaChannel (CsmaChannel const &o);
|
||||
|
||||
/**
|
||||
* Operator = is declared but not implemented. This disables the assignment
|
||||
* operator for CsmaChannel objects.
|
||||
* \param o object to copy
|
||||
* \returns the copied object
|
||||
*/
|
||||
CsmaChannel &operator = (CsmaChannel const &o);
|
||||
|
||||
/**
|
||||
* The assigned data rate of the channel
|
||||
|
||||
@@ -58,6 +58,11 @@ class ErrorModel;
|
||||
class CsmaNetDevice : public NetDevice
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
|
||||
/**
|
||||
@@ -114,6 +119,7 @@ public:
|
||||
* \see SetDataRate ()
|
||||
* \see SetInterframeGap ()
|
||||
* \param ch a pointer to the channel to which this object is being attached.
|
||||
* \returns true if no error
|
||||
*/
|
||||
bool Attach (Ptr<CsmaChannel> ch);
|
||||
|
||||
@@ -356,6 +362,7 @@ private:
|
||||
* Operator = is declared but not implemented. This disables the assignment
|
||||
* operator for CsmaNetDevice objects.
|
||||
* \param o object to copy
|
||||
* \returns the copied object
|
||||
*/
|
||||
CsmaNetDevice &operator = (const CsmaNetDevice &o);
|
||||
|
||||
@@ -708,6 +715,9 @@ private:
|
||||
*/
|
||||
TracedCallback<> m_linkChangeCallbacks;
|
||||
|
||||
/**
|
||||
* Default Maximum Transmission Unit (MTU) for the CsmaNetDevice
|
||||
*/
|
||||
static const uint16_t DEFAULT_MTU = 1500;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user