packaging: fixed lost application classes, added AMB plugin config file.
[profile/ivi/murphy.git] / packaging.in / amb-config.lua
1 --[[
2     Vehicle speed property
3
4     This property has a basic type which is updated often, therefore use
5     the built-in handler.
6 --]]
7
8
9 amb.property {
10     name = "vehicle_speed",
11     basic_table_name = "amb_vehicle_speed", -- default: "amb_" + name
12     dbus_data = {
13         obj = "/org/automotive/runningstatus/vehicleSpeed",
14         interface = "org.automotive.vehicleSpeed",
15         property = "VehicleSpeed",
16         signature = "i",
17     },
18 }
19
20
21 --[[
22     Shift position property
23
24     Use custom handler for setting the stick status.
25 --]]
26
27 stick_handler = function (self, property)
28     -- insert or update the incoming data
29
30     print("shift position handler: " .. property)
31
32     table = self.outputs.test_table
33
34     table:replace({ id = 0, shift_position = property })
35 end
36
37 amb.property {
38     name = "stick_handler",
39     handler = stick_handler,
40     outputs = {
41         test_table = mdb.table {
42             name = "amb_shift_position",
43             index = { "id" },
44             create = true,
45             columns = {
46                 { "id", mdb.unsigned },
47                 { "shift_position", mdb.unsigned },
48             }
49         }
50     },
51     dbus_data = {
52         obj = "/org/automotive/runningstatus/transmission",
53         interface = "org.automotive.transmission",
54         property = "ShiftPosition",
55         signature = "y",
56     },
57 }