The Orocos Event is a thread-safe publish-subscribe implementation and provides synchronous and asynchronous callback handling. More...
#include <rtt/Event.hpp>
Public Types | |
typedef EventProcessor::AsynStorageType | AsynStorageType |
typedef boost::function < SignatureT > | SlotFunction |
typedef Event< SignatureT > | EventType |
typedef SignatureT | Signature |
typedef boost::function_traits < SignatureT >::result_type | result_type |
The result type of the function signature. | |
Public Member Functions | |
Event (const std::string name) | |
Create a named Synchronous/Asynchronous Event. | |
Event () | |
Create a Synchronous/Asynchronous Event. | |
Event (const Event &m) | |
Event objects may be copied. | |
Event & | operator= (const Event &m) |
Event objects may be assigned. | |
Event (boost::shared_ptr< ActionInterface > implementation) | |
Initialise a nameless Event object from an implementation. | |
Event & | operator= (boost::shared_ptr< ActionInterface > implementation) |
Event objects may be assigned to an implementation. | |
bool | ready () const |
Check if this Event is ready for execution. | |
const std::string & | getName () const |
Returns the name of this event, given upon construction. | |
int | arity () const |
Return the arity of this event. | |
Handle | connect (const SlotFunction &f) |
Connect a synchronous event slot to this event. | |
Handle | connect (const SlotFunction &l, EventProcessor *ep, AsynStorageType t=EventProcessor::OnlyFirst) |
Connect an Asynchronous event slot to this event. | |
Handle | setup (const SlotFunction &f) |
Setup a synchronous event slot to this event. | |
Handle | setup (const SlotFunction &l, EventProcessor *ep, AsynStorageType t=EventProcessor::OnlyFirst) |
Setup an Asynchronous event slot to this event. | |
EventBasePtr | getImplementation () const |
Static Public Attributes | |
static NameServer< EventType * > | nameserver |
Public nameserver for Events. |
The Orocos Event is a thread-safe publish-subscribe implementation and provides synchronous and asynchronous callback handling.
Use connect() to immediately connect a callback function to this Event. The returned Handle object can be used to disconnect/reconnect it lateron.
Use setup() to setup a connection of a callback function with this Event, but leave it in a dormant state. Use the returned Handle object and connect() to establish the connection.
Emit (call,raise, fire) the event by writing:
my_event(a, b, c);
SignatureT | The function type signature of the callback functions this event will call. For example void(int, double) if you want the event to call a function 'void foo(int x, double y)'; |
Definition at line 84 of file Event.hpp.
typedef EventProcessor::AsynStorageType RTT::Event< SignatureT >::AsynStorageType |
RTT::Event< SignatureT >::Event | ( | const Event< SignatureT > & | m | ) | [inline] |
RTT::Event< SignatureT >::Event | ( | boost::shared_ptr< ActionInterface > | implementation | ) | [inline] |
Event& RTT::Event< SignatureT >::operator= | ( | boost::shared_ptr< ActionInterface > | implementation | ) | [inline] |
Event& RTT::Event< SignatureT >::operator= | ( | const Event< SignatureT > & | m | ) | [inline] |
bool RTT::Event< SignatureT >::ready | ( | ) | const [inline] |
NameServer< Event< SignatureT > * > RTT::Event< SignatureT >::nameserver [inline, static] |
Public nameserver for Events.