started core routing engine
authorKevron Rees <kevron_m_rees@linux.intel.com>
Wed, 8 Aug 2012 23:53:20 +0000 (16:53 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Wed, 8 Aug 2012 23:53:20 +0000 (16:53 -0700)
ambd/CMakeLists.txt
lib/abstractsource.cpp
lib/abstractsource.h
plugins/CMakeLists.txt
plugins/nobdycompatplugin.cpp [deleted file]
plugins/nobdycompatplugin.cpp~ [deleted file]
plugins/nobdycompatplugin.h [deleted file]
plugins/nobdycompatplugin.h~ [deleted file]

index 8310dd2..f7f1808 100644 (file)
@@ -1,4 +1,4 @@
-add_executable(ambd main.cpp pluginloader.cpp)
+add_executable(ambd core.cpp main.cpp pluginloader.cpp)
 
 include_directories(${include_dirs} )
 target_link_libraries(ambd ${link_libraries})
index 4f49968..bd75d0b 100644 (file)
@@ -34,3 +34,9 @@ void AbstractSource::setPropertyChangedCb(PropertyChangedSignal propertyChangedC
        mPropertyChangedCb = propertyChangedCb;
 }
 
+void AbstractSource::setSupportedChangedCb(SupportedChangedSignal supportedChangedCb)
+{
+       mSupportedChangedCb = supportedChangedCb;
+}
+
+
index ef29df4..cb7c0f0 100644 (file)
@@ -31,6 +31,7 @@ using namespace std;
 class AbstractSource;
 
 typedef function<void (VehicleProperty::Property, boost::any)> PropertyChangedSignal;
+typedef function<void (PropertyList)> SupportedChangedSignal;
 
 typedef list<AbstractSource*> SourceList;
 
@@ -43,6 +44,7 @@ public:
        void propertyChanged(VehicleProperty::Property property, boost::any value);
 
        void setPropertyChangedCb(PropertyChangedSignal propertyChangedCb);
+       void setSupportedChangedCb(SupportedChangedSignal supportedChangedCb);
        
        ///pure virtual methods:
 
@@ -55,6 +57,7 @@ public:
 
 private:
        PropertyChangedSignal mPropertyChangedCb;
+       SupportedChangedSignal mSupportedChangedCb;
     
 };
 
index a9bcf6e..ed50e32 100644 (file)
@@ -7,15 +7,3 @@ add_library(exampleplugin MODULE ${exampleplugin_sources})
 set_target_properties(exampleplugin PROPERTIES PREFIX "")
 target_link_libraries(exampleplugin -lamb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries})
 
-if(use_qtcore)
-       if(nobdy_compat)
-               pkg_check_modules(nobdy REQUIRED nobdy)
-               set(nobdyplugin_headers nobdycompatplugin.h)
-               set(nobdyplugin_sources nobdycompatplugin.cpp)
-               qt4_wrap_cpp(nobdy_moc_sources ${nobdyplugin_headers})
-               add_library(nobdyplugin MODULE ${nobdyplugin_sources} ${nobdy_moc_sources})
-               set_target_properties(nobdyplugin PROPERTIES PREFIX "")
-               include_directories(${nobdy_INCLUDE_DIRS} ${include_dirs})
-               target_link_libraries(nobdyplugin ${nobdy_LIBRARIES} -lamb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries})
-       endif(nobdy_compat)
-endif(use_qtcore)
\ No newline at end of file
diff --git a/plugins/nobdycompatplugin.cpp b/plugins/nobdycompatplugin.cpp
deleted file mode 100644 (file)
index 7ea7e93..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-    <one line to give the library's name and an idea of what it does.>
-    Copyright (C) 2012  Kevron Rees <email>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#include "propertytypes/vehiclespeed.h"
-#include "nobdycompatplugin.h"
-#include <QObject>
-
-NobdyCompatPlugin::NobdyCompatPlugin(QObject *parent): QObject(parent)
-{
-       vehicleSpeedProperty = new VehicleSpeedProperty();
-       
-       velocityStream = NobdyStreamFactory::createDefaultStream(VehicleData::Velocity);
-       engineSpeedStream = NobdyStreamFactory::createDefaultStream(VehicleData::EngineRPM);
-       
-       QObject::connect(velocityStream, SIGNAL(changed(QVariant)), this, SLOT(velocityChangedSlot(QVariant))); 
-}
-
-void NobdyCompatPlugin::engineSpeedChangedSlot(QVariant value)
-{
-       
-}
-
-void NobdyCompatPlugin::velocityChangedSlot(QVariant value)
-{
-       vehicleSpeedProperty->setValue(value.toUInt());
-}
-
-extern "C" void create()
-{
-       new NobdyCompatPlugin;
-}
-
-
diff --git a/plugins/nobdycompatplugin.cpp~ b/plugins/nobdycompatplugin.cpp~
deleted file mode 100644 (file)
index 12a386d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-    <one line to give the library's name and an idea of what it does.>
-    Copyright (C) 2012  Kevron Rees <email>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#include "propertytypes/vehiclespeed.h"
-#include "nobdycompatplugin.h"
-#include <QObject>
-
-NobdyCompatPlugin::NobdyCompatPlugin(QObject *parent): QObject(parent)
-{
-       vehicleSpeedProperty = new VehicleSpeedProperty();
-       
-       velocityStream = NobdyStreamFactory::createDefaultStream(VehicleData::Velocity);
-       engineSpeedStream = NobdyStreamFactory::createDefaultStream(VehicleData::EngineRPM);
-       
-       QObject::connect(velocityStream,SIGNAL(changed(QVariant)),this, SLOT(velocityChangedSlot(QVariant)));   
-}
-
-void NobdyCompatPlugin::engineSpeedChangedSlot(QVariant value)
-{
-       
-}
-
-void NobdyCompatPlugin::velocityChangedSlot(QVariant value)
-{
-       vehicleSpeedProperty->setValue(value.toUInt());
-}
-
-extern "C" void create()
-{
-       new NobdyCompatPlugin;
-}
-
-
diff --git a/plugins/nobdycompatplugin.h b/plugins/nobdycompatplugin.h
deleted file mode 100644 (file)
index 22d4010..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-    <one line to give the library's name and an idea of what it does.>
-    Copyright (C) 2012  Kevron Rees <email>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#ifndef NOBDYCOMPATPLUGIN_H
-#define NOBDYCOMPATPLUGIN_H
-
-#include <nobdystream.h>
-
-class VehicleSpeedProperty;
-
-class NobdyCompatPlugin : public QObject
-{
-Q_OBJECT
-public:
-       explicit NobdyCompatPlugin(QObject* parent = 0);
-       
-private slots:
-       void velocityChangedSlot(QVariant value);
-       void engineSpeedChangedSlot(QVariant value);
-    
-private: 
-       VehicleSpeedProperty * vehicleSpeedProperty;
-       NobdyStream* velocityStream;
-       NobdyStream* engineSpeedStream;
-    
-};
-
-#endif // NOBDYCOMPATPLUGIN_H
diff --git a/plugins/nobdycompatplugin.h~ b/plugins/nobdycompatplugin.h~
deleted file mode 100644 (file)
index 4b78ae9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-    <one line to give the library's name and an idea of what it does.>
-    Copyright (C) 2012  Kevron Rees <email>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-
-#ifndef NOBDYCOMPATPLUGIN_H
-#define NOBDYCOMPATPLUGIN_H
-
-#include <nobdystream.h>
-#include "propertytypes/vehiclespeed.h"
-
-class NobdyCompatPlugin : public QObject
-{
-Q_OBJECT
-public:
-       explicit NobdyCompatPlugin(QObject* parent = 0);
-       
-private slots:
-       void velocityChangedSlot(QVariant value);
-       void engineSpeedChangedSlot(QVariant value);
-    
-private: 
-       VehicleSpeedProperty * vehicleSpeedProperty;
-       NobdyStream* velocityStream;
-       NobdyStream* engineSpeedStream;
-    
-};
-
-#endif // NOBDYCOMPATPLUGIN_H