diff --git a/src/helper/nqos-wifi-mac-helper.h b/src/helper/nqos-wifi-mac-helper.h index 14446e647..431ed6c2d 100644 --- a/src/helper/nqos-wifi-mac-helper.h +++ b/src/helper/nqos-wifi-mac-helper.h @@ -31,7 +31,17 @@ namespace ns3 { class NqosWifiMacHelper : public WifiMacHelper { public: + /** + * Create a NqosWifiMacHelper to make life easier for people who want to + * work with non-QOS Wifi MAC layers. + */ NqosWifiMacHelper (); + + /** + * \internal + * Destroy a NqosWifiMacHelper. + */ + virtual ~NqosWifiMacHelper (); /** * Create a mac helper in a default working state. @@ -71,6 +81,7 @@ public: std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); private: /** + * \internal * \returns a newly-created MAC object. * * This method implements the pure virtual method defined in \ref ns3::WifiMacHelper. diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index 4baedd199..18bbf807c 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -36,9 +36,20 @@ namespace ns3 { class OlsrHelper : public Ipv4RoutingHelper { public: - OlsrHelper (); - OlsrHelper (const OlsrHelper &); /** + * Create an OlsrHelper that makes life easier for people who want to install + * OLSR routing to nodes. + */ + OlsrHelper (); + + /** + * \brief Construct an OlsrHelper from another previously initialized instance + * (Copy Constructor). + */ + OlsrHelper (const OlsrHelper &); + + /** + * \internal * \returns pointer to clone of this OlsrHelper * * This method is mainly for internal use by the other helpers; @@ -62,6 +73,11 @@ public: */ void Set (std::string name, const AttributeValue &value); private: + /** + * \internal + * \brief Assignment operator declared private and not implemented to disallow + * assignment and prevent the compiler from happily inserting its own. + */ OlsrHelper &operator = (const OlsrHelper &o); ObjectFactory m_agentFactory; }; diff --git a/src/helper/on-off-helper.h b/src/helper/on-off-helper.h index 087c30777..7914ef090 100644 --- a/src/helper/on-off-helper.h +++ b/src/helper/on-off-helper.h @@ -32,12 +32,15 @@ namespace ns3 { /** - * \brief instanciate an ns3::OnOffApplication on a set of nodes. + * \brief A helper to make it easier to instantiate an ns3::OnOffApplication + * on a set of nodes. */ class OnOffHelper { public: /** + * Create an OnOffHelper to make it easier to work with OnOffApplications + * * \param protocol the name of the protocol to use to send traffic * by the applications. This string identifies the socket * factory type used to create sockets for the applications. @@ -48,6 +51,8 @@ public: OnOffHelper (std::string protocol, Address address); /** + * Helper function used to set the underlying application attributes. + * * \param name the name of the application attribute to set * \param value the value of the application attribute to set */ @@ -83,6 +88,7 @@ public: private: /** + * \internal * Install an ns3::OnOffApplication on the node configured with all the * attributes set with SetAttribute. * diff --git a/src/helper/packet-sink-helper.h b/src/helper/packet-sink-helper.h index 8dfc434b2..ed6006cb9 100644 --- a/src/helper/packet-sink-helper.h +++ b/src/helper/packet-sink-helper.h @@ -27,11 +27,31 @@ namespace ns3 { +/** + * \brief A helper to make it easier to instantiate an ns3::PacketSinkApplication + * on a set of nodes. + */ class PacketSinkHelper { public: + /** + * Create a PacketSinkHelper to make it easier to work with PacketSinkApplications + * + * \param protocol the name of the protocol to use to receive traffic + * This string identifies the socket factory type used to create + * sockets for the applications. A typical value would be + * ns3::TcpSocketFactory. + * \param address the address of the sink, + * + */ PacketSinkHelper (std::string protocol, Address address); + /** + * Helper function used to set the underlying application attributes. + * + * \param name the name of the application attribute to set + * \param value the value of the application attribute to set + */ void SetAttribute (std::string name, const AttributeValue &value); /** @@ -50,6 +70,7 @@ public: * \param node The node on which a PacketSinkApplication will be installed. */ ApplicationContainer Install (Ptr node) const; + /** * Install an ns3::PacketSinkApplication on each node of the input container * configured with all the attributes set with SetAttribute. @@ -59,6 +80,9 @@ public: ApplicationContainer Install (std::string nodeName) const; private: + /** + * \internal + */ Ptr InstallPriv (Ptr node) const; ObjectFactory m_factory; }; diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index 4edfa5499..5b1c6d884 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -35,15 +35,22 @@ class PcapWriter; class AsciiWriter; /** - * \brief build a set of PointToPointNetDevice objects + * \brief Build a set of PointToPointNetDevice objects */ class PointToPointHelper { public: - // by default, create queues of type DropTailQueue. + /** + * Create a PointToPointHelper to make life easier when creating point to + * point networks. + */ PointToPointHelper (); /** + * Each point to point net device must have a queue to pass packets through. + * This method allows one to set the type of the queue that is automatically + * created when the device is created and attached to a node. + * * \param type the type of queue * \param n1 the name of the attribute to set on the queue * \param v1 the value of the attribute to set on the queue @@ -64,6 +71,9 @@ public: std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ()); /** + * Set an attribute value to be propagated to each NetDevice created by the + * helper. + * * \param name the name of the attribute to set * \param value the value of the attribute to set * @@ -71,7 +81,11 @@ public: * by PointToPointHelper::Install */ void SetDeviceAttribute (std::string name, const AttributeValue &value); + /** + * Set an attribute value to be propagated to each Channel created by the + * helper. + * * \param name the name of the attribute to set * \param value the value of the attribute to set * @@ -297,7 +311,6 @@ private: ObjectFactory m_deviceFactory; }; - } // namespace ns3 #endif /* POINT_TO_POINT_HELPER_H */ diff --git a/src/helper/qos-wifi-mac-helper.h b/src/helper/qos-wifi-mac-helper.h index f0bb26e30..041288ea2 100644 --- a/src/helper/qos-wifi-mac-helper.h +++ b/src/helper/qos-wifi-mac-helper.h @@ -34,13 +34,26 @@ namespace ns3 { class QosWifiMacHelper : public WifiMacHelper { public: + /** + * Create a QosWifiMacHelper that is used to make life easier when working + * with Wifi devices using a QOS MAC layer. + */ QosWifiMacHelper (); + + /** + * \internal + * Destroy a QosWifiMacHelper + */ virtual ~QosWifiMacHelper (); + /** * Create a mac helper in a default working state. */ static QosWifiMacHelper Default (void); + /** + * Set the underlying type of the MAC and its attributes. + * * \param type the type of ns3::WifiMac to create. * \param n0 the name of the attribute to set * \param v0 the value of the attribute to set @@ -72,6 +85,8 @@ public: std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** + * Set the class, type and attribuytes for the Msdu agregator + * * \param accessClass access class for which we are setting aggregator. Possibilities * are: AC_BK, AC_BE, AC_VI, AC_VO. * \param type the type of ns3::WifiMac to create. @@ -94,6 +109,7 @@ public: std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue ()); private: /** + * \internal * \returns a newly-created MAC object. * * This method implements the pure virtual method defined in \ref ns3::WifiMacHelper. diff --git a/src/helper/tap-bridge-helper.h b/src/helper/tap-bridge-helper.h index 0ac7460a7..da9a67ec1 100644 --- a/src/helper/tap-bridge-helper.h +++ b/src/helper/tap-bridge-helper.h @@ -29,17 +29,102 @@ namespace ns3 { class Node; class AttributeValue; +/** + * \brief build TapBridge to allow ns-3 simulations to interact with Linux + * tap devices and processes on the Linux host. + */ class TapBridgeHelper { public: + /** + * Construct a TapBridgeHelper to make life easier for people wanting to + * have their simulations interact with Linux tap devices and processes + * on the Linux host. + */ TapBridgeHelper (); + + /** + * Construct a TapBridgeHelper to make life easier for people wanting to + * have their simulations interact with Linux tap devices and processes + * on the Linux host. + * + * \param gateway An Ipv4Address to be used as the default gateway for + * the created bridges, + */ TapBridgeHelper (Ipv4Address gateway); + + /* + * Set an attribute in the underlying TabBridge net device when these + * devices are automatically created. + * + * \param n1 the name of the attribute to set + * \param v1 the value of the attribute to set + */ void SetAttribute (std::string n1, const AttributeValue &v1); + + /** + * This method installs a TapBridge on the specified Node and forms the + * bridge with the NetDevice specified. The Node is specified using + * a Ptr and the NetDevice is specified using a Ptr + * + * \param node The Ptr to install the TapBridge in + * \param nd The Ptr to attach to the bridge. + * \returns A pointer to the new TapBridge NetDevice. + */ Ptr Install (Ptr node, Ptr nd); + + /** + * This method installs a TapBridge on the specified Node and forms the + * bridge with the NetDevice specified. The node is specified by a + * name string that has previously been assoicated with the Node using + * the Object Name Service. The NetDevice is specified by a Ptr. + * + * \param nodeName The name of the Node to install the TapBridge in + * \param nd The Ptr to attach to the bridge. + * \returns A pointer to the new TapBridge NetDevice. + */ Ptr Install (std::string nodeName, Ptr nd); + + /** + * This method installs a TapBridge on the specified Node and forms the + * bridge with the NetDevice specified. The NetDevice is specified by a + * name string that has previously been assoicated with the NetDevice + * using the Object Name Service. + * + * \param node The Ptr to install the TapBridge in + * \param ndName The name of the NetDevice to attach to the bridge. + * \returns A pointer to the new TapBridge NetDevice. + */ Ptr Install (Ptr node, std::string ndName); + + /** + * This method installs a TapBridge on the specified Node and forms the + * bridge with the NetDevice specified. The node is specified by a + * name string that has previously been assoicated with the Node using + * the Object Name Service. The NetDevice is specified by a name + * string that has prevously been associated with the Object Name + * Service. + * + * \param nodeName The name of the Node to install the TapBridge in + * \param ndName The name of the NetDevice to attach to the bridge. + * \returns A pointer to the new TapBridge NetDevice. + */ Ptr Install (std::string nodeName, std::string ndName); - Ptr Install (Ptr node, Ptr nd, const AttributeValue &v1); + + /** + * This method installs a TapBridge on the specified Node and forms the + * bridge with the NetDevice specified. The Node is specified using + * a Ptr and the NetDevice is specified using a Ptr. + * The type of the actual Bridge device is specified with the + * provided AttributeValue (typically "ns3::TapBridge"). + * + * \param node The Ptr to install the TapBridge in + * \param nd The Ptr to attach to the bridge. + * \param bridgeType The TypeId of the bridge that will be automatically + * created. + * \returns A pointer to the new TapBridge NetDevice. + */ + Ptr Install (Ptr node, Ptr nd, const AttributeValue &bridgeType); private: ObjectFactory m_deviceFactory; }; diff --git a/src/helper/udp-echo-helper.h b/src/helper/udp-echo-helper.h index c4b4e24e3..c554359f4 100644 --- a/src/helper/udp-echo-helper.h +++ b/src/helper/udp-echo-helper.h @@ -29,51 +29,65 @@ namespace ns3 { /** - * \brief create a server application which waits for input udp packets + * \brief Create a server application which waits for input udp packets * and sends them back to the original sender. */ class UdpEchoServerHelper { public: /** - * \param port the port the server will wait on for incoming packets + * Create UdpEchoServerHelper which will make life easier for people trying + * to set up simulations with echos. + * + * \param port The port the server will wait on for incoming packets */ UdpEchoServerHelper (uint16_t port); /** + * Record an attribute to be set in each Application after it is is created. + * * \param name the name of the attribute to set * \param value the value of the attribute to set - * - * Record an attribute to be set after the server application is created. */ void SetAttribute (std::string name, const AttributeValue &value); /** - * \param node the node + * Create a UdpEchoServerApplication on the specified Node. * - * Create a udp echo server application on the input node + * \param node The node on which to create the Application. The node is + * specified by a Ptr. * - * \returns the application created + * \returns An ApplicationContainer holding the Application created, */ ApplicationContainer Install (Ptr node) const; + /** - * \param nodeName the node + * Create a UdpEchoServerApplication on specified node * - * Create a udp echo server application on the input node + * \param nodeName The node on which to create the application. The node + * is specified by a node name previously registered with + * the Object Name Service. * - * \returns the application created + * \returns An ApplicationContainer holding the Application created. */ ApplicationContainer Install (std::string nodeName) const; + /** - * \param c the nodes + * \param c The nodes on which to create the Applications. The nodes + * are specified by a NodeContainer. * - * Create one udp echo server application on each of the input nodes + * Create one udp echo server application on each of the Nodes in the + * NodeContainer. * - * \returns the applications created, one application per input node. + * \returns The applications created, one Application per Node in the + * NodeContainer. */ ApplicationContainer Install (NodeContainer c) const; private: + /** + * \internal + */ Ptr InstallPriv (Ptr node) const; ObjectFactory m_factory; @@ -86,16 +100,19 @@ class UdpEchoClientHelper { public: /** - * \param ip ip address of the remote udp echo server - * \param port port number of the remote udp echo server + * Create UdpEchoClientHelper which will make life easier for people trying + * to set up simulations with echos. + * + * \param ip The IP address of the remote udp echo server + * \param port The port number of the remote udp echo server */ UdpEchoClientHelper (Ipv4Address ip, uint16_t port); /** + * Record an attribute to be set in each Application after it is is created. + * * \param name the name of the attribute to set * \param value the value of the attribute to set - * - * Record an attribute to be set after the client application is created. */ void SetAttribute (std::string name, const AttributeValue &value); @@ -151,21 +168,28 @@ public: void SetFill (Ptr app, uint8_t *fill, uint32_t fillLength, uint32_t dataLength); /** - * \param node the node + * Create a udp echo client application on the specified node. The Node + * is provided as a Ptr. * - * Create a udp echo client application on the input node + * \param node The Ptr on which to create the UdpEchoClientApplication. * - * \returns the application created + * \returns An ApplicationContainer that holds a Ptr to the + * application created */ ApplicationContainer Install (Ptr node) const; + /** - * \param nodeName the node + * Create a udp echo client application on the specified node. The Node + * is provided as a string name of a Node that has been previously + * associated using the Object Name Service. * - * Create a udp echo client application on the input node + * \param node The name of the node on which to create the UdpEchoClientApplication * - * \returns the application created + * \returns An ApplicationContainer that holds a Ptr to the + * application created */ ApplicationContainer Install (std::string nodeName) const; + /** * \param c the nodes * diff --git a/src/helper/v4ping-helper.h b/src/helper/v4ping-helper.h index 449bd2821..1e2f5617e 100644 --- a/src/helper/v4ping-helper.h +++ b/src/helper/v4ping-helper.h @@ -17,33 +17,48 @@ class V4PingHelper { public: /** - * \param remote the address which should be pinged + * Create a V4PingHelper which is used to make life easier for people wanting + * to use ping Applications. + * + * \param remote The address which should be pinged */ V4PingHelper (Ipv4Address remote); /** - * \param nodes the list of nodes. + * Install a pinger application on each Node in the provided NodeContainer. * - * Install a pinger application on each node in the input list of nodes. - * \returns a list of pinger applications, one for each input node + * \param nodes The NodeContainer containing all of the nodes to get a V4Ping + * application. + * + * \returns A list of pinger applications, one for each input node */ ApplicationContainer Install (NodeContainer nodes) const; + /** - * \param node the node + * Install a pinger application on the provided Node. The Node is specified + * directly by a Ptr * - * Install a pinger application on the input node - * \returns the pinger application created. + * \param node The node to install the V4PingApplication on. + * + * \returns An ApplicationContainer holding the pinger application created. */ ApplicationContainer Install (Ptr node) const; + /** - * \param nodeName the node + * Install a pinger application on the provided Node. The Node is specified + * by a string that must have previosly been associated with a Node using the + * Object Name Service. * - * Install a pinger application on the input node - * \returns the pinger application created. + * \param nodeName The node to install the V4PingApplication on. + * + * \returns An ApplicationContainer holding the pinger application created. */ ApplicationContainer Install (std::string nodeName) const; private: + /** + * \internal + */ Ptr InstallPriv (Ptr node) const; ObjectFactory m_factory; };