projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add Lua bindings for ubus events
[project/ubus.git]
/
lua
/
test.lua
diff --git
a/lua/test.lua
b/lua/test.lua
index
07e62c6
..
d24ac6e
100755
(executable)
--- a/
lua/test.lua
+++ b/
lua/test.lua
@@
-39,4
+39,16
@@
local my_method = {
}
conn:add(my_method)
+
+local my_event = {
+ test = function(msg)
+ print("Call to test event")
+ for k, v in pairs(msg) do
+ print("key=" .. k .. " value=" .. tostring(v))
+ end
+ end,
+}
+
+conn:listen(my_event)
+
uloop.run()