added driving safety attributes
authorKevron Rees <tripzero.kev@gmail.com>
Thu, 4 Dec 2014 23:32:58 +0000 (15:32 -0800)
committerKevron Rees <tripzero.kev@gmail.com>
Thu, 4 Dec 2014 23:32:58 +0000 (15:32 -0800)
docs/CMakeLists.txt
docs/amb.in.idl [moved from docs/amb.idl with 90% similarity]
lib/vehicleproperty.cpp
lib/vehicleproperty.h
plugins/bluemonkey/config.js
plugins/dbus/dbusinterfacemanager.cpp
plugins/dbus/drivingsafety.h
xwalk/vehicle_api.js

index 69e99af..9a88138 100644 (file)
@@ -4,6 +4,6 @@ if(enable_docs)
   install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/amb.idl DESTINATION ${DOC_INSTALL_DIR}/dbus/html/ COMPONENT Docs)
   add_custom_target(doc_idl ALL mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/dbus/html/ && cp ${CMAKE_CURRENT_SOURCE_DIR}/amb.idl ${CMAKE_CURRENT_SOURCE_DIR}/dbus/html/amb.idl WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Moving amb.idl" VERBATIM)
 
-  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/amb.idl ${CMAKE_CURRENT_SOURCE_DIR}/amb.idl @ONLY)
-
 endif(enable_docs)
+
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/amb.in.idl ${CMAKE_CURRENT_SOURCE_DIR}/amb.fidl @ONLY)
similarity index 90%
rename from docs/amb.idl
rename to docs/amb.in.idl
index 79acde0..dffe393 100644 (file)
@@ -1,5 +1,7 @@
 /*! amb.idl
-* /brief This document describes the DBus interfaces and data types for the
+* \name @PROJECT_NAME@
+* \version @PROJECT_VERSION@
+* \brief This document describes the DBus interfaces and data types for the
 * Automotive Message Broker API.  The data types are intended to as-close-as-
 * possible be compatible with the W3C vehicle <a href="https://rawgit.com/w3c/automotive-bg/master/data_spec.html>data spec</a>.
 */
@@ -48,7 +50,7 @@ interface VehiclePropertyType {
   attribute Zone Zone readonly
 
   /*!
-  * \brief returns dictionary of objectName and values for data between
+  * \brief return dictionary of objectName and values for data between
   * 'beginTime' and 'endTime'
   * \arg beginTime time stamp in Seconds since Unix Epoc
   * \arg endTime time stamp in Seconds since Unix Epoc
@@ -77,7 +79,7 @@ enumeration Zone {
 interface org.automotive.Manager  {
 
   /*! List
-   *  \brief returns supported properties
+   *  \brief return supported properties
   */
   method List {
     out { String[] }
@@ -93,7 +95,7 @@ interface org.automotive.Manager  {
    *  when the last proccess that calls Find* disconnects from DBus.
    *
    *  \arg String objectName to find
-   *  \returns list of object paths that provide the given object Name.
+   *  \return list of object paths that provide the given object Name.
   */
   method FindObject {
     in {
@@ -107,10 +109,10 @@ interface org.automotive.Manager  {
   /*!
    * FindObjectForZone
    *  \brief find the DBus object path which matches "objectName" and "zone".  This has the same behavior as FindObject
-   * except that it takes an addition zone argument and only returns the path for that zone.
+   * 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
-   *  \returns 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"
   */
@@ -128,7 +130,7 @@ interface org.automotive.Manager  {
    * ZonesForObjectName
    *  \brief get a list of zones for a given objectName.
    *  \arg String objectName object name.
-   *  \returns list of zones for the given objectName (@see Zone)
+   *  \return list of zones for the given objectName (@see Zone)
   */
   method ZonesForObjectName {
     in {
@@ -143,7 +145,7 @@ interface org.automotive.Manager  {
    * SupportsProperty
    * \brief check whether a Property exists.
    * \arg propertyName name of property of Object
-   * \returns true if Property exists
+   * \return true if Property exists
    */
   method SupportsProperty {
     in {
@@ -977,8 +979,19 @@ interface org.automotive.AntilockBrakingSystem extends VehiclePropertyType  {
 
   /*!  AntilockBrakingSystem
    *   \brief MUST return whether Antilock Braking System is Idle (false) or Engaged (true)
+   *   TODO: Deprecated.  Use Engaged.  Remove in 0.14
    */
    attribute Boolean AntilockBrakingSystem readonly
+
+  /*!
+  * \brief MUST return whether or not the ABS Setting is enabled: enabled (true) or disabled (false)
+  */
+  attribute Boolean Enabled readonly;
+
+  /*!
+  * \brief MUST return whether or not the ABS is engaged: engaged (true) or idle (false)
+  */
+  attribute Boolean Engaged readonly;
 }
 
 
@@ -986,15 +999,26 @@ interface org.automotive.TractionControlSystem extends VehiclePropertyType  {
 
   /*!  TractionControlSystem
    *   \brief MUST return whether Traction Control System is Off (false) or On (true)
+   * TODO: Deprecated.  Use Engaged.  Remove in 0.14
    */
    attribute Boolean TractionControlSystem readonly
+
+  /*!
+  * \brief MUST return whether or not the TCS Setting is enabled: enabled (true) or disabled (false)
+  */
+  attribute Boolean Enabled readonly;
+
+  /*!
+  * \brief MUST return whether or not the TCS is engaged: engaged (true) or idle (false)
+  */
+  attribute Boolean Engaged readonly;
 }
 
 
 interface org.automotive.VehicleTopSpeedLimit extends VehiclePropertyType  {
 
   /*!  VehicleTopSpeedLimit
-   *   \brief MUST returns top rated speed in km/h. 0 = no limit
+   *   \brief MUST return top rated speed in km/h. 0 = no limit
    */
    attribute UInt16 VehicleTopSpeedLimit readonly
 }
@@ -1002,16 +1026,24 @@ interface org.automotive.VehicleTopSpeedLimit extends VehiclePropertyType  {
 
 interface org.automotive.AirbagStatus extends VehiclePropertyType  {
 
-  const UInt16 AIRBAGSTATUS_INACTIVE = 0;
-  const UInt16 AIRBAGSTATUS_ACTIVE = 1;
-  const UInt16 AIRBAGSTATUS_DEPLOYED = 2;
-
   /*!  AirbagStatus
-   *   \brief MUST returns Airbag status (byte) (see AIRBAGSTATUS_*)
+   *   \brief MUST return Airbag status (byte) (see AIRBAGSTATUS_*)
+   *  TODO: deprecated.  Remove in 0.14
    */
    attribute UInt16 AirbagStatus readonly
+
+  /*!
+  * \brief MUST return whether or not the airbag is activaged: activated (true) or deactivated (false)
+  */
+  attribute Boolean Activated readonly;
+
+  /*!
+  * \brief MUST return whether the airbag is deployed: deployed (true) or not (false)
+  */
+  attribute Boolean Deployed readonly;
 }
 
+/// TODO: deprecated. Remove in 0.14
 enumeration AirbagStatus {
   inactive = 0,
   active = 1,
@@ -1023,10 +1055,8 @@ enumeration AirbagStatus {
  */
 interface org.automotive.DoorStatus extends VehiclePropertyType  {
 
-
-
   /*!  DoorStatus
-   *   \brief MUST returns Door status (byte).
+   *   \brief MUST return Door status (byte).
    * CLOSED = 0
    * OPEN = 1
    * AJAR = 2
@@ -1034,15 +1064,16 @@ interface org.automotive.DoorStatus extends VehiclePropertyType  {
    attribute UInt16 DoorStatus readonly
 
   /*!  DoorLockStatus
-   *   \brief MUST returns Door status (bool locked = true, unlocked = false).
+   *   \brief MUST return Door status (bool locked = true, unlocked = false).
    */
   attribute Boolean DoorLockStatus;
 
   /*!  ChildLockStatus
-   *   \brief MUST returns Child lock status of rear doors.  active = true, inactive = false.
+   *   \brief MUST return Child lock status of rear doors.  active = true, inactive = false.
    *   Setting this to 'true' will prevent the rear doors from being opened
    *   from the inside.
    */
+   ///TODO: Deprecated in 0.14.  Use org.automotive.ChildLockStatus
   attribute Boolean ChildLockStatus;
 }
 
@@ -1055,24 +1086,24 @@ enumeration DoorStatus {
 interface org.automotive.Door extends VehiclePropertyType  {
 
   /*!  Status
-   *   \brief MUST returns Door status (byte).  See DOORSTATUS_*
+   *   \brief MUST return Door status (byte).  See DOORSTATUS_*
    */
    attribute DoorStatus Status readonly
 
   /*!  Lock
-   *   \brief MUST returns Door status (bool locked = true, unlocked = false).
+   *   \brief MUST return Door status (bool locked = true, unlocked = false).
    */
   attribute Boolean Lock;
 
   /*!  ChildLock
-   *   \brief MUST returns Child lock status of rear doors.  active = true, inactive = false.
+   *   \brief MUST return Child lock status of rear doors.  active = true, inactive = false.
    *   Setting this to 'true' will prevent the rear doors from being opened
    *   from the inside.
    */
   attribute Boolean ChildLock;
 }
 
-
+///TODO: Deprecated in 0.14.  Use org.automotive.Seat
 interface org.automotive.SeatBelt extends VehiclePropertyType  {
 
   /*! Status
@@ -1081,11 +1112,11 @@ interface org.automotive.SeatBelt extends VehiclePropertyType  {
    attribute Boolean Status readonly
 }
 
-
+///TODO: Deprecated in 0.14.  Use org.automotive.Seat
 interface org.automotive.OccupantStatus extends VehiclePropertyType  {
 
   /*!  OccupantStatus
-   *   \brief MUST returns status of Occupant (byte, see
+   *   \brief MUST return status of Occupant (byte, see
    */
    attribute UInt16 OccupantStatus readonly
 }
@@ -1094,7 +1125,7 @@ interface org.automotive.OccupantStatus extends VehiclePropertyType  {
 interface org.automotive.ObstacleDistance extends VehiclePropertyType  {
 
   /*!  ObstacleDistance
-   *   \brief MUST returns Distance Sensor distance (Double) in m.
+   *   \brief MUST return Distance Sensor distance (Double) in m.
    */
    attribute Double ObstacleDistance readonly
 }
@@ -1582,5 +1613,68 @@ interface org.automotive.VehicleSound extends VehiclePropertyType {
   attribute array EngineSoundEnhancementMode of String readonly;
 }
 
+interface org.automotive.ElectronicStabilityControl extends VehiclePropertyType {
+  /*!
+  * \brief MUST return whether or not the ESC Setting is enabled: enabled (true) or disabled (false)
+  */
+  attribute Boolean Enabled readonly;
+
+  /*!
+  * \brief MUST return whether or not the ESC is engaged: engaged (true) or idle (false)
+  */
+  attribute Boolean Engaged readonly;
 }
 
+interface org.automotive.TopSpeedLimit extends VehiclePropertyType {
+  /*!
+  * \brief MUST return whether or not the ESC Setting is enabled: enabled (true) or disabled (false)
+  */
+  attribute UInt16 Speed readonly;
+}
+
+interface org.automotive.ChildSafetyLock extends VehiclePropertyType {
+  /*!
+  * \brief MUST return whether or not the Child Safety Lock is locked: locked (true) or unlocked (false)
+  */
+  attribute Boolean Lock;
+}
+
+enum OccupantStatus {
+  adult = "adult",
+  child = "child",
+  vacant = "vacant"
+};
+
+enum IdentificationTypeEnum {
+  pin = "pin",
+  keyfob = "keyfob",
+  Bluetooth = "Bluetooth",
+  NFC = "NFC",
+  fingerprint = "fingerprint",
+  camera = "camera",
+  voice = "voice"
+};
+
+interface org.automotive.Seat extends VehiclePropertyType {
+  /*!
+  * \brief MUST return the status of seat occupant
+  */
+  attribute OccupantStatus Occupant;
+
+  /*!
+  * \brief MUST return whether or not the seat belt is fastened: fastened (true) or unfastened (false)
+  */
+  attribute Boolean SeatBelt;
+
+  /*!
+  * \brief MUST return occupant identifier
+  */
+  attribute String OccupantName;
+
+  /*!
+  * \brief MUST return identification type
+  */
+  attribute IdentificationTypeEnum IdentificationType;
+}
+
+
index e39735e..d590648 100644 (file)
@@ -64,6 +64,18 @@ const char* Door::W3C::Closed = "closed";
 const char* Door::W3C::Open = "open";
 const char* Door::W3C::Ajar = "ajar";
 
+const char* Seat::W3C::Vacant = "vacant";
+const char* Seat::W3C::Child = "child";
+const char* Seat::W3C::Adult = "adult";
+
+const char* Seat::W3C::Pin = "pin";
+const char* Seat::W3C::Keyfob = "keyfob";
+const char* Seat::W3C::Bluetooth = "Bluetooth";
+const char* Seat::W3C::NFC = "NFC";
+const char* Seat::W3C::Fingerprint = "fingerprint";
+const char* Seat::W3C::Camera = "camera";
+const char* Seat::W3C::Voice = "voice";
+
 const char* HVAC::W3C::FloorPanel = "floorpanel";
 const char* HVAC::W3C::FloorDuct = "floorduct";
 const char* HVAC::W3C::Bilevel = "bilevel";
@@ -172,8 +184,12 @@ const VehicleProperty::Property VehicleProperty::ParkingBrakeStatus = "ParkingBr
 const VehicleProperty::Property VehicleProperty::ParkingLightStatus = "ParkingLightStatus";
 const VehicleProperty::Property VehicleProperty::HazardLightStatus = "HazardLightStatus";
 const VehicleProperty::Property VehicleProperty::AirbagStatus = "AirbagStatus";
+const VehicleProperty::Property VehicleProperty::AirbagDeployed = "AirbagDeployed";
+const VehicleProperty::Property VehicleProperty::AirbagActivated = "AirbagActivated";
 const VehicleProperty::Property VehicleProperty::AntilockBrakingSystem = "AntilockBrakingSystem";
+const VehicleProperty::Property VehicleProperty::AntilockBrakingSystemEnabled = "AntilockBrakingSystemEnabled";
 const VehicleProperty::Property VehicleProperty::TractionControlSystem = "TractionControlSystem";
+const VehicleProperty::Property VehicleProperty::TractionControlSystemEnabled = "TractionControlSystemEnabled";
 const VehicleProperty::Property VehicleProperty::VehicleTopSpeedLimit = "VehicleTopSpeedLimit";
 const VehicleProperty::Property VehicleProperty::DoorStatus = "DoorStatus";
 const VehicleProperty::Property VehicleProperty::DoorStatusW3C = "DoorStatusW3C";
@@ -182,6 +198,7 @@ const VehicleProperty::Property VehicleProperty::ChildLockStatus = "ChildLockSta
 const VehicleProperty::Property VehicleProperty::SeatBeltStatus = "SeatBeltStatus";
 const VehicleProperty::Property VehicleProperty::WindowLockStatus = "WindowLockStatus";
 const VehicleProperty::Property VehicleProperty::OccupantStatus = "OccupantStatus";
+const VehicleProperty::Property VehicleProperty::OccupantStatusW3C = "OccupantStatusW3C";
 const VehicleProperty::Property VehicleProperty::ObstacleDistance = "ObstacleDistance";
 const VehicleProperty::Property VehicleProperty::RainSensor = "RainSensor";
 const VehicleProperty::Property VehicleProperty::WindshieldWiper = "WindshieldWiper";
@@ -244,6 +261,10 @@ const VehicleProperty::Property VehicleProperty::VehicleDriveMode = "VehicleDriv
 const VehicleProperty::Property VehicleProperty::ActiveNoiseControlMode = "ActiveNoiseControlMode";
 const VehicleProperty::Property VehicleProperty::AvailableSounds = "AvailableSounds";
 const VehicleProperty::Property VehicleProperty::EngineSoundEnhancementMode = "EngineSoundEnhancementMode";
+const VehicleProperty::Property VehicleProperty::ElectronicStabilityControlEnabled = "ElectronicStabilityControlEnabled";
+const VehicleProperty::Property VehicleProperty::ElectronicStabilityControlEngaged = "ElectronicStabilityControlEngaged";
+const VehicleProperty::Property VehicleProperty::OccupantIdentificationType = "OccupantIdentificationType";
+const VehicleProperty::Property VehicleProperty::OccupantName = "OccupantName";
 
 PropertyList VehicleProperty::mCapabilities;
 PropertyList VehicleProperty::mCustomProperties;
@@ -354,10 +375,15 @@ VehicleProperty::VehicleProperty()
        REGISTERPROPERTY(ParkingBrakeStatus, false);
        REGISTERPROPERTY(ParkingLightStatus, false);
        REGISTERPROPERTY(HazardLightStatus, false);
+       /// TODO: deprecated in 0.14
        REGISTERPROPERTY(AirbagStatus, Airbag::Inactive);
+       REGISTERPROPERTY(AirbagActivated, false);
+       REGISTERPROPERTY(AirbagDeployed, false);
 
        REGISTERPROPERTY(AntilockBrakingSystem, false);
+       REGISTERPROPERTY(AntilockBrakingSystemEnabled, false);
        REGISTERPROPERTY(TractionControlSystem, false);
+       REGISTERPROPERTY(TractionControlSystemEnabled, false);
        REGISTERPROPERTY(VehicleTopSpeedLimit, 0);
 
        REGISTERPROPERTY(DoorStatus, Door::Closed);
@@ -365,7 +391,9 @@ VehicleProperty::VehicleProperty()
        REGISTERPROPERTY(DoorLockStatus, false);
        REGISTERPROPERTY(ChildLockStatus, false);
        REGISTERPROPERTY(SeatBeltStatus, false);
+       /// TODO: deprecated in 0.14
        REGISTERPROPERTY(OccupantStatus, Seat::Vacant);
+       REGISTERPROPERTY(OccupantStatusW3C, Seat::W3C::Vacant);
        REGISTERPROPERTY(WindowLockStatus, false);
        REGISTERPROPERTY(ObstacleDistance, 0);
 
@@ -442,6 +470,11 @@ VehicleProperty::VehicleProperty()
                return t;
        });
        REGISTERPROPERTY(EngineSoundEnhancementMode, "");
+       REGISTERPROPERTY(ElectronicStabilityControlEnabled, false);
+       REGISTERPROPERTY(ElectronicStabilityControlEngaged, false);
+       REGISTERPROPERTY(OccupantIdentificationType, Seat::W3C::Pin);
+       REGISTERPROPERTY(OccupantName, "");
+
 }
 
 void VehicleProperty::factory()
index 796369a..fe36f0b 100644 (file)
@@ -226,6 +226,22 @@ enum Occupant
        Child,
        Adult
 };
+namespace W3C
+{
+extern const char * Vacant;
+extern const char * Child;
+extern const char * Adult;
+
+extern const char * Pin;
+extern const char * Keyfob;
+extern const char * Bluetooth;
+extern const char * NFC ;
+extern const char * Fingerprint;
+extern const char * Camera;
+extern const char * Voice;
+}
+
+
 }
 
 namespace Window
@@ -754,23 +770,32 @@ public:
         */
        static const Property HazardLightStatus;
        PROPERTYTYPEBASIC(HazardLightStatus, bool)
-       //typedef BasicPropertyType<bool> HazardLightStatusType;
 
        static const Property AntilockBrakingSystem;
        PROPERTYTYPEBASIC(AntilockBrakingSystem, bool)
-       //typedef BasicPropertyType<bool> AntilockBrakingSystemType;
+
+       static const Property AntilockBrakingSystemEnabled;
+       PROPERTYTYPEBASIC(AntilockBrakingSystemEnabled, bool)
 
        static const Property TractionControlSystem;
        PROPERTYTYPEBASIC(TractionControlSystem, bool)
-       //typedef BasicPropertyType<bool> TractionControlSystemType;
+
+       static const Property TractionControlSystemEnabled;
+       PROPERTYTYPEBASIC(TractionControlSystemEnabled, bool)
 
        static const Property VehicleTopSpeedLimit;
        PROPERTYTYPEBASIC(VehicleTopSpeedLimit,uint16_t)
-       //typedef BasicPropertyType<uint16_t> VehicleTopSpeedLimitType;
 
+       ///TODO: Deprecated in 0.14
        static const Property AirbagStatus;
        PROPERTYTYPEBASIC(AirbagStatus, Airbag::Status)
 
+       static const Property AirbagActivated;
+       PROPERTYTYPEBASIC(AirbagActivated, bool)
+
+       static const Property AirbagDeployed;
+       PROPERTYTYPEBASIC(AirbagDeployed, bool)
+
        /// TODO: deprecate in 0.14.  Use DoorStatusW3C
        static const Property DoorStatus;
        PROPERTYTYPEBASIC(DoorStatus, Door::Status)
@@ -792,9 +817,13 @@ public:
        static const Property WindowLockStatus;
        PROPERTYTYPEBASIC(WindowLockStatus, bool)
 
+       ///TODO Deprecated in 0.14
        static const Property OccupantStatus;
        PROPERTYTYPEBASIC(OccupantStatus, Seat::Occupant)
 
+       static const Property OccupantStatusW3C;
+       PROPERTYTYPE(OccupantStatusW3C, OccupantStatusW3CType, StringPropertyType, std::string)
+
        static const Property ObstacleDistance;
        PROPERTYTYPEBASIC(ObstacleDistance, double)
 
@@ -978,6 +1007,18 @@ public:
        static const Property EngineSoundEnhancementMode;
        PROPERTYTYPE(EngineSoundEnhancementMode, EngineSoundEnhancementModeType, StringPropertyType, std::string)
 
+       static const Property ElectronicStabilityControlEnabled;
+       PROPERTYTYPEBASIC(ElectronicStabilityControlEnabled, bool)
+
+       static const Property ElectronicStabilityControlEngaged;
+       PROPERTYTYPEBASIC(ElectronicStabilityControlEngaged, bool)
+
+       static const Property OccupantIdentificationType;
+       PROPERTYTYPE(OccupantIdentificationType, OccupantIdentificationTypeType, StringPropertyType, std::string)
+
+       static const Property OccupantName;
+       PROPERTYTYPE(OccupantName, OccupantNameType, StringPropertyType, std::string)
+
        /** END PROPERTIES **/
 
        /*!
index 6832be8..8d6795a 100644 (file)
@@ -110,11 +110,62 @@ bluemonkey.createCustomProperty("SeatPositionSideCushion", 0);
 
 bluemonkey.createCustomProperty("VehicleDriveMode", "auto");
 
-bluemonkey.createCustomProperty("MirrorSettingPan", 0);
-bluemonkey.createCustomProperty("MirrorSettingTilt", 0);
+bluemonkey.createCustomProperty("MirrorSettingPan", 0, Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("MirrorSettingTilt", 0, Zone.Front | Zone.Left);
+
+bluemonkey.createCustomProperty("MirrorSettingPan", 0, Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("MirrorSettingTilt", 0, Zone.Front | Zone.Right);
 
 bluemonkey.createCustomProperty("DashboardIllumination", 5);
 
+bluemonkey.createCustomProperty("AntilockBreakingSystem", false);
+bluemonkey.createCustomProperty("AntilockBreakingSystemEnabled", true);
+
+bluemonkey.createCustomProperty("TractionControlSystem", true);
+bluemonkey.createCustomProperty("TractionControlSystemEnabled", true);
+
+bluemonkey.createCustomProperty("ElectronicStabilityControlEnabled", true);
+bluemonkey.createCustomProperty("ElectronicStabilityControlEngaged", true);
+
+bluemonkey.createCustomProperty("VehicleTopSpeedLimit", 150);
+
+bluemonkey.createCustomProperty("AirbagActivated", true, Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("AirbagDeployed", false, Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("AirbagActivated", true, Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("AirbagDeployed", false, Zone.Front | Zone.Right);
+
+bluemonkey.createCustomProperty("ChildSafetyLock", false, Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("ChildSafetyLock", true, Zone.Rear | Zone.Right);
+
+bluemonkey.createCustomProperty("AntilockBrakingSystem", false);
+bluemonkey.createCustomProperty("AntilockBrakingSystemEnabled", true);
+
+bluemonkey.createCustomProperty("DoorStatusW3C", "closed", Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("DoorStatusW3C", "closed", Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("DoorStatusW3C", "closed", Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("DoorStatusW3C", "closed", Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("DoorLockStatus", true, Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("DoorLockStatus", true, Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("DoorLockStatus", true, Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("DoorLockStatus", true, Zone.Rear | Zone.Left);
+
+bluemonkey.createCustomProperty("OccupantStatusW3C", "adult", Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("OccupantStatusW3C", "adult", Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("OccupantStatusW3C", "child", Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("OccupantStatusW3C", "child", Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("SeatBeltStatus", true, Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("SeatBeltStatus", true, Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("SeatBeltStatus", true, Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("SeatBeltStatus", true, Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("OccupantName", "Kevron", Zone.Front | Zone.Left);
+bluemonkey.createCustomProperty("OccupantName", "Irene", Zone.Front | Zone.Right);
+bluemonkey.createCustomProperty("OccupantName", "Miggie", Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("OccupantName", "Emma", Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("OccupantIdentificationType", "camera", Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("OccupantIdentificationType", "Bluetooth", Zone.Rear | Zone.Left);
+bluemonkey.createCustomProperty("OccupantIdentificationType", "pin", Zone.Rear | Zone.Right);
+bluemonkey.createCustomProperty("OccupantIdentificationType", "pin", Zone.Rear | Zone.Left);
+
 var speedProperty = bluemonkey.subscribeTo("VehicleSpeed");
 
 var testTimer = bluemonkey.createTimer();
index 79ce23e..fb088ba 100644 (file)
@@ -262,6 +262,10 @@ void DBusInterfaceManager::registerTypes()
        exportProperty<SeatAdjustment>(re, connection);
        exportProperty<DriveMode>(re, connection);
        exportProperty<VehicleSound>(re, connection);
+       exportProperty<ElectronicStabilityControl>(re, connection);
+       exportProperty<ChildSafetyLock>(re, connection);
+       exportProperty<SeatProperty>(re, connection);
+       exportProperty<DoorProperty>(re, connection);
 
        PropertyList list = VehicleProperty::customProperties();
        PropertyList implemented = AbstractDBusInterface::implementedProperties();
index fb7964d..4fec8c7 100644 (file)
@@ -11,7 +11,10 @@ public:
        AntilockBrakingSystemProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("AntilockBrakingSystem", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "AntilockBrakingSystem", "b", AbstractProperty::Read);
+               /// TODO: Deprecated.  Remove in 0.14
+               wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "AntilockBrakingSystem", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::AntilockBrakingSystem, "Engaged", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::AntilockBrakingSystemEnabled, "Enabled", AbstractProperty::Read);
        }
 };
 
@@ -21,7 +24,10 @@ public:
        TractionControlSystemProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("TractionControlSystem", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::TractionControlSystem, "TractionControlSystem", "b", AbstractProperty::Read);
+               /// TODO: Deprecated.  Remove in 0.14
+               wantPropertyVariant(VehicleProperty::TractionControlSystem, "TractionControlSystem", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::TractionControlSystemEnabled, "Enabled", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::TractionControlSystem, "Engaged", AbstractProperty::Read);
        }
 };
 
@@ -32,7 +38,9 @@ public:
        VehicleTopSpeedLimitProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("VehicleTopSpeedLimit", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::VehicleTopSpeedLimit, "VehicleTopSpeedLimit", "q", AbstractProperty::Read);
+               /// TODO: Deprecated.  Remove in 0.14
+               wantPropertyVariant(VehicleProperty::VehicleTopSpeedLimit, "VehicleTopSpeedLimit", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::VehicleTopSpeedLimit, "Speed", AbstractProperty::Read);
        }
 };
 
@@ -42,11 +50,14 @@ public:
        AirbagStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("AirbagStatus", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::AirbagStatus, "AirbagStatus", "y", AbstractProperty::Read);
+               /// TODO: Deprecated in 0.14
+               wantPropertyVariant(VehicleProperty::AirbagStatus, "AirbagStatus", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::AirbagActivated, "AirbagActivated", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::AirbagDeployed, "AirbagDeployed", AbstractProperty::Read);
        }
 };
 
-/// TODO: deprecated. remove in 0.13
+/// TODO: deprecated. remove in 0.14
 class DoorStatusProperty: public DBusSink
 {
 public:
@@ -54,11 +65,12 @@ public:
                :DBusSink("DoorStatus", re, connection, map<string, string>())
        {
 
-               wantPropertyVariant(VehicleProperty::DoorStatus, "DoorStatus", "b", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::DoorStatus, "DoorStatus", AbstractProperty::Read);
 
-               wantPropertyVariant(VehicleProperty::DoorLockStatus, "DoorLockStatus", "b", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::DoorLockStatus, "DoorLockStatus", AbstractProperty::Read);
 
-               wantPropertyVariant(VehicleProperty::ChildLockStatus, "ChildLockStatus", "b", AbstractProperty::Read);
+               ///TODO: Deprecated in 0.14
+               wantPropertyVariant(VehicleProperty::ChildLockStatus, "ChildLockStatus", AbstractProperty::Read);
        }
 };
 
@@ -71,29 +83,32 @@ public:
 
                wantPropertyVariant(VehicleProperty::DoorStatusW3C, "Status", AbstractProperty::Read);
 
-               wantPropertyVariant(VehicleProperty::DoorLockStatus, "Lock", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::DoorLockStatus, "Lock", AbstractProperty::ReadWrite);
 
+               ///TODO: Deprecated in 0.14
                wantPropertyVariant(VehicleProperty::ChildLockStatus, "ChildLock", AbstractProperty::Read);
        }
 };
 
+/// TODO: Deprecated in 0.14
 class SeatBeltStatusProperty: public DBusSink
 {
 public:
        SeatBeltStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("SeatBelt", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::SeatBeltStatus, "Status", "b", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::SeatBeltStatus, "Status", AbstractProperty::Read);
        }
 };
 
+/// TODO: Deprecated in 0.14
 class OccupantStatusProperty: public DBusSink
 {
 public:
        OccupantStatusProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("OccupantStatus", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::OccupantStatus, "OccupantStatus", "i", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::OccupantStatus, "OccupantStatus", AbstractProperty::Read);
        }
 };
 
@@ -103,7 +118,41 @@ public:
        ObstacleDistanceProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
                :DBusSink("ObstacleDistance", re, connection, map<string, string>())
        {
-               wantPropertyVariant(VehicleProperty::ObstacleDistance, "ObstacleDistance", "d", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::ObstacleDistance, "ObstacleDistance", AbstractProperty::Read);
+       }
+};
+
+class ElectronicStabilityControl: public DBusSink
+{
+public:
+       ElectronicStabilityControl(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
+               :DBusSink("ElectronicStabilityControl", re, connection, map<string, string>())
+       {
+               wantPropertyVariant(VehicleProperty::ElectronicStabilityControlEnabled, "Enabled", AbstractProperty::Read);
+               wantPropertyVariant(VehicleProperty::ElectronicStabilityControlEngaged, "Engaged", AbstractProperty::Read);
+       }
+};
+
+class ChildSafetyLock: public DBusSink
+{
+public:
+       ChildSafetyLock(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
+               :DBusSink("ChildSafetyLock", re, connection, map<string, string>())
+       {
+               wantPropertyVariant(VehicleProperty::ChildLockStatus, "Lock", AbstractProperty::ReadWrite);
+       }
+};
+
+class SeatProperty: public DBusSink
+{
+public:
+       SeatProperty(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
+               :DBusSink("Seat", re, connection, map<string, string>())
+       {
+               wantPropertyVariant(VehicleProperty::OccupantStatusW3C, "Occupant", AbstractProperty::ReadWrite);
+               wantPropertyVariant(VehicleProperty::SeatBeltStatus, "SeatBelt", AbstractProperty::ReadWrite);
+               wantPropertyVariant(VehicleProperty::OccupantName, "OccupantName", AbstractProperty::ReadWrite);
+               wantPropertyVariant(VehicleProperty::OccupantIdentificationType, "IdentificationType", AbstractProperty::ReadWrite);
        }
 };
 
index 6e32d58..67e6e7d 100644 (file)
@@ -334,15 +334,25 @@ _defineVehicleSignalProperty(exports, 'washerFluid');
 _defineVehicleSignalProperty(exports, 'malfunctionIndicator');
 _defineVehicleSignalProperty(exports, 'batteryStatus');
 _defineVehicleSignalProperty(exports, 'tire');
+_defineVehicleSignalProperty(exports, 'diagnostics');
 
 /// Personalization attributes:
 _defineVehicleSignalProperty(exports, 'mirror');
 _defineVehicleSignalProperty(exports, 'seatAdjustment');
 _defineVehicleSignalProperty(exports, 'driveMode');
 _defineVehicleSignalProperty(exports, 'dashboardIllumination');
-
-
+_defineVehicleSignalProperty(exports, 'vehicleSound');
+
+/// Driving Safety attributes:
+_defineVehicleSignalProperty(exports, 'antilockBreakingSystem');
+_defineVehicleSignalProperty(exports, 'tractionControlSystem');
+_defineVehicleSignalProperty(exports, 'electronicStabilityControl');
+_defineVehicleSignalProperty(exports, 'topSpeedLimit');
+_defineVehicleSignalProperty(exports, 'airbagStatus');
 _defineVehicleSignalProperty(exports, 'door');
+_defineVehicleSignalProperty(exports, 'childSafetyLock');
+_defineVehicleSignalProperty(exports, 'seat');
+
 _defineVehicleSignalProperty(exports, 'temperature');
 _defineVehicleSignalProperty(exports, 'climateControl');
 _defineVehicleSignalProperty(exports, 'defrost');