-- Enable per-plugin configuration
- Enable websocketsink plugin to listen on a configurable interface
- Enable websocketsource plugin to connect to a configurable host
- websocketsink unsubscribe on disconnect
+- Add properties for initial obd-ii support for: BatteryVoltage, InteriorTemperature, EngineOilTemperature,
+ VIN, and WMI
struct{ byte, byte, byte } EngineOil [readonly]
- Remaining Oil Percentage (byte)
+ Remaining Oil life remaining; percentage (byte)
Engine Oil Temperature (byte) in degrees C
Engine Oil Pressure in kPa (uint16)
}
};
+class StringPropertyType: public AbstractPropertyType
+{
+public:
+ StringPropertyType(std::string val)
+ :AbstractPropertyType()
+ {
+ setValue(val);
+ }
+
+ StringPropertyType(StringPropertyType const & other)
+ {
+ setValue(other.value<std::string>());
+ }
+
+ StringPropertyType & operator = (StringPropertyType const & other)
+ {
+ //setValue(other.value<std::string>());
+ return *this;
+ }
+
+
+ std::string toString()
+ {
+ return value<std::string>();
+ }
+
+};
+
#endif
const VehicleProperty::Property VehicleProperty::AccelerationZ = "AccelerationZ";
const VehicleProperty::Property VehicleProperty::MassAirFlow = "MassAirFlow";
const VehicleProperty::Property VehicleProperty::ButtonEvent = "ButtonEvent";
+const VehicleProperty::Property VehicleProperty::AirIntakeTemperature = "AirIntakeTemperature";
+const VehicleProperty::Property VehicleProperty::BatteryVoltage = "BatteryVoltage";
+const VehicleProperty::Property VehicleProperty::InteriorTemperature = "InteriorTemperature";
+const VehicleProperty::Property VehicleProperty::EngineOilTemperature = "EngineOilTemperature";
+const VehicleProperty::Property VehicleProperty::VIN = "VIN";
+const VehicleProperty::Property VehicleProperty::WMI = "WMI";
VehicleProperty::VehicleProperty()
{
mProperties.push_back(AccelerationZ);
mProperties.push_back(MassAirFlow);
mProperties.push_back(ButtonEvent);
+ mProperties.push_back(AirIntakeTemperature);
+ mProperties.push_back(BatteryVoltage);
+ mProperties.push_back(InteriorTemperature);
+ mProperties.push_back(EngineOilTemperature);
+ mProperties.push_back(VIN);
+ mProperties.push_back(WMI);
return mProperties;
}
else if(name == AccelerationY) return new AccelerationType(value);
else if(name == AccelerationZ) return new AccelerationType(value);
else if(name == MassAirFlow) return new MassAirFlowType(value);
- else if(name == ButtonEvent) return new ButtonEventType(value);
+ else if(name == AirIntakeTemperature) return new AirIntakeTemperatureType(value);
+ else if(name == BatteryVoltage) return new BatteryVoltageType(value);
+ else if(name == InteriorTemperature) return new InteriorTemperatureType(value);
+ else if(name == EngineOilTemperature) return new EngineOilTemperatureType(value);
+ else if(name == VIN) return new VINType(value);
+ else if(name == WMI) return new WMIType(value);
+
return nullptr;
}
static const Property ButtonEvent;
typedef BasicPropertyType<int> ButtonEventType;
+ /**< Air intake temperature in degrees celcius */
+ static const Property AirIntakeTemperature;
+ typedef BasicPropertyType<int> AirIntakeTemperatureType;
+
+ /**< Battery voltage in volts */
+ static const Property BatteryVoltage;
+ typedef BasicPropertyType<double> BatteryVoltageType;
+
+ /**< Interior Air Temperature in degrees celcius */
+ static const Property InteriorTemperature;
+ typedef BasicPropertyType<int> InteriorTemperatureType;
+
+ /**< Engine Oil Temperature in degrees celcius */
+ static const Property EngineOilTemperature;
+ typedef BasicPropertyType<int> EngineOilTemperatureType;
+
+ /**< Vehicle Identification Number (ISO 3779) 17 chars**/
+ static const Property VIN;
+ typedef StringPropertyType VINType;
+
+ /**< World Manufacturer Identifier (SAE) 3 characters. */
+ static const Property WMI;
+ typedef StringPropertyType WMIType;
+
static std::list<VehicleProperty::Property> capabilities();
static AbstractPropertyType* getPropertyTypeForPropertyNameValue(Property name, std::string value);