src/helper/csma-helper.h
changeset 6273 8d70de29d514
parent 6096 96deefc231fa
equal deleted inserted replaced
6272:f52c6e3cae70 6273:8d70de29d514
    95    * CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes
    95    * CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes
    96    * configured by CsmaHelper::SetDeviceAttribute and then adds the device
    96    * configured by CsmaHelper::SetDeviceAttribute and then adds the device
    97    * to the node and attaches the channel to the device.
    97    * to the node and attaches the channel to the device.
    98    *
    98    *
    99    * \param node The node to install the device in
    99    * \param node The node to install the device in
   100    * \returns A containter holding the added net device.
   100    * \returns A container holding the added net device.
   101    */
   101    */
   102   NetDeviceContainer Install (Ptr<Node> node) const;
   102   NetDeviceContainer Install (Ptr<Node> node) const;
   103 
   103 
   104   /**
   104   /**
   105    * This method creates an ns3::CsmaChannel with the attributes configured by
   105    * This method creates an ns3::CsmaChannel with the attributes configured by
   106    * CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes
   106    * CsmaHelper::SetChannelAttribute, an ns3::CsmaNetDevice with the attributes
   107    * configured by CsmaHelper::SetDeviceAttribute and then adds the device
   107    * configured by CsmaHelper::SetDeviceAttribute and then adds the device
   108    * to the node and attaches the channel to the device.
   108    * to the node and attaches the channel to the device.
   109    *
   109    *
   110    * \param name The name of the node to install the device in
   110    * \param name The name of the node to install the device in
   111    * \returns A containter holding the added net device.
   111    * \returns A container holding the added net device.
   112    */
   112    */
   113   NetDeviceContainer Install (std::string name) const;
   113   NetDeviceContainer Install (std::string name) const;
   114 
   114 
   115   /**
   115   /**
   116    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   116    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   117    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   117    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   118    * attaches the provided channel to the device.
   118    * attaches the provided channel to the device.
   119    *
   119    *
   120    * \param node The node to install the device in
   120    * \param node The node to install the device in
   121    * \param channel The channel to attach to the device.
   121    * \param channel The channel to attach to the device.
   122    * \returns A containter holding the added net device.
   122    * \returns A container holding the added net device.
   123    */
   123    */
   124   NetDeviceContainer Install (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
   124   NetDeviceContainer Install (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
   125 
   125 
   126   /**
   126   /**
   127    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   127    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   128    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   128    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   129    * attaches the provided channel to the device.
   129    * attaches the provided channel to the device.
   130    *
   130    *
   131    * \param node The node to install the device in
   131    * \param node The node to install the device in
   132    * \param channelName The name of the channel to attach to the device.
   132    * \param channelName The name of the channel to attach to the device.
   133    * \returns A containter holding the added net device.
   133    * \returns A container holding the added net device.
   134    */
   134    */
   135   NetDeviceContainer Install (Ptr<Node> node, std::string channelName) const;
   135   NetDeviceContainer Install (Ptr<Node> node, std::string channelName) const;
   136 
   136 
   137   /**
   137   /**
   138    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   138    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   139    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   139    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   140    * attaches the provided channel to the device.
   140    * attaches the provided channel to the device.
   141    *
   141    *
   142    * \param nodeName The name of the node to install the device in
   142    * \param nodeName The name of the node to install the device in
   143    * \param channel The chanel to attach to the device.
   143    * \param channel The channel to attach to the device.
   144    * \returns A containter holding the added net device.
   144    * \returns A container holding the added net device.
   145    */
   145    */
   146   NetDeviceContainer Install (std::string nodeName, Ptr<CsmaChannel> channel) const;
   146   NetDeviceContainer Install (std::string nodeName, Ptr<CsmaChannel> channel) const;
   147 
   147 
   148   /**
   148   /**
   149    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   149    * This method creates an ns3::CsmaNetDevice with the attributes configured by
   150    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   150    * CsmaHelper::SetDeviceAttribute and then adds the device to the node and 
   151    * attaches the provided channel to the device.
   151    * attaches the provided channel to the device.
   152    *
   152    *
   153    * \param nodeName The name of the node to install the device in
   153    * \param nodeName The name of the node to install the device in
   154    * \param channelName The name of the chanel to attach to the device.
   154    * \param channelName The name of the channel to attach to the device.
   155    * \returns A containter holding the added net device.
   155    * \returns A container holding the added net device.
   156    */
   156    */
   157   NetDeviceContainer Install (std::string nodeName, std::string channelName) const;
   157   NetDeviceContainer Install (std::string nodeName, std::string channelName) const;
   158 
   158 
   159   /**
   159   /**
   160    * This method creates an ns3::CsmaChannel with the attributes configured by
   160    * This method creates an ns3::CsmaChannel with the attributes configured by
   162    * container: it creates an ns3::CsmaNetDevice (with the attributes 
   162    * container: it creates an ns3::CsmaNetDevice (with the attributes 
   163    * configured by CsmaHelper::SetDeviceAttribute); adds the device to the 
   163    * configured by CsmaHelper::SetDeviceAttribute); adds the device to the 
   164    * node; and attaches the channel to the device.
   164    * node; and attaches the channel to the device.
   165    *
   165    *
   166    * \param c The NodeContainer holding the nodes to be changed.
   166    * \param c The NodeContainer holding the nodes to be changed.
   167    * \returns A containter holding the added net devices.
   167    * \returns A container holding the added net devices.
   168    */
   168    */
   169   NetDeviceContainer Install (const NodeContainer &c) const;
   169   NetDeviceContainer Install (const NodeContainer &c) const;
   170 
   170 
   171   /**
   171   /**
   172    * For each Ptr<node> in the provided container, this method creates an 
   172    * For each Ptr<node> in the provided container, this method creates an 
   174    * CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches 
   174    * CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches 
   175    * the provided channel to the device.
   175    * the provided channel to the device.
   176    *
   176    *
   177    * \param c The NodeContainer holding the nodes to be changed.
   177    * \param c The NodeContainer holding the nodes to be changed.
   178    * \param channel The channel to attach to the devices.
   178    * \param channel The channel to attach to the devices.
   179    * \returns A containter holding the added net devices.
   179    * \returns A container holding the added net devices.
   180    */
   180    */
   181   NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel) const;
   181   NetDeviceContainer Install (const NodeContainer &c, Ptr<CsmaChannel> channel) const;
   182 
   182 
   183   /**
   183   /**
   184    * For each Ptr<node> in the provided container, this method creates an 
   184    * For each Ptr<node> in the provided container, this method creates an 
   186    * CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches 
   186    * CsmaHelper::SetDeviceAttribute); adds the device to the node; and attaches 
   187    * the provided channel to the device.
   187    * the provided channel to the device.
   188    *
   188    *
   189    * \param c The NodeContainer holding the nodes to be changed.
   189    * \param c The NodeContainer holding the nodes to be changed.
   190    * \param channelName The name of the channel to attach to the devices.
   190    * \param channelName The name of the channel to attach to the devices.
   191    * \returns A containter holding the added net devices.
   191    * \returns A container holding the added net devices.
   192    */
   192    */
   193   NetDeviceContainer Install (const NodeContainer &c, std::string channelName) const;
   193   NetDeviceContainer Install (const NodeContainer &c, std::string channelName) const;
   194 
   194 
   195 private:
   195 private:
   196   /*
   196   /*