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

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

template<class Port, class Msg>
class nrt::MessageChecking< Port, Msg >

A Checking is a unique binding of a Message type to a port class.

Module objects can check() on a given Checking port if and only if they derive from the corresponding MessageChecker of the Checking. Msg must derive from nrt::MessageBase. See MessageChecker for how to use check(). A convenience macro is provided (in details/ModuleHelpers.H) to easily declare a checking class:


Where PortName is the name of the class that will embody your Checking, MsgType is the type of message that we wish to check for (must derive from nrt::MessageBase), and Description is a plain C-style string describing your Checking. For example:

class MessageA : public nrt::MessageBase { }; // define some message type A
NRT_DECLARE_MESSAGECHECKER_PORT(AsyncInputA, MessageA, "MessageA Async Input"); // Our port is named AsyncInputA

The reason for declaring a new Checking type is to allow one to have several ones with identical message type, but different descriptions and different port classes. Although these deal with identical messages, they may check in different namespaces and on different topics (see the definition of MessageChecker) and thus achieve different functions.

Definition at line 263 of file ModulePortHelpers.H.

Public Types

typedef Port PortType
typedef Msg MsgType
 The message type.

Static Public Attributes

static bool const isSplittable = false
 Cannot split any check() for now...

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