![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <node/Node.hpp>


Public Member Functions | |
| virtual void | addService (const std::string &name, service::Service *si) |
| Component will be stored under the name ci->getName(). | |
| virtual probe::bus::ContextProviderCollection & | getContextProviderCollection () |
| std::string | getName () const |
| Name of the Node (also used in the registry). | |
| unsigned int | getNodeID () const |
| NodeID of the Node. | |
| Node (Registry *registry, const pyconfig::View &pyco) | |
| virtual void | onShutdown () |
| Called before simulation will finally shutdown. | |
| virtual void | onWorldCreated () |
| Inform all components that world has been created. | |
| virtual void | startup () |
| Called immedeatly after constructor. | |
| virtual | ~Node () |
Protected Types | |
| typedef std::list < component::Interface * > | ComponentContainer |
| Container for Components. | |
| typedef wns::container::Registry < std::string, service::Service * > | ServiceContainer |
| Container with name of and reference to the Service. | |
Protected Member Functions | |
| virtual wns::service::Service * | getAnyService (const component::FQSN &name) const |
| Retrieve a Service by its FQSN. | |
Protected Attributes | |
| wns::pyconfig::View | config |
| The Python configuration of this node. | |
| probe::bus::ContextProviderCollection | contextProviderRegistry |
| Container to hold the node-wide. | |
| Registry * | globalNodes |
| pointer to the node registry | |
| ComponentContainer | localComponents |
| Components are kept in a list in order to able to destroy them when finished. | |
| ServiceContainer | localServices |
| Components are stored in this container. | |
| logger::Logger | log |
| Logger instance. | |
| std::string | name |
| The name of this Node. | |
| unsigned int | nodeID |
| The NodeID of this Node. | |
Static Protected Attributes | |
| static std::list< unsigned long int > | ids |
| List of allocated ids. | |
Friends | |
| class | wns::node::tests::NodeTest |
Definition at line 68 of file Node.hpp.
typedef std::list<component::Interface*> wns::node::Node::ComponentContainer [protected] |
typedef wns::container::Registry<std::string, service::Service*> wns::node::Node::ServiceContainer [protected] |
| Node::Node | ( | Registry * | registry, | |
| const pyconfig::View & | pyco | |||
| ) | [explicit] |
| void Node::addService | ( | const std::string & | name, | |
| service::Service * | si | |||
| ) | [virtual] |
Assures: Name of Service is unique across all nodes in a simulation.
Implements wns::node::Interface.
| wns::service::Service * Node::getAnyService | ( | const component::FQSN & | name | ) | const [protected, virtual] |
Usage:
00001 00002 // retrieve TCP instance from Node 00003 component::tests::TCPInterface* tcp = 00004 node->getService<component::tests::TCPInterface*>("TCP");
Implements wns::node::Interface.
| wns::probe::bus::ContextProviderCollection & Node::getContextProviderCollection | ( | ) | [virtual] |
| std::string Node::getName | ( | ) | const [virtual] |
| unsigned int Node::getNodeID | ( | ) | const [virtual] |
| void Node::onShutdown | ( | ) | [virtual] |
| void Node::onWorldCreated | ( | ) | [virtual] |
| void Node::startup | ( | ) | [virtual] |
This will be called after the constructor has been called. The Node can call virtual methods of itself which is forbidden in the constructor. The probing system is available at this point
Implements wns::node::Interface.
wns::pyconfig::View wns::node::Node::config [protected] |
Registry* wns::node::Node::globalNodes [protected] |
ComponentContainer wns::node::Node::localComponents [protected] |
ServiceContainer wns::node::Node::localServices [protected] |
logger::Logger wns::node::Node::log [protected] |
std::string wns::node::Node::name [protected] |
unsigned int wns::node::Node::nodeID [protected] |
1.5.5