RobWorkProject  23.9.11-
Public Member Functions | List of all members
LuaExecutionThread Class Reference

this class handles the execution of lua commands such that they are executed in a seperate thread. More...

#include <LuaExecutionThread.hpp>

Inherits QThread.

Public Member Functions

 LuaExecutionThread (const std::string &cmd, rw::core::Ptr< rwlibs::swig::LuaState > lstate, rw::core::Ptr< rw::core::LogWriter > output, QObject *parent=NULL)
 constructor More...
 
void set (const std::string &cmd, rw::core::Ptr< rwlibs::swig::LuaState > lstate, rw::core::Ptr< rw::core::LogWriter > output)
 sets the command to execute, the lua state on which to execute and the log in which output should be written. More...
 
void run ()
 executes the command
 
void stop ()
 stop a running script
 
std::string getReturnString ()
 on error this returns the error message reported by the lua interpreter More...
 
int getReturnValue ()
 returns the value which lua reports upon completion of executing the lua command string.
 
std::string getCommand ()
 return the command that was executed. More...
 

Detailed Description

this class handles the execution of lua commands such that they are executed in a seperate thread.

Constructor & Destructor Documentation

◆ LuaExecutionThread()

LuaExecutionThread ( const std::string &  cmd,
rw::core::Ptr< rwlibs::swig::LuaState lstate,
rw::core::Ptr< rw::core::LogWriter output,
QObject *  parent = NULL 
)
inline

constructor

Parameters
cmd
lstate
output
parent

Member Function Documentation

◆ getCommand()

std::string getCommand ( )
inline

return the command that was executed.

Returns
command string that was executed.

◆ getReturnString()

std::string getReturnString ( )
inline

on error this returns the error message reported by the lua interpreter

Returns

◆ set()

void set ( const std::string &  cmd,
rw::core::Ptr< rwlibs::swig::LuaState lstate,
rw::core::Ptr< rw::core::LogWriter output 
)

sets the command to execute, the lua state on which to execute and the log in which output should be written.

Parameters
cmd[in] a valid Lua block
lstate[in] the current lua state
output[in] the log in which to print result

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