ms: Lua part of location update testing

The lua part to start the MS and then signal the first
successful Location Update.

Change-Id: Ica5aa0c2f86d0e5d8a2bc4dc0652de18762dd156
This commit is contained in:
Holger Hans Peter Freyther 2018-01-21 21:56:46 +00:00
parent 4a62bb0086
commit 28bcaf0f2c
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package.path = '${test.lua_support}/?.lua;' .. package.path
event = require('ms_support')
send = 1
function mm_cb(new_state, new_substate, old_substate)
if new_state == 19 and new_substate == 1 and send == 1 then
send = 0
event.send({lu_done=1})
end
end
local cbs = {
Mm=mm_cb
}
osmo.ms():register(cbs)
osmo.ms().start()
event.register(osmo.ms():number(), "${test.event_path}")