From: Kevron Rees Date: Tue, 21 Aug 2012 23:50:22 +0000 (-0700) Subject: initial working dbus plugin X-Git-Tag: submit/release/20120910.223349~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e5fb71fd2903f080dfecb55678963da55e1d386;p=profile%2Fivi%2Fautomotive-message-broker.git initial working dbus plugin --- diff --git a/plugins/dbus/abstractproperty.h b/plugins/dbus/abstractproperty.h index 8feae3e..921d0df 100644 --- a/plugins/dbus/abstractproperty.h +++ b/plugins/dbus/abstractproperty.h @@ -71,6 +71,7 @@ public: void setValue(boost::any val) { mValue = val; + updateValue(); } template diff --git a/plugins/exampleplugin.cpp b/plugins/exampleplugin.cpp index 64e7cc4..5dc9b96 100644 --- a/plugins/exampleplugin.cpp +++ b/plugins/exampleplugin.cpp @@ -99,6 +99,7 @@ PropertyList ExampleSourcePlugin::supported() PropertyList props; props.push_back(VehicleProperty::EngineSpeed); props.push_back(VehicleProperty::VehicleSpeed); + props.push_back(VehicleProperty::AccelerationX); return props; } @@ -112,10 +113,12 @@ void ExampleSourcePlugin::randomizeProperties() { velocity = 1 + (255.00 * (rand() / (RAND_MAX + 1.0))); engineSpeed = 1 + (15000.00 * (rand() / (RAND_MAX + 1.0))); + int accelerationX = 1 + (15000.00 * (rand() / (RAND_MAX + 1.0))); DebugOut()<<"setting velocity to: "<updateProperty(VehicleProperty::VehicleSpeed, velocity); routingEngine->updateProperty(VehicleProperty::EngineSpeed, engineSpeed); + routingEngine->updateProperty(VehicleProperty::AccelerationX, accelerationX); }