#include <node.h>


Public Types | |
| typedef std::list < ProcessorHandle > | ProcessorList |
| typedef EdgeModel::const_adjacency_iterator | const_adjacency_iterator |
| typedef EdgeModel::adjacency_iterator | adjacency_iterator |
Public Member Functions | |
| std::set< const Node * > | get_adjacent_nodes (EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) const |
| std::set< Node * > | get_adjacent_nodes_w (EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) |
construction / destruction / init / reset | |
| Node () | |
| virtual | ~Node () |
| virtual void | set_real_position (const Vec &) throw () |
| virtual void | add_processor (const ProcessorHandle &) throw () |
| Adds a processor to this node. | |
| virtual void | set_world (World &) throw () |
| Sets the current world instance on this node. | |
| virtual void | set_id (int) throw () |
| Do not use directly, only for init purposes. Sets the node id. | |
| virtual void | set_label (const std::string &) throw () |
| Do not use directly, only for init purposes. Sets the node label. | |
| virtual void | init () throw () |
| Do not use directly, only for init purposes. | |
| virtual void | reset (void) throw () |
| Reset the nodes state. | |
| virtual void | step (void) throw () |
| Do not call directly. Called whenever a new round starts. | |
Message sending and receiving | |
| virtual void | send (const MessageHandle &) throw () |
| Send a message to all 1-hop neighbors. | |
| virtual void | receive (const ConstMessageHandle &) throw () |
| Called whenever the node receives a message. | |
Node movements and position | |
| virtual void | set_movement (const NodeMovementHandle &) throw () |
| Set the movement for this node. This will determine the nodes position. | |
| virtual NodeMovement & | movement_w (void) throw () |
| Get the nodes movement as const. | |
| virtual const NodeMovement & | movement (void) const throw () |
| Get the nodes movement. | |
| virtual Vec | real_position (void) const throw () |
| Convenience method. Calls movement().position(). | |
| bool | has_est_position (void) const throw () |
| True if the node has an estimated position. | |
| void | clear_est_position (void) throw () |
| Removes the estimated position. | |
| virtual const Vec & | est_position (void) const throw () |
| Returns the nodes estimated position. | |
| void | set_est_position (const Vec &) throw () |
| Sets the nodes estimated position. | |
Accelerated tag access | |
| virtual void | sync_to_tags (void) throw () |
| virtual void | sync_from_tags (void) throw ( std::runtime_error ) |
Node and other information | |
| virtual int | id (void) const throw () |
| const std::string & | label (void) const throw () |
| Returns the unique node label. | |
| virtual int | simulation_round (void) const throw () |
| Convenience method for World::simulation_round(). | |
| virtual double | current_time (void) const throw () |
| Convenience method for World::current_time(). | |
| virtual Processor::ProcessorState | state (void) const throw () |
| virtual const World & | world (void) const throw () |
| Returns the const World in which the Node is living. | |
| virtual World & | world_w (void) throw () |
| Returns the World in which the Node is living. | |
| bool | is_special_node (void) const throw () |
| template<typename T> | |
| T * | get_processor_of_type_w (void) throw () |
| Returns a Processor of a desired type. Returns NULL if no processor of this type is registered. | |
| template<typename T> | |
| const T * | get_processor_of_type (void) const throw () |
| Returns a const Processor of a desired type. Returns NULL if no processor of this type is registered. | |
Node Neighborhood access | |
| const_adjacency_iterator | begin_adjacent_nodes (EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) const throw () |
| const_adjacency_iterator | end_adjacent_nodes (void) const throw () |
| adjacency_iterator | begin_adjacent_nodes_w (EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) throw () |
| adjacency_iterator | end_adjacent_nodes_w (void) throw () |
| int | degree (EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) const throw () |
| Size of the one hop neighborhood (not counting the 0-hop neighborhood). | |
| void | set_minimum_storage (int mindist) throw () |
| NeighborhoodHandle | neighborhood_w (int maxdist, EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) throw () |
| Makes the node collect and store all neighborhoods up to hop distance maxdist. | |
| NeighborhoodConstHandle | neighborhood (int maxdist, EdgeModel::CommunicationDirection d=EdgeModel::CD_BIDI) const throw () |
Node comparison | |
| bool | operator== (const Node &n) const throw () |
| bool | operator!= (const Node &n) const throw () |
Node component information | |
| const bool | has_fixpoint () const throw () |
| const int | component_extension () const throw () |
Static Public Attributes | |
| static const std::string | WARN_HOOD_STORAGE_PARAMETER |
Protected Member Functions | |
Node movement | |
| virtual void | observers_added (MovementObserver &obs) throw () |
| typedef std::list<ProcessorHandle> shawn::Node::ProcessorList |
| shawn::Node::Node | ( | ) |
| virtual shawn::Node::~Node | ( | ) | [virtual] |
| virtual void shawn::Node::set_real_position | ( | const Vec & | ) | throw () [virtual] |
Set the position of a node. Before the node has been initialized, only real_pos_ is set. After init, a call to set_real_position will result in the creation of a NoMovement NodeMovement instance with this position. This will remove any previous NodeMovement with set_movement.
| virtual void shawn::Node::add_processor | ( | const ProcessorHandle & | ) | throw () [virtual] |
Adds a processor to this node.
| virtual void shawn::Node::set_world | ( | World & | ) | throw () [virtual] |
Sets the current world instance on this node.
| virtual void shawn::Node::set_id | ( | int | ) | throw () [virtual] |
Do not use directly, only for init purposes. Sets the node id.
| virtual void shawn::Node::set_label | ( | const std::string & | ) | throw () [virtual] |
Do not use directly, only for init purposes. Sets the node label.
| virtual void shawn::Node::init | ( | ) | throw () [virtual] |
Do not use directly, only for init purposes.
| virtual void shawn::Node::reset | ( | void | ) | throw () [virtual] |
Reset the nodes state.
| virtual void shawn::Node::step | ( | void | ) | throw () [virtual] |
Do not call directly. Called whenever a new round starts.
| virtual void shawn::Node::send | ( | const MessageHandle & | ) | throw () [virtual] |
Send a message to all 1-hop neighbors.
| virtual void shawn::Node::receive | ( | const ConstMessageHandle & | ) | throw () [virtual] |
Called whenever the node receives a message.
| virtual void shawn::Node::set_movement | ( | const NodeMovementHandle & | ) | throw () [virtual] |
Set the movement for this node. This will determine the nodes position.
| virtual NodeMovement& shawn::Node::movement_w | ( | void | ) | throw () [virtual] |
Get the nodes movement as const.
| virtual const NodeMovement& shawn::Node::movement | ( | void | ) | const throw () [virtual] |
Get the nodes movement.
| virtual Vec shawn::Node::real_position | ( | void | ) | const throw () [virtual] |
Convenience method. Calls movement().position().
| bool shawn::Node::has_est_position | ( | void | ) | const throw () |
True if the node has an estimated position.
| void shawn::Node::clear_est_position | ( | void | ) | throw () |
Removes the estimated position.
| virtual const Vec& shawn::Node::est_position | ( | void | ) | const throw () [virtual] |
Returns the nodes estimated position.
| void shawn::Node::set_est_position | ( | const Vec & | ) | throw () |
Sets the nodes estimated position.
| virtual void shawn::Node::sync_to_tags | ( | void | ) | throw () [virtual] |
| virtual void shawn::Node::sync_from_tags | ( | void | ) | throw ( std::runtime_error ) [virtual] |
| virtual int shawn::Node::id | ( | void | ) | const throw () [virtual] |
| const std::string& shawn::Node::label | ( | void | ) | const throw () |
Returns the unique node label.
| virtual int shawn::Node::simulation_round | ( | void | ) | const throw () [virtual] |
Convenience method for World::simulation_round().
| virtual double shawn::Node::current_time | ( | void | ) | const throw () [virtual] |
Convenience method for World::current_time().
| virtual Processor::ProcessorState shawn::Node::state | ( | void | ) | const throw () [virtual] |
Returns the nodes state. The returned state depends on the state of the Processor instances attached to the node. If at least one processor is active, Active is returned, if at least on processor is sleeping, Sleeping is returned. Otherwise Inactive will be returned.
| virtual const World& shawn::Node::world | ( | void | ) | const throw () [virtual] |
| virtual World& shawn::Node::world_w | ( | void | ) | throw () [virtual] |
| bool shawn::Node::is_special_node | ( | void | ) | const throw () |
Returns true if the node is special. Special means that special_boot() will be invoked at the beginning of the simulation. This can be used e.g. to start a certain protocol.
| T* shawn::Node::get_processor_of_type_w | ( | void | ) | throw () [inline] |
Returns a Processor of a desired type. Returns NULL if no processor of this type is registered.
| const T* shawn::Node::get_processor_of_type | ( | void | ) | const throw () [inline] |
Returns a const Processor of a desired type. Returns NULL if no processor of this type is registered.
| const_adjacency_iterator shawn::Node::begin_adjacent_nodes | ( | EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI |
) | const throw () |
| const_adjacency_iterator shawn::Node::end_adjacent_nodes | ( | void | ) | const throw () |
| adjacency_iterator shawn::Node::begin_adjacent_nodes_w | ( | EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI |
) | throw () |
| adjacency_iterator shawn::Node::end_adjacent_nodes_w | ( | void | ) | throw () |
| int shawn::Node::degree | ( | EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI |
) | const throw () |
Size of the one hop neighborhood (not counting the 0-hop neighborhood).
| void shawn::Node::set_minimum_storage | ( | int | mindist | ) | throw () |
Makes the node store all neighborhoods up to size mindist. works currently only for mindist == 0 or 1.
| NeighborhoodHandle shawn::Node::neighborhood_w | ( | int | maxdist, | |
| EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI | |||
| ) | throw () |
Makes the node collect and store all neighborhoods up to hop distance maxdist.
Hints the node to drop stored neighborhoods of hop distance fromdist and above As prepare_neighborhood(..), but more sophisticated, supports nodes movement If neighborhood changed, stored informations will be moved to garbage collector indicates for information droping, sets nh_data_is_valid_ to false --> data will be calculated once again
| NeighborhoodConstHandle shawn::Node::neighborhood | ( | int | maxdist, | |
| EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI | |||
| ) | const throw () |
| bool shawn::Node::operator== | ( | const Node & | n | ) | const throw () [inline] |
| bool shawn::Node::operator!= | ( | const Node & | n | ) | const throw () [inline] |
| const bool shawn::Node::has_fixpoint | ( | ) | const throw () [inline] |
| const int shawn::Node::component_extension | ( | ) | const throw () [inline] |
Indicates if true, that the nodes component members are computed already, i.e. a fixpoint of a (multi-hop-) neighborhood is computed.
| std::set<const Node*> shawn::Node::get_adjacent_nodes | ( | EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI |
) | const |
This returns an upper bound of hops, which are needed for this node component coverage.
| std::set<Node*> shawn::Node::get_adjacent_nodes_w | ( | EdgeModel::CommunicationDirection | d = EdgeModel::CD_BIDI |
) |
| virtual void shawn::Node::observers_added | ( | MovementObserver & | obs | ) | throw () [protected, virtual] |
const std::string shawn::Node::WARN_HOOD_STORAGE_PARAMETER [static] |
1.5.6