Orocos Real-Time Toolkit  2.5.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
RTT::internal::SignalBase Class Reference

The base signal class which stores connection objects. More...

#include <rtt/internal/SignalBase.hpp>

Inherited by RTT::internal::OROCOS_SIGNAL_N< R, SlotFunctionT >.

List of all members.

Public Types

typedef ConnectionBase::shared_ptr connection_t
typedef ListLockFree
< connection_t > 
connections_list

Public Member Functions

virtual ~SignalBase ()
 Deletes this Signal and will destroy all connections and handles of this object.
void disconnect ()
 Disconnects all connections.
void destroy ()
 Destroys all connections.
void reserve (size_t conns)
 Reserves memory for a number of connections.
virtual int arity () const =0
 Returns the arity (the number of arguments) of this signal.

Protected Member Functions

void conn_setup (connection_t conn)
void conn_connect (connection_t conn)
void conn_disconnect (connection_t conn)
void conn_destroy (connection_t conn)

Protected Attributes

connections_list mconnections
bool emitting

Friends

class ConnectionBase

Detailed Description

The base signal class which stores connection objects.

It implements real-time management of connections, such that connection/disconnetion of a handler is always thread-safe and real-time.

Definition at line 128 of file SignalBase.hpp.


Constructor & Destructor Documentation

Deletes this Signal and will destroy all connections and handles of this object.

It is not necessary to call disconnect() or disconnect() prior to destroying a SignalBase.

Definition at line 229 of file SignalBase.cpp.

References destroy().


Member Function Documentation

Destroys all connections.

This will destroy all connections of this Event. All Handles will be disconnected and unable to reconnect.

Definition at line 252 of file SignalBase.cpp.

References RTT::internal::ListLockFree< T >::empty(), RTT::internal::ListLockFree< T >::erase(), and RTT::internal::ListLockFree< T >::front().

Referenced by ~SignalBase().

Disconnects all connections.

All Handles will be disconnected, but able to reconnect.

Definition at line 241 of file SignalBase.cpp.

References RTT::internal::ListLockFree< T >::apply().

void RTT::internal::SignalBase::reserve ( size_t  conns)

Reserves memory for a number of connections.

Use this method to efficiently reserve memory for possible connections. If not used, the event will reserve memory in batch, depending upon demand. This does not impair/influence real-time performance, only memory efficiency.

Parameters:
connsThe number of connections to reserve memory for.

Definition at line 268 of file SignalBase.cpp.

References RTT::internal::ListLockFree< T >::reserve().


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