diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/onload-control-policy.json | 23 | ||||
-rw-r--r-- | data/onload-control-script.lua | 8 |
2 files changed, 20 insertions, 11 deletions
diff --git a/data/onload-control-policy.json b/data/onload-control-policy.json index d910893..736e188 100644 --- a/data/onload-control-policy.json +++ b/data/onload-control-policy.json @@ -1,22 +1,31 @@ { "$schema": "ToBeDone", "metadata": { - "label": "sample-audio-policy", + "label": "sample-audio-control", "info": "Provide Default Audio Policy for Multimedia, Navigation and Emergency", "version": "1.0" }, "onload": { - "info": "controler initialisation config", - "plugin": "sample-audio-policy.so", + "label": "onload-config", + "info": "onload initialisation config", + "plugin": "audio-ctl-plugin-sample.so", "actions": [ { - "info": "Call policy sharelib install entrypoint", + "label": "onload-sample-cb", + "info": "Call control sharelib install entrypoint", "callback": "SamplePolicyInstall", "args": {"arg1" : "first_arg", "nextarg": "second arg value"} }, { + "label": "onload-sample-api", "info": "Assert AlsaCore Presence", "api": "alsacore", - "verb": "ping" + "verb": "ping", + "args": "test" + }, { + "label": "onload-sample-lua", + "info": "Assert LUA Engine", + "lua": "Test_Lua_Engine", + "args": "ping" } ] }, @@ -25,7 +34,7 @@ "label": "multimedia", "actions": [ { - "label": "multimedia-policy-cb", + "label": "multimedia-control-cb", "info": "Call Sharelib Sample Callback", "callback": "samplePolicyCB", "args": { @@ -33,7 +42,7 @@ "arg2": "toto" } }, { - "label": "multimedia-policy-ucm", + "label": "multimedia-control-ucm", "info": "Subcall AlSA UCM navigation", "api": "alsacore", "verb": "ucmset", diff --git a/data/onload-control-script.lua b/data/onload-control-script.lua index ac316cd..f50bf7a 100644 --- a/data/onload-control-script.lua +++ b/data/onload-control-script.lua @@ -21,17 +21,17 @@ count=0 -- Adjust Volume function of vehicle speed -function Adjust_Volume_Speed (speed_meters_second) +function Adjust_Volume_Speed (request, speed_meters_second) - AFB:notice("In Adjust_Volume_Speed") + AFB:notice("In Adjust_Volume_Speed speed=%d", speed_meters_second); - print (string.format("***** Adjust_Volume_Speed speed=%d count=%d", speed_meters_second, count)); + print (string.format("*****(From Lua) Adjust_Volume_Speed speed=%d count=%d", speed_meters_second, count)); -- compute volume volume = speed_meters_second * 2 count=count+1 - AFB:success (1234, volume, count, 5678) + AFB:success (request, 1234, volume, count, 5678) end |