Added Fluid interface to Vehicle module 41/34741/1 tizen
authorAlice Liu <alice.liu@intel.com>
Mon, 2 Feb 2015 08:21:20 +0000 (16:21 +0800)
committerAlice Liu <alice.liu@intel.com>
Mon, 2 Feb 2015 08:21:20 +0000 (16:21 +0800)
Package version up (2.0.52).

Change-Id: I02080d89778e66e8be8c6d2bad101466d9a41c8f
Signed-off-by: Alice Liu <alice.liu@intel.com>
package/changelog
package/pkginfo.manifest
web/cache.manifest
web/dbsamples/dbvehicle.json
web/ripple.js

index 4b9da5c..5a5a8be 100644 (file)
@@ -1,3 +1,6 @@
+* 2.0.52
+- Added Fluid interface to Vehicle module
+== Alice Liu <alice.liu@intel.com> 2015-02-02 16:20
 * 2.0.51
 - Fixed MediaServer bug
 == Alice Liu <alice.liu@intel.com> 2015-01-29 15:18
index 0bc833a..7bd6af7 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.51
+Version:2.0.52
 Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
 
 Package:websimulator-core
index e298186..fc35b9d 100644 (file)
@@ -108,4 +108,4 @@ themes/light/images/ui-icons_454545_256x240.png
 themes/light/images/ui-icons_888888_256x240.png
 themes/light/images/ui-icons_cd0a0a_256x240.png
 themes/light/theme.css
-# Manifest build date: Thu Jan 29 2015 15:16:01 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Mon Feb 02 2015 11:25:53 GMT+0800 (CST)
\ No newline at end of file
index ef30fe1..7cf188f 100644 (file)
@@ -6,9 +6,11 @@
         "ClimateControl", "Sunroof", "ConvertibleRoof",
         "Identification", "SizeConfiguration", "FuelConfiguration",
         "TransmissionConfiguration", "Odometer", "BatteryStatus", "ParkingBrake",
-        "AntilockBrakingSystem", "TractionControlSystem",
-        "AirbagStatus", "NightMode", "DrivingMode",
-        "ButtonEvent", "SteeringWheel", "ThrottlePosition", "EngineCoolant"],
+        "AntilockBrakingSystem", "TractionControlSystem", "Door",
+        "AirbagStatus", "NightMode", "DrivingMode", "ChildSafetyLock",
+        "ButtonEvent", "SteeringWheel", "ThrottlePosition", "EngineCoolant",
+        "Tire", "Seat", "WasherFluid", "BrakeMaintenance", "WiperStatus", "TopSpeedLimit",
+        "SideWindow", "Defrost"],
     "newestHistory": null,
     "currentConfiguration": 0,
     "configurationData": [
@@ -19,7 +21,8 @@
     "settingData": [
         0, 0, true, 0, false, false, false, false, false, false, false, false, false, false, false, false,
         0x04, 0, 0, false, false, false, false, false, false, 0, 0, "closed", "inactive", true, true,
-        false, false, false, 10, 80],
+        false, false, false, false, 10, 80, "closed", false, 5, 0, false, false, "pin", "adult", 0, false,
+        0, false, 0, false, "off", 400, false, 100, false, false],
     "autoRunningData": [
         [0,   0,   0,    0, 0,  0,  0,  100, 20, 59, 10, 15, 100, 5,  0,  0,  9, 0, 1500, 10, -90, 0,  10, 40],
         [10,  10,  100,  3, 10, 10, 10, 99,  20, 59, 10, 15, 99,  10, 20, 5,  4, 0, 1600, 10, -80, 2,  10, 41],
index ec54990..f712b78 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Thu Jan 29 2015 15:16:00 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Mon Feb 02 2015 11:25:52 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -77787,8 +77787,9 @@ _vehicleMapStack.vehicleProperties = [
      "Identification", "SizeConfiguration", "FuelConfiguration",
     "TransmissionConfiguration", "Odometer", "BatteryStatus", "ParkingBrake",
     "AntilockBrakingSystem", "TractionControlSystem", "AirbagStatus",
-    "NightMode", "DrivingMode", "ButtonEvent", "SteeringWheel",
-    "ThrottlePosition", "EngineCoolant"
+    "NightMode", "DrivingMode", "ChildSafetyLock", "ButtonEvent", "SteeringWheel",
+    "ThrottlePosition", "EngineCoolant", "Door", "Tire", "Seat", "WasherFluid",
+    "BrakeMaintenance", "WiperStatus", "TopSpeedLimit", "SideWindow", "Defrost"
 ];
 
 //Vehicle Configuration
@@ -77829,6 +77830,13 @@ _vehicleMapStack.vehiclePropertyRangeMap = {
     "ThrottlePosition-value": [0, 100, 1],
     "EngineCoolant-level": [0, 100, 1],
     "EngineCoolant-temperature": [0, 100, 1],
+    "Tire-pressure": [0, 500, 1],
+    "Tire-temperature": [0, 100, 1],
+    "WasherFluid-level": [0, 100, 1],
+    "BrakeMaintenance-fluidLevel": [0, 100, 1],
+    "BrakeMaintenance-padWear": [0, 100, 1],
+    "TopSpeedLimit-speed": [0, 400, 1],
+    "SideWindow-openness": [0, 100, 1]
 };
 
 //simulate car running attributes' controller-types.
@@ -78046,6 +78054,10 @@ _vehicleMapStack.vehicleSettingMap = {
         "type": "radio",
         "options": [{"INACTIVE": false}, {"ACTIVE": true}]
     },
+    "ChildSafetyLock-lock": {
+        "type": "radio",
+        "options": [{"lock": true}, {"unlock": false}]
+    },
     "NightMode-mode": {
         "type": "radio",
         "options": [{"Night": true}, {"Day": false}]
@@ -78059,6 +78071,86 @@ _vehicleMapStack.vehicleSettingMap = {
     },
     "BatteryStatus-current": {
         "type": "range"
+    },
+    "Door-status": {
+        "type": "select",
+        "options": [{"OPEN": "open"}, {"AJAR": "ajar"},
+            {"CLOSED": "closed"}]
+    },
+    "Door-lock": {
+        "type": "radio",
+        "options": [{"lock": true}, {"unlock": false}]
+    },
+    "Tire-pressure": {
+        "type": "range"
+    },
+    "Tire-temperature": {
+        "type": "range"
+    },
+    "Tire-pressureLow": {
+        "type": "radio",
+        "options": [{"LOW": true}, {"NOT LOW": false}]
+    },
+    "Seat-seatbelt": {
+        "type": "radio",
+        "options": [{"Fastened": true}, {"Unfastened": false}]
+    },
+    "Seat-identificationType": {
+        "type": "select",
+        "options": [{"Pin": "pin"}, {"Keyfob": "keyfob"},
+            {"Bluetooth": "Bluetooth"}, {"NFC": "NFC"},
+            {"Fingerprint": "fingerprint"}, {"Camera": "camera"},
+            {"Voice": "voice"}]
+    },
+    "Seat-occupant": {
+        "type": "select",
+        "options": [{"Adult": "adult"}, {"Child": "child"},
+            {"Vancant": "vancant"}]
+    },
+    "WasherFluid-level": {
+        "type": "range"
+    },
+    "WasherFluid-levelLow": {
+        "type": "radio",
+        "options": [{"Low": true}, {"Not Low": false}]
+    },
+    "BrakeMaintenance-fluidLevel": {
+        "type": "range"
+    },
+    "BrakeMaintenance-fluidLevelLow": {
+        "type": "radio",
+        "options": [{"Low": true}, {"Not Low": false}]
+    },
+    "BrakeMaintenance-padWear": {
+        "type": "range"
+    },
+    "BrakeMaintenance-brakesWorn": {
+        "type": "radio",
+        "options": [{"Worn": true}, {"Not Worn": false}]
+    },
+    "WiperStatus-wiperSetting": {
+        "type": "select",
+        "options": [{"OFF": "off"}, {"Once": "once"}, {"Slowest": "slowest"},
+            {"Slow": "slow"}, {"Middle": "middle"}, {"Fast": "fast"},
+            {"Fastest": "fastest"}, {"Auto": "auto"}]
+    },
+    "TopSpeedLimit-speed": {
+        "type": "range"
+    },
+    "SideWindow-lock": {
+        "type": "radio",
+        "options": [{"Locked": true}, {"Unlocked": false}]
+    },
+    "SideWindow-openness": {
+        "type": "range"
+    },
+    "Defrost-defrostWindow": {
+        "type": "radio",
+        "options": [{"On": true}, {"Off": false}]
+    },
+    "Defrost-defrostMirrors": {
+        "type": "radio",
+        "options": [{"On": true}, {"Off": false}]
     }
 };
 
@@ -78089,7 +78181,14 @@ _vehicleMapStack.vehiclePropertyUnitsMap = {
     "SteeringWheel-angle": "deg",
     "ThrottlePosition-value": "%",
     "EngineCoolant-level": "%",
-    "EngineCoolant-temperature": "C"
+    "EngineCoolant-temperature": "C",
+    "Tire-pressure": "kpa",
+    "Tire-temperature": "C",
+    "WasherFluid-level": "%",
+    "BrakeMaintenance-fluidLevel": "%",
+    "BrakeMaintenance-padWear": "%",
+    "TopSpeedLimit-speed": "kph",
+    "SideWindow-openness": "%"
 };
 
 //key and value of select types in attributes
@@ -82973,7 +83072,12 @@ _t = {
                                         "running"],
     ConvertibleRoofStatus:              ["closed", "closing", "opening",
                                         "opened"],
-    ParkingBrakeStatus:                 ["inactive", "active", "error"]
+    ParkingBrakeStatus:                 ["inactive", "active", "error"],
+    IdentificationType:                 ["pin", "keyfob", "Bluetooth", "NFC",
+                                         "fingerprint", "camera", "voice"],
+    OccupantStatus:                     ["adult", "child", "vacant"],
+    WiperControl:                       ["off", "once", "slowest", "slow",
+                                         "middle", "fast", "fastest", "auto"]
 };
 
 /*
@@ -83241,6 +83345,13 @@ _t.TractionControlSystem = {
 };
 
 /*
+ *TopSpeedLimit
+ */
+_t.TopSpeedLimit = {
+    speed: _t.unsigned_short
+};
+
+/*
  * AirbagStatus
  */
 _t.AirbagStatus = {
@@ -83319,6 +83430,34 @@ _t.Door = {
 };
 
 /*
+ * ChildSafetyLock
+ */
+_t.ChildSafetyLock = {
+    lock: _t.boolean,
+    zone: _t.unsigned_short
+};
+
+/*
+ * Seat
+ */
+_t.Seat = {
+    occupant:           _t.OccupantStatus,
+    seatbelt:           _t.boolean,
+    occupantName:       _t.DOMString,
+    identificationType: _t.IdentificationType,
+    zone:               _t.unsigned_short
+};
+
+/*
+ * WiperStatus
+ */
+_t.WiperStatus = {
+    wiperSpeed:    _t.unsigned_short,
+    wiperSettring: _t.WiperControl,
+    zone:          _t.unsigned_short
+};
+
+/*
  * Defrost
  */
 _t.Defrost = {
@@ -83328,6 +83467,14 @@ _t.Defrost = {
 };
 
 /*
+ * SideWindow
+ */
+_t.SideWindow = {
+    lock:     _t.boolean,
+    openness: _t.unsigned_short
+};
+
+/*
  * ClimateControl
  */
 _t.ClimateControl = {
@@ -83344,6 +83491,25 @@ _t.ClimateControl = {
 };
 
 /*
+ * BrakeMaintenance
+ */
+_t.BrakeMaintenance = {
+    fluidLevel:    _t.unsigned_short,
+    fluidLevelLow: _t.boolean,
+    padWear:       _t.unsigned_short,
+    brakesWorn:    _t.boolean,
+    zone:          _t.unsigned_short
+};
+
+/*
+ * WasherFluid
+ */
+_t.WasherFluid = {
+    level:    _t.unsigned_short,
+    levelLow: _t.boolean
+};
+
+/*
  * BatteryStatus
  */
 _t.BatteryStatus = {
@@ -83368,7 +83534,9 @@ _t.VehicleCommonDataType = {
         _t.ParkingBrake, _t.AntilockBrakingSystem, _t.TractionControlSystem,
         _t.AirbagStatus, _t.NightMode, _t.ButtonEvent, _t.SteeringWheel,
         _t.ThrottlePosition, _t.EngineCoolant, _t.BrakeOperation, _t.Tire,
-        _t.Door, _t.Defrost, _t.ClimateControl, _t.BatteryStatus]
+        _t.Door, _t.ChildSafetyLock, _t.Defrost, _t.ClimateControl, _t.BatteryStatus,
+        _t.Seat, _t.WasherFluid, _t.BrakeMaintenance, _t.WiperStatus, _t.TopSpeedLimit,
+        _t.SideWindow]
 };
 
 /*
@@ -83600,17 +83768,24 @@ var utils = require('ripple/utils'),
     NightMode,
     //Maintenance Interfaces
     Odometer,
+    BrakeMaintenance,
+    WasherFluid,
     BatteryStatus,
     Tire,
     //DrivingSafety Interfaces
     AntilockBrakingSystem,
     TractionControlSystem,
+    TopSpeedLimit,
     AirbagStatus,
     Door,
+    ChildSafetyLock,
+    Seat,
     //Climate Interfaces
     Temperature,
     RainSensor,
+    WiperStatus,
     Defrost,
+    SideWindow,
     ClimateControl,
     Sunroof,
     ConvertibleRoof,
@@ -83628,6 +83803,16 @@ var utils = require('ripple/utils'),
     _security = {
         "http://tizen.org/privilege/vehicle": []
     },
+    _wiperSpeed = {
+        "off": 0,
+        "once": 0,
+        "slowest": 15,
+        "slow": 12,
+        "middle": 9,
+        "fast": 6,
+        "fastest": 3,
+        "auto": 9
+    },
     _self;
 
 function _initialize () {
@@ -83673,7 +83858,7 @@ event.on("vehicle-subscribe-response", function(propertyObj) {
             success = _data[property][handle];
             value = new VehicleFactory(property, propertyObj.val);
 
-            value['interfaceName'] = property; 
+            value['interfaceName'] = property;
 
             success(value);
         }
@@ -83765,7 +83950,7 @@ function VehicleInterface (property) {
         for(var pro in _data.cache[property]) {
              data[pro] = _data.cache[property][pro];
         }
-       
+
         return data;
     };
 
@@ -84053,6 +84238,12 @@ VehicleFactory = function (vehicleType, value) {
     case "Odometer":
         instanceType = new Odometer(value);
         break;
+    case "BrakeMaintenance":
+        instanceType = new BrakeMaintenance(value);
+        break;
+    case "WasherFluid":
+        instanceType = new WasherFluid(value);
+        break;
     case "BatteryStatus":
         instanceType = new BatteryStatus(value);
         break;
@@ -84066,6 +84257,9 @@ VehicleFactory = function (vehicleType, value) {
     case "TractionControlSystem":
         instanceType = new TractionControlSystem(value);
         break;
+    case "TopSpeedLimit":
+        instanceType = new TopSpeedLimit(value);
+        break;
     case "AirbagStatus":
         instanceType = new AirbagStatus(value);
         break;
@@ -84073,15 +84267,27 @@ VehicleFactory = function (vehicleType, value) {
         instanceType = new Door(value);
         break;
     //
+    case "ChildSafetyLock":
+        instanceType = new ChildSafetyLock(value);
+        break;
+    case "Seat":
+        instanceType = new Seat(value);
+        break;
     case "Temperature":
         instanceType = new Temperature(value);
         break;
     case "RainSensor":
         instanceType = new RainSensor(value);
         break;
+    case "WiperStatus":
+        instanceType = new WiperStatus(value);
+        break;
     case "Defrost":
         instanceType = new Defrost(value);
         break;
+    case "SideWindow":
+        instanceType = new SideWindow(value);
+        break;
     case "ClimateControl":
         instanceType = new ClimateControl(value);
         break;
@@ -85005,6 +85211,62 @@ Odometer = function (propertyTypes) {
     });
 };
 
+BrakeMaintenance = function (propertyTypes) {
+    var brakeMaintenance = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    brakeMaintenance.fluidLevel = propertyTypes.fluidLevel || null;
+    brakeMaintenance.fluidLevelLow = propertyTypes.fluidLevelLow || false;
+    brakeMaintenance.padWear = propertyTypes.padWear || null;
+    brakeMaintenance.brakesWorn = propertyTypes.brakesWorn || false;
+    brakeMaintenance.zone = propertyTypes.zone || 0;
+
+    this.__defineGetter__("fluidLevel", function () {
+        return brakeMaintenance.fluidLevel;
+    });
+
+    this.__defineGetter__("fluidLevelLow", function () {
+        return brakeMaintenance.fluidLevelLow;
+    });
+
+    this.__defineGetter__("padWear", function () {
+        return brakeMaintenance.padWear;
+    });
+
+    this.__defineGetter__("brakesWorn", function () {
+        return brakeMaintenance.brakesWorn;
+    });
+
+    this.__defineGetter__("zone", function () {
+        return brakeMaintenance.zone;
+    });
+
+    this.__defineSetter__("zone", function (val) {
+        try {
+            brakeMaintenance.zone = t.unsigned_short(val, "?");
+        } catch (err) {
+        }
+    });
+};
+
+WasherFluid = function (propertyTypes) {
+    var washerFluid = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    washerFluid.level = propertyTypes.level || null;
+    washerFluid.levelLow = propertyTypes.levelLow || false;
+
+    this.__defineGetter__("level", function () {
+        return washerFluid.level;
+    });
+
+    this.__defineGetter__("levelLow", function () {
+        return washerFluid.levelLow;
+    });
+};
+
 BatteryStatus = function (propertyTypes) {
     var batteryStatus = {};
 
@@ -85119,6 +85381,16 @@ TractionControlSystem = function (propertyTypes) {
     });
 };
 
+TopSpeedLimit = function (propertyTypes) {
+    var topSpeedLimit = {};
+
+    topSpeedLimit.speed = propertyTypes.speed || null;
+
+    this.__defineGetter__("speed", function () {
+        return topSpeedLimit.speed;
+    });
+};
+
 AirbagStatus = function (propertyTypes) {
     var airbagStatus = {};
 
@@ -85184,6 +85456,84 @@ Door = function (propertyTypes) {
     });
 };
 
+ChildSafetyLock = function (propertyTypes) {
+    var childSafetyLock = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    childSafetyLock.lock = propertyTypes.lock || false;
+    childSafetyLock.zone = propertyTypes.zone || 0;
+
+    this.__defineGetter__("lock", function () {
+        return childSafetyLock.lock;
+    });
+
+    this.__defineSetter__("lock", function (val) {
+        try {
+            childSafetyLock.lock = t.boolean(val);
+        } catch (err) {
+        }
+    });
+
+    this.__defineGetter__("zone", function () {
+        return childSafetyLock.zone;
+    });
+
+    this.__defineSetter__("zone", function (val) {
+        try {
+            childSafetyLock.zone = t.unsigned_short(val, "?");
+        } catch (err) {
+        }
+    });
+};
+
+Seat = function (propertyTypes) {
+    var seat = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    if (propertyTypes == null) {
+        seat.occupant = null;
+        seat.seatbelt = false;
+        seat.occupantName = null;
+        seat.identificationType = null;
+        seat.zone = 0;
+    } else {
+        seat.occupant = propertyTypes.occupant;
+        seat.seatbelt = propertyTypes.seatbelt;
+        seat.occupantName = propertyTypes.occupantName;
+        seat.identificationType = propertyTypes.identificationType;
+        seat.zone = propertyTypes.zone;
+    }
+
+    this.__defineGetter__("occupant", function () {
+        return seat.occupant;
+    });
+
+    this.__defineGetter__("seatbelt", function () {
+        return seat.seatbelt;
+    });
+
+    this.__defineGetter__("occupantName", function () {
+        return seat.occupantName;
+    });
+
+    this.__defineGetter__("identificationType", function () {
+        return seat.identificationType;
+    });
+
+    this.__defineGetter__("zone", function () {
+        return seat.zone;
+    });
+
+    this.__defineSetter__("zone", function (val) {
+        try {
+            seat.zone = t.unsigned_short(val, "?");
+        } catch (err) {
+        }
+    });
+};
+
 Temperature = function (propertyTypes) {
     var temperature = {};
 
@@ -85201,6 +85551,43 @@ Temperature = function (propertyTypes) {
     });
 };
 
+WiperStatus = function (propertyTypes) {
+    var wiperStatus = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    wiperStatus.wiperSetting = propertyTypes.wiperSetting || "off";
+    wiperStatus.wiperSpeed = propertyTypes.wiperSpeed ||
+            _wiperSpeed[wiperStatus.wiperSetting];
+    wiperStatus.zone = propertyTypes.zone || 0;
+
+    this.__defineGetter__("wiperSetting", function () {
+        return wiperStatus.wiperSetting;
+    });
+
+    this.__defineSetter__("wiperSetting", function (val) {
+        try {
+            wiperStatus.wiperSetting = t.WiperControl(val);
+        } catch (err) {
+        }
+    });
+
+    this.__defineGetter__("wiperSpeed", function () {
+        return wiperStatus.wiperSpeed;
+    });
+
+    this.__defineGetter__("zone", function () {
+        return wiperStatus.zone;
+    });
+
+    this.__defineSetter__("zone", function (val) {
+        try {
+            wiperStatus.zone = t.unsigned_short(val, "?");
+        } catch (err) {
+        }
+    });
+};
+
 Defrost = function (propertyTypes) {
     var defrost = {};
 
@@ -85244,6 +85631,35 @@ Defrost = function (propertyTypes) {
     });
 };
 
+SideWindow = function (propertyTypes) {
+    var sideWindow = {};
+
+    VehicleCommonDataType.call(this, propertyTypes);
+
+    sideWindow.lock = propertyTypes.lock || false;
+    sideWindow.openness = propertyTypes.openness || null;
+    sideWindow.zone = propertyTypes.zone || 0;
+
+    this.__defineGetter__("lock", function () {
+        return sideWindow.lock;
+    });
+
+    this.__defineGetter__("openness", function () {
+        return sideWindow.openness;
+    });
+
+    this.__defineGetter__("zone", function () {
+        return sideWindow.zone;
+    });
+
+    this.__defineSetter__("zone", function (val) {
+        try {
+            sideWindow.zone = t.unsigned_short(val, "?");
+        } catch (err) {
+        }
+    });
+};
+
 ClimateControl = function (propertyTypes) {
     var climateControl = {};