#include <maca_transmission_model.h>


Public Member Functions | |
construction, destruction and support for lifecycle | |
| MacaTransmissionModel () | |
| ~MacaTransmissionModel () | |
| virtual void | init () throw () |
| virtual void | reset () throw () |
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. | |
| virtual void | deliver_messages () throw () |
| Delivers all messages which are in the vector. | |
Protected Member Functions | |
| void | insert_message (TransmissionModel::MessageInfo &mi) throw () |
| Insert a new-coming message into aired_messages_. | |
| bool | need_delay (maca_msg *new_msg, maca_msg *msg) throw () |
| See if new_msg will interfere with msg. | |
| void | deliver_one_message (maca_msg *msg) throw () |
| Delivers one message. | |
Protected Attributes | |
| int | received_ |
| The number of messages received. | |
| double | average_delay_ |
| The average delay of the packets. | |
| double | jitter_ |
| The average variation of delay. | |
| int | deliver_num_ |
| Number of messages delivered so far. | |
| double | last_delay_ |
| The delay of last message. | |
| std::vector< maca_msg * > | aired_messages_ |
| The messages that have been sent by the nodes and are waiting for delivery. | |
Classes | |
| struct | maca_msg |
| Message structure used in MACA transmission model. More... | |
| struct | same_round |
| Unary function to determine if two messages are of the same simulation round. More... | |
The model assumes that a node sends a RTS packet before it sends the message, and a destination node replies a CTS packet. Any other node who hears the RTS or CTS packet cannot sends a message in the same simulation round, so there is no packet loss.
| shawn::MacaTransmissionModel::MacaTransmissionModel | ( | ) |
| shawn::MacaTransmissionModel::~MacaTransmissionModel | ( | ) |
| virtual void shawn::MacaTransmissionModel::init | ( | ) | throw () [virtual] |
Reimplemented from shawn::TransmissionModel.
| virtual void shawn::MacaTransmissionModel::reset | ( | ) | throw () [virtual] |
Reimplemented from shawn::TransmissionModel.
| virtual bool shawn::MacaTransmissionModel::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::MacaTransmissionModel::send_message | ( | MessageInfo & | mi | ) | throw () [virtual] |
Stores each message in a vector for delivery at the next simulation round start.
A new structure of maca_msg will be build and inserted into aired_messages_
Implements shawn::TransmissionModel.
| virtual void shawn::MacaTransmissionModel::deliver_messages | ( | ) | throw () [virtual] |
Delivers all messages which are in the vector.
Call deliver_one_message( maca_msg* msg ) for each element in aired_messages_
Implements shawn::TransmissionModel.
| void shawn::MacaTransmissionModel::insert_message | ( | TransmissionModel::MessageInfo & | mi | ) | throw () [protected] |
| bool shawn::MacaTransmissionModel::need_delay | ( | maca_msg * | new_msg, | |
| maca_msg * | msg | |||
| ) | throw () [protected] |
See if new_msg will interfere with msg.
| void shawn::MacaTransmissionModel::deliver_one_message | ( | maca_msg * | msg | ) | throw () [protected] |
Delivers one message.
Deliver a message to all the neighbours of its source node
int shawn::MacaTransmissionModel::received_ [protected] |
The number of messages received.
double shawn::MacaTransmissionModel::average_delay_ [protected] |
The average delay of the packets.
double shawn::MacaTransmissionModel::jitter_ [protected] |
The average variation of delay.
int shawn::MacaTransmissionModel::deliver_num_ [protected] |
Number of messages delivered so far.
double shawn::MacaTransmissionModel::last_delay_ [protected] |
The delay of last message.
std::vector<maca_msg*> shawn::MacaTransmissionModel::aired_messages_ [protected] |
The messages that have been sent by the nodes and are waiting for delivery.
1.5.6