Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
y
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Properties
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
i
m
o
q
r
s
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
b
c
d
e
f
h
k
l
o
p
r
s
t
u
x
z
Enumerator
b
c
d
f
h
i
k
l
n
o
p
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
plotjuggler_app
transforms
lua_custom_function.h
Go to the documentation of this file.
1
#ifndef LUA_CUSTOM_FUNCTION_H
2
#define LUA_CUSTOM_FUNCTION_H
3
4
#include "
custom_function.h
"
5
#include "
sol.hpp
"
6
7
#include <mutex>
8
9
class
LuaCustomFunction
:
public
CustomFunction
10
{
11
public
:
12
LuaCustomFunction
(
SnippetData
snippet
= {});
13
14
void
initEngine
()
override
;
15
16
void
calculatePoints
(
const
std::vector<const PlotData*>& channels_data,
17
size_t
point_index, std::vector<PlotData::Point>& points)
override
;
18
19
QString
language
()
const override
20
{
21
return
"LUA"
;
22
}
23
24
const
char
*
name
()
const override
25
{
26
return
"LuaCustomFunction"
;
27
}
28
29
bool
xmlLoadState
(
const
QDomElement& parent_element)
override
;
30
31
std::string
getError
(
sol::error
err);
32
33
private
:
34
sol::state
_lua_engine
;
35
sol::protected_function
_lua_function
;
36
std::vector<double>
_chan_values
;
37
std::mutex
mutex_
;
38
int
global_lines_
= 0;
39
int
function_lines_
= 0;
40
};
41
42
#endif // LUA_CUSTOM_FUNCTION_H
sol::basic_protected_function
Definition:
forward.hpp:1159
LuaCustomFunction::initEngine
void initEngine() override
Definition:
lua_custom_function.cpp:25
LuaCustomFunction
Definition:
lua_custom_function.h:9
LuaCustomFunction::_lua_engine
sol::state _lua_engine
Definition:
lua_custom_function.h:34
LuaCustomFunction::name
const char * name() const override
Name of the plugin type, NOT the particular instance.
Definition:
lua_custom_function.h:24
LuaCustomFunction::function_lines_
int function_lines_
Definition:
lua_custom_function.h:39
LuaCustomFunction::language
QString language() const override
Definition:
lua_custom_function.h:19
LuaCustomFunction::getError
std::string getError(sol::error err)
Definition:
lua_custom_function.cpp:169
LuaCustomFunction::LuaCustomFunction
LuaCustomFunction(SnippetData snippet={})
Definition:
lua_custom_function.cpp:4
LuaCustomFunction::xmlLoadState
bool xmlLoadState(const QDomElement &parent_element) override
Override this method to load the status of the plugin from XML.
Definition:
lua_custom_function.cpp:162
custom_function.h
LuaCustomFunction::global_lines_
int global_lines_
Definition:
lua_custom_function.h:38
sol.hpp
CustomFunction::snippet
const SnippetData & snippet() const
Definition:
custom_function.cpp:64
LuaCustomFunction::_lua_function
sol::protected_function _lua_function
Definition:
lua_custom_function.h:35
LuaCustomFunction::calculatePoints
void calculatePoints(const std::vector< const PlotData * > &channels_data, size_t point_index, std::vector< PlotData::Point > &points) override
Definition:
lua_custom_function.cpp:55
sol::error
Definition:
sol.hpp:4573
CustomFunction
Definition:
custom_function.h:40
SnippetData
Definition:
custom_function.h:19
sol::state
Definition:
sol.hpp:28238
LuaCustomFunction::_chan_values
std::vector< double > _chan_values
Definition:
lua_custom_function.h:36
LuaCustomFunction::mutex_
std::mutex mutex_
Definition:
lua_custom_function.h:37
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Jan 26 2025 03:23:24