Hi,

I am trying to call a function registered on ubus from lua script. I know
how to call a argument less function but don't know the syntax of a
function with args (also how to add ubus timeout).

My lua script snippet:

require "ubus"
local conn = ubus.connect()

local status_1 = conn:call("my_interface", "fun_1", {})                --[[
this is working fine ]]--

local status_2 = conn:call("my_interface", "fun_2", {arg_1 = "hello", arg_2
= "12"})    --[[ not sure whether this works ]]--


In second call I also want to add ubus timeout option. I also checked for
the same in ubus repository (https://github.com/commodo/ubus) but didn't
found any example.

Can somebody tell me how to add ubus timeout in ubus call from lua ?
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to