#include <csma_transmission_model_message.h>


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::MessageInfo * | pmi |
| std::vector< msg_destination * > | destinations_ |
| The vector which stores the neighbours of the source node. | |
| double | deliver_time |
| double | backoff |
| double | duration_ |
| bool | sending |
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
| 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] |

| shawn::csma_msg::~csma_msg | ( | ) | [inline] |
destruction of structure csma_msg
Free the occupied memory of the message and its destinations
| bool shawn::csma_msg::operator< | ( | csma_msg | msg | ) | [inline] |
| void shawn::csma_msg::push_new_destination | ( | shawn::Node * | pNode | ) | [inline] |
Push a destination node into the vector destination_.
| 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.
| lowerBound | Random value's lowerBound | |
| upperBound | Random value's upperBound |


| 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
| std::vector<msg_destination*> shawn::csma_msg::destinations_ |
The vector which stores the neighbours of the source node.
| double shawn::csma_msg::backoff |
| double shawn::csma_msg::duration_ |
1.5.6