LuaService.hpp
Go to the documentation of this file.
1 #ifndef OCL_LUASERVICE_HPP
2 #define OCL_LUASERVICE_HPP
3 
4 /*
5  * Lua scripting plugin
6  */
7 
8 #include <rtt/Service.hpp>
9 #include <rtt/os/Mutex.hpp>
10 
11 #include "LuaStateHandle.hpp"
12 
13 struct lua_State;
14 #ifdef LUA_RTT_TLSF
15 struct lua_tlsf_info;
16 #endif
17 
18 namespace OCL
19 {
20  class LuaService : public RTT::Service
21  {
22  protected:
25 
26  public:
28  ~LuaService();
29 
30  bool exec_file(const std::string &file);
31  bool exec_str(const std::string &str);
32 
34  };
35 
36 #ifdef LUA_RTT_TLSF
37  class LuaTLSFService : public RTT::Service
38  {
39  protected:
40  lua_State *L;
42  struct lua_tlsf_info *tlsf_inf;
43 
44  public:
45  LuaTLSFService(RTT::TaskContext* tc);
46  ~LuaTLSFService();
47 
48  bool tlsf_incmem(unsigned int size);
49  bool exec_file(const std::string &file);
50  bool exec_str(const std::string &str);
51 
53  };
54 #endif // LUA_RTT_TLSF
55 } // namespace OCL
56 
57 #endif // OCL_LUASERVICE_HPP
RTT::os::Mutex m
Definition: LuaService.hpp:24
bool exec_file(const std::string &file)
Definition: LuaService.cpp:105
LuaService(RTT::TaskContext *tc)
Definition: LuaService.cpp:27
LuaStateHandle getLuaState()
Definition: LuaService.cpp:127
lua_State * L
Definition: LuaService.hpp:23
struct lua_State lua_State
Definition: lua-repl.h:54
bool exec_str(const std::string &str)
Definition: LuaService.cpp:116


ocl
Author(s): OCL Development Team
autogenerated on Wed Jun 26 2019 19:26:27