shawn::ZigbeeCsmaTransmissionModel::csma_msg Struct Reference

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

#include <zigbee_csma_transmission_model.h>

Collaboration diagram for shawn::ZigbeeCsmaTransmissionModel::csma_msg:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool operator< (csma_msg msg2)
void push_new_destination (shawn::Node *pNode)
 Push a destination node into the vector destination_.
 csma_msg (TransmissionModel::MessageInfo *mi, int backoff_exponent, int contention_window)
 construction of structure csma_msg
 ~csma_msg ()
 destruction of structure csma_msg

Public Attributes

TransmissionModel::MessageInfopmi
std::vector< msg_destination * > destinations_
 The vector which stores the neighbours of the source node.
double deliver_time
 The deliver time of the msg., but it is also used as the sense time before the msg. is delivered.
int BE
 The backoff exponent, its value is between min_backoff_exponent and max_backoff_exponent.
int NB
 The number of backoff, its value is initialized to be zero and increased by one each time the msg. is asked to delay. But a value larger then max_backoff_num means a message failure.
int CW
 The contention window decreased by one if the channel is idle when the node senses the carrier. And a zero value means the node wins the channel.

Classes

struct  msg_destination
 The structure for information of a destination node. More...


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.


Constructor & Destructor Documentation

shawn::ZigbeeCsmaTransmissionModel::csma_msg::csma_msg ( TransmissionModel::MessageInfo mi,
int  backoff_exponent,
int  contention_window 
) [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::ZigbeeCsmaTransmissionModel::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::ZigbeeCsmaTransmissionModel::csma_msg::operator< ( csma_msg  msg2  )  [inline]

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

Push a destination node into the vector destination_.

Parameters:
pNode pointer to the destination node


Member Data Documentation

The vector which stores the neighbours of the source node.

The deliver time of the msg., but it is also used as the sense time before the msg. is delivered.

The backoff exponent, its value is between min_backoff_exponent and max_backoff_exponent.

The number of backoff, its value is initialized to be zero and increased by one each time the msg. is asked to delay. But a value larger then max_backoff_num means a message failure.

The contention window decreased by one if the channel is idle when the node senses the carrier. And a zero value means the node wins the channel.


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

Generated on Sun May 20 00:01:38 2012 for Shawn by  doxygen 1.5.6