obdII is b0rked but getting closer
authorKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 28 Sep 2012 20:52:03 +0000 (13:52 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 28 Sep 2012 20:52:03 +0000 (13:52 -0700)
TODO
plugins/obd2plugin/CMakeLists.txt
plugins/obd2plugin/asyncqueuewatcher.cpp
plugins/obd2plugin/obd2source.cpp

diff --git a/TODO b/TODO
index 6b9ee1a..81855a9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
 - test for memory leaks in websocket sink plugin
 - per-source property filtering in routing engine
-
+- historic data "get" interface in routing engine
+- sqlite database storage plugin
index de71fab..7783d5d 100644 (file)
@@ -3,13 +3,14 @@ include(CheckIncludeFiles)
 
 pkg_check_modules(gio REQUIRED gio-2.0)
 pkg_check_modules(gio-unix REQUIRED gio-unix-2.0)
+pkg_check_modules(glibmm REQUIRED glibmm-2.4)
 
-include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS} ${glibmm_INCLUDE_DIRS})
 
 set(obd2sourceplugin_headers obd2source.h obdlib.h bluetoothmanagerproxy.h  bluetoothadapterproxy.h bluetoothserialproxy.h asyncqueuewather.h)
 set(obd2sourceplugin_sources obd2source.cpp obdlib.cpp bluetooth.hpp bluetoothmanagerproxy.c bluetoothadapterproxy.c bluetoothserialproxy.c asyncqueuewatcher.cpp)
 add_library(obd2sourceplugin MODULE ${obd2sourceplugin_sources})
 set_target_properties(obd2sourceplugin PROPERTIES PREFIX "")
-target_link_libraries(obd2sourceplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${gio_LIBRARIES} ${gio-unix_LIBRARIES})
+target_link_libraries(obd2sourceplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${gio_LIBRARIES} ${gio-unix_LIBRARIES} ${glibmm_LIBRARIES})
 
 install(TARGETS obd2sourceplugin LIBRARY DESTINATION lib/automotive-message-broker)
index 30bbf91..f8ed09f 100644 (file)
@@ -19,15 +19,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include "asyncqueuewatcher.h"
 
 struct QueueWatch{
-       GAsyncQueue* queue;
        GSource source;
+       GAsyncQueue* queue;
 };
 
 static gboolean prepare (GSource *source, gint *timeout)
 {
        QueueWatch *watch = (QueueWatch *)source;
        *timeout = -1;
-       return (g_async_queue_length (watch->queue) > 0);
+       int size = g_async_queue_length (watch->queue);
+       return (size > 0);
 }
 
 static gboolean check (GSource *source)
index c80c00b..f86df36 100644 (file)
@@ -269,7 +269,7 @@ void threadLoop(gpointer data)
                                
                        }
                        
-                       DebugOut()<<"Reply: "<<replyVector[2]<<" "<<replyVector[3]<<endl;
+                       //DebugOut()<<"Reply: "<<replyVector[2]<<" "<<replyVector[3]<<endl;
                }
                if(!reqList.size()) usleep(10000);
                repeatReqList.clear();