Remaining Oil Percentage (byte)
Engine Oil Temperature (byte) in degrees C
- Engine Oil Pressure (byte)
+ Engine Oil Pressure in kPa (uint16)
struct{ byte, byte } EngineCoolant [readonly]
-set(amb_sources fuelrangeproperty.cpp fuellevelproperty.cpp chime.cpp hornproperty.cpp interiorlightstatusproperty.cpp lightstatusproperty.cpp wheelbrakeproperty.cpp cruisecontrolstatus.cpp transmissiongearstatus.cpp tripmeterproperty.cpp fueleconomyproperty.cpp vehiclepowermodeproperty.cpp enginespeedproperty.cpp runningstatusinterface.cpp vehiclespeed.cpp abstractdbusinterface.cpp abstractproperty.cpp dbusinterfacemanager.cpp debugout.cpp)
+set(amb_sources engineoilproperty.cpp fuelrangeproperty.cpp fuellevelproperty.cpp chime.cpp hornproperty.cpp interiorlightstatusproperty.cpp lightstatusproperty.cpp wheelbrakeproperty.cpp cruisecontrolstatus.cpp transmissiongearstatus.cpp tripmeterproperty.cpp fueleconomyproperty.cpp vehiclepowermodeproperty.cpp enginespeedproperty.cpp runningstatusinterface.cpp vehiclespeed.cpp abstractdbusinterface.cpp abstractproperty.cpp dbusinterfacemanager.cpp debugout.cpp)
set(amb_headers_install abstractproperty.h vehiclespeed.h hornproperty.h interiorlightstatusproperty.h lightstatusproperty.h wheelbrakeproperty.h cruisecontrolstatus.h transmissiongearstatus.h tripmeterproperty.h fueleconomyproperty.h vehiclepowermodeproperty.h enginespeedproperty.h chime.h)
include_directories( ${include_dirs} )
add_library(amb SHARED ${amb_sources})
GVariant* Chime::toGVariant()
{
-
+ return g_variant_new_boolean(value());
}
Chime::Chime()
return value();
}
- Chime& operator = (bool val)
+ Chime& operator = (bool const & val)
{
this->setValue(val);
return *this;
--- /dev/null
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#include "engineoilproperty.h"
+
+void EngineOilProperty::fromGVariant(GVariant* value)
+{
+
+}
+
+GVariant* EngineOilProperty::toGVariant()
+{
+
+}
+
+
+
--- /dev/null
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#ifndef ENGINEOILPROPERTY_H
+#define ENGINEOILPROPERTY_H
+
+#include <abstractproperty.h>
+
+class EngineOil
+{
+public:
+ EngineOil():remaining(0), temperature(0), pressure(0) { }
+
+ uint8_t remaining;
+ uint8_t temperature;
+ uint16_t pressure;
+};
+
+class EngineOilProperty : public AbstractProperty
+{
+
+public:
+
+
+ virtual void fromGVariant(GVariant* value);
+ virtual GVariant* toGVariant();
+
+
+};
+
+#endif // ENGINEOILPROPERTY_H
print "InteriorLightStatus", interiorLightStatus
print "HornSatus", hornStatus
print "Chime", chimeStatus
-print "FuelLevel: ", fuelLevelStatus
+print "FuelLevel: %i" % fuelLevelStatus
print "FuelRange", fuelRange
assert type(speed) == dbus.UInt16
assert fuelLevelStatus == 95
assert type(fuelRange) == dbus.UInt16
-assert fuelRange = 321
+assert fuelRange == 321
print "Passed"