#include <zigbee_csma_transmission_model.h>

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::MessageInfo * | pmi |
| 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... | |
The structure includes the pointer of TransmissionModel::MessageInfo, its destinations, the delivery time and the remaining backoff time.
| 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
| 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_.
| pNode | pointer to the destination node |
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.
1.5.6