#include <csma_transmission_model.h>


Public Member Functions | |
| virtual void | deliver_messages () throw () |
| Delivers all messages which are in the vector Method inherited from shawn::TransmissionModel. Is not implemented in this module since the messages are added to the shawn::EventScheduler and do not have to be delivered at the beginning of a round. | |
construction, destruction and support for life cycle | |
| CsmaTransmissionModel (int bandwidth, double backoff, double sending_jitter) | |
| ~CsmaTransmissionModel () | |
| virtual void | init () throw () |
| Initialize the csma transmission model. | |
| virtual void | reset () throw () |
| Reset the csma transmission model. | |
Transmission Model Implementation | |
| virtual bool | supports_mobility (void) const throw (std::logic_error) |
| Mobility is depending on mobility support from the edge model. | |
| virtual void | send_message (MessageInfo &mi) throw () |
| Stores each message in a vector for delivery at the next simulation round start. | |
basic method inherited from EventHandler | |
| virtual void | CsmaTransmissionModel::timeout (EventScheduler &event_scheduler, EventScheduler::EventHandle event_handle, double time, EventScheduler::EventTagHandle &event_tag_handle) throw () |
Delivers a message. | |
| void | deliver (csma_msg *msg) throw () |
| shawn::CsmaTransmissionModel::CsmaTransmissionModel | ( | int | bandwidth, | |
| double | backoff, | |||
| double | sending_jitter | |||
| ) |
| shawn::CsmaTransmissionModel::~CsmaTransmissionModel | ( | ) |
| virtual void shawn::CsmaTransmissionModel::init | ( | ) | throw () [virtual] |
Initialize the csma transmission model.
Gets the list of neighbors
Reimplemented from shawn::TransmissionModel.
| virtual void shawn::CsmaTransmissionModel::reset | ( | ) | throw () [virtual] |
Reset the csma transmission model.
Clear the statistic variables and set the parameters to its default value.
Reimplemented from shawn::TransmissionModel.
| virtual bool shawn::CsmaTransmissionModel::supports_mobility | ( | void | ) | const throw (std::logic_error) [virtual] |
Mobility is depending on mobility support from the edge model.
The edge model is used to determine the 1-hop neighbours which will receive the message
Implements shawn::TransmissionModel.
| virtual void shawn::CsmaTransmissionModel::send_message | ( | MessageInfo & | mi | ) | throw () [virtual] |
Stores each message in a vector for delivery at the next simulation round start.
A new structure of csma_msg will be build and inserted into aired_messages_
Implements shawn::TransmissionModel.
| virtual void shawn::CsmaTransmissionModel::CsmaTransmissionModel::timeout | ( | EventScheduler & | event_scheduler, | |
| EventScheduler::EventHandle | event_handle, | |||
| double | time, | |||
| EventScheduler::EventTagHandle & | event_tag_handle | |||
| ) | throw () [virtual] |
| virtual void shawn::CsmaTransmissionModel::deliver_messages | ( | ) | throw () [virtual] |
Delivers all messages which are in the vector Method inherited from shawn::TransmissionModel. Is not implemented in this module since the messages are added to the shawn::EventScheduler and do not have to be delivered at the beginning of a round.
Implements shawn::TransmissionModel.
| void shawn::CsmaTransmissionModel::deliver | ( | csma_msg * | msg | ) | throw () |
This method implements the CSMA/CA algorithm. The processor listens if a neighbor is sending. If no neighbor is sending, it will deliver its message, otherwise it will delay the message to the end of the transmission plus a random backoff.
| msg | Pointer to the message to be send |
1.5.6