shawn::PermalinkCommunicationModel Class Reference

CommunicationModel that provides static links between nodes to mimic fixed communication channels. More...

#include <permalink_communication_model.h>

Inheritance diagram for shawn::PermalinkCommunicationModel:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

construction / destruction / init
 PermalinkCommunicationModel ()
virtual ~PermalinkCommunicationModel ()
virtual void init (void) throw ()
edges
virtual void add_edge (std::string, std::string) throw ()
CommunicationModel interface
virtual bool can_communicate_bidi (const Node &, const Node &) const throw ()
virtual bool can_communicate_uni (const Node &, const Node &) const throw ()
virtual bool exists_communication_upper_bound (void) const throw ()
 returns whether communication_upper_bound() returns a useful value
virtual double communication_upper_bound (void) const throw ()
virtual bool is_status_available_on_construction (void) const throw ()
virtual bool in_domain (const Node &, const Node &) const throw ()
 Returns true if this instance is able to anser the can_communicate_uni() and can_communicate_bidi() questions.


Detailed Description

CommunicationModel that provides static links between nodes to mimic fixed communication channels.

Unidirectional edges can be added manually by using add_edge(). Alternatively, see PermalinkCommunicationModelFactory on how to configure the static links by using Tag entries in the SimulationEnvironment.


Constructor & Destructor Documentation

shawn::PermalinkCommunicationModel::PermalinkCommunicationModel (  ) 

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


Member Function Documentation

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

called after world is setup and before first node is created. used by World

Reimplemented from shawn::CommunicationModel.

virtual void shawn::PermalinkCommunicationModel::add_edge ( std::string  ,
std::string   
) throw () [virtual]

virtual bool shawn::PermalinkCommunicationModel::can_communicate_bidi ( const Node ,
const Node  
) const throw () [virtual]

Returns:
true iff can_communicate_uni(u,v) and can_communicate_uni(v,u), therefore, whether the two nodes may exchange messages.

Implements shawn::CommunicationModel.

virtual bool shawn::PermalinkCommunicationModel::can_communicate_uni ( const Node ,
const Node  
) const throw () [virtual]

Returns:
true if the first passed node can send messages to the second.
Warning:
currently, unidirectional links are unsupported. This method is therefore pretty much useless

Implements shawn::CommunicationModel.

virtual bool shawn::PermalinkCommunicationModel::exists_communication_upper_bound ( void   )  const throw () [virtual]

returns whether communication_upper_bound() returns a useful value

Implements shawn::CommunicationModel.

virtual double shawn::PermalinkCommunicationModel::communication_upper_bound ( void   )  const throw () [virtual]

if exists_communication_upper_bound(), nodes whose euclidean distance exceeds communication_upper_bound() can never communicate in any direction.

Providing such a value is useful because EdgeModel instances might use the information for geographical caching.

Implements shawn::CommunicationModel.

virtual bool shawn::PermalinkCommunicationModel::is_status_available_on_construction ( void   )  const throw () [virtual]

Returns:
whether the status (i.e., whether two nodes can communicate) is available instantly when nodes are created.

Implements shawn::CommunicationModel.

virtual bool shawn::PermalinkCommunicationModel::in_domain ( const Node ,
const Node  
) const throw () [virtual]

Returns true if this instance is able to anser the can_communicate_uni() and can_communicate_bidi() questions.

The default implementation returns true. Override this method to implement communication model specific intelligence. This is mainly used in conjunction with MultipleCommunicationModel to combine several CommunicationModels

Reimplemented from shawn::CommunicationModel.


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

Generated on Thu Sep 9 00:00:47 2010 for Shawn by  doxygen 1.5.6