User Manual, Developers Guide and API Documentation

simpletl::Medium Class Reference

The static methods of this class assure that there is always just one ongoing transmission. If there is an ongoing transmissions later transmissions will be queued and served in FIFO order.

#include <Medium.hpp>

Collaboration diagram for simpletl::Medium:

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void send (wns::events::scheduler::Callable c, wns::simulator::Time delay)
 Will schedule the operator() method of object of type T for execution. The method will be executed at simulation time "delay" if the medium is busy. Else it will be queued and executed later. The execution of the event corresponds to the end of an transmission. The passed object must call the setFree() method in its operator() method when it has finished.
static void setFree ()
 Called when the ongoing transmission is over by the current transmission event. If queued the next transmission event is scheduled for execution.

Private Types

typedef std::queue< QEntryEventQueue
typedef std::pair
< wns::events::scheduler::Callable,
wns::simulator::Time
QEntry

Static Private Attributes

static bool busy = false
static EventQueue eventqueue = Medium::EventQueue()


Detailed Description

Definition at line 47 of file Medium.hpp.


Member Typedef Documentation

typedef std::queue<QEntry> simpletl::Medium::EventQueue [private]

Definition at line 83 of file Medium.hpp.

Definition at line 82 of file Medium.hpp.


Member Function Documentation

static void simpletl::Medium::send ( wns::events::scheduler::Callable  c,
wns::simulator::Time  delay 
) [inline, static]

Definition at line 59 of file Medium.hpp.

void Medium::setFree (  )  [static]

Definition at line 38 of file Medium.cpp.


Member Data Documentation

bool Medium::busy = false [static, private]

Definition at line 84 of file Medium.hpp.

Definition at line 85 of file Medium.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:39 2012 for openWNS by  doxygen 1.5.5