/meta-agl-core/dynamic-layers/meta-selinux/

oller-submodule' title='app-controller-submodule Git repository'/>
summaryrefslogtreecommitdiffstats
path: root/docs/configSample.md
blob: 0c3504449f04b416d99249ce646bb39877c5161d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Config Sample

Here after a simple configuration sample.

```json
{
    "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json",
    "metadata": {
        "uid": "sample-audio-control",
        "api": "audio-control",
        "info": "Provide Default Audio Policy for Multimedia, Navigation and Emergency",
        "version": "1.0",
        "require": ["intel-hda", "jabra-usb", "scarlett-usb"]
    },
    "plugins": {
        "uid" : "MyPlug",
        "spath":"./plugins/pluginname:../conf.d/project/lua.d",
        "libs": ["ctl-audio-plugin-sample.ctlso", "softmixer-simple.lua"],
        "lua": ["Lua2cHelloWorld1", "Lua2cHelloWorld2"]
    },
    "onload": [{
        "uid": "onload-sample-cb",
        "info": "Call control sharelib install entrypoint",
        "action": "lua://MyPlug#SamplePolicyInit",
        "args": {
            "arg1": "first_arg",
            "nextarg": "second arg value"
            }
        }, {
        "uid": "onload-sample-api",
        "info": "Assert AlsaCore Presence",
        "action": "api://alsacore#ping",
        "args": {
            "test": "onload-sample-api"
            }
        }
    ],
    "controls":[{
            "uid": "multimedia",
            "privileges": "urn:AGL:permission:audio:public:mutimedia",
            "action": "lua://MyPlug#Audio_Set_Multimedia"
        }, {
            "uid": "navigation",
            "privileges": "urn:AGL:permission:audio:public:navigation",
            "action": "lua://MyPlug#Audio_Set_Navigation"
        }, {
            "uid": "emergency",
            "privileges": "urn:AGL:permission:audio:public:emergency",
            "action": "lua://MyPlug#Audio_Set_Emergency"
        }, {
            "uid": "multimedia-control-cb",
            "info": "Call Sharelib Sample Callback",
            "action": "plugin://MyPlug#sampleControlNavigation",
            "args": {
                "arg1": "snoopy",
                "arg2": "toto"
            }
        }, {
            "uid": "navigation-control-ucm",
            "action": "api://alsacore#ping",
            "args": {
                "test": "navigation"
            }
         }, {
            "uid": "navigation-control-lua",
            "info": "Call Lua Script to set Navigation",
            "action": "lua://MyPlug#Audio_Set_Navigation"
        }
    ],
    "events":[{
            "uid": "speed-action-1",
            "action": "plugin://MyPlug#Blink-when-over-130",
            "args": {
                "speed": 130,
                "blink-speed": 1000
            }
        }, {
            "uid": "Adjust-Volume",
            "action": "lua://MyPlug#Adjust_Volume_To_Speed"
        }, {
            "uid": "Display-Rear-Camera",
            "action": "plugin://MyPlug#Display-Rear-Camera"
        }, {
            "uid": "Prevent-Phone-Call",
            "action": "api://phone#status",
            "args": {
                "call-accepted": "false"
            }
        }, {
            "uid": "Authorize-Video",
            "action": "api://video#status",
            "args": {
                "tv-accepted": "true"
            }
        }
    ]
}
```