Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calling SDKs C functions from lua script

Featured Replies

Hello everyone interested by this developpers topic, specially LINDA's :hi:
I would like to know if it will be, or how it's, possible from LINDA lua script to call
C 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 Session
result = clib.SendLVLDCommand(32,1); -- send command OVRD LIGHT ON
result = clib.LVLDSession(0, 202) -- close LVLDSDK Session
print("LVLDSession return:" .. result)

any help appreciate

Marc

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.