"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": [
"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],
/*!
- 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
"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
"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.
"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}]
},
"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}]
}
};
"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
"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"]
};
/*
};
/*
+ *TopSpeedLimit
+ */
+_t.TopSpeedLimit = {
+ speed: _t.unsigned_short
+};
+
+/*
* AirbagStatus
*/
_t.AirbagStatus = {
};
/*
+ * 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 = {
};
/*
+ * SideWindow
+ */
+_t.SideWindow = {
+ lock: _t.boolean,
+ openness: _t.unsigned_short
+};
+
+/*
* ClimateControl
*/
_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 = {
_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]
};
/*
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,
_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 () {
success = _data[property][handle];
value = new VehicleFactory(property, propertyObj.val);
- value['interfaceName'] = property;
+ value['interfaceName'] = property;
success(value);
}
for(var pro in _data.cache[property]) {
data[pro] = _data.cache[property][pro];
}
-
+
return data;
};
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;
case "TractionControlSystem":
instanceType = new TractionControlSystem(value);
break;
+ case "TopSpeedLimit":
+ instanceType = new TopSpeedLimit(value);
+ break;
case "AirbagStatus":
instanceType = new AirbagStatus(value);
break;
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;
});
};
+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 = {};
});
};
+TopSpeedLimit = function (propertyTypes) {
+ var topSpeedLimit = {};
+
+ topSpeedLimit.speed = propertyTypes.speed || null;
+
+ this.__defineGetter__("speed", function () {
+ return topSpeedLimit.speed;
+ });
+};
+
AirbagStatus = function (propertyTypes) {
var airbagStatus = {};
});
};
+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 = {};
});
};
+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 = {};
});
};
+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 = {};