iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::MessagePosterConnector< Posting > Class Template Reference

#include <nrt/Core/Blackboard/Connector.H>

template<class Posting>
class nrt::MessagePosterConnector< Posting >

MessagePosterConnector class defines a connector for a MessagePoster.

MessagePosterConnector has an input port (subscription) that can catch posts with matching message type, return type, namespace, and topic, and an output port (posting) onto which any received messages will be re-posted, but using that output port's topic, and either in the same namespace or in the parent namespace (if border connector). Note that connectors do not actually catch messages and re-post them, they are just an abstraction for this catching and re-posting, but these actions are transparently handled by the Blackboard with no need for any message to actually transition through the connector object. Instead, when some connected path is found by the Blackboard between a MessagePoster and a MessageSubscriber with any number of possibly intervening connectors where all namespaces and topics correctly mesh with each other, then the Blackboard directly forwards all messages posted by the MessagePoster to the MessageSubscriber.

Example use is:

ModuleA posts onto topic1 ModuleB posts onto topic2

you create a MessagePosterConnector and setTopicFilter("topic[12]") and setTopic("cooltopic"). As a result, any message posted by ModuleA or ModuleB will be sent to any subscriber that catches cooltopic. This is particularly useful when the ConnectorType is Border, in shich case, subscribers in the parent namespace from that of ModuleA, ModuleB and the connector will receive the messages.

Definition at line 83 of file Connector.H.

Inheritance diagram for nrt::MessagePosterConnector< Posting >:
nrt::ConnectorBase

Public Member Functions

virtual ~MessagePosterConnector ()
 Public destructor so std::shared_ptr<...> can delete the Connector.
 

Friends

class BlackboardMaster
 Only the BlackboardMaster can manipulate us directly.
 

Additional Inherited Members

- Private Member Functions inherited from nrt::ConnectorBase
virtual ~ConnectorBase ()
 Public destructor so std::shared_ptr<ConnectorBase> can delete the Connector.
 

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