Orocos Real-Time Toolkit  2.5.0
Scripting.cpp
00001 /***************************************************************************
00002   tag: The SourceWorks  Tue Sep 7 00:55:18 CEST 2010  Scripting.cpp
00003 
00004                         Scripting.cpp -  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 #include "Scripting.hpp"
00040 
00041 namespace RTT
00042 {
00043     /*
00044       unloadProgram
00045       getProgramStatus
00046       getProgramStatusStr
00047       getProgramList
00048       unloadStateMachine
00049       getStateMachineStatus
00050       getStateMachineStatusStr
00051       getStateMachineList
00052       getStateMachine
00053       getStateMachine
00054       execute
00055       runScript
00056       eval
00057       loadPrograms
00058       loadProgramText
00059       unloadProgram
00060       getProgramLine
00061       getProgramText
00062       loadStateMachines
00063       loadStateMachineText
00064       unloadStateMachine
00065       getStateMachineText
00066       getStateMachineLine
00067       getCurrentState
00068       startProgram
00069       stopProgram
00070       pauseProgram
00071       stepProgram
00072       hasProgram
00073       isProgramRunning
00074       isProgramPaused
00075       inProgramError
00076       activateStateMachine
00077       deactivateStateMachine
00078       startStateMachine
00079       pauseStateMachine
00080       stopStateMachine
00081       resetStateMachine
00082       requestStateMachineState
00083       hasStateMachine
00084       isStateMachineActive
00085       isStateMachineRunning
00086       inStateMachineError
00087       isStateMachinePaused
00088       getStateMachineState
00089       inStateMachineState
00090     */
00091     Scripting::Scripting(TaskContext* owner)
00092         : ServiceRequester("scripting", owner),
00093           unloadProgram("unloadProgram"),
00094           getProgramStatus("getProgramStatus"),
00095           getProgramStatusStr("getProgramStatusStr"),
00096           getProgramList("getProgramList"),
00097           unloadStateMachine("unloadStateMachine"),
00098           getStateMachineStatus("getStateMachineStatus"),
00099           getStateMachineStatusStr("getStateMachineStatusStr"),
00100           getStateMachineList("getStateMachineList"),
00101           execute("execute"),
00102           runScript("runScript"),
00103           eval("eval"),
00104           loadPrograms("loadPrograms"),
00105           loadProgramText("loadProgramText"),
00106           getProgramLine("getProgramLine"),
00107           getProgramText("getProgramText"),
00108           loadStateMachines("loadStateMachines"),
00109           loadStateMachineText("loadStateMachineText"),
00110           getStateMachineText("getStateMachineText"),
00111           getStateMachineLine("getStateMachineLine"),
00112           startProgram("startProgram"),
00113           stopProgram("stopProgram"),
00114           pauseProgram("pauseProgram"),
00115           stepProgram("stepProgram"),
00116           hasProgram("hasProgram"),
00117           isProgramRunning("isProgramRunning"),
00118           isProgramPaused("isProgramPaused"),
00119           inProgramError("inProgramError"),
00120           activateStateMachine("activateStateMachine"),
00121           deactivateStateMachine("deactivateStateMachine"),
00122           startStateMachine("startStateMachine"),
00123           pauseStateMachine("pauseStateMachine"),
00124           stopStateMachine("stopStateMachine"),
00125           resetStateMachine("resetStateMachine"),
00126           requestStateMachineState("requestStateMachineState"),
00127           hasStateMachine("hasStateMachine"),
00128           isStateMachineActive("isStateMachineActive"),
00129           isStateMachineRunning("isStateMachineRunning"),
00130           inStateMachineError("inStateMachineError"),
00131           isStateMachinePaused("isStateMachinePaused"),
00132           getStateMachineState("getStateMachineState"),
00133           inStateMachineState("inStateMachineState")
00134     {
00135         addOperationCaller(unloadProgram);
00136         addOperationCaller(getProgramStatus);
00137         addOperationCaller(getProgramStatusStr);
00138         addOperationCaller(getProgramList);
00139         addOperationCaller(unloadStateMachine);
00140         addOperationCaller(getStateMachineStatus);
00141         addOperationCaller(getStateMachineStatusStr);
00142         addOperationCaller(getStateMachineList);
00143         addOperationCaller(execute);
00144         addOperationCaller(eval);
00145         addOperationCaller(runScript);
00146         addOperationCaller(loadPrograms);
00147         addOperationCaller(loadProgramText);
00148         addOperationCaller(getProgramLine);
00149         addOperationCaller(getProgramText);
00150         addOperationCaller(loadStateMachines);
00151         addOperationCaller(loadStateMachineText);
00152         addOperationCaller(getStateMachineText);
00153         addOperationCaller(getStateMachineLine);
00154         addOperationCaller(startProgram);
00155         addOperationCaller(stopProgram);
00156         addOperationCaller(pauseProgram);
00157         addOperationCaller(stepProgram);
00158         addOperationCaller(hasProgram);
00159         addOperationCaller(isProgramRunning);
00160         addOperationCaller(isProgramPaused);
00161         addOperationCaller(inProgramError);
00162         addOperationCaller(activateStateMachine);
00163         addOperationCaller(deactivateStateMachine);
00164         addOperationCaller(startStateMachine);
00165         addOperationCaller(pauseStateMachine);
00166         addOperationCaller(stopStateMachine);
00167         addOperationCaller(resetStateMachine);
00168         addOperationCaller(requestStateMachineState);
00169         addOperationCaller(hasStateMachine);
00170         addOperationCaller(isStateMachineActive);
00171         addOperationCaller(isStateMachineRunning);
00172         addOperationCaller(inStateMachineError);
00173         addOperationCaller(isStateMachinePaused);
00174         addOperationCaller(getStateMachineState);
00175         addOperationCaller(inStateMachineState);
00176     }
00177 
00178     Scripting::~Scripting()
00179     {
00180     }
00181 
00182 }