datarate, packet, defaultvalue, object dox
parent
9d2216d84f
commit
6c93b818af
|
@ -61,7 +61,7 @@ class DataRate
|
||||||
* numerical portion, followed by units in the following format:
|
* numerical portion, followed by units in the following format:
|
||||||
* - Prefix: nothing, "k", "M", "G"
|
* - Prefix: nothing, "k", "M", "G"
|
||||||
* - Data Unit: "b, "B"
|
* - Data Unit: "b, "B"
|
||||||
* - Time Suffix: "ps", "/s"
|
* - Time Suffix: "ps", "/s" \n
|
||||||
* The prefixes are SI powers of 10 (10^0,10^3,10^6,10^9 respectively).\n
|
* The prefixes are SI powers of 10 (10^0,10^3,10^6,10^9 respectively).\n
|
||||||
* The units are the bit, and the (8-bit) byte respectively.\n
|
* The units are the bit, and the (8-bit) byte respectively.\n
|
||||||
* Both time suffixes denote "per second". Some supported examples include
|
* Both time suffixes denote "per second". Some supported examples include
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace ns3 {
|
||||||
*
|
*
|
||||||
* Implementing a new type of Header for a new protocol is pretty easy
|
* Implementing a new type of Header for a new protocol is pretty easy
|
||||||
* and is a matter of creating a subclass of the ns3::Header base class,
|
* and is a matter of creating a subclass of the ns3::Header base class,
|
||||||
* and implementing the 4 pure virtual methods defined in ns3::Header.
|
* and implementing the 4 pure virtual methods defined in ns3::Chunk.
|
||||||
* Sample code which shows how to create such a new Header, how to use
|
* Sample code which shows how to create such a new Header, how to use
|
||||||
* it, and how to manipulate tags is shown below:
|
* it, and how to manipulate tags is shown below:
|
||||||
* \include samples/main-packet.cc
|
* \include samples/main-packet.cc
|
||||||
|
|
|
@ -199,10 +199,26 @@ private:
|
||||||
class StringEnumDefaultValue : public DefaultValueBase
|
class StringEnumDefaultValue : public DefaultValueBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* \param name The name of the variable
|
||||||
|
* \param help The help string
|
||||||
|
*/
|
||||||
StringEnumDefaultValue (const std::string &name,
|
StringEnumDefaultValue (const std::string &name,
|
||||||
const std::string &help);
|
const std::string &help);
|
||||||
|
/**
|
||||||
|
* \brief Add a default value to this enumeration of strings
|
||||||
|
* \param value The string to make the default for this
|
||||||
|
*/
|
||||||
void AddDefaultValue (const std::string &value);
|
void AddDefaultValue (const std::string &value);
|
||||||
|
/**
|
||||||
|
* \brief Add a possible value to accept for this default value
|
||||||
|
*/
|
||||||
void AddPossibleValue (const std::string &value);
|
void AddPossibleValue (const std::string &value);
|
||||||
|
/**
|
||||||
|
* \brief Get the value of this default value.
|
||||||
|
* \return The string that has been assigned to this default value, either by
|
||||||
|
* Bind() or by a command line setting
|
||||||
|
*/
|
||||||
std::string GetValue (void) const;
|
std::string GetValue (void) const;
|
||||||
private:
|
private:
|
||||||
virtual bool DoParseValue (const std::string &value);
|
virtual bool DoParseValue (const std::string &value);
|
||||||
|
|
|
@ -25,13 +25,34 @@
|
||||||
|
|
||||||
namespace ns3 {
|
namespace ns3 {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Base class that supports reference counting for memory management
|
||||||
|
*
|
||||||
|
* Many objects in the system derive from this class in order to use its
|
||||||
|
* reference counting implementation.
|
||||||
|
*/
|
||||||
class Object
|
class Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* \brief Constructor
|
||||||
|
*
|
||||||
|
* Creates an object with a single reference count
|
||||||
|
*/
|
||||||
Object ();
|
Object ();
|
||||||
virtual ~Object ();
|
virtual ~Object ();
|
||||||
|
/**
|
||||||
|
* \brief Increments the reference count of this object
|
||||||
|
*/
|
||||||
void Ref (void) const;
|
void Ref (void) const;
|
||||||
|
/**
|
||||||
|
* \brief Decrements the reference count of this object
|
||||||
|
*/
|
||||||
void Unref (void) const;
|
void Unref (void) const;
|
||||||
|
/**
|
||||||
|
* \return true if there is only a single reference to this object anywhere
|
||||||
|
* in the system; false otherwise.
|
||||||
|
*/
|
||||||
bool IsSingle (void) const;
|
bool IsSingle (void) const;
|
||||||
void Dispose (void);
|
void Dispose (void);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -57,17 +57,42 @@ public:
|
||||||
// bring myself to just type 2 in the code (even though I type 0 and 1 :-).
|
// bring myself to just type 2 in the code (even though I type 0 and 1 :-).
|
||||||
//
|
//
|
||||||
static const int N_DEVICES = 2;
|
static const int N_DEVICES = 2;
|
||||||
|
/**
|
||||||
|
* \brief Create a PointToPointChannel
|
||||||
|
*
|
||||||
|
* By default, you get a channel with the name "PointToPoint Channel" that
|
||||||
|
* has an "infitely" fast transmission speed and zero delay.
|
||||||
|
*/
|
||||||
PointToPointChannel ();
|
PointToPointChannel ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Create a PointToPointChannel
|
||||||
|
*
|
||||||
|
* \param bps The bitrate of the channel
|
||||||
|
* \param delay Transmission delay through the channel
|
||||||
|
*/
|
||||||
PointToPointChannel (const DataRate& bps, const Time& delay);
|
PointToPointChannel (const DataRate& bps, const Time& delay);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Create a PointToPointChannel
|
||||||
|
*
|
||||||
|
* \param name the name of the channel for identification purposes
|
||||||
|
* \param bps The bitrate of the channel
|
||||||
|
* \param delay Transmission delay through the channel
|
||||||
|
*/
|
||||||
PointToPointChannel (const std::string& name,
|
PointToPointChannel (const std::string& name,
|
||||||
const DataRate& bps, const Time& delay);
|
const DataRate& bps, const Time& delay);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Attach a given netdevice to this channel
|
||||||
|
* \param device pointer to the netdevice to attach to the channel
|
||||||
|
*/
|
||||||
void Attach (Ptr<PointToPointNetDevice> device);
|
void Attach (Ptr<PointToPointNetDevice> device);
|
||||||
bool TransmitStart (Packet& p, Ptr<PointToPointNetDevice> src);
|
bool TransmitStart (Packet& p, Ptr<PointToPointNetDevice> src);
|
||||||
bool TransmitEnd (Packet &p, Ptr<PointToPointNetDevice> src);
|
bool TransmitEnd (Packet &p, Ptr<PointToPointNetDevice> src);
|
||||||
void PropagationCompleteEvent(Packet p, Ptr<PointToPointNetDevice> src);
|
void PropagationCompleteEvent(Packet p, Ptr<PointToPointNetDevice> src);
|
||||||
|
|
||||||
|
|
||||||
virtual uint32_t GetNDevices (void) const;
|
virtual uint32_t GetNDevices (void) const;
|
||||||
virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
|
virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue