branch merge

This commit is contained in:
Craig Dowell committed 2009-03-16 18:23:33 -07:00
commit c36718e4f9
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ void OnOffApplication::CancelEvents ()
void OnOffApplication::StartSending()
{
NS_LOG_FUNCTION_NOARGS ();
m_lastStartTime = Simulator::Now();
ScheduleNextTx(); // Schedule the send packet event
ScheduleStopEvent();
}
@@ -64,6 +64,22 @@ class Socket;
* variables. During the "Off" state, no traffic is generated.
* During the "On" state, cbr traffic is generated. This cbr traffic is
* characterized by the specified "data rate" and "packet size".
*
* Note: When an application is started, the first packet transmission
* occurs _after_ a delay equal to (packet size/bit rate). Note also,
* when an application transitions into an off state in between packet
* transmissions, the remaining time until when the next transmission
* would have occurred is cached and is used when the application starts
* up again. Example: packet size = 1000 bits, bit rate = 500 bits/sec.
* If the application is started at time 3 seconds, the first packet
* transmission will be scheduled for time 5 seconds (3 + 1000/500)
* and subsequent transmissions at 2 second intervals. If the above
* application were instead stopped at time 4 seconds, and restarted at
* time 5.5 seconds, then the first packet would be sent at time 6.5 seconds,
* because when it was stopped at 4 seconds, there was only 1 second remaining
* until the originally scheduled transmission, and this time remaining
* information is cached and used to schedule the next transmission
* upon restarting.
*/
class OnOffApplication : public Application
{