Orocos Real-Time Toolkit
2.9.0
|
The base signal class which stores connection objects. More...
#include <rtt/internal/SignalBase.hpp>
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. More... | |
void | disconnect () |
Disconnects all connections. More... | |
void | destroy () |
Destroys all connections. More... | |
void | reserve (size_t conns) |
Reserves memory for a number of connections. More... | |
virtual int | arity () const =0 |
Returns the arity (the number of arguments) of this signal. More... | |
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) |
SignalBase () | |
Protected Attributes | |
connections_list | mconnections |
bool | emitting |
Friends | |
class | ConnectionBase |
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.
Definition at line 131 of file SignalBase.hpp.
Definition at line 133 of file SignalBase.hpp.
|
protected |
Definition at line 210 of file SignalBase.cpp.
References mconnections.
|
virtual |
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().
|
pure virtual |
Returns the arity (the number of arguments) of this signal.
Implemented in RTT::internal::OROCOS_SIGNAL_N< R, SlotFunctionT >.
|
protected |
Definition at line 103 of file SignalBase.cpp.
|
protected |
Definition at line 130 of file SignalBase.cpp.
Referenced by RTT::internal::ConnectionBase::destroy().
|
protected |
Definition at line 146 of file SignalBase.cpp.
|
protected |
Definition at line 88 of file SignalBase.cpp.
void RTT::internal::SignalBase::destroy | ( | ) |
Destroys all connections.
This will destroy all connections of this Event. All Handles will be disconnected and unable to reconnect.
Definition at line 251 of file SignalBase.cpp.
References RTT::internal::ListLockFree< T >::empty(), RTT::internal::ListLockFree< T >::erase(), RTT::internal::ListLockFree< T >::front(), and mconnections.
Referenced by ~SignalBase().
void RTT::internal::SignalBase::disconnect | ( | ) |
Disconnects all connections.
All Handles will be disconnected, but able to reconnect.
Definition at line 240 of file SignalBase.cpp.
References RTT::internal::ListLockFree< T >::apply(), and mconnections.
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.
conns | The number of connections to reserve memory for. |
Definition at line 267 of file SignalBase.cpp.
References mconnections, and RTT::internal::ListLockFree< T >::reserve().
|
friend |
Definition at line 144 of file SignalBase.hpp.
|
protected |
Definition at line 171 of file SignalBase.hpp.
|
protected |
Definition at line 154 of file SignalBase.hpp.
Referenced by destroy(), disconnect(), reserve(), and SignalBase().