iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ModulePortHelpers.H File Reference
#include <nrt/Core/Blackboard/Message.H>
#include <nrt/Core/Blackboard/MessagePosterResults.H>
#include <nrt/Core/Blackboard/MessageCheckerResults.H>
#include <nrt/Core/Blackboard/AnyMessage.H>
#include <nrt/Core/Blackboard/ModuleBase.H>
#include <nrt/Core/Blackboard/ConnectorBase.H>
#include <sys/types.h>
#include <boost/thread/shared_mutex.hpp>
#include <map>
#include <array>

Author
Laurent Itti

License

// ////////////////////////////////////////////////////////////////////////
//              The iLab Neuromorphic Robotics Toolkit (NRT)             //
// Copyright 2010-2012 by the University of Southern California (USC)    //
//                          and the iLab at USC.                         //
//                                                                       //
//                iLab - University of Southern California               //
//                Hedco Neurociences Building, Room HNB-10               //
//                    Los Angeles, Ca 90089-2520 - USA                   //
//                                                                       //
//      See http://ilab.usc.edu for information about this project.      //
// ////////////////////////////////////////////////////////////////////////
// This file is part of The iLab Neuromorphic Robotics Toolkit.          //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is free software: you can      //
// redistribute it and/or modify it under the terms of the GNU General   //
// Public License as published by the Free Software Foundation, either   //
// version 3 of the License, or (at your option) any later version.      //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is distributed in the hope     //
// that it will be useful, but WITHOUT ANY WARRANTY; without even the    //
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       //
// PURPOSE.  See the GNU General Public License for more details.        //
//                                                                       //
// You should have received a copy of the GNU General Public License     //
// along with The iLab Neuromorphic Robotics Toolkit.  If not, see       //
// <http://www.gnu.org/licenses/>.                                       //
// ////////////////////////////////////////////////////////////////////////

Definition in file ModulePortHelpers.H.

Go to the source code of this file.

Classes

class  nrt::ParameterCore< T >
 A changeable parameter for a Component, core class. More...
 
class  nrt::MessagePosting< Port, Msg, Ret >
 A Posting port is a unique binding of a sent Message type and a returned Message type to a port class. More...
 
class  nrt::MessagePosting< Port, Msg, void >
 Specialization of MessagePosting for void return type. More...
 
class  nrt::MessagePosting< Port, nrt::Message< T >, void >
 Specialization of MessagePosting for void return type and nrt::Message<T> message. More...
 
class  nrt::MessageChecking< Port, Msg >
 A Checking is a unique binding of a Message type to a port class. More...
 
class  nrt::MessageSubscription< Port, Msg, Ret >
 A Subscription is a unique binding of a received Message type and a returned Message type to a port class. More...
 
class  nrt::MessageSubscription< Port, Msg, void >
 Specialization of MessageSubscription for void return type. More...
 
class  nrt::MessageSubscription< Port, nrt::Message< T >, void >
 Specialization of MessageSubscription for void return type and nrt::Message<T> message. More...
 
struct  nrt::SimpleMessagePosting< T, isMessage >
 Simple CRTP struct for a MessagePosting, used by split posters. More...
 
struct  nrt::SimpleMessagePosting< T, false >
 Simple CRTP struct for a MessagePosting associated with a nrt::Message<T> and void return type. More...
 
struct  nrt::SimpleMessagePosting< T, true >
 Simple CRTP struct for a MessagePosting associated with a T (should derive from MessageBase) and void return type. More...
 
struct  nrt::SimpleMessageSubscription< T, isMessage >
 Simple CRTP struct for a MessageSubscription, used by split subscribers. More...
 
struct  nrt::SimpleMessageSubscription< T, false >
 Simple CRTP struct for a MessageSubscription, used by split subscribers. More...
 
struct  nrt::SimpleMessageSubscription< T, true >
 Simple CRTP struct for a MessageSubscription, used by split subscribers. More...
 
class  nrt::MessagePoster< Msgs >
 Generic variadic class template definition of MessagePoster. More...
 
class  nrt::MessagePoster<>
 Special case to terminate variadic template inheritance recursion. More...
 
class  nrt::MessagePosterCoreBase
 Base class for a MessagePoster. More...
 
class  nrt::SplitMessagePoster< T >
 Split message poster, implemented by MessagePoster ports that use splittable CompositeMessage messages. More...
 
class  nrt::MessagePosterCore< Posting >
 Module objects which derive from MessagePoster will be allowed to post Message objects. More...
 
class  nrt::SplitMessagePoster< T >
 Split message poster, implemented by MessagePoster ports that use splittable CompositeMessage messages. More...
 
class  nrt::MessageChecker< Checkers >
 Generic variadic MessageChecker class template. More...
 
class  nrt::MessageChecker<>
 Special case to terminate recursion. More...
 
class  nrt::MessageCheckerCoreBase
 Base class for MessageChecker. More...
 
class  nrt::MessageCheckerCore< Checking >
 Module objects which derive from MessageChecker will be allowed to post Message objects. More...
 
class  nrt::MessageSubscriber< Msgs >
 Variadic-template MessageSubscriber class. More...
 
class  nrt::MessageSubscriber<>
 Variadic-template MessageSubscriber class. More...
 
class  nrt::MessageSubscriberCoreBase
 Base class for a MessageSubscriber. More...
 
class  nrt::MessageSubscriberCore< Subscription >
 Core class for the variadic MessageSubscriber template. More...
 
class  nrt::SplitMessageSubscriber< T, true >
 Subscriber helper class for split subscriptions. More...
 
class  nrt::SplitMessageSubscriber< T, false >
 Subscriber helper class for split subscriptions. More...
 

Namespaces

 nrt
 Reserved namespace for NRT core classes and functions.
 

Macros

#define NRT_DECLARE_MESSAGEPOSTER_PORT(PortName, MsgType, RetType, Description)
 Convenience macro to define a Poster using CRTP. More...
 
#define NRT_DECLARE_MESSAGECHECKER_PORT(PortName, MsgType, Description)
 Convenience macro to define a Checker using CRTP. More...
 
#define NRT_DECLARE_MESSAGESUBSCRIBER_PORT(PortName, MsgType, RetType, Description)
 Convenience macro to define a Subscription using CRTP. More...
 

Typedefs

typedef size_t nrt::blackboard::msgkey
 
typedef std::function< void(std::shared_ptr
< std::string const > msg,
std::string const
&transactionkey, size_t const
numcallbacks)> 
nrt::blackboard::MessageSubscriberRemotePostHandler
 
typedef std::function
< std::shared_ptr< std::string
const >std::string const
&transactionkey)> 
nrt::blackboard::MessageSubscriberRemoteCallback
 
typedef std::function< void(std::shared_ptr
< nrt::MessageBase const >
msg, std::string &retstr)> 
nrt::blackboard::MessageSubscriberCallbackForRemote
 
typedef std::function
< std::shared_ptr< std::string
const >
nrt::MessageCheckerPolicy
const)> 
nrt::blackboard::MessageCheckerRemoteCall
 
typedef std::shared_ptr
< nrt::AnyMessage const > 
nrt::blackboard::AnyMsgPtr
 

Enumerations

enum  nrt::MessageCheckerPolicy { nrt::MessageCheckerPolicy::Any, nrt::MessageCheckerPolicy::Unseen, nrt::MessageCheckerPolicy::AnyBlock, nrt::MessageCheckerPolicy::UnseenBlock }
 Policy flag that can be passed to check() to indicate what to check for and how. More...
 
enum  nrt::ModuleParamPort { nrt::ModuleParamPort::Poster, nrt::ModuleParamPort::Checker, nrt::ModuleParamPort::Subscriber }
 Module Parameter port type, used to create ports in Modules for Parameters. More...
 

Functions

void nrt::blackboard::catchAndRethrow (std::string const &bbwhere, nrt::ModuleBase *mod)
 Helper function to internally catch and rethrow exceptions within the Blackboard.