shawn::csma_msg Class Reference

Message structure used in csma transmission model. More...

#include <csma_transmission_model_message.h>

Inheritance diagram for shawn::csma_msg:

Inheritance graph
[legend]
Collaboration diagram for shawn::csma_msg:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 csma_msg ()
 construction of structure csma_msg
 csma_msg (TransmissionModel::MessageInfo *mi, double duration, double backoff_)
 ~csma_msg ()
 destruction of structure csma_msg
bool operator< (csma_msg msg)
 < Operator for csma_msg
void push_new_destination (shawn::Node *pNode)
 Push a destination node into the vector destination_.
double random (double lowerBound, double upperBound) throw ()
 Returns a random double value within given bounds.
void setSending ()
 Should be set if message is sent.
bool isSending ()

Public Attributes

TransmissionModel::MessageInfopmi
std::vector< msg_destination * > destinations_
 The vector which stores the neighbours of the source node.
double deliver_time
double backoff
double duration_
bool sending


Detailed Description

Message structure used in csma transmission model.

The structure includes the pointer of TransmissionModel::MessageInfo, its destinations, the delivery time and the remaining backoff time. The csma_msg inherits EventScheduler::EventTag. This is necessary for "adding" the messages to the EventScheduler


Constructor & Destructor Documentation

shawn::csma_msg::csma_msg (  )  [inline]

construction of structure csma_msg

The deliver_time of the message is initialized as the sending time, and backoff is given a negative value to show that the message has not got any backoff time yet.

shawn::csma_msg::csma_msg ( TransmissionModel::MessageInfo mi,
double  duration,
double  backoff_ 
) [inline]

Here is the call graph for this function:

shawn::csma_msg::~csma_msg (  )  [inline]

destruction of structure csma_msg

Free the occupied memory of the message and its destinations


Member Function Documentation

bool shawn::csma_msg::operator< ( csma_msg  msg  )  [inline]

< Operator for csma_msg

Parameters:
msg Other message

void shawn::csma_msg::push_new_destination ( shawn::Node pNode  )  [inline]

Push a destination node into the vector destination_.

Parameters:
pNode pointer to the destination node

double shawn::csma_msg::random ( double  lowerBound,
double  upperBound 
) throw () [inline]

Returns a random double value within given bounds.

Parameters:
lowerBound Random value's lowerBound
upperBound Random value's upperBound

Here is the call graph for this function:

Here is the caller graph for this function:

void shawn::csma_msg::setSending (  )  [inline]

Should be set if message is sent.

bool shawn::csma_msg::isSending (  )  [inline]

Returns wether message will be send. bool


Member Data Documentation

The vector which stores the neighbours of the source node.


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

Generated on Sun Feb 5 00:01:31 2012 for Shawn by  doxygen 1.5.6