Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
lua
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
:
23
lua_State
*
L
;
24
RTT::os::Mutex
m
;
25
26
public
:
27
LuaService
(
RTT::TaskContext
* tc);
28
~LuaService
();
29
30
bool
exec_file
(
const
std::string &file);
31
bool
exec_str
(
const
std::string &str);
32
33
LuaStateHandle
getLuaState
();
34
};
35
36
#ifdef LUA_RTT_TLSF
37
class
LuaTLSFService :
public
RTT::Service
38
{
39
protected
:
40
lua_State
*
L
;
41
RTT::os::Mutex
m
;
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
52
LuaStateHandle
getLuaState
();
53
};
54
#endif // LUA_RTT_TLSF
55
}
// namespace OCL
56
57
#endif // OCL_LUASERVICE_HPP
OCL::LuaService::m
RTT::os::Mutex m
Definition:
LuaService.hpp:24
OCL::LuaService::exec_file
bool exec_file(const std::string &file)
Definition:
LuaService.cpp:105
OCL::LuaService::LuaService
LuaService(RTT::TaskContext *tc)
Definition:
LuaService.cpp:27
OCL::LuaService::getLuaState
LuaStateHandle getLuaState()
Definition:
LuaService.cpp:127
Mutex.hpp
OCL::LuaService
Definition:
LuaService.hpp:20
OCL::LuaService::L
lua_State * L
Definition:
LuaService.hpp:23
RTT::Service
lua_State
struct lua_State lua_State
Definition:
lua-repl.h:54
Service.hpp
OCL::LuaService::exec_str
bool exec_str(const std::string &str)
Definition:
LuaService.cpp:116
OCL
Definition:
deployer-funcs.cpp:68
RTT::TaskContext
lua_tlsf_info
Definition:
tlsf_rtt.h:10
OCL::LuaService::~LuaService
~LuaService()
Definition:
LuaService.cpp:87
RTT::os::Mutex
LuaStateHandle.hpp
OCL::LuaStateHandle
Definition:
LuaStateHandle.hpp:10
ocl
Author(s): OCL Development Team
autogenerated on Wed Jun 26 2019 19:26:27