packaging: fixed lost application classes, added AMB plugin config file.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Wed, 16 Jan 2013 09:57:37 +0000 (11:57 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:10 +0000 (18:37 +0200)
packaging.in/amb-config.lua [new file with mode: 0644]
packaging.in/murphy.lua
packaging.in/murphy.spec.in

diff --git a/packaging.in/amb-config.lua b/packaging.in/amb-config.lua
new file mode 100644 (file)
index 0000000..ad8a909
--- /dev/null
@@ -0,0 +1,57 @@
+--[[
+    Vehicle speed property
+
+    This property has a basic type which is updated often, therefore use
+    the built-in handler.
+--]]
+
+
+amb.property {
+    name = "vehicle_speed",
+    basic_table_name = "amb_vehicle_speed", -- default: "amb_" + name
+    dbus_data = {
+        obj = "/org/automotive/runningstatus/vehicleSpeed",
+        interface = "org.automotive.vehicleSpeed",
+        property = "VehicleSpeed",
+        signature = "i",
+    },
+}
+
+
+--[[
+    Shift position property
+
+    Use custom handler for setting the stick status.
+--]]
+
+stick_handler = function (self, property)
+    -- insert or update the incoming data
+
+    print("shift position handler: " .. property)
+
+    table = self.outputs.test_table
+
+    table:replace({ id = 0, shift_position = property })
+end
+
+amb.property {
+    name = "stick_handler",
+    handler = stick_handler,
+    outputs = {
+        test_table = mdb.table {
+            name = "amb_shift_position",
+            index = { "id" },
+            create = true,
+            columns = {
+                { "id", mdb.unsigned },
+                { "shift_position", mdb.unsigned },
+            }
+        }
+    },
+    dbus_data = {
+        obj = "/org/automotive/runningstatus/transmission",
+        interface = "org.automotive.transmission",
+        property = "ShiftPosition",
+        signature = "y",
+    },
+}
index d01103d..ef8520d 100644 (file)
@@ -50,9 +50,13 @@ else
 end
 
 -- define application classes
-application_class { name = "navigator", priority = 4 }
-application_class { name = "phone"    , priority = 3 }
-application_class { name = "game"     , priority = 2 }
+application_class { name = "navigator", priority = 8 }
+application_class { name = "event"    , priority = 7 }
+application_class { name = "phone"    , priority = 6 }
+application_class { name = "camera"   , priority = 5 }
+application_class { name = "alert"    , priority = 4 }
+application_class { name = "game"     , priority = 3 }
+application_class { name = "radio"    , priority = 2 }
 application_class { name = "player"   , priority = 1 }
 application_class { name = "implicit" , priority = 0 }
 
index 653dc46..11fc0b3 100644 (file)
@@ -330,6 +330,11 @@ popd >& /dev/null
 cp packaging.in/murphy-lua.conf $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.conf
 cp packaging.in/murphy.lua      $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.lua
 
+# Copy plugin configuration files in place.
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb
+cp packaging.in/amb-config.lua \
+    $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb/config.lua
+
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
 cp packaging.in/murphyd.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd
 chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd