Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | Public Attributes | List of all members
RTT::internal::FusedMSignal< Signature > Struct Template Reference

A Function object that reacts to a Signal by writing the arguments in data sources and calling an action object. More...

#include <rtt/internal/FusedFunctorDataSource.hpp>

Inheritance diagram for RTT::internal::FusedMSignal< Signature >:
RTT::base::DisposableInterface

Public Types

typedef boost::function_traits< Signature >::result_type result_type
 
typedef result_type value_t
 
typedef create_sequence< typename boost::function_types::parameter_types< Signature >::type > SequenceFactory
 
typedef SequenceFactory::atype DataSourceSequence
 
typedef boost::shared_ptr< FusedMSignal< Signature > > shared_ptr
 

Public Member Functions

 FusedMSignal (base::ActionInterface *act, const DataSourceSequence &s, ExecutionEngine *subscr)
 Create a new object which takes ownership of the action to be executed upon signal. More...
 
 ~FusedMSignal ()
 
result_type invoke (const typename SequenceFactory::data_type &seq) const
 A Fused function that takes the arguments of the signal, puts them into the assignable data sources and executes the associated action. More...
 
void executeAndDispose ()
 Execute functionality and free this object. More...
 
void dispose ()
 As long as dispose (or executeAndDispose() ) is not called, this object will not be destroyed. More...
 
void setArguments (const DataSourceSequence &a1)
 
FusedMSignal< Signature >::shared_ptr cloneRT () const
 

Public Attributes

boost::shared_ptr< base::ActionInterfacemact
 
SequenceFactory::data_store_type arg_cache
 
DataSourceSequence args
 
ExecutionEnginesubscriber
 
boost::shared_ptr< FusedMSignal< Signature > > self
 Used to refcount self as long as dispose() is not called. More...
 

Detailed Description

template<typename Signature>
struct RTT::internal::FusedMSignal< Signature >

A Function object that reacts to a Signal by writing the arguments in data sources and calling an action object.

Implementation note: this class does not require copy/clone semantics because it is re-created for each SM instantiation, so it already gets the copy/cloned Data Sources in its constructor.

Definition at line 514 of file FusedFunctorDataSource.hpp.

Member Typedef Documentation

template<typename Signature>
typedef SequenceFactory::atype RTT::internal::FusedMSignal< Signature >::DataSourceSequence

Definition at line 521 of file FusedFunctorDataSource.hpp.

template<typename Signature>
typedef boost::function_traits<Signature>::result_type RTT::internal::FusedMSignal< Signature >::result_type

Definition at line 517 of file FusedFunctorDataSource.hpp.

template<typename Signature>
typedef create_sequence< typename boost::function_types::parameter_types<Signature>::type> RTT::internal::FusedMSignal< Signature >::SequenceFactory

Definition at line 520 of file FusedFunctorDataSource.hpp.

template<typename Signature>
typedef boost::shared_ptr<FusedMSignal<Signature> > RTT::internal::FusedMSignal< Signature >::shared_ptr

Definition at line 535 of file FusedFunctorDataSource.hpp.

template<typename Signature>
typedef result_type RTT::internal::FusedMSignal< Signature >::value_t

Definition at line 518 of file FusedFunctorDataSource.hpp.

Constructor & Destructor Documentation

template<typename Signature>
RTT::internal::FusedMSignal< Signature >::FusedMSignal ( base::ActionInterface act,
const DataSourceSequence s,
ExecutionEngine subscr 
)
inline

Create a new object which takes ownership of the action to be executed upon signal.

Parameters
actThe action to be executed upon invoke()
sThe data sources we have to fill in before executing the action
subscrThe ExecutionEngine that will execute the action in it's thread. If null is given, the action is executed synchronously within invoke()

Definition at line 544 of file FusedFunctorDataSource.hpp.

template<typename Signature>
RTT::internal::FusedMSignal< Signature >::~FusedMSignal ( )
inline

Definition at line 551 of file FusedFunctorDataSource.hpp.

Member Function Documentation

template<typename Signature>
FusedMSignal<Signature>::shared_ptr RTT::internal::FusedMSignal< Signature >::cloneRT ( ) const
inline

Definition at line 599 of file FusedFunctorDataSource.hpp.

template<typename Signature>
void RTT::internal::FusedMSignal< Signature >::dispose ( )
inlinevirtual

As long as dispose (or executeAndDispose() ) is not called, this object will not be destroyed.

Implements RTT::base::DisposableInterface.

Definition at line 589 of file FusedFunctorDataSource.hpp.

template<typename Signature>
void RTT::internal::FusedMSignal< Signature >::executeAndDispose ( )
inlinevirtual

Execute functionality and free this object.

You may no longer use this object after calling this method.

Implements RTT::base::DisposableInterface.

Definition at line 579 of file FusedFunctorDataSource.hpp.

template<typename Signature>
result_type RTT::internal::FusedMSignal< Signature >::invoke ( const typename SequenceFactory::data_type seq) const
inline

A Fused function that takes the arguments of the signal, puts them into the assignable data sources and executes the associated action.

Definition at line 559 of file FusedFunctorDataSource.hpp.

References RTT::ExecutionEngine::process().

template<typename Signature>
void RTT::internal::FusedMSignal< Signature >::setArguments ( const DataSourceSequence a1)
inline

Definition at line 594 of file FusedFunctorDataSource.hpp.

Member Data Documentation

template<typename Signature>
SequenceFactory::data_store_type RTT::internal::FusedMSignal< Signature >::arg_cache

Definition at line 525 of file FusedFunctorDataSource.hpp.

template<typename Signature>
DataSourceSequence RTT::internal::FusedMSignal< Signature >::args

Definition at line 526 of file FusedFunctorDataSource.hpp.

template<typename Signature>
boost::shared_ptr<base::ActionInterface> RTT::internal::FusedMSignal< Signature >::mact

Definition at line 522 of file FusedFunctorDataSource.hpp.

template<typename Signature>
boost::shared_ptr<FusedMSignal<Signature> > RTT::internal::FusedMSignal< Signature >::self

Used to refcount self as long as dispose() is not called.

This refcount is real-time since both shared_ptr and object were allocated with the rt_allocator class.

Definition at line 533 of file FusedFunctorDataSource.hpp.

template<typename Signature>
ExecutionEngine* RTT::internal::FusedMSignal< Signature >::subscriber

Definition at line 527 of file FusedFunctorDataSource.hpp.


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