January 14, 20179 yr Hello everyone interested by this developpers topic, specially LINDA's I would like to know if it will be, or how it's, possible from LINDA lua script to callC SDK addons functions directly by using the lua ffi library (luaJIT) ?Maybe it's already possible with the LINDA lua editor. I'am not an expert with it. Tried but the ffi library is not loaded or not include and it's throw a nil exception.this simple lua script works in IDE like ZeroBrane studio. It calls LevelD 767 SDK functions directly. This is really handy:local ffi = require("ffi")ffi.cdef[[long LVLDSession(int action, int version);long SendLVLDCommand(int action, int value);]]name = "D:\\Program Files (x86)\\ZeroBraneStd\\myprograms\\LVLDSDK"clib = ffi.load(name)result = clib.LVLDSession(1, 202) -- open LVLDSDK Sessionresult = clib.SendLVLDCommand(32,1); -- send command OVRD LIGHT ONresult = clib.LVLDSession(0, 202) -- close LVLDSDK Sessionprint("LVLDSession return:" .. result)any help appreciateMarc
Archived
This topic is now archived and is closed to further replies.