From: Kevron Rees Date: Thu, 23 Aug 2012 22:34:25 +0000 (-0700) Subject: fixed unsubscribe X-Git-Tag: submit/release/20120910.223349~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef1d82422c5db0c5cfb3d19e510173d9ffd0a94b;p=profile%2Fivi%2Fautomotive-message-broker.git fixed unsubscribe --- diff --git a/ambd/core.cpp b/ambd/core.cpp index ada8123..d30f6f4 100644 --- a/ambd/core.cpp +++ b/ambd/core.cpp @@ -43,7 +43,7 @@ void Core::setSupported(PropertyList supported, AbstractSource* source) { if(!ListPlusPlus(&mMasterPropertyList).contains((*itr))) { - DebugOut()<<__FUNCTION__<<"() adding suport for property "<(&mMasterPropertyList).contains((property))) { - DebugOut()<<__FUNCTION__<<"(): property not supported: "<(&list).removeOne(self); + + ListPlusPlus(&propertySinkMap[property]).removeOne(self); for(SourceList::iterator itr = mSources.begin(); itr != mSources.end(); itr++) { diff --git a/lib/vehicleproperty.cpp b/lib/vehicleproperty.cpp index bd21c52..c764d9b 100644 --- a/lib/vehicleproperty.cpp +++ b/lib/vehicleproperty.cpp @@ -42,12 +42,3 @@ VehicleProperty::VehicleProperty() } -string VehicleProperty::name(VehicleProperty::Property prop) -{ - return ""; -} - -VehicleProperty::Property VehicleProperty::value(string name) -{ - return VehicleProperty::NoValue; -} diff --git a/lib/vehicleproperty.h b/lib/vehicleproperty.h index 1449091..f5c920d 100644 --- a/lib/vehicleproperty.h +++ b/lib/vehicleproperty.h @@ -35,36 +35,59 @@ public: typedef std::string Property; - //enum Property - //{ + /// Various property types: + static const Property NoValue; - static const Property VehicleSpeed; /**< Vehicle Velocity in km/h */ - static const Property EngineSpeed;/**< Engine Speed in rotations per minute */ - static const Property TransmissionShiftPosition; /**< Transmission Shift Position - * 0 = Neutral - * 1 = 1st - * 2 = 2nd - * ... - * 64 = Drive - * 128 = Reverse - * 255 = Park - */ - - static const Property ThrottlePosition; /**< Throttle position 0-100% */ - static const Property WheelBrake; /**< Wheel brake position. Engaged = true, Idle = false */ - static const Property SteeringWheelAngle; /**< Steering wheel angle (0-359) */ - static const Property TurnSignal; /**< 0=off, 1=right, 2=left, 3=hazard */ - static const Property ClutchStatus; /**< Clutch pedal status 0=off, 1=on */ - static const Property EngineOilPressure; /**< Oil pressure TODO: units */ - static const Property EngineCoolantTemperature; /**< Engine coolant temperature in degrees celcius **/ - static const Property MachineGunTurretStatus; /**< 0=off, 1=on */ - static const Property AccelerationX; /**< Acceleration on the 'x' axis in 1/1000 gravitational acceleration "g-force" */ - static const Property AccelerationY; /**< Acceleration on the 'y' axis in 1/1000 gravitational acceleration "g-force" */ - static const Property AccelerationZ; /**< Acceleration on the 'z' axis in 1/1000 gravitational acceleration "g-force" */ - //}; - - static std::string name(Property prop); - static Property value(std::string name); + + /**< Vehicle Velocity in km/h */ + static const Property VehicleSpeed; + + /**< Engine Speed in rotations per minute */ + static const Property EngineSpeed; + + /**< Transmission Shift Position + * 0 = Neutral + * 1 = 1st + * 2 = 2nd + * ... + * 64 = Drive + * 128 = Reverse + * 255 = Park + */ + static const Property TransmissionShiftPosition; + + /**< Throttle position 0-100% */ + static const Property ThrottlePosition; + + /**< Wheel brake position. Engaged = true, Idle = false */ + static const Property WheelBrake; + + /**< Steering wheel angle (0-359) */ + static const Property SteeringWheelAngle; + + /**< 0=off, 1=right, 2=left, 3=hazard */ + static const Property TurnSignal; + + /**< Clutch pedal status 0=off, 1=on */ + static const Property ClutchStatus; + + /**< Oil pressure TODO: units */ + static const Property EngineOilPressure; + + /**< Engine coolant temperature in degrees celcius **/ + static const Property EngineCoolantTemperature; + + /**< 0=off, 1=on */ + static const Property MachineGunTurretStatus; + + /**< Acceleration on the 'x' axis in 1/1000 gravitational acceleration "g-force" */ + static const Property AccelerationX; + + /**< Acceleration on the 'y' axis in 1/1000 gravitational acceleration "g-force" */ + static const Property AccelerationY; + + /**< Acceleration on the 'z' axis in 1/1000 gravitational acceleration "g-force" */ + static const Property AccelerationZ; }; diff --git a/plugins/examplesink.cpp b/plugins/examplesink.cpp index e72ba5d..f152e0d 100644 --- a/plugins/examplesink.cpp +++ b/plugins/examplesink.cpp @@ -51,7 +51,7 @@ void ExampleSink::supportedChanged(PropertyList supportedProperties) void ExampleSink::propertyChanged(VehicleProperty::Property property, boost::any value, std::string uuid) { - DebugOut()<(value)<(value)<