branch merge
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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> 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<Application> InstallPriv (Ptr<Node> node) const;
|
||||
ObjectFactory m_factory;
|
||||
};
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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<Node> and the NetDevice is specified using a Ptr<NetDevice>
|
||||
*
|
||||
* \param node The Ptr<Node> to install the TapBridge in
|
||||
* \param nd The Ptr<NetDevice> to attach to the bridge.
|
||||
* \returns A pointer to the new TapBridge NetDevice.
|
||||
*/
|
||||
Ptr<NetDevice> Install (Ptr<Node> node, Ptr<NetDevice> 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<NetDevice>.
|
||||
*
|
||||
* \param nodeName The name of the Node to install the TapBridge in
|
||||
* \param nd The Ptr<NetDevice> to attach to the bridge.
|
||||
* \returns A pointer to the new TapBridge NetDevice.
|
||||
*/
|
||||
Ptr<NetDevice> Install (std::string nodeName, Ptr<NetDevice> 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<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<NetDevice> Install (Ptr<Node> 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<NetDevice> Install (std::string nodeName, std::string ndName);
|
||||
Ptr<NetDevice> Install (Ptr<Node> node, Ptr<NetDevice> 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<Node> and the NetDevice is specified using a Ptr<NetDevice>.
|
||||
* The type of the actual Bridge device is specified with the
|
||||
* provided AttributeValue (typically "ns3::TapBridge").
|
||||
*
|
||||
* \param node The Ptr<Node> to install the TapBridge in
|
||||
* \param nd The Ptr<NetDevice> 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<NetDevice> Install (Ptr<Node> node, Ptr<NetDevice> nd, const AttributeValue &bridgeType);
|
||||
private:
|
||||
ObjectFactory m_deviceFactory;
|
||||
};
|
||||
|
||||
@@ -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<Node>.
|
||||
*
|
||||
* \returns the application created
|
||||
* \returns An ApplicationContainer holding the Application created,
|
||||
*/
|
||||
ApplicationContainer Install (Ptr<Node> 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<Application> InstallPriv (Ptr<Node> 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<Application> 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<Node>.
|
||||
*
|
||||
* Create a udp echo client application on the input node
|
||||
* \param node The Ptr<Node> on which to create the UdpEchoClientApplication.
|
||||
*
|
||||
* \returns the application created
|
||||
* \returns An ApplicationContainer that holds a Ptr<Application> to the
|
||||
* application created
|
||||
*/
|
||||
ApplicationContainer Install (Ptr<Node> 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<Application> to the
|
||||
* application created
|
||||
*/
|
||||
ApplicationContainer Install (std::string nodeName) const;
|
||||
|
||||
/**
|
||||
* \param c the nodes
|
||||
*
|
||||
|
||||
@@ -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<Node>
|
||||
*
|
||||
* 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> 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<Application> InstallPriv (Ptr<Node> node) const;
|
||||
ObjectFactory m_factory;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user