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

#include <nrt/Core/Blackboard/details/ModulePortHelpers.H>

template<typename T>
class nrt::SplitMessageSubscriber< T, true >

Subscriber helper class for split subscriptions.

Definition at line 1181 of file ModulePortHelpers.H.

Inheritance diagram for nrt::SplitMessageSubscriber< T, true >:
nrt::MessageSubscriberCore< nrt::SimpleMessageSubscription< T, true > > nrt::ModuleBase nrt::MessageSubscriberCoreBase

Public Member Functions

 SplitMessageSubscriber (nrt::MessageSubscriberCoreBase *parent, std::shared_ptr< T > &field, size_t const bitnum, std::string const &mod, std::string const &portna, std::string const &descr)
 
virtual void onMessage (nrt::SimpleMessageSubscription< T, true > msg)
 Callback called by the Blackboard when a relevant Message is posted. More...
 
- Public Member Functions inherited from nrt::MessageSubscriberCore< nrt::SimpleMessageSubscription< T, true > >
 MessageSubscriberCore ()
 Constructor, will register this subscriber with the Blackboard.
 
virtual ~MessageSubscriberCore ()
 Virtual destructor for safe inheritance, will un-register this subscriber with the Blackboard.
 
virtual void createSubSubscribers ()
 Create our split sub-ports.
 
virtual void deleteSubSubscribers ()
 Delete our split sub-ports.
 
virtual bool isSplit () const
 Return true if we currently have split-sub-subscribers.
 
OutPtr make_return_message (Args &&...args) const
 Allocate a return message and return a unique_ptr to it, to be used in a callback as return value. More...
 
std::string make_connector (std::string const &name, std::string const &namespc, nrt::ConnectorType const type, std::string const &topic, std::string const &topicfilter) const
 Create a connector for this port's Checking type on the master Blackboard. More...
 
- Public Member Functions inherited from nrt::ModuleBase
 ModuleBase ()
 Constructor.
 
virtual ~ModuleBase ()
 Virtual destructor for safe inheritance.
 
ModuleUID const & uid () const
 Get our unique ID which will be used to track Module objects in distributed systems.
 
std::string getNamespace () const
 Get the module's namespace. More...
 
void setLogicalPath (std::string const &lp)
 Set the logical path for this module, as categ/subcat/.../classname. More...
 
std::string getLogicalPath () const
 Get the logical path for this module, as categ/subcat/.../classname.
 
- Public Member Functions inherited from nrt::MessageSubscriberCoreBase
virtual ~MessageSubscriberCoreBase ()
 Virtual destructor for safe inheritance.
 
void setTopicFilter (std::string const &topicfilt_)
 Set the TopicFilter for this subscriber. More...
 

Additional Inherited Members

- Public Types inherited from nrt::MessageSubscriberCore< nrt::SimpleMessageSubscription< T, true > >
typedef
nrt::SimpleMessageSubscription
< T, true > 
SubscriptionType
 Our underlying subscription type (used by Connectors)
 
typedef
nrt::SimpleMessageSubscription
< T, true > 
InPtr
 Type used for incoming messages in onMessage. More...
 
typedef
nrt::SimpleMessageSubscription
< T, true >::RetUptr 
OutPtr
 Type that onMessage() returns (typically, void or std::unique_ptr<ReturnMessageType>)
 
- Protected Member Functions inherited from nrt::MessageSubscriberCore< nrt::SimpleMessageSubscription< T, true > >
 MessageSubscriberCore (std::string const &mod, std::string const &portna, std::string const &descr)
 Special constructor used only by dynamic ports (Parameter, split subscribers, etc)
 
virtual void notifySplitReceive (size_t const bitnum)
 Notification called by each sub-subscriber when it receives a split field.
 
virtual void abortSplitReceive ()
 Order to abort a split receive, e.g., upon destruction or stop()
 
- Protected Attributes inherited from nrt::ModuleBase
boost::shared_mutex itsNamespaceMtx
 
std::string namespc
 
std::string logicalpath
 
- Protected Attributes inherited from nrt::MessageSubscriberCoreBase
std::string msgtype
 Type of Message we subscribe to.
 
std::string rettype
 Type of Message we return from our callback.
 
std::string module
 Module which we belong to.
 
std::string portname
 String name for our Subscription port class.
 
std::string description
 String human description for our Subscription.
 
std::string topicfilt
 TopicFilter that we subscribe to.
 
int sequence
 Subscriber sequence number within module used for ordering of ports in the GUI.
 
bool splittable
 Can this port be split into sub-ports?
 
boost::shared_mutex mtx
 
std::shared_ptr
< nrt::MessageSubscriberCallbackWrapperBase > 
callbackWrapperBase
 
std::shared_ptr
< nrt::MessageSubscriberCallbackWrapperBase > 
callbackAnyWrapperBase
 

Member Function Documentation

template<typename T >
void nrt::SplitMessageSubscriber< T, true >::onMessage ( nrt::SimpleMessageSubscription< T, true >  msg)
inlinevirtual

Callback called by the Blackboard when a relevant Message is posted.

Derived classes must implement this function.

Implements nrt::MessageSubscriberCore< nrt::SimpleMessageSubscription< T, true > >.

Definition at line 1179 of file ModulePortImpl.H.


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