Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

SingleChannelRadio Class Reference
[radios - radio modules]

A simple radio being able to send / transmit on one channel. More...

#include <SingleChannelRadio.h>

Inherits BasicModule.

Inheritance diagram for SingleChannelRadio:

Inheritance graph
[legend]
Collaboration diagram for SingleChannelRadio:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void initialize (int)
 Initialization of the module and some variables.
virtual void finish ()
virtual void handleMessage (cMessage *)
 should not be called, instead direct calls to the radio methods should be used.
bool switchToSleep ()
bool switchToSend ()
bool switchToRecv ()
bool setActiveChannel (int c)
 change the active channel, never fails (returns true).
bool setBitrate (double b)
 change the bit rate, never fails (returns true)

Protected Member Functions

bool switchTo (RadioState::States, simtime_t delta)

Protected Attributes

RadioState state
 hold radio state
int stateCat
 channel radio category
ActiveChannel aChannel
 holds active channel, default channel is set by MAC protocol
int aChannelCat
 active channel category
Bitrate bitrate
 current bit rate for this radio, default is set by MAC
int bitrateCat
 current bit rate and the category number
bool handlingTimer
int nicModuleId
simtime_t swSleep
simtime_t swSend
simtime_t swRecv
cMessage * timer

Private Member Functions

 Module_Class_Members (SingleChannelRadio, BasicModule, 0)

Detailed Description

A simple radio being able to send / transmit on one channel.

Author:
Andreas Koepke


Member Function Documentation

bool SingleChannelRadio::switchTo RadioState::States  ,
simtime_t  delta
[protected]
 

perform switch if possible

bool SingleChannelRadio::switchToSleep  ) 
 

Methods to control state of this radio returns whether state was actually changed


Member Data Documentation

bool SingleChannelRadio::handlingTimer [protected]
 

semaphore to prevent changing of radio during a change

int SingleChannelRadio::nicModuleId [protected]
 

id of the surrounding nic module

simtime_t SingleChannelRadio::swRecv [protected]
 

variable that holds the time the radio needs to switch to a certain state

simtime_t SingleChannelRadio::swSend [protected]
 

variable that holds the time the radio needs to switch to a certain state

simtime_t SingleChannelRadio::swSleep [protected]
 

variable that holds the time the radio needs to switch to a certain state

cMessage* SingleChannelRadio::timer [protected]
 

variable that holds the time the radio needs to switch to a certain state


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 08:30:19 2007 for Mobility Framework by  doxygen 1.4.4