View | Details | Raw Unified | Return to bug 2958
Collapse All | Expand All

(-)a/src/network/helper/application-container.cc (+9 lines)
 Lines 90-95   ApplicationContainer::Start (Time start) Link Here 
90
    }
90
    }
91
}
91
}
92
void 
92
void 
93
ApplicationContainer::StartWithJitter (Time start, Ptr<RandomVariableStream> rv)
94
{
95
  for (Iterator i = Begin (); i != End (); ++i)
96
    {
97
      Ptr<Application> app = *i;
98
      app->SetStartTime (start + Seconds (rv->GetValue ()));
99
    }
100
}
101
void 
93
ApplicationContainer::Stop (Time stop)
102
ApplicationContainer::Stop (Time stop)
94
{
103
{
95
  for (Iterator i = Begin (); i != End (); ++i)
104
  for (Iterator i = Begin (); i != End (); ++i)
(-)a/src/network/helper/application-container.h (+19 lines)
 Lines 24-29    Link Here 
24
#include <stdint.h>
24
#include <stdint.h>
25
#include <vector>
25
#include <vector>
26
#include "ns3/application.h"
26
#include "ns3/application.h"
27
#include "ns3/random-variable-stream.h"
27
28
28
namespace ns3 {
29
namespace ns3 {
29
30
 Lines 193-198   public: Link Here 
193
   */
194
   */
194
  void Start (Time start);
195
  void Start (Time start);
195
196
197
  /**
198
   * \brief Arrange for all of the Applications in this container to Start()
199
   * at the Time given as a parameter, plus some jitter.
200
   *
201
   * All Applications need to be provided with a starting simulation time and
202
   * a stopping simulation time.  The ApplicationContainer is a convenient 
203
   * place for allowing all of the contained Applications to be told to wake
204
   * up and start doing their thing (Start) at a common time.
205
   *
206
   * This method simply iterates through the contained Applications and calls
207
   * their Start() methods with the provided Time, plus a jitter drawn from
208
   * the provided random variable.
209
   *
210
   * \param start The Time at which each of the applications should start.
211
   * \param rv The random variable that adds jitter
212
   */
213
  void StartWithJitter (Time start, Ptr<RandomVariableStream> rv);
214
196
  /**
215
  /**
197
   * \brief Arrange for all of the Applications in this container to Stop()
216
   * \brief Arrange for all of the Applications in this container to Stop()
198
   * at the Time given as a parameter.
217
   * at the Time given as a parameter.

Return to bug 2958