make uuid() const. update all plugins
authorKevron Rees <kevron.m.rees@intel.com>
Thu, 5 Sep 2013 21:28:05 +0000 (14:28 -0700)
committerKevron Rees <kevron.m.rees@intel.com>
Thu, 5 Sep 2013 21:28:05 +0000 (14:28 -0700)
29 files changed:
lib/abstractroutingengine.h
lib/abstractsink.h
lib/debugout.h
plugins/database/databasesink.cpp
plugins/database/databasesink.h
plugins/dbus/dbusinterfacemanager.h
plugins/dbus/dbusplugin.cpp
plugins/dbus/dbusplugin.h
plugins/demosink/demosinkplugin.cpp
plugins/demosink/demosinkplugin.h
plugins/exampleplugin.cpp
plugins/exampleplugin.h
plugins/examplesink.cpp
plugins/examplesink.h
plugins/murphyplugin/murphysource.h
plugins/obd2plugin/obd2source.cpp
plugins/obd2plugin/obd2source.h
plugins/opencvlux/opencvluxplugin.cpp
plugins/opencvlux/opencvluxplugin.h
plugins/testplugin/testplugin.cpp
plugins/testplugin/testplugin.h
plugins/tpms/tpmsplugin.cpp
plugins/tpms/tpmsplugin.h
plugins/websocketsink/websocketsink.cpp
plugins/websocketsink/websocketsink.h
plugins/websocketsourceplugin/websocketsource.cpp
plugins/websocketsourceplugin/websocketsource.h
plugins/wheel/wheelplugin.cpp
plugins/wheel/wheelplugin.h

index f538459..3448fce 100644 (file)
@@ -195,6 +195,7 @@ public:
 
        virtual void setSupported(PropertyList supported, AbstractSource* source) = 0;
        virtual void updateSupported(PropertyList added, PropertyList removed) = 0;
+
        /// Deprecated:
        void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid)
        {
index 77ca6ec..a98f44e 100644 (file)
@@ -48,17 +48,25 @@ public:
        /*! uuid() is a unique identifier
          * @return a guid-style unique identifier
          */
-       virtual string uuid() = 0;
+       virtual const string uuid() = 0;
+
+
+       /// Deprecated:
+       virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid)
+       {
+               DebugOut(DebugOut::Warning)<<"propertyChanged(VehicleProperty::Property, AbstractPropertyType*,string) is deprecated.  Use propertyChanged(AbstractPropertyType*, const string &)"<<endl;
+               propertyChanged(value, uuid);
+       }
 
        /*! propertyChanged is called when a subscribed to property changes.
          * @see AbstractRoutingEngine::subscribeToPropertyChanges()
-         * @param property name that changed
          * @param value value of the property that changed. this is a temporary pointer that will be destroyed.
          * Do not destroy it.  If you need to store the value use value.anyValue(), value.value<T>() or
          * value->copy() to copy.
          * @param uuid Unique identifier representing the source
          */
-       virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string  uuid) = 0;
+       virtual void propertyChanged(AbstractPropertyType* value, const string &uuid) {}
+
        virtual void supportedChanged(PropertyList supportedProperties) = 0;
        
 
index 1ec9a13..660fbfb 100644 (file)
@@ -40,12 +40,11 @@ public:
        DebugOut(int debugLevel = 4)
        {
                mDebugLevel = debugLevel;
-               ostream out(buf);
-
-               out.precision(15);
 
                if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
                {
+                       ostream out(buf);
+                       out.precision(15);
                        out<<bufferTime(amb::currentTime())<<" | ";
 
                        if(mDebugLevel == Error)
@@ -57,34 +56,36 @@ public:
 
        DebugOut const& operator << (string message) const
        {
-               ostream out(buf);
-
-               out.precision(15);
-
                if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
-                        out<<message<<" ";
+               {
+                       ostream out(buf);
+                       out.precision(15);
+                       out<<message<<" ";
+               }
                return *this;
        }
 
        DebugOut const& operator << (ostream & (*manip)(std::ostream&)) const
        {
-               ostream out(buf);
 
-               out.precision(15);
 
                if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
-                        out<<endl;
+               {
+                       ostream out(buf);
+                       out.precision(15);
+                       out<<endl;
+               }
                return *this;
        }
        
        DebugOut const & operator << (double val) const
        {
-               ostream out(buf);
-
-               out.precision(15);
-
                if(mDebugLevel <= debugThreshhold || mDebugLevel == Error || mDebugLevel == Warning)
-                        out<<val<<" ";
+               {
+                       ostream out(buf);
+                       out.precision(15);
+                       out<<val<<" ";
+               }
                return *this;
        }
 
index 14c4046..60ff7e0 100644 (file)
@@ -372,8 +372,10 @@ void DatabaseSink::setDatabaseFileName(string filename)
        routingEngine->setSupported(mSupported, this);
 }
 
-void DatabaseSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid)
+void DatabaseSink::propertyChanged(AbstractPropertyType *value, const std::string &uuid)
 {
+       VehicleProperty::Property property = value->name;
+
        if(!shared)
                return;
 
@@ -394,7 +396,7 @@ void DatabaseSink::propertyChanged(VehicleProperty::Property property, AbstractP
 }
 
 
-std::string DatabaseSink::uuid()
+const string DatabaseSink::uuid()
 {
        return "9f88156e-cb92-4472-8775-9c08addf50d3";
 }
index 57f87d4..7b6dc0f 100644 (file)
@@ -150,8 +150,8 @@ public:
        DatabaseSink(AbstractRoutingEngine* engine, map<string, string> config);
        ~DatabaseSink();
        virtual void supportedChanged(PropertyList supportedProperties);
-       virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
-       virtual std::string uuid();
+       virtual void propertyChanged(AbstractPropertyType *value, const std::string &uuid);
+       const std::string uuid();
 
        ///source role:
        virtual void getPropertyAsync(AsyncPropertyReply *reply);
index 94e6734..d94cab3 100644 (file)
@@ -35,7 +35,7 @@ public:
        AbstractRoutingEngine* re;
 
        /// From AbstractSink:
-       virtual string uuid(){ return "DBusInterfaceManager"; }
+       virtual const string uuid(){ return "DBusInterfaceManager"; }
        virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string  uuid) { }
        virtual void supportedChanged(PropertyList supportedProperties);
     
index f1a7a1d..c51ca26 100644 (file)
@@ -61,8 +61,10 @@ void DBusSink::supportedChanged(PropertyList supportedProperties)
                unregisterObject();
 }
 
-void DBusSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid)
+void DBusSink::propertyChanged(AbstractPropertyType *value, const std::string &uuid)
 {
+       VehicleProperty::Property property = value->name;
+
        if(propertyDBusMap.find(property) == propertyDBusMap.end() || value->zone != zoneFilter)
                return;
 
@@ -71,7 +73,7 @@ void DBusSink::propertyChanged(VehicleProperty::Property property, AbstractPrope
        mTime = value->timestamp;
 }
 
-std::string DBusSink::uuid()
+const string DBusSink::uuid()
 {
        return "c2e6cafa-eef5-4b8a-99a0-0f2c9be1057d";
 }
index 2afb74b..67bb12a 100644 (file)
@@ -36,8 +36,8 @@ public:
        DBusSink(std::string objectName, AbstractRoutingEngine* engine, GDBusConnection* connection, map<string, string> config);
        virtual ~DBusSink() { }
        virtual void supportedChanged(PropertyList supportedProperties);
-       virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid);
-       virtual std::string uuid();
+       virtual void propertyChanged(AbstractPropertyType *value, const std::string &uuid);
+       virtual const std::string uuid();
 
        std::list<VehicleProperty::Property> wantsProperties()
        {
index d8f4057..b76d98e 100644 (file)
@@ -71,13 +71,15 @@ extern "C" AbstractSinkManager * create(AbstractRoutingEngine* routingengine, ma
        return new DemoSinkManager(routingengine, config);
 }
 
-string DemoSink::uuid()
+const string DemoSink::uuid()
 {
        return "5b0e8a04-d6d7-43af-b827-1663627a25d9";
 }
 
-void DemoSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid)
+void DemoSink::propertyChanged(AbstractPropertyType *value, const string &uuid)
 {
+       VehicleProperty::Property property = value->name;
+
        std::string app = configuration["script"];
        std::string strValue = value->toString();
 
index ffd806c..755b5c5 100644 (file)
@@ -31,9 +31,9 @@ public:
        DemoSink(AbstractRoutingEngine* re, map<string, string> config);
        ~DemoSink();
        
-       string uuid();
+       const string uuid();
        
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid);
+       void propertyChanged(AbstractPropertyType* value, const string &uuid);
        void supportedChanged(PropertyList);
 
        friend class WheelPrivate;      
index bfdffbe..a0074b7 100644 (file)
@@ -90,7 +90,7 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        
 }
 
-string ExampleSourcePlugin::uuid()
+const string ExampleSourcePlugin::uuid()
 {
        return "6dd4268a-c605-4a06-9034-59c1e8344c8e";
 }
index 4483261..3db5623 100644 (file)
@@ -30,7 +30,7 @@ class ExampleSourcePlugin: public AbstractSource
 public:
        ExampleSourcePlugin(AbstractRoutingEngine* re, map<string, string> config);
        
-       string uuid();
+       const string uuid();
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply);
        AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -40,7 +40,6 @@ public:
 
        int supportedOperations();
        
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
        void supportedChanged(PropertyList) {}
        
        void randomizeProperties();
index 1dbeba1..5c1fb0a 100644 (file)
@@ -193,12 +193,13 @@ void ExampleSink::supportedChanged(PropertyList supportedProperties)
        g_timeout_add(10000, getRangedCb, routingEngine);
 }
 
-void ExampleSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid)
+void ExampleSink::propertyChanged(AbstractPropertyType* value, const string &uuid)
 {
+       VehicleProperty::Property property = value->name;
        DebugOut()<<property<<" value: "<<value->toString()<<endl;
 }
 
-std::string ExampleSink::uuid()
+const string ExampleSink::uuid()
 {
        return "f7e4fab2-eb73-4842-9fb0-e1c550eb2d81";
 }
index afac457..1ef8597 100644 (file)
@@ -30,8 +30,8 @@ public:
        ExampleSink(AbstractRoutingEngine* engine, map<string, string> config);
        virtual PropertyList subscriptions();
        virtual void supportedChanged(PropertyList supportedProperties);
-       virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
-       virtual std::string uuid();
+       virtual void propertyChanged(AbstractPropertyType* value, const std::string &uuid);
+       virtual const std::string uuid();
 };
 
 class ExampleSinkManager: public AbstractSinkManager
index 463ed93..1095409 100644 (file)
@@ -39,7 +39,7 @@ public:
     MurphySource(AbstractRoutingEngine* re, map<string, string> config);
     ~MurphySource();
 
-    string uuid() { return "murphy"; };
+       const string uuid() { return "murphy"; }
     void getPropertyAsync(AsyncPropertyReply *reply);
     void getRangePropertyAsync(AsyncRangePropertyReply *reply);
     AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -49,7 +49,6 @@ public:
 
     int supportedOperations();
 
-    void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
     void supportedChanged(PropertyList) {}
 
     void processValue(string propertyName, AbstractPropertyType *value);
index f7961c4..70a1493 100644 (file)
@@ -658,7 +658,7 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        return new OBD2Source(routingengine, config);
        
 }
-string OBD2Source::uuid()
+const string OBD2Source::uuid()
 {
        return "f77af740-f1f8-11e1-aff1-0800200c9a66";
 }
index cc131dd..fcad73f 100644 (file)
@@ -133,7 +133,7 @@ class OBD2Source : public AbstractSource
 public:
        OBD2Source(AbstractRoutingEngine* re, map<string, string> config);
        ~OBD2Source();
-       string uuid();
+       const string uuid();
        int portHandle;
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
@@ -153,7 +153,7 @@ public:
        void engineCoolantTemp(int temp);
        PropertyList removeRequests;
        void setSupported(PropertyList list);
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
+
        void supportedChanged(PropertyList) {}
        GAsyncQueue* commandQueue;
        GAsyncQueue* statusQueue;
index 9ab7434..142ced4 100644 (file)
@@ -113,7 +113,7 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        
 }
 
-string OpenCvLuxPlugin::uuid()
+const string OpenCvLuxPlugin::uuid()
 {
        return "3c7a1ea0-7d2e-11e2-9e96-0800200c9a66";
 }
index ea5634f..f59a2a4 100644 (file)
@@ -48,7 +48,7 @@ public:
 
        OpenCvLuxPlugin(AbstractRoutingEngine* re, map<string, string> config);
        
-       string uuid();
+       const string uuid();
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply);
        AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -58,7 +58,6 @@ public:
 
        int supportedOperations();
        
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
        void supportedChanged(PropertyList) {}
        
        void updateProperty(uint lux);
index d120ffe..d3298d5 100644 (file)
@@ -102,7 +102,7 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        return new TestPlugin(routingengine, config);
        
 }
-string TestPlugin::uuid()
+const string TestPlugin::uuid()
 {
        return "f77af740-f1f8-11e1-aff1-0800200c9a66";
 }
index 6a638ad..ee5147d 100644 (file)
@@ -41,7 +41,7 @@ class TestPlugin : public AbstractSource
 public:
        TestPlugin(AbstractRoutingEngine* re, map<string, string> config);
        ~TestPlugin();
-       string uuid();
+       const string uuid();
        int portHandle;
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
@@ -53,7 +53,6 @@ public:
        int supportedOperations();
 
        void setSupported(PropertyList list);
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
        void supportedChanged(PropertyList) {}
        void setConfiguration(map<string, string> config);
        //void randomizeProperties();
index c3f912d..2dea1fd 100644 (file)
@@ -102,9 +102,9 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        
 }
 
-string TpmsPlugin::uuid()
+const string TpmsPlugin::uuid()
 {
-       return "CHANGE THIS 6dd4268a-c605-4a06-9034-59c1e8344c8e";
+       return "5e896a00-15b3-11e3-8ffd-0800200c9a66";
 }
 
 
@@ -113,48 +113,58 @@ void TpmsPlugin::getPropertyAsync(AsyncPropertyReply *reply)
        DebugOut() << "TPMS: getPropertyAsync called for property: " << reply->property << endl;
 
     if(reply->property == VehicleProperty::TirePressureLeftFront) {
-      VehicleProperty::TirePressureType temp(lfPressure);
+         VehicleProperty::TirePressureLeftFrontType temp(lfPressure);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TirePressureRightFront) {
-      VehicleProperty::TirePressureType temp(rfPressure);
+         VehicleProperty::TirePressureRightFrontType temp(rfPressure);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TirePressureLeftRear) {
-      VehicleProperty::TirePressureType temp(lrPressure);
+         VehicleProperty::TirePressureLeftRearType temp(lrPressure);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TirePressureRightRear) {
-      VehicleProperty::TirePressureType temp(rrPressure);
+         VehicleProperty::TirePressureRightRearType temp(rrPressure);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TireTemperatureLeftFront) {
-      VehicleProperty::EngineSpeedType temp(lfTemperature);
+         VehicleProperty::TireTemperatureLeftFrontType temp(lfTemperature);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TireTemperatureRightFront) {
-      VehicleProperty::EngineSpeedType temp(rfTemperature);
+         VehicleProperty::TireTemperatureRightFrontType temp(rfTemperature);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TireTemperatureLeftRear) {
-      VehicleProperty::EngineSpeedType temp(lrTemperature);
+         VehicleProperty::TireTemperatureLeftRearType temp(lrTemperature);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
     else if(reply->property == VehicleProperty::TireTemperatureRightRear) {
-      VehicleProperty::EngineSpeedType temp(rrTemperature);
+         VehicleProperty::TireTemperatureRightRearType temp(rrTemperature);
+         reply->success = true;
       reply->value = &temp;
       reply->completed(reply);
     }
 
     else {
       DebugOut() << "TPMS: no such getProperty type: " << reply->property << endl;
+         reply->success = false;
+         reply->error = AsyncPropertyReply::InvalidOperation;
       reply->value = nullptr;
       reply->completed(reply);
        }
@@ -290,23 +300,23 @@ int TpmsPlugin::readValues()
     }
   }
 
-  VehicleProperty::TirePressureType lfPres(lfPressure);
-  VehicleProperty::TirePressureType rfPres(rfPressure);
-  VehicleProperty::TirePressureType lrPres(lrPressure);
-  VehicleProperty::TirePressureType rrPres(rrPressure);
-  VehicleProperty::TireTemperatureType lfTemp(lfTemperature);
-  VehicleProperty::TireTemperatureType rfTemp(rfTemperature);
-  VehicleProperty::TireTemperatureType lrTemp(lrTemperature);
-  VehicleProperty::TireTemperatureType rrTemp(rrTemperature);
-
-  routingEngine->updateProperty(VehicleProperty::TirePressureLeftFront, &lfPres, uuid());
-  routingEngine->updateProperty(VehicleProperty::TirePressureRightFront, &rfPres, uuid());
-  routingEngine->updateProperty(VehicleProperty::TirePressureLeftRear, &lrPres, uuid());
-  routingEngine->updateProperty(VehicleProperty::TirePressureRightRear, &rrPres, uuid());
-  routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftFront, &lfTemp, uuid());
-  routingEngine->updateProperty(VehicleProperty::TireTemperatureRightFront, &rfTemp, uuid());
-  routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftRear, &lrTemp, uuid());
-  routingEngine->updateProperty(VehicleProperty::TireTemperatureRightRear, &rrTemp, uuid());
+  VehicleProperty::TirePressureLeftFrontType lfPres(lfPressure);
+  VehicleProperty::TirePressureRightFrontType rfPres(rfPressure);
+  VehicleProperty::TirePressureLeftRearType lrPres(lrPressure);
+  VehicleProperty::TirePressureRightRearType rrPres(rrPressure);
+  VehicleProperty::TireTemperatureLeftFrontType lfTemp(lfTemperature);
+  VehicleProperty::TireTemperatureRightFrontType rfTemp(rfTemperature);
+  VehicleProperty::TireTemperatureLeftRearType lrTemp(lrTemperature);
+  VehicleProperty::TireTemperatureRightRearType rrTemp(rrTemperature);
+
+  routingEngine->updateProperty(&lfPres, uuid());
+  routingEngine->updateProperty(&rfPres, uuid());
+  routingEngine->updateProperty(&lrPres, uuid());
+  routingEngine->updateProperty(&rrPres, uuid());
+  routingEngine->updateProperty(&lfTemp, uuid());
+  routingEngine->updateProperty(&rfTemp, uuid());
+  routingEngine->updateProperty(&lrTemp, uuid());
+  routingEngine->updateProperty(&rrTemp, uuid());
 
   return 0;
 }
index f0f2668..7ed87af 100644 (file)
@@ -30,7 +30,7 @@ class TpmsPlugin: public AbstractSource
 public:
        TpmsPlugin(AbstractRoutingEngine* re, map<string, string> config);
        
-       string uuid();
+       const string uuid();
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply);
        AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -38,7 +38,6 @@ public:
        void unsubscribeToPropertyChanges(VehicleProperty::Property property);
        PropertyList supported();
        
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
        void supportedChanged(PropertyList) {}
 
     int readValues();
index 7e74815..5b09ef6 100644 (file)
@@ -41,16 +41,14 @@ WebSocketSink::WebSocketSink(AbstractRoutingEngine* re,libwebsocket *wsi,string
        m_re = re;
        re->subscribeToProperty(ambdproperty,this);
 }
-string WebSocketSink::uuid()
+const string WebSocketSink::uuid()
 {
        return m_uuid;
 }
-void WebSocketSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string  uuid)
+void WebSocketSink::propertyChanged(AbstractPropertyType *value, const string &uuid)
 {
-  //printf("Got property:%i\n",boost::any_cast<uint16_t>(reply->value));
-       //uint16_t velocity = boost::any_cast<uint16_t>(value);
-       //m_re->updateProperty(name,VehicleProperty::getPropertyTypeForPropertyNameValue(name,data.front()));
-       
+       VehicleProperty::Property property = value->name;
+
        stringstream s;
        
        //TODO: Dirty hack hardcoded stuff, jsut to make it work.
index c65ebff..9c7a288 100644 (file)
@@ -29,8 +29,8 @@ class WebSocketSink : public AbstractSink
 public:
        WebSocketSink(AbstractRoutingEngine* re,libwebsocket *wsi,string uuid,VehicleProperty::Property property,std::string ambdproperty);
        ~WebSocketSink();
-       string uuid() ;
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string  uuid);
+       const string uuid() ;
+       void propertyChanged(AbstractPropertyType *value, const std::string &uuid);
        void supportedChanged(PropertyList supportedProperties);
        PropertyList subscriptions();
        libwebsocket *socket() { return m_wsi; }
index 56fb22d..76a9475 100644 (file)
@@ -518,7 +518,7 @@ int WebSocketSource::supportedOperations()
        return Get | Set | GetRanged;
 }
 
-string WebSocketSource::uuid()
+const string WebSocketSource::uuid()
 {
        return "d293f670-f0b3-11e1-aff1-0800200c9a66";
 }
index 6b9103f..c44c725 100644 (file)
@@ -33,7 +33,7 @@ class WebSocketSource : public AbstractSource
 
 public:
        WebSocketSource(AbstractRoutingEngine* re, std::map<std::string, std::string> config);
-       std::string uuid();
+       const std::string uuid();
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply);
        AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -51,7 +51,6 @@ public:
        PropertyList activeRequests;
        PropertyList removeRequests;
        void setSupported(PropertyList list);
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid) {}
        void supportedChanged(PropertyList) {}
        void setConfiguration(std::map<std::string, std::string> config);
        //map<VehicleProperty::Property,AsyncPropertyReply*> propertyReplyMap;
index 78d4ec6..7a541e6 100644 (file)
@@ -124,7 +124,7 @@ extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<str
        return new WheelSourcePlugin(routingengine, config);
 }
 
-string WheelSourcePlugin::uuid()
+const string WheelSourcePlugin::uuid()
 {
        return "c0ffee8a-c605-4a06-9034-59c1deadbeef";
 }
index 30e7b87..229934d 100644 (file)
@@ -33,7 +33,7 @@ public:
        WheelSourcePlugin(AbstractRoutingEngine* re, map<string, string> config);
        ~WheelSourcePlugin();
        
-       string uuid();
+       const string uuid();
        void getPropertyAsync(AsyncPropertyReply *reply);
        void getRangePropertyAsync(AsyncRangePropertyReply *reply){}
        AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
@@ -43,7 +43,6 @@ public:
 
        int supportedOperations();
        
-       void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
        void supportedChanged(PropertyList) {}
 
        map<string, string> getConfiguration() { return configuration; }