lua

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallLuaConverter

func CallLuaConverter(L *lua.LState, method string, raw interface{}) ([]plugin.DeviceData, error)

CallLuaConverter 调用 Lua 脚本转换器

func CallLuaEncodeConverter

func CallLuaEncodeConverter(L *lua.LState, deviceSn string, raw interface{}) (string, error)

CallLuaEncodeConverter 调用 Lua 脚本编码转换器

func CallLuaMethod

func CallLuaMethod(L *lua.LState, method string, args ...lua.LValue) (string, error)

执行指定lua方法

func CallLuaMethodV2 added in v1.1.2

func CallLuaMethodV2(L *lua.LState, method string, args ...lua.LValue) (*lua.LTable, error)

func Close

func Close(L *lua.LState)

关闭Lua虚拟机

func InitLuaVM

func InitLuaVM(filePath string) (*lua.LState, error)

InitLuaVM 编译 lua 脚本

Types

type LuaModule added in v1.1.1

type LuaModule struct{}

LuaModule go 实现 lua 模块,供脚本内使用

var LuaModuleInstance *LuaModule

func (*LuaModule) Loader added in v1.1.1

func (lm *LuaModule) Loader(L *lua.LState) int

Loader 模块预加载

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL