- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/Command/CommandTranslator.h

    00001
    00002 //
    00003 // Copyright (c) 2005           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00010
    00011 #ifndef MERS_EXECUTIVES_DEDUCTIVECONTROLLER_COMMAND_COMMANDTRANSLATOR_HEADERFILE
    00012 #define MERS_EXECUTIVES_DEDUCTIVECONTROLLER_COMMAND_COMMANDTRANSLATOR_HEADERFILE
    00013
    00014 #ifdef _MSC_VER
    00015 #pragma warning(disable:4786)
    00016 #endif
    00017
    00018 #include <Mers/Utils/Logging/logger.h>
    00019
    00020 #include <Mers/Interfaces/ExecutionInterfaceBase.h>
    00021 #include <Mers/Utils/Containers/DynamicArrayTemplate.h>
    00022
    00023 namespace Mers {
    00024         namespace Executives {
    00025                 namespace DeductiveController {
    00026                         namespace Command {
    00027
    00028                                 class CommandDispatcherEntry;
    00029
    00036                                 class CommandTranslator :
    00037                                         public Mers::Interfaces::ExecutionInterfaceBase
    00038                                 {
    00039                                 public:
    00049                                         CommandTranslator(Mers::Interfaces::ExecutionInterfaceBase * execInt,
    00050                                                 Mers::Utils::Containers::DynamicArrayTemplate
    00051                                                 < CommandDispatcherEntry > &entries);
    00052
    00056                                         ~CommandTranslator();
    00057
    00074                                         virtual bool start( TaskIdentifier task );
    00075
    00080                                         virtual bool stop();
    00081
    00092                                         virtual bool stop( TaskIdentifier task );
    00093
    00113                                         virtual int step( bool block = true );
    00114
    00120                                         virtual bool isDone();
    00121
    00129                                         virtual bool isDone( TaskIdentifier task );
    00130
    00139                                         virtual Mers::Utils::Lang::String getActiveTasksString() const;
    00140
    00150                                         virtual TaskIdentifier createTask( const Mers::Utils::Lang::String &taskName );
    00151
    00163                                         virtual TaskIdentifier createTask( const Mers::Utils::Lang::String &taskName,
    00164                                                 std::vector< const Mers::Utils::Lang::String *> const &parameters );
    00165
    00173                                         virtual bool isValid( TaskIdentifier task );
    00174
    00183                                         virtual void deleteTask( TaskIdentifier task );
    00184
    00190                                         virtual Mers::Interfaces::TaskFactory * getTaskFactory();
    00191
    00201                                         virtual t_TaskSharedPointer getTask( TaskIdentifier task ) const;
    00202
    00203                                         virtual std::set<TaskIdentifier> getRecentlyFailedTasks() { std::set<TaskIdentifier> recentlyFailedTasks; return recentlyFailedTasks; }
    00204                                         virtual std::set<TaskIdentifier> getRecentlyCompletedTasks() { std::set<TaskIdentifier> recentlyCompletedTasks; return recentlyCompletedTasks; }
    00205
    00206 #ifndef EMBEDDED
    00207
    00213                                         virtual void print(std::ostream &out) const;
    00214 #endif
    00215
    00216                                 protected:
    00219                                         ExecutionInterfaceBase * m_execInt;
    00220
    00224                                         Mers::Utils::Containers::DynamicArrayTemplate
    00225                                         < const CommandDispatcherEntry > m_DispatcherEntries;
    00226
    00228                                         static log4cplus::Logger logger;
    00229                                 };
    00230                         }
    00231                 }
    00232         }
    00233 }
    00234
    00235 #endif // MERS_EXECUTIVES_DEDUCTIVECONTROLLER_COMMAND_COMMANDTRANSLATOR_HEADERFILE