Scripting.hpp
Go to the documentation of this file.
00001 /***************************************************************************
00002   tag: The SourceWorks  Tue Sep 7 00:55:18 CEST 2010  Scripting.hpp
00003 
00004                         Scripting.hpp -  description
00005                            -------------------
00006     begin                : Tue September 07 2010
00007     copyright            : (C) 2010 The SourceWorks
00008     email                : peter@thesourceworks.com
00009 
00010  ***************************************************************************
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU General Public                   *
00013  *   License as published by the Free Software Foundation;                 *
00014  *   version 2 of the License.                                             *
00015  *                                                                         *
00016  *   As a special exception, you may use this file as part of a free       *
00017  *   software library without restriction.  Specifically, if other files   *
00018  *   instantiate templates or use macros or inline functions from this     *
00019  *   file, or you compile this file and link it with other files to        *
00020  *   produce an executable, this file does not by itself cause the         *
00021  *   resulting executable to be covered by the GNU General Public          *
00022  *   License.  This exception does not however invalidate any other        *
00023  *   reasons why the executable file might be covered by the GNU General   *
00024  *   Public License.                                                       *
00025  *                                                                         *
00026  *   This library is distributed in the hope that it will be useful,       *
00027  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00028  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00029  *   Lesser General Public License for more details.                       *
00030  *                                                                         *
00031  *   You should have received a copy of the GNU General Public             *
00032  *   License along with this library; if not, write to the Free Software   *
00033  *   Foundation, Inc., 59 Temple Place,                                    *
00034  *   Suite 330, Boston, MA  02111-1307  USA                                *
00035  *                                                                         *
00036  ***************************************************************************/
00037 
00038 
00039 #ifndef ORO_SCRIPTING_HPP_
00040 #define ORO_SCRIPTING_HPP_
00041 
00042 #include "../ServiceRequester.hpp"
00043 #include "ProgramInterface.hpp"
00044 #include "StateMachine.hpp"
00045 #include "../OperationCaller.hpp"
00046 #include <string>
00047 
00048 namespace RTT
00049 {
00050 
00054     class RTT_SCRIPTING_API Scripting
00055         : public ServiceRequester
00056     {
00057     public:
00058         Scripting(TaskContext* owner);
00059         ~Scripting();
00060         typedef scripting::ProgramInterface::Status ProgramStatus;
00061         typedef scripting::StateMachine::Status StateMachineStatus;
00062 
00063         OperationCaller<bool (const std::string& )> unloadProgram;
00064 
00065         OperationCaller<ProgramStatus::ProgramStatus (const std::string& )> getProgramStatus;
00066 
00067         OperationCaller<std::string (const std::string& )> getProgramStatusStr;
00068 
00069         OperationCaller<std::vector<std::string>(void)> getProgramList;
00070 
00071         OperationCaller<bool ( const std::string&  )> unloadStateMachine;
00072 
00073         OperationCaller<StateMachineStatus::StateMachineStatus (const std::string& )> getStateMachineStatus;
00074 
00075         OperationCaller<std::string (const std::string& )> getStateMachineStatusStr;
00076 
00077         OperationCaller<std::vector<std::string> ()> getStateMachineList;
00078 
00079         OperationCaller<int (const std::string&  )> execute;
00080 
00081         OperationCaller<bool ( const std::string&)> runScript;
00082 
00083         OperationCaller<bool ( const std::string& )> eval;
00084 
00085         OperationCaller<bool ( const std::string&)> loadPrograms;
00086 
00087         OperationCaller<bool ( const std::string& )> loadProgramText;
00088 
00089         OperationCaller<int (const std::string& )> getProgramLine;
00090 
00091         OperationCaller<std::string (const std::string&  )> getProgramText;
00092 
00093         OperationCaller<bool ( const std::string& )> loadStateMachines;
00094 
00095         OperationCaller<bool ( const std::string& code )> loadStateMachineText;
00096 
00097         OperationCaller<std::string (const std::string&  )> getStateMachineText;
00098 
00099         OperationCaller<int (const std::string&  )> getStateMachineLine;
00100 
00101         OperationCaller<bool (const std::string& )> startProgram;
00102 
00103         OperationCaller<bool (const std::string& )> stopProgram;
00104 
00105         OperationCaller<bool (const std::string& )> pauseProgram;
00106 
00107         OperationCaller<bool (const std::string& )> stepProgram;
00108 
00109         OperationCaller<bool (const std::string& )> hasProgram;
00110 
00111         OperationCaller<bool (const std::string& )> isProgramRunning;
00112 
00113         OperationCaller<bool (const std::string& )> isProgramPaused;
00114 
00115         OperationCaller<bool (const std::string& )> inProgramError;
00116 
00117         OperationCaller<bool (const std::string& )> activateStateMachine;
00118 
00119         OperationCaller<bool (const std::string& )> deactivateStateMachine;
00120 
00121         OperationCaller<bool (const std::string& )> startStateMachine;
00122 
00123         OperationCaller<bool (const std::string& )> pauseStateMachine;
00124 
00125         OperationCaller<bool (const std::string& )> stopStateMachine;
00126 
00127         OperationCaller<bool (const std::string& )> resetStateMachine;
00128 
00129         OperationCaller<bool (const std::string& , const std::string& )> requestStateMachineState;
00130 
00131         OperationCaller<bool (const std::string& )> hasStateMachine;
00132 
00133         OperationCaller<bool (const std::string& )> isStateMachineActive;
00134 
00135         OperationCaller<bool (const std::string& )> isStateMachineRunning;
00136 
00137         OperationCaller<bool (const std::string& )> inStateMachineError;
00138 
00139         OperationCaller<bool (const std::string& )> isStateMachinePaused;
00140 
00141         OperationCaller<std::string (const std::string& )> getStateMachineState;
00142 
00143         OperationCaller<bool (const std::string& , const std::string& )> inStateMachineState;
00144     };
00145 
00146 }
00147 
00148 #endif /* ORO_SCRIPTING_HPP_ */


rtt
Author(s): RTT Developers
autogenerated on Fri Sep 9 2016 04:01:58