RTT::detail::DataSourceArgsCommand< CommandT, CommandF > Class Template Reference

A Command which dispatches locally. More...

#include <rtt/DataSourceArgsCommand.hpp>

Inheritance diagram for RTT::detail::DataSourceArgsCommand< CommandT, CommandF >:
RTT::DispatchInterface

List of all members.

Public Types

typedef boost::function_traits
< CommandT > 
traits
typedef CommandT Signature
typedef bool result_type
enum  Status {
  NotReady, Ready, Sent, NotAccepted,
  Accepted, Executed, NotValid, Valid,
  Done
}
 

The status progressions of a Dispatchable Command.

More...
typedef boost::shared_ptr
< DispatchInterface
shared_ptr
 If you want to share ownership of DispatchInterface instances, use this shared_ptr type.
typedef CommandInterface_ptr _ptr_type
typedef CommandInterface_var _var_type
typedef CommandInterface_out _out_type

Public Member Functions

 DataSourceArgsCommand (boost::function< CommandT > com, boost::function< CommandT > con, CommandProcessor *cp, bool inverted)
 DataSourceArgsCommand (CommandF com, CommandF con, CommandProcessor *cp, bool inverted)
DataSourceArgsCommand
< CommandT, CommandF > * 
create () const
template<class Arg1T >
DataSourceArgsCommand
< CommandT, CommandF > * 
create (DataSource< Arg1T > *a1) const
template<class Arg1T , class Arg2T >
DataSourceArgsCommand
< CommandT, CommandF > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2) const
template<class Arg1T , class Arg2T , class Arg3T >
DataSourceArgsCommand
< CommandT, CommandF > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3) const
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T >
DataSourceArgsCommand
< CommandT, CommandF > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3, DataSource< Arg4T > *a4) const
bool ready () const
 The command's effect is done.
virtual bool dispatch ()
 Dispatch a command.
virtual void readArguments ()
virtual bool execute ()
virtual bool done () const
 Returns true if the command is done.
virtual void reset ()
 After reset(), another attempt to dispatch the command will be made upon execute().
virtual bool sent () const
 Returns true if the command was sent to the CommandProcessor.
virtual bool accepted () const
 Returns true if the command was accepted when sent to the CommandProcessor.
virtual bool executed () const
 Returns true if the command was executed by the CommandProcessor.
virtual bool valid () const
 Returns true if the command was valid, i.e.
virtual ConditionInterfacecreateCondition () const
virtual DataSourceArgsCommand
< CommandT, CommandF > * 
clone () const
virtual DataSourceArgsCommand
< CommandT, CommandF > * 
copy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const
virtual ::RTT::Corba::CommandList * getCommands (void)
virtual
::RTT::Corba::Descriptions * 
getArguments (const char *command)
virtual char * getResultType (const char *command)
virtual char * getDescription (const char *command)
virtual ::RTT::Corba::Command_ptr createCommand (const char *command, const ::RTT::Corba::Arguments &args)
virtual ::RTT::Corba::Command_ptr createCommandAny (const char *command, const ::RTT::Corba::AnyArguments &args)
virtual ::CORBA::Boolean _is_a (const char *type_id)
virtual const char * _interface_repository_id (void) const
virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr)

Static Public Member Functions

static CommandInterface_ptr _duplicate (CommandInterface_ptr obj)
static void _tao_release (CommandInterface_ptr obj)
static CommandInterface_ptr _narrow (::CORBA::Object_ptr obj)
static CommandInterface_ptr _unchecked_narrow (::CORBA::Object_ptr obj)
static CommandInterface_ptr _nil (void)
static void _tao_any_destructor (void *)

Protected Member Functions

virtual void RTT_Corba_CommandInterface_setup_collocation (void)

Friends

class TAO::Narrow_Utils< CommandInterface >

Detailed Description

template<class CommandT, class CommandF = detail::Functor<CommandT>>
class RTT::detail::DataSourceArgsCommand< CommandT, CommandF >

A Command which dispatches locally.

The arguments are fetched from DataSources.

Definition at line 57 of file DataSourceArgsCommand.hpp.


Member Enumeration Documentation

The status progressions of a Dispatchable Command.

The order of these enums is important and should not be altered.

Enumerator:
Ready 

The command is not yet initialised.

Sent 

The command is ready for execution.

NotAccepted 

The command has been sent/dispatched to the CommandProcessor.

Accepted 

The command was not accepted by the CommandProcessor.

Executed 

The command was accepted by the CommandProcessor.

NotValid 

The command was executed by the CommandProcessor.

Valid 

The command's arguments were found to be invalid.

Done 

The command's arguments were valid.

Definition at line 65 of file DispatchInterface.hpp.


Member Function Documentation

template<class CommandT, class CommandF = detail::Functor<CommandT>>
virtual bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::accepted (  )  const [inline, virtual]

Returns true if the command was accepted when sent to the CommandProcessor.

A Command is accepted when the CommandProcessor was running and its queue was not full.

Implements RTT::DispatchInterface.

Definition at line 163 of file DataSourceArgsCommand.hpp.

template<class CommandT, class CommandF = detail::Functor<CommandT>>
virtual bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::dispatch (  )  [inline, virtual]

Dispatch a command.

If it is not accepted, fail, if it is accepted, return true

Implements RTT::DispatchInterface.

Definition at line 130 of file DataSourceArgsCommand.hpp.

References RTT::CommandProcessor::process().

template<class CommandT, class CommandF = detail::Functor<CommandT>>
virtual bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::executed (  )  const [inline, virtual]

Returns true if the command was executed by the CommandProcessor.

When executed() is true, you can check if it was found valid().

Implements RTT::DispatchInterface.

Definition at line 167 of file DataSourceArgsCommand.hpp.

template<class CommandT, class CommandF = detail::Functor<CommandT>>
bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::ready (  )  const [inline, virtual]

The command's effect is done.

Returns true if the command is ready for dispatch. If ready() returns true, dispatch() can be safely called, otherwise, dispatch() will fail.

Implements RTT::DispatchInterface.

Definition at line 126 of file DataSourceArgsCommand.hpp.

template<class CommandT, class CommandF = detail::Functor<CommandT>>
virtual bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::sent (  )  const [inline, virtual]

Returns true if the command was sent to the CommandProcessor.

You can use this flag to check whether execute() was invoked.

Implements RTT::DispatchInterface.

Definition at line 159 of file DataSourceArgsCommand.hpp.

template<class CommandT, class CommandF = detail::Functor<CommandT>>
virtual bool RTT::detail::DataSourceArgsCommand< CommandT, CommandF >::valid (  )  const [inline, virtual]

Returns true if the command was valid, i.e.

the command itself was executed and returned true.

Implements RTT::DispatchInterface.

Definition at line 171 of file DataSourceArgsCommand.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:46 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3