6 \def-api-feature http://tizen.org/api/vehicle
7 \brief Allows access to the vehicle API
12 partial interface Navigator {
13 attribute Vehicle vehicle;
17 interface VehiclePropertyType: Event {
18 /** /brief time at which the vehicle generated the property
20 attribute DOMTimeStamp time;
22 attribute DOMString source;
26 interface VehiclePropertyError {
27 const unsigned short PERMISSION_DENIED = 1;
28 const unsigned short PROPERTY_UNAVAILABLE = 2;
29 const unsigned short TIMEOUT = 3;
30 const unsigned short UNKNOWN = 10;
33 * MUST return error code.
35 attribute unsigned short code;
38 * MUST return error message
40 attribute DOMString message;
43 callback VehiclePropertyCallback = void (VehiclePropertyType value);
45 callback VehiclePropertyErrorCallback = void (VehiclePropertyError error);
47 callback VehiclePropertyListCallback = void (sequence<VehiclePropertyType> values);
49 callback SupportedPropertiesCallback = void (sequence<DOMString> properties);
55 const unsigned short ZONE_None = 0;
56 const unsigned short ZONE_Front = 1;
57 const unsigned short ZONE_Middle = 0x10;
58 const unsigned short ZONE_Right = 0x100;
59 const unsigned short ZONE_Left = 0x1000;
60 const unsigned short ZONE_Rear = 0x10000;
61 const unsigned short ZONE_Center = 0x10000;
64 * \brief returns supported object types
66 sequence<DOMString> supported();
69 * \brief fetch the current value for 'objectType'.
70 * \param objectType is the requested property to be retrieved.
71 * \param zone specify the zone in which this object type is in
72 * \return object representing the requested 'objectType'
74 any get(DOMString objectType, optional short zone);
76 /** \brief subscribe to the given property and get callbacks when it changes
77 * \param objectType property to set
78 * \param successCallback callback will be called when the "objectType" changes
79 * \param errorCallback callback if error has been called.
82 subscribe(DOMString objectType, VehiclePropertyCallback successCallback, optional unsigned short zone, optional VehiclePropertyErrorCallback errorCallback);
85 * \brief set the given objectType to value
86 * \param objectType object type to set
87 * \param value value to set, should contain zone information ie "zone" : 0
88 * \param errorCallback callback if error has been called.
90 set(DOMString objectType, VehiclePropertyType value, optional VehiclePropertyErrorCallback errorCallback);
93 * \brief get values for a given objectType within a certain past time period between 'startTime' and 'endTime'
94 * \param objectType object type to request
95 * \param zone in which the objectType is located or 0 if no zone.
96 * \param startTime, starting period of time.
97 * \param endTime, ending period of time.
98 * \param successCallback Callback with the result of the method call
99 * \param errorCallback Callback if an error has occurred.
101 getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, VehiclePropertyListCallback successCallback, optional VehiclePropertyErrorCallback errorCallback);
105 interface VehicleSpeed : VehiclePropertyType {
108 * \brief Must return Vehicle Speed in kilometers per hour.
110 attribute unsigned long vehicleSpeed;
114 interface EngineSpeed : VehiclePropertyType {
117 * \brief Must return Engine Speed in rotations per minute.
119 attribute unsigned long engineSpeed;
123 interface VehiclePowerMode : VehiclePropertyType {
124 const unsigned short VEHICLEPOWERMODE_OFF = 0;
125 const unsigned short VEHICLEPOWERMODE_ACCESSORY1 = 1;
126 const unsigned short VEHICLEPOWERMODE_ACCESSORY2 = 2;
127 const unsigned short VEHICLEPOWERMODE_RUN = 3;
130 * \brief Must return Vehicle Power mode (see VEHICLEPOWERMODE)
132 attribute octet vehiclePowerMode;
136 interface TripMeter : VehiclePropertyType {
139 * \brief Must return trip meters. Changing any items in the array will reset the item's value to '0'.
141 attribute sequence<unsigned long> tripMeters;
145 interface Acceleration : VehiclePropertyType {
148 * \brief Must return acceleration on the "X" axis as 1/1000 G (gravitational force).
150 attribute unsigned long x;
153 * \brief Must return acceleration on the "Y" axis as 1/1000 G (gravitational force).
155 attribute unsigned long y;
158 * \brief Must return acceleration on the "Z" axis as 1/1000 G (gravitational force).
160 attribute unsigned long z;
164 interface Transmission : VehiclePropertyType {
165 const unsigned short TRANSMISSIONPOSITION_NEUTRAL = 0;
166 const unsigned short TRANSMISSIONPOSITION_FIRST = 1;
167 const unsigned short TRANSMISSIONPOSITION_SECOND = 2;
168 const unsigned short TRANSMISSIONPOSITION_THIRD = 3;
169 const unsigned short TRANSMISSIONPOSITION_FORTH = 4;
170 const unsigned short TRANSMISSIONPOSITION_FIFTH = 5;
171 const unsigned short TRANSMISSIONPOSITION_SIXTH = 6;
172 const unsigned short TRANSMISSIONPOSITION_SEVENTH = 7;
173 const unsigned short TRANSMISSIONPOSITION_EIGHTH = 8;
174 const unsigned short TRANSMISSIONPOSITION_NINTH = 9;
175 const unsigned short TRANSMISSIONPOSITION_TENTH = 10;
176 const unsigned short TRANSMISSIONPOSITION_CVT = 64;
177 const unsigned short TRANSMISSIONPOSITION_REVERSE = 128;
178 const unsigned short TRANSMISSIONPOSITION_PARK = 255;
179 const unsigned short TRANSMISSIONMODE_NORMAL = 0;
180 const unsigned short TRANSMISSIONMODE_SPORT = 1;
181 const unsigned short TRANSMISSIONMODE_ECONOMY = 2;
182 const unsigned short TRANSMISSIONMODE_OEMCUSTOM1 = 3;
183 const unsigned short TRANSMISSIONMODE_OEMCUSTOM2 = 4;
186 * \brief Must return transmission gear position (see TRANSMISSIONPOSITION)
188 attribute octet gearPosition;
191 * \brief Must return transmission Mode (see
193 attribute octet mode;
197 interface CruiseControlStatus : VehiclePropertyType {
200 * \brief Must return whether or not the Cruise Control system is active (true) or inactive (false)
202 attribute boolean activated;
205 * \brief Must return target Cruise Control speed in kilometers per hour (kph).
207 attribute unsigned short speed;
211 interface WheelBrake : VehiclePropertyType {
214 * \brief Must return Wheel Brake status: Engaged = true, disengaged = false
216 attribute boolean engaged;
220 interface LightStatus : VehiclePropertyType {
223 * \brief Must return headlight status: on = true, off = false.
225 attribute boolean head;
228 * \brief Must return right turn signal status: on = true, off = false.
230 attribute boolean rightTurn;
233 * \brief Must return left turn signal status: on = true, off = false.
235 attribute boolean leftTurn;
238 * \brief Must return brake signal light status: on = true, off = false.
240 attribute boolean brake;
243 * \brief Must return fog light status: on = true, off = false.
245 attribute boolean fog;
248 * \brief Must return hazard light status: on = true, off = false.
250 attribute boolean hazard;
253 * \brief Must return parking light status: on = true, off = false.
255 attribute boolean parking;
258 * \brief Must return high beam status: on = true, off = false.
260 attribute boolean highBeam;
264 interface InteriorLightStatus : VehiclePropertyType {
267 * \brief Must return passenger interior light status: on = true, off = false
269 attribute boolean passenger;
272 * \brief Must return driver interior light status: on = true, off = false
274 attribute boolean driver;
277 * \brief Must return center interior light status: on = true, off = false
279 attribute boolean center;
283 interface Horn : VehiclePropertyType {
286 * \brief Must return horn status: on = true, off = false
288 attribute boolean on;
292 interface Fuel : VehiclePropertyType {
295 * \brief Must return fuel level as a percentage of fullness.
297 attribute unsigned short level;
300 * \brief Must return estimated fuel range in kilometers.
302 attribute unsigned short range;
304 /** InstantConsumption
305 * \brief Must return instant fuel consumption in milliliters of fuel per second.
307 attribute unsigned short instantConsumption;
310 * \brief Must return instant fuel 'economy' in kilometers per liter of fuel.
312 attribute unsigned short instantEconomy;
315 * \brief Must return average fuel 'economy' in kilometers per liter of fuel since last reset. Setting this to any value should reset the counter to '0'
317 attribute unsigned short averageEconomy;
321 interface EngineOil : VehiclePropertyType {
324 * \brief Must return remaining engine oil as percentage of fullness.
326 attribute unsigned short remaining;
329 * \brief Must return Engine Oil Temperature in Celcius.
331 attribute long temperature;
334 * \brief Must return Engine Oil Pressure in kPa.
336 attribute unsigned short pressure;
340 interface Location : VehiclePropertyType {
343 * \brief Must return latitude in Deg.Min (-180, +180)
345 attribute double latitude;
348 * \brief Must return longitude in Deg.Min (-90, +90)
350 attribute double longitude;
353 * \brief Must return altitude in meters above sea-level (0).
355 attribute double altitude;
358 * \brief Must return direction in Degrees (0-360)
360 attribute unsigned short direction;
364 interface ExteriorBrightness : VehiclePropertyType {
366 /** ExteriorBrightness
367 * \brief Must return the brightness outside the vehicle in lux.
369 attribute unsigned long exteriorBrightness;
373 interface Temperature : VehiclePropertyType {
376 * \brief Must return the temperature of the interior of the vehicle in celcius.
378 attribute short interior;
381 * \brief Must return the temperature of the exterior of the vehicle in celcius.
383 attribute short exterior;
387 interface RainSensor : VehiclePropertyType {
390 * \brief Must return level of rain intensity 0: No Rain - 10: Heaviest Rain.
392 attribute unsigned short rainSensor;
396 interface WindshieldWiper : VehiclePropertyType {
397 const unsigned short WIPERSPEED_OFF = 0;
398 const unsigned short WIPERSPEED_SLOWEST= 1;
399 const unsigned short WIPERSPEED_FASTEST = 5;
400 const unsigned short WIPERSPEED_AUTO = 10;
403 * \brief Must return Level of windshield whiper speed (see WIPERSPEED)
405 attribute unsigned short windshieldWiper;
408 dictionary DefrostDictionary {
409 unsigned short window;
414 interface HVAC : VehiclePropertyType {
415 const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;
416 const unsigned short AIRFLOWDIRECTION_FLOORDUCT= 1;
417 const unsigned short AIRFLOWDIRECTION_FRONT = 0x02;
418 const unsigned short AIRFLOWDIRECTION_DEFROSTER = 0x04;
421 * \brief Must return airflow direction. See
423 attribute unsigned short airflowDirection;
426 * \brief Must return speed of the fan (0-7)
428 attribute unsigned short fanSpeed;
430 /** TargetTemperature
431 * \brief Must return target desired temperature in celcius.
433 attribute unsigned short targetTemperature;
436 * \brief Must return air conditioning on (true) / off (false).
438 attribute boolean airConditioning;
441 * \brief Must return air recirculation on (true) / off (false).
443 attribute boolean airRecirculation;
446 * \brief Must return heater on (true) / off (false).
448 attribute boolean heater;
451 * \brief Must return the defrost status of all windows equiped with defrosters. This will return a dictionary of DefrostDictionary that represents
452 * \brief each window and its defrost status.
454 attribute DefrostDictionary defrost;
456 /** SteeringWheelHeater
457 * \brief Must return air recirculation on (true) / off (false).
459 attribute boolean steeringWheelHeater;
462 * \brief Must return seat heater status: on (true) / off (false).
464 attribute boolean seatHeater;
467 * \brief Must return seat heater status: on (true) / off (false).
469 attribute boolean seatCooler;
473 interface WindowStatus : VehiclePropertyType {
474 const unsigned short WINDOWLOCATION_DRIVER= 0;
475 const unsigned short WINDOWLOCATION_PASSENGER = 1;
476 const unsigned short WINDOWLOCATION_LEFTREAR = 2;
477 const unsigned short WINDOWLOCATION_RIGHTREAR = 3;
478 const unsigned short WINDOWLOCATION_REAR = 4;
481 * \brief Must return window status for each window location. object returned is a
482 * dictionary { unsigned short windowlocation, unsigned short percentage opened }
484 attribute object WindowStatus;
488 interface Sunroof : VehiclePropertyType {
491 * \brief Must return window status for sunroof openness percentage.
493 attribute unsigned short openness;
496 * \brief Must return tilt status for sunroof percentage.
498 attribute unsigned short tilt;
502 interface ConvertibleRoof : VehiclePropertyType {
505 * \brief Must return window status for sunroof openness percentage.
507 attribute unsigned short openness;
511 interface VehicleId : VehiclePropertyType {
514 * \brief MUST return World Manufacturer Identifier (WMI)
515 * WMI is defined by SAE ISO 3780:2009. 3 characters.
517 attribute DOMString WMI;
520 * \brief MUST return Vehicle Identification Number (VIN) as defined by ISO 3779. 17 characters.
522 attribute DOMString VIN;
526 interface Size : VehiclePropertyType {
529 * \brief MUST return width of vehicle in mm
531 attribute unsigned long width;
534 * \brief MUST return height of vehicle in mm
536 attribute unsigned long height;
539 * \brief MUST return length of vehicle in mm
541 attribute unsigned long length;
545 interface FuelInfo : VehiclePropertyType {
546 const unsigned short FUELTYPE_GASOLINE = 0;
547 const unsigned short FUELTYPE_HIGH_OCTANE= 1;
548 const unsigned short FUELTYPE_DIESEL = 2;
549 const unsigned short FUELTYPE_ELECTRIC = 3;
550 const unsigned short FUELTYPE_HYDROGEN = 4;
551 const unsigned short REFUELPOSITION_LEFT = 0;
552 const unsigned short REFUELPOSITION_RIGHT= 1;
553 const unsigned short REFUELPOSITION_FRONT = 2;
554 const unsigned short REFUELPOSITION_REAR = 3;
557 * \brief MUST return type of fuel. integer 0-4 (see
559 attribute unsigned short type;
562 * \brief MUST return position of refuling (see
564 attribute unsigned short refuelPosition;
568 interface VehicleType : VehiclePropertyType {
569 const unsigned short VEHICLETYPE_SEDAN = 0;
570 const unsigned short VEHICLETYPE_COUPE= 1;
571 const unsigned short VEHICLETYPE_CABRIOLE = 2;
572 const unsigned short VEHICLETYPE_ROADSTER = 3;
573 const unsigned short VEHICLETYPE_SUV = 4;
574 const unsigned short VEHICLETYPE_TRUCK = 5;
577 * \brief MUST return type of Vehicle. Integer 0-5 (see
579 attribute unsigned short type;
583 interface Doors : VehiclePropertyType {
586 * \brief MUST return Number of doors in each row. The index represents the row. Position '0'
587 * represents the first row, '1' the second row etc.
588 * Example a common mini-van may have Doors[0] = 2 doors,
589 * Doors[1] = 1 (side door), Doors[2] = 1 (trunk).
591 attribute sequence<unsigned short> doorsPerRow;
595 interface TransmissionGearType : VehiclePropertyType {
596 const unsigned short TRANSMISSIONGEARTYPE_AUTO=0;
597 const unsigned short TRANSMISSIONGEARTYPE_MANUAL=1;
598 const unsigned short TRANSMISSIONGEARTYPE_CV=2;
600 /** TransmissionGearType
601 * \brief MUST return transmission gear type of either Automatic, Manual or Constant Variable (CV). See
603 attribute unsigned short transmissionGearType;
607 interface WheelInformation : VehiclePropertyType {
610 * \brief MUST return Radius of Front Wheel(s) in mm.
612 attribute unsigned short frontWheelRadius;
615 * \brief MUST return Radius of Rear Wheel(s) in mm.
617 attribute unsigned short rearWheelRadius;
620 * \brief MUST return Wheel Track in mm.
622 attribute unsigned long wheelTrack;
625 * \brief MUST return Antilock Brake System status: on = true, off = false.
627 attribute boolean ABS;
631 interface Odometer : VehiclePropertyType {
634 * \brief MUST return Distance traveled in km
636 attribute unsigned long odometer;
640 interface Fluid : VehiclePropertyType {
643 * \brief MUST return Transmission fluid level percentage. 0-100.
645 attribute unsigned short transmission;
648 * \brief MUST return Brake fluid level percentage. 0-100.
650 attribute unsigned short brake;
653 * \brief MUST return Washer fluid level percentage. 0-100.
655 attribute unsigned short washer;
659 interface Battery : VehiclePropertyType {
662 * \brief MUST return battery voltage.
664 attribute double voltage;
667 * \brief MUST return battery current in Amperes
669 attribute double current;
673 interface TirePressure : VehiclePropertyType {
676 * \brief MUST return left front tire pressure in kPa.
678 attribute double leftFront;
681 * \brief MUST return right front tire pressure in kPa.
683 attribute double rightFront;
686 * \brief MUST return left rear tire pressure in kPa.
688 attribute double leftRear;
691 * \brief MUST return right rear tire pressure in kPa.
693 attribute double rightRear;
697 interface TireTemperature : VehiclePropertyType {
700 * \brief MUST return left front tire temperature in Celcius.
702 attribute double leftFront;
705 * \brief MUST return right front tire temperature in Celcius.
707 attribute double rightFront;
710 * \brief MUST return left rear tire temperature in Celcius.
712 attribute double leftRear;
715 * \brief MUST return right rear tire temperature in Celcius.
717 attribute double rightRear;
721 interface SecurityAlert : VehiclePropertyType {
726 attribute boolean securityAlert;
730 interface ParkingBrake : VehiclePropertyType {
733 * must return status of parking brake: Engaged = true, Disengaged = false.
735 attribute boolean parkingBrake;
739 interface ParkingLight : VehiclePropertyType {
742 * must return status of parking light: Engaged = true, Disengaged = false.
744 attribute boolean parkingLight;
748 interface HazardLight : VehiclePropertyType {
751 * must return status of hazard light: Engaged = true, Disengaged = false.
753 attribute boolean hazardLight;
757 interface AntilockBrakingSystem : VehiclePropertyType {
759 /** AntilockBrakingSystem
760 * \brief MUST return whether Antilock Braking System is Idle (false) or Engaged (true)
762 attribute boolean antilockBrakingSystem;
766 interface TractionControlSystem : VehiclePropertyType {
768 /** TractionControlSystem
769 * \brief MUST return whether Traction Control System is Off (false) or On (true)
771 attribute boolean tractionControlSystem;
775 interface VehicleTopSpeedLimit : VehiclePropertyType {
777 /** VehicleTopSpeedLimit
778 * \brief MUST returns top rated speed in km/h. 0 = no limit
780 attribute unsigned short vehicleTopSpeedLimit;
784 interface AirbagStatus : VehiclePropertyType {
785 const unsigned short AIRBAGLOCATION_DRIVER = 0;
786 const unsigned short AIRBAGLOCATION_PASSENGER= 1;
787 const unsigned short AIRBAGLOCATION_LEFTSIDE = 2;
788 const unsigned short AIRBAGLOCATION_RIGHTSIDE = 3;
789 const unsigned short AIRBAGSTATUS_INACTIVE = 0;
790 const unsigned short AIRBAGSTATUS_ACTIVE = 1;
791 const unsigned short AIRBAGSTATUS_DEPLOYED = 2;
794 * \brief MUST returns a dictionary of Airbag (byte) and Status (byte) (see
796 attribute object airbagStatus;
800 interface DoorStatus : VehiclePropertyType {
801 const unsigned short DOORLOCATION_DRIVER= 0;
802 const unsigned short DOORLOCATION_PASSENGER = 1;
803 const unsigned short DOORLOCATION_LEFTREAR = 2;
804 const unsigned short DOORLOCATION_RIGHTREAR = 3;
805 const unsigned short DOORLOCATION_TRUNK = 4;
806 const unsigned short DOORLOCATION_FUELCAP = 5;
807 const unsigned short DOORLOCATION_HOOD = 6;
808 const unsigned short DOORSTATUS_CLOSED = 0;
809 const unsigned short DOORSTATUS_OPEN = 1;
810 const unsigned short DOORSTATUS_AJAR = 2;
813 * \brief MUST returns dictionary of Door (byte) and Status (byte). See
815 attribute object doorStatus;
818 * \brief MUST returns dictionary of Door (byte) and Status (bool locked = true, unlocked = false). See
820 attribute object doorLockStatus;
823 * \brief MUST returns Child lock status of rear doors. active = true, inactive = false.
824 * Setting this to 'true' will prevent the rear doors from being opened
827 attribute boolean childLockStatus;
831 interface SeatBeltStatus : VehiclePropertyType {
832 const unsigned short SEATBELTLOCATION_DRIVER= 0;
833 const unsigned short SEATBELTLOCATION_MIDDLEFRONT = 1;
834 const unsigned short SEATBELTLOCATION_PASSENGER = 2;
835 const unsigned short SEATBELTLOCATION_LEFTREAR = 3;
836 const unsigned short SEATBELTLOCATION_MIDDLEREAR = 4;
837 const unsigned short SEATBELTLOCATION_RIGHTREAR = 5;
840 * \brief MUST returns dictionary of Seat Belt (byte, see SEATBELTLOCATION) and Status (bool: Fasten = true, Unfastened = false)
842 attribute object seatBeltStatus;
846 interface OccupantStatus : VehiclePropertyType {
847 const unsigned short OCCUPANTLOCATION_DRIVER = 0;
848 const unsigned short OCCUPANTLOCATION_FRONTMIDDLE = 1;
849 const unsigned short OCCUPANTLOCATION_PASSENGER= 2;
850 const unsigned short OCCUPANTLOCATION_LEFTREAR = 3;
851 const unsigned short OCCUPANTLOCATION_MIDDLEREAR = 4;
852 const unsigned short OCCUPANTLOCATION_RIGHTREAR = 5;
853 const unsigned short OCCUPANTSTATUS_VACANT = 0;
854 const unsigned short OCCUPANTSTATUS_CHILD = 1;
855 const unsigned short OCCUPANTSTATUS_ADULT = 2;
858 * \brief MUST returns dictionary of Occupant (byte see OCCUPANTLOCATION) and Status (byte, see
860 attribute object occupantStatus;
864 interface ObstacleDistance : VehiclePropertyType {
865 const unsigned short DISTANCESENSORLOCATION_LEFTFRONT = 0;
866 const unsigned short DISTANCESENSORLOCATION_RIGHTFRONT = 1;
867 const unsigned short DISTANCESENSORLOCATION_LEFTREAR = 2;
868 const unsigned short DISTANCESENSORLOCATION_RIGHTREAR = 3;
869 const unsigned short DISTANCESENSORLOCATION_LEFTBLINDSPOT = 4;
870 const unsigned short DISTANCESENSORLOCATION_RIGHTBLINDSPOT = 5;
873 * \brief MUST returns dictionary of Distance Sensor (byte, see DISTANCESENSORLOCATION) and distance (double) in m.
875 attribute object obstacleDistance;