shawn::TransmissionModel Class Reference

Model deciding how messages are delivered, use it to model transmission channel characteristics. More...

#include <transmission_model.h>

Inheritance diagram for shawn::TransmissionModel:

Inheritance graph
[legend]
Collaboration diagram for shawn::TransmissionModel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Construction, destruction and lifecycle support
 TransmissionModel ()
virtual ~TransmissionModel ()
const Worldworld (void) const throw ()
virtual void init (void) throw ()
virtual void reset (void) throw ()
Configuration and data access
virtual void set_world (World &) throw ()
Worldworld_w (void) throw ()
virtual bool supports_mobility (void) const =0 throw (std::logic_error)
 Return true if your model supports node mobility.
Transmission model implementation
virtual void send_message (MessageInfo &mi)=0 throw ()
 Receives a message for delivery.
virtual void deliver_messages ()=0 throw ()
 Periodically invoked by the world before a new simulation round starts.

Classes

struct  MessageInfo
 Container for message delivery related stuff. More...


Detailed Description

Model deciding how messages are delivered, use it to model transmission channel characteristics.

Abstract superclass for transmission models. A message is accepted for delivery by send_message(). An implementation is free to decide how to handle the message. It may be e.g. delayed, altered, dropped or duplicated. Periodically deliver_messages() is invoked by the world before a new simulation round starts. Message delivery is not bound to deliver_messages(), any suitable method can be used. One possibility is to use the EventScheduler to delay packets.

Todo:
Currently there is no list of recipients for unicast.

Constructor & Destructor Documentation

shawn::TransmissionModel::TransmissionModel (  ) 

virtual shawn::TransmissionModel::~TransmissionModel (  )  [virtual]


Member Function Documentation

const World& shawn::TransmissionModel::world ( void   )  const throw ()

virtual void shawn::TransmissionModel::init ( void   )  throw () [virtual]

virtual void shawn::TransmissionModel::reset ( void   )  throw () [virtual]

virtual void shawn::TransmissionModel::set_world ( World  )  throw () [virtual]

World& shawn::TransmissionModel::world_w ( void   )  throw ()

virtual bool shawn::TransmissionModel::supports_mobility ( void   )  const throw (std::logic_error) [pure virtual]

virtual void shawn::TransmissionModel::send_message ( MessageInfo mi  )  throw () [pure virtual]

virtual void shawn::TransmissionModel::deliver_messages (  )  throw () [pure virtual]

Periodically invoked by the world before a new simulation round starts.

Delivery of messages is not bound to this method. It can e.g. also be scheduled by the EventScheduler.

Implemented in shawn::AlohaTransmissionModel, shawn::ChainableTransmissionModel, shawn::CsmaTransmissionModel, shawn::MacaTransmissionModel, shawn::ReliableTransmissionModel, and shawn::ZigbeeCsmaTransmissionModel.


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

Generated on Tue Feb 7 00:01:37 2012 for Shawn by  doxygen 1.5.6