Modified: Add vehicle property to ico_set_vehicleinfo tool. Revise: add manifest... 67/14167/1 accepted/tizen/ivi/release remotes/origin/tizen tizen3.0 accepted/tizen/ivi/20131227.204812 accepted/tizen/ivi/release/20140108.220622 submit/tizen/20131226.090356 submit/tizen/20140108.022406 submit/tizen_ivi_release/20140108.030104 submit/tizen_ivi_release/20140108.221004
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Thu, 26 Dec 2013 07:37:33 +0000 (16:37 +0900)
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Thu, 26 Dec 2013 07:38:59 +0000 (16:38 +0900)
Change-Id: I09abfe9eb1f55ec936b36baf82dbc0f94c0254d0
Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
ico-vic-amb-plugin.manifest [new file with mode: 0644]
packaging/ico-vic-amb-plugin.changes
packaging/ico-vic-amb-plugin.spec
src/ambinterface.cc
src/controlwebsocket.cc
tool/CMakeLists.txt
tool/ico_set_vehicleinfo.c

diff --git a/ico-vic-amb-plugin.manifest b/ico-vic-amb-plugin.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
index 47a7dd3..f6a13e4 100644 (file)
@@ -1,3 +1,8 @@
+* Thu Dec 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> submit/tizen/20131219.042044@419946f
+- 0.9.05 release
+-- modified: Add vehicle property to ico_set_vehicleinfo tool.
+-- revise: add manifest file for SMACK label setting
+
 * Fri Nov 29 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen_ivi_stable/20131116.012220@47cc4e3
 - 0.9.04 release
 -- BugFix:TIVI-1991
index da1263f..78142a2 100644 (file)
@@ -1,7 +1,7 @@
 Name:       ico-vic-amb-plugin
 Summary:    Automotive Message Broker is a vehicle network abstraction system.
-Version:    0.9.4
-Release:    2.1
+Version:    0.9.5
+Release:    1.1
 Group:      System Environment/Daemons
 License:    LGPL v2.1
 URL:        ""
@@ -16,11 +16,11 @@ BuildRequires:  libjson-devel
 BuildRequires:  automotive-message-broker-devel >= 0.10.0
 BuildRequires:  ico-uxf-utilities-devel >= 0.9.04
 BuildRequires:  ico-uxf-utilities >= 0.9.04
-BuildRequires:  pkgconfig(ecore)
-BuildRequires:  pkgconfig(elementary)
-BuildRequires:  pkgconfig(edbus)
-BuildRequires:  pkgconfig(dbus-1)
-BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(edbus)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(appcore-efl)
 
 %description 
 Collection of plugins for automotive-message-broker
@@ -45,6 +45,7 @@ cp tool/ico_set_vehicleinfo %{buildroot}/usr/bin/ico_set_vehicleinfo
 %postun -p /sbin/ldconfig
 
 %files
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_libdir}/automotive-message-broker/*.so
 %{_sysconfdir}/ambd/AMBformat.conf
index bdf6fdd..e9275a5 100644 (file)
@@ -278,17 +278,13 @@ AMBIF::updateProperty(AMBVehicleInfo *vehicleinfo)
 {
     if (vehicleinfo->name == VehicleProperty::VehicleSpeed) {
         static uint16_t prevspd = -1;
-        static const uint16_t unusablespd = -1;
+        static uint16_t spdmax = -1;
         uint16_t spd = vehicleinfo->value->value<uint16_t>();
-        if ((prevspd == unusablespd && spd > 0) || (prevspd == 0 && spd > 0)) {
-            DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " 
-                        << vehicleinfo->name 
-                        << ". VehicleSpeed is 1km/h or more.\n";
+        if ((prevspd == spdmax && spd > 0) || (prevspd == 0 && spd > 0)) {
+            DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " << vehicleinfo->name << ". VehicleSpeed is 1km/h or more.\n";
         }
-        else if ((prevspd == unusablespd && spd == 0) || 
-                 (prevspd > 0 && spd == 0)) {
-            DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " 
-                        << vehicleinfo->name << ". VehicleSpeed is 0km/h.\n";
+        else if ((prevspd == spdmax && spd == 0) || (prevspd > 0 && spd == 0)) {
+            DebugOut(3) << "PERF CHG_VIC_INF VIC-Plugin notify Code of update " << vehicleinfo->name << ". VehicleSpeed is 0km/h.\n";
         }
         prevspd = spd;
     }
index 6d1b0a1..9aff9d4 100644 (file)
@@ -398,36 +398,26 @@ ControlWebsocket::callback_receive(const struct ico_uws_context *context,
         break;
     case ICO_UWS_EVT_RECEIVE:
     {
-        DebugOut(10) << "ControlWebsocket Start callback_recevie"
-                     << " Receive message.\n";
+        DebugOut(10) << "ControlWebsocket Start callback_recevie Receive message.\n";
         GenerateCommID<void*> *idserver = GenerateCommID<void*>::getInstance();
         int commid = idserver->getID(const_cast<void*>(id), -1);
         StandardMessage msg;
         char *buf = reinterpret_cast<char*>(detail->_ico_uws_message.recv_data);
         if (strcmp(&buf[0], "VELOCITY") == 0) {
             static uint16_t prevspd = -1;
-            static const uint16_t unusablespd = -1;
+            static uint16_t spdmax = -1;
             uint16_t spd = 0;
-            memcpy(&spd, 
-                   buf + StandardMessage::KEYEVENTTYPESIZE + 
-                   sizeof(struct timeval) + sizeof(int), 
-                   sizeof(uint16_t));
-            if ((prevspd == unusablespd && spd > 0) || 
-                (prevspd == 0 && spd > 0)) {
-                DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " 
-                            << &buf[0] << ". VELOCITY is 1km/h or more.\n";
+            memcpy(&spd, buf + StandardMessage::KEYEVENTTYPESIZE + sizeof(struct timeval) + sizeof(int), sizeof(uint16_t));
+            if ((prevspd == spdmax && spd > 0) || (prevspd == 0 && spd > 0)) {
+                DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " << &buf[0] << ". VELOCITY is 1km/h or more.\n";
             }
-            else if ((prevspd == unusablespd && spd == 0) || 
-                     (prevspd > 0 && spd == 0)) {
-                DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " 
-                            << &buf[0] << ". VELOCITY is 0km/h.\n";
+            else if ((prevspd == spdmax && spd == 0) || (prevspd > 0 && spd == 0)) {
+                DebugOut(3) << "PERF CHG_VIC_INF Receive from VIC. Message is " << &buf[0] << ". VELOCITY is 0km/h.\n";
             }
             prevspd = spd;
         }
-        container->ctrlws->receive(commid, buf, 
-                                   detail->_ico_uws_message.recv_len);
-        DebugOut(10) << "ControlWebsocket End " 
-                     << "callback_recevie Receive message.\n";
+        container->ctrlws->receive(commid, buf, detail->_ico_uws_message.recv_len);
+        DebugOut(10) << "ControlWebsocket End callback_recevie Receive message.\n";
         break;
     }
     case ICO_UWS_EVT_ADD_FD:
index b885335..5669512 100644 (file)
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 2.8)
 include(CheckIncludeFiles)
 
 set(ico_set_vehicleinfo_sources ico_set_vehicleinfo.c)
index e5d0568..d24d36a 100644 (file)
@@ -44,7 +44,9 @@ static const struct {
     char        *prop;
     char        *eventtype;
     unsigned char   datatype[5];
-}               vehicleinfo_key[] = {
+}
+
+vehicleinfo_key[] = {
     { "VehicleSpeed", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
     { "Speed", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
     { "Velocity", "VELOCITY", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
@@ -61,14 +63,17 @@ static const struct {
     { "Winker", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
     { "TurnSignal", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
     { "Turn", "TURN_SIGNAL", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
-    { "lightStatus", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, 0} },
+    { "lightStatus", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_NULL} },
     { "light", "LIGHTSTATUS", {TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, TYPE_BOOL, 0} },
-    { "WATER_TEMP", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
-    { "EXTERIORBRIGHTNESS", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
-    { "EXTERIOR", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
-    { "STEERING", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
-    { "steering", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
-    { "\0", "\0", {TYPE_NULL, 0, 0, 0, 0} } };
+    { "Warter_Temp", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+    { "WarterTemp", "WATER_TEMP", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+    { "ExteriorBrightness", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
+    { "Exterior", "EXTERIORBRIGHTNESS", {TYPE_UINT16, TYPE_NULL, 0, 0, 0} },
+    { "Steering", "STEERING", {TYPE_INT32, TYPE_NULL, 0, 0, 0} },
+    { "TripMeter", "TRIPMETER", {TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_NULL, 0} },
+    { "Fuel", "FUEL", {TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_INT16, TYPE_NULL} },
+    { "\0", "\0", {TYPE_NULL, 0, 0, 0, 0} }
+};
 
 struct KeyDataMsg_t
 {
@@ -388,4 +393,3 @@ main(int argc, char *argv[])
 
     exit(0);
 }
-