Lua#

This page covers using the kRPC Lua client with the KSA service. The kRPC Lua client guide covers the client in full.

Note

kRPC for KSA is experimental. A later release will make the client easier to use with the KSA service.

Installing#

Install the kRPC Lua client 0.7.0 from LuaRocks:

luarocks install krpc 0.7.0

The kRPC Lua client guide covers other ways to install the client.

Connecting to the Server#

The client builds the KSA service from the definitions the server sends when it connects, so the service is conn.ksa:

local krpc = require 'krpc'
local conn = krpc.connect('Example')
print(conn.ksa.active_vehicle.name)

The kRPC Lua client guide covers connecting, streams and the client’s other features.

API Reference#