src/node/application.h
changeset 607 1b7abeccfcda
parent 604 0b6bef4e99bc
child 728 95c426b1cb60
equal deleted inserted replaced
606:d9e3640ee24b 607:1b7abeccfcda
    27 #include "ns3/ptr.h"
    27 #include "ns3/ptr.h"
    28 #include "ns3/i-node.h"
    28 #include "ns3/i-node.h"
    29 
    29 
    30 namespace ns3 {
    30 namespace ns3 {
    31 
    31 
    32 class Node;
    32 class INode;
    33 class RandomVariable;
    33 class RandomVariable;
    34 
    34 
    35 /**
    35 /**
    36  * \brief The base class for all ns3 applicationes
    36  * \brief The base class for all ns3 applicationes
    37  * 
    37  * 
    50  * in more detail Socket class in socket.h.
    50  * in more detail Socket class in socket.h.
    51  */
    51  */
    52 class Application : public Object
    52 class Application : public Object
    53 {
    53 {
    54 public:
    54 public:
    55   Application(Ptr<Node>);
    55   Application(Ptr<INode>);
    56   virtual ~Application();
    56   virtual ~Application();
    57   
    57   
    58   /**
    58   /**
    59    * \brief Specify application start time
    59    * \brief Specify application start time
    60    * \param startTime Start time for this application, absolute time,
    60    * \param startTime Start time for this application, absolute time,
    96    *        relative to the start of the simulation.
    96    *        relative to the start of the simulation.
    97    */
    97    */
    98   void Stop(const RandomVariable& stopVariable);
    98   void Stop(const RandomVariable& stopVariable);
    99 
    99 
   100   /**
   100   /**
   101    * \returns the Node to which this Application object is attached.
   101    * \returns the INode to which this Application object is attached.
   102    */
   102    */
   103   Ptr<Node> GetNode() const;
   103   Ptr<INode> GetINode() const;
   104   
   104   
   105 private:
   105 private:
   106   /**
   106   /**
   107    * \brief Application specific startup code
   107    * \brief Application specific startup code
   108    *
   108    *
   126   void ScheduleStart (const Time &time);
   126   void ScheduleStart (const Time &time);
   127   void ScheduleStop (const Time &time);
   127   void ScheduleStop (const Time &time);
   128 
   128 
   129   EventId         m_startEvent;
   129   EventId         m_startEvent;
   130   EventId         m_stopEvent;
   130   EventId         m_stopEvent;
   131   Ptr<Node>       m_node;
   131   Ptr<INode>       m_node;
   132 };
   132 };
   133 
   133 
   134 } //namespace ns3
   134 } //namespace ns3
   135 #endif
   135 #endif