#turn on -fpic/-fpie:
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie -pie -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie -pie -std=c++1y")
if(opencvlux_plugin)
message(STATUS "OpenCV Lux plugin enabled")
* except that it takes an addition zone argument and only return the path for that zone.
* \arg String property is the requested property to be retrieved.
* \arg Zone zone is the zone which the object
- * \return string representing the DBus Object path. Possible errors:
+ * \return string representing the DBus Object path.
+ * Possible errors:
* "org.automotive.Manager.InvalidZone"
* "org.automotive.Manager.ObjectNotFound"
*/
}
-enum WiperControl {
+enumeration WiperControl {
off = "off",
once = "once",
slowest = "slowest",
}
-enum ConvertibleRoofStatus {
+enumeration ConvertibleRoofStatus {
closed = "closed",
closing = "closing",
opening = "opening",
attribute Boolean BrakePedalDepressed readonly
}
-enum Button {
+enumeration Button {
home = "home",
back = "back",
search = "search",
down = "down"
}
-enum ButtonEventType {
+enumeration ButtonEventType {
press = "press",
long_press = "long_press",
release = "release"
attribute UInt8 SeatSideCushion;
}
-enum DriveModeType {
+enumeration DriveModeType {
comfort = "comfort",
auto = "auto",
sport = "sport",
attribute Boolean Lock;
}
-enum OccupantStatus {
+enumeration OccupantStatus {
adult = "adult",
child = "child",
vacant = "vacant"
};
-enum IdentificationTypeEnum {
+enumeration IdentificationTypeEnum {
pin = "pin",
keyfob = "keyfob",
Bluetooth = "Bluetooth",
attribute UInt16 Pressure;
}
-enum LaneDepartureStatus {
+enumeration LaneDepartureStatus {
off = "off",
pause = "pause",
running = "running"
attribute LaneDepartureStatus Status readonly;
}
-enum AlarmStatus {
+enumeration AlarmStatus {
disarmed = "disarmed",
prearmed = "prearmed",
armed = "armed",
attribute AlarmStatus Status;
}
-enum ParkingBrakeStatus {
+enumeration ParkingBrakeStatus {
inactive = "inactive",
active = "active",
error = "error"
};
+interface org.automotive.ParkingBrake extends VehiclePropertyType {
+ /*!
+ * \brief MUST return the current status of vehicle Alarm System.
+ */
+ attribute ParkingBrakeStatus Status readonly;
+}
*
* \section basic_usage Basic Recommended Usage
*
-* It is recomended that the Manager interface be used to find the DBus Object that contains the
+* It is recommended that the Manager interface be used to find the DBus Object that contains the
* data type you need. This is done through the FindObject() call. It is expected that DBus
-* Object Paths may change and so it is not appropriate to hard code DBus Object Paths.
+* Object Paths may change and so it is not appropriate to hard code DBus Object Paths.
*
* \section example Usage Example
* Here is a pseudo-code example of how the api is to be used:
/**< Button Event @see ButtonEvents::ButtonEventType */
///TODO: deprecated. Use ButtonEventW3C. Remove in 0.14
+ [[deprecated("Depricated in 0.14. Use ButtonEventW3C")]]
static const Property ButtonEvent;
PROPERTYTYPE(ButtonEvent, ButtonEventType, BasicPropertyType<ButtonEvents::ButtonEventType>, ButtonEvents::ButtonEventType)
bluemonkey.createCustomProperty("OccupantIdentificationType", "pin", Zone.Rear | Zone.Left);
bluemonkey.createCustomProperty("TargetTemperature", 20);
+bluemonkey.createCustomProperty("FanSpeed", 1);
+bluemonkey.createCustomProperty("AirConditioning", false);
+bluemonkey.createCustomProperty("Heater", false);
+bluemonkey.createCustomProperty("AirflowDirection", 0);
+bluemonkey.createCustomProperty("AirRecirculation", false);
-bluemonkey.createCustomProperty("AirflowDirection", 0, Zone.Front | Zone.Left);
-bluemonkey.createCustomProperty("FanSpeed", 1, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("TargetTemperature", 20, Zone.Front | Zone.Left);
-bluemonkey.createCustomProperty("AirConditioning", false, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("AirRecirculation", false, Zone.Front | Zone.Left);
-bluemonkey.createCustomProperty("Heater", false, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("SteeringWheelHeater", 0, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("SeatHeater", 0, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("SeatCooler", 0, Zone.Front | Zone.Left);
bluemonkey.createCustomProperty("AirflowDirection", 0, Zone.Front | Zone.Right);
-bluemonkey.createCustomProperty("FanSpeed", 1, Zone.Front | Zone.Right);
bluemonkey.createCustomProperty("TargetTemperature", 25, Zone.Front | Zone.Right);
-bluemonkey.createCustomProperty("AirConditioning", false, Zone.Front | Zone.Right);
-bluemonkey.createCustomProperty("AirRecirculation", false, Zone.Front | Zone.Right);
-bluemonkey.createCustomProperty("Heater", false, Zone.Front | Zone.Right);
bluemonkey.createCustomProperty("SeatHeater", 0, Zone.Front | Zone.Right);
bluemonkey.createCustomProperty("SeatCooler", 0, Zone.Front | Zone.Right);
//VehicleSpeed
speedProperty.value = Math.floor((Math.random() * 100) + 1);
});
+
+//testTimer.start();
bool TestPlugin::testCoreSetSupported()
{
PropertyList supported(routingEngine->supported());
- TEST(contains(supported,TestProptertyName1) == false);
- std::vector<std::string> sources(routingEngine->sourcesForProperty(TestProptertyName1));
- TEST(contains(sources,uuid()) == false);
-
- // if we were registered in Core, it will ask us and we will return it valid, but we haven't registered yet
- TEST(routingEngine->getPropertyInfo(TestProptertyName1, uuid()).isValid() == false);
+ TEST(contains(supported, TestProptertyName1) == false);
//
// CALL setSupported
//
- routingEngine->updateSupported(m_supportedProperties, PropertyList(), nullptr);// invalid input
- TEST(routingEngine->getPropertyInfo(TestProptertyName1, uuid()).isValid() == false);
// valid call
- routingEngine->updateSupported(m_supportedProperties, PropertyList(), this);// we are register as source from now
+ routingEngine->updateSupported(m_supportedProperties, PropertyList(), this);
TEST(routingEngine->getPropertyInfo(TestProptertyName1, uuid()).isValid() == true);
Zone::ZoneList zones(routingEngine->getPropertyInfo(TestProptertyName1, uuid()).zones());
TEST(contains(zones, Zone::LeftSide) == true);
supported = routingEngine->supported();
- TEST(contains(supported,TestProptertyName1) == true);
- TEST(contains(supported,TestProptertyName2) == true);
- TEST(contains(supported,VehicleProperty::ClutchStatus) == false);
+ TEST(contains(supported, TestProptertyName1) == true);
+ TEST(contains(supported, TestProptertyName2) == true);
+ TEST(contains(supported, VehicleProperty::ClutchStatus) == false);
- sources = routingEngine->sourcesForProperty(TestProptertyName1);
+ std::vector<std::string> sources = routingEngine->sourcesForProperty(TestProptertyName1);
TEST(contains(sources,uuid()) == true);
TEST(routingEngine->getPropertyInfo(TestProptertyName2, uuid()).isValid() == true);
zones = routingEngine->getPropertyInfo(TestProptertyName2, uuid()).zones();
- TEST(contains(zones,Zone::FrontSide) == true);
+ TEST(contains(zones, Zone::FrontSide) == true);
return true;
}
tfirst->append(v3);
tsecond->fromVariant(tfirst->toVariant());
- g_assert (tfirst->toString() == tsecond->toString());
+ GVariant* testGVSVariant = g_variant_new("i", 9);
+ TEST(GVS<int>::value(testGVSVariant) == 9);
+
+ TEST (tfirst->toString() == tsecond->toString());
testBooleanToStringFromString();
- g_assert (testCoreUpdateSupported());
+ TEST (testCoreUpdateSupported());
testSubscription();