diff options
author | Tim Trampedach <tim@timtt.com> | 2012-10-13 15:39:55 -0700 |
---|---|---|
committer | Kevron Rees <kevron_m_rees@linux.intel.com> | 2012-10-26 16:31:38 -0700 |
commit | 7e84835b1c67ee52ce7eed053cbb34e8ceb0f742 (patch) | |
tree | 91e8efd6c970f3f423b4ef497ed8960debe32511 | |
parent | 11af6e69011af2c73b841fa5471ab223565e3312 (diff) | |
download | automotive-message-broker-7e84835b1c67ee52ce7eed053cbb34e8ceb0f742.tar.gz |
tire temperature values added
-rw-r--r-- | lib/vehicleproperty.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/vehicleproperty.cpp b/lib/vehicleproperty.cpp index 8619ef28..063f11bf 100644 --- a/lib/vehicleproperty.cpp +++ b/lib/vehicleproperty.cpp @@ -59,6 +59,10 @@ const VehicleProperty::Property VehicleProperty::TirePressureLeftFront = "TirePr const VehicleProperty::Property VehicleProperty::TirePressureRightFront = "TirePressureRightFront"; const VehicleProperty::Property VehicleProperty::TirePressureLeftRear = "TirePressureLeftRear"; const VehicleProperty::Property VehicleProperty::TirePressureRightRear = "TirePressureRightRear"; +const VehicleProperty::Property VehicleProperty::TireTemperatureLeftFront = "TireTemperatureLeftFront"; +const VehicleProperty::Property VehicleProperty::TireTemperatureRightFront = "TireTemperatureRightFront"; +const VehicleProperty::Property VehicleProperty::TireTemperatureLeftRear = "TireTemperatureLeftRear"; +const VehicleProperty::Property VehicleProperty::TireTemperatureRightRear = "TireTemperatureRightRear"; const VehicleProperty::Property VehicleProperty::VehiclePowerMode = "VehiclePowerMode"; const VehicleProperty::Property VehicleProperty::TripMeterA = "TripMeterA"; const VehicleProperty::Property VehicleProperty::TripMeterB = "TripMeterB"; @@ -132,11 +136,19 @@ VehicleProperty::VehicleProperty() std::list<VehicleProperty::Property> VehicleProperty::capabilities() { return mCapabilities; + mProperties.push_back(TireTemperatureLeftFront); + mProperties.push_back(TireTemperatureRightFront); + mProperties.push_back(TireTemperatureLeftRear); + mProperties.push_back(TireTemperatureRightRear); } AbstractPropertyType* VehicleProperty::getPropertyTypeForPropertyNameValue(VehicleProperty::Property name, std::string value) { + else if(name == TireTemperatureLeftFront) return new TireTemperatureType(value); + else if(name == TireTemperatureRightFront) return new TireTemperatureType(value); + else if(name == TireTemperatureLeftRear) return new TireTemperatureType(value); + else if(name == TireTemperatureRightRear) return new TireTemperatureType(value); if(registeredPropertyFactoryMap.count(name) > 0) { VehicleProperty::PropertyTypeFactoryCallback cb = registeredPropertyFactoryMap[name]; |