Skip to content
Permalink
Browse files

a bit of refactoring of climate prior to inclusion in the main spec

  • Loading branch information
tripzero committed Feb 10, 2014
1 parent f0ce6f2 commit 9bd92cc9c59a5fd2d27c4c6f54f82d25b0e43372
Showing with 24 additions and 142 deletions.
  1. +24 −142 draft_specs/VehicleAPI_Climate_Draft.htm
@@ -73,58 +73,6 @@ <h3>Use Cases for climate/environment interfaces</h3>

</section>

<!-------------------- API Description & Properties -------------------------->

This comment has been minimized.

Copy link
@tripzero

tripzero Feb 10, 2014

Author Owner

Common-api is already in the main draft spec. So we won't reproduce it here. This will make copy-pasting the rest easier.


<section class="common-api">
<h2>Common Vehicle API & Properties</h2>

<!------------------------ Interface Temperature ------------------------------>
<section>
<h3><a>VehicleZone</a> type</h3>
<p>The <a>VehicleZone</a> type represents the zone of the vehicle</p>
<dl title="enum VehicleZone" class="idl">
<dt>all</dt>
<dd></dd>
<dt>row1</dt>
<dd></dd>
<dt>row2</dt>
<dd></dd>
<dt>row3</dt>
<dd></dd>
<dt>row1left</dt>
<dd></dd>
<dt>row1center</dt>
<dd></dd>
<dt>row1right</dt>
<dd></dd>
<dt>row2left</dt>
<dd></dd>
<dt>row2center</dt>
<dd></dd>
<dt>row2right</dt>
<dd></dd>
<dt>row3left</dt>
<dd></dd>
<dt>row3center</dt>
<dd></dd>
<dt>row3right</dt>
<dd></dd>
</dl>

<p>Some vehicle data types exist per seats or locations. Thus, it make sense to handle those as a set by identifiers.<br>
<a>VehicleZone</a> type is used to specify the scope of the data.</p>

</section>
<p class="note">
It needs to be clarified how to use vehicle zone type in method and event handler.<br>
It’s useful for ‘getter’ and ‘setter’ method because those require handling data to specific zone or all zones.<br>
Using zone identifier, single common ‘getter’ and ‘setter’ can handle all cases.<br>
However, we should investigate whether it works well with DOM event.
</p>

</section>


<!-------------------- API Description & Properties -------------------------->

<section class="api-properties">
@@ -134,7 +82,7 @@ <h2>API Description & Properties</h2>
<section>
<h3><a>Temperature</a> Interface</h3>
<p>The <a>Temperature</a> interface provides information about the current temperature of outside or inside vehicle.
<dl title="[NoInterfaceObject] interface Temperature : VehiclePropertyType" class="idl">
<dl title="[NoInterfaceObject] interface Temperature : VehicleCommonDataType" class="idl">

This comment has been minimized.

Copy link
@tripzero

tripzero Feb 10, 2014

Author Owner

The main draft spec calls this "VehicleCommonDataType". It's basically the same concept.

<dt>readonly attribute short interiorTemperature</dt>
<dd>the current temperature of the air inside of the vehicle. </dd>
<dt>readonly attribute short exteriorTemperature</dt>
@@ -156,7 +104,7 @@ <h3><a>Temperature</a> Interface</h3>
<section>
<h3><a>ExteriorBrightness</a> Interface</h3>
<p>The <a>ExteriorBrightness</a> interface provides information about ambient light levels.
<dl title="[NoInterfaceObject] interface ExteriorBrightness : VehiclePropertyType" class="idl">
<dl title="[NoInterfaceObject] interface ExteriorBrightness : VehicleCommonDataType" class="idl">
</dl>
<p class="note">There's relevant draft specification. There is no reason not to use it.<br>
<a href="http://www.w3.org/TR/2013/CR-ambient-light-20131001/">http://www.w3.org/TR/2013/CR-ambient-light-20131001/</a>
@@ -167,7 +115,7 @@ <h3><a>ExteriorBrightness</a> Interface</h3>
<section>
<h3><a>RainSensor</a> Interface</h3>
<p>The <a>RainSensor</a> interface provides information about ambient light levels.
<dl title="[NoInterfaceObject] interface RainSensor : VehiclePropertyType" class="idl">
<dl title="[NoInterfaceObject] interface RainSensor : VehicleCommonDataType" class="idl">
<dt>readonly attribute unsigned short rain</dt>
<dd>the amount of rain detected by the rain sensor. level of rain intensity ( 0: No Rain ~ 10: Heaviest Rain)</dd>
</dl>
@@ -177,68 +125,16 @@ <h3><a>RainSensor</a> Interface</h3>
<section>
<h3><a>WiperStatus</a> Interface</h3>
<p>The <a>WiperStatus</a> interface represents the status of wiper operation.
<dl title="[NoInterfaceObject] interface WiperStatus : VehiclePropertyType" class="idl">

This comment has been minimized.

Copy link
@tripzero

tripzero Feb 10, 2014

Author Owner

Combine WiperStatus and Settings. With a common set, this will be less confusing:

vehicle.wiperStatus.set({"speed" : 10}, someZone).then(...)

<dt>readonly attribute unsigned short frontWiperSpeed</dt>
<dd>current speed interval of wiping windshield ( 0: off, 1: Slowest ~ 10: Fastest )</dd>
<dt>readonly attribute unsigned short? rearWiperSpeed</dt>
<dd>current speed interval of wiping rear window ( 0: off, 1: Slowest ~ 10: Fastest )</dd>
</dl>
<p>rearWiperSpeed is optional depending on vehicle type.</p>
</section>

<!------------------------ Interface WiperSetting ------------------------------>
<section>
<h3><a>WiperSetting</a> Interface</h3>
<p>The <a>WiperSetting</a> interface represents the current setting of the wiper controller.

<dl title="enum WiperControl" class="idl">
<dt>off</dt>
<dd>Wiper is not in operation</dd>
<dt>once</dt>
<dd>Wipe single. It's a transient state and goes to the off mode</dd>
<dt>slowest</dt>
<dd>Wiper is on mode with the slowest speed</dd>
<dt>slow</dt>
<dd>Wiper is on mode with slow speed</dd>
<dt>middle</dt>
<dd>Wiper is on mode with middle speed</dd>
<dt>fast</dt>
<dd>Wiper is on mode with fast speed</dd>
<dt>fastest</dt>
<dd>Wiper is on mode with the fastest speed</dd>
<dt>auto</dt>
<dd>Wiper is on the automatic mode which controls wiping speed with accordance with the amount of rain</dd>
</dl>

<dl title="[NoInterfaceObject] interface WiperSetting : VehiclePropertyType" class="idl">
<dt>attribute WiperControl frontWiperControl</dt>
<dd>current setting of the front wiper controller. It can be used to send user's request for changing setting.</dd>
<dt>attribute WiperControl? rearWiperControl</dt>
<dd>current setting of the rear wiper controller. It can be used to send user's request for changing setting.</dd>
</dl>
<p>rearWiperControl is optional depending on vehicle type.</p>
</section>

<!------------------------ Interface Defrost ------------------------------>
<section>
<h3><a>Defrost</a> Interface</h3>
<p>The <a>Defrost</a> interface represents the status of wiper operation.
<dl title="[NoInterfaceObject] interface Defrost : VehiclePropertyType" class="idl">
<dt>attribute boolean defrostWindShield</dt>
<dd>current status of the defrost switch for WindShield. It can be used to send user's request for changing setting.</dd>
<dt>attribute boolean? defrostRearWindow</dt>
<dd>current status of the defrost switch for rear window. It can be used to send user's request for changing setting.</dd>
<dt>attribute boolean? defrostSideMirrors</dt>
<dd>current status of the defrost switch for side mirrors. It can be used to send user's request for changing setting.</dd>
</dl>
<p>defrostRearWindow, defrostSideMirrors are optional depending on vehicle type.</p>
<dl title="[NoInterfaceObject] interface WiperStatus : VehicleCommonDataType" class="idl">
<dt>readonly attribute unsigned short speed</dt>
<dd>current speed interval of wiping for the window in 'zone' ( 0: off, 1: Slowest ~ 10: Fastest )</dd>
</section>

<!------------------------ Interface Sunroof ------------------------------>
<section>
<h3><a>Sunroof</a> Interface</h3>
<p>The <a>Sunroof</a> interface represents the current status of Sunroof.
<dl title="[NoInterfaceObject] interface Sunroof : VehiclePropertyType" class="idl">
<dl title="[NoInterfaceObject] interface Sunroof : VehicleCommonDataType" class="idl">
<dt>attribute unsigned short openness</dt>
<dd>current status of Sunroof as a percentage of openness ( 0: Closed, 100: Fully Opened).</dd>
<dt>attribute unsigned short tilt</dt>
@@ -263,31 +159,24 @@ <h3><a>ConvertibleRoof</a> Interface</h3>
<dd>The convertible roof is opened</dd>
</dl>

<dl title="[NoInterfaceObject] interface ConvertibleRoof : VehiclePropertyType" class="idl">
<dl title="[NoInterfaceObject] interface ConvertibleRoof : VehicleCommonDataType" class="idl">
<dt>attribute ConvertibleRoofStatus status</dt>
<dd>current status of Convertible Roof.</dd>
</dl>
<p>It can be used to send user's request for changing setting. "closed" is used to close and "opened" is used to open.</p>
</section>

<!------------------------ Interface SideWindow ------------------------------>
<!------------------------ Interface Window ------------------------------>

This comment has been minimized.

Copy link
@tripzero

tripzero Feb 10, 2014

Author Owner

Create a generic window that is zoned for all windows.

<section>
<h3><a>SideWindow</a> Interface</h3>
<p>The <a>SideWindow</a> interface represents the current status of openness of side windows.

<dl title="dictionary WindowOpenness" class="idl">
<dt>attribute VehicleZone zone</dt>
<dd>indicate which vehicle zone the current side window openness corresponds to</dd>
<dt>attribute unsigned short openness</dt>
<dd>current status of the side window as a percentage of openness. (0:Closed, 100:Fully Opened)</dd>
</dl>

<dl title="[NoInterfaceObject] interface SideWindow : VehiclePropertyType" class="idl">
<dt>attribute WindowOpenness[] window</dt>
<dd>current statuss of the number of each side windows as an array.</dd>
</dl>
<p>zone attribute of WindowOpenness can have only row#left and row#right values. row# center is not applicable here.<br>
It can be used to send user's request for changing setting.</p>
<h3><a>Window</a> Interface</h3>
<p>The <a>Window</a> interface represents the current status of openness of side windows.

<dl title="[NoInterfaceObject] interface Window : VehicleCommonDataType" class="idl">
<dt>attribute unsigned short openness</dt>
<dd>current status of the side window as a percentage of openness. (0:Closed, 100:Fully Opened)</dd>
<dt>attribute boolean defrost</dt>

This comment has been minimized.

Copy link
@tripzero

tripzero Feb 10, 2014

Author Owner

Add defrost property. This should be an optional attribute. I missed the "?" marking it so....

<dd>current status of the defroster</dd>
</dl>
</section>

<!------------------------ Interface ClimateControl ------------------------------>
@@ -306,9 +195,7 @@ <h3><a>ClimateControl</a> Interface</h3>
<dd>Air flow is directed to the floor outlets and the windshield</dd>
</dl>

<dl title="dictionary HVAC" class="idl">
<dt>attribute VehicleZone zone</dt>
<dd>indicate which vehicle zone the current HVAC information corresponds to</dd>
<dl title="[NoInterfaceObject] interface ClimateControl : VehicleCommonDataType" class="idl">
<dt>attribute AirflowDirection airflowDirection</dt>
<dd>current status of the direction of the air flow through the ventilation system</dd>
<dt>attribute unsigned short fanSpeedLevel</dt>
@@ -323,15 +210,10 @@ <h3><a>ClimateControl</a> Interface</h3>
<dd>current status of the seat warmer ( 0: off, 1: least warm ~ 10: warmest )</dd>
<dt>attribute unsigned short? seatCooler</dt>
<dd>current status of the seat ventilation ( 0: off, 1: least warm ~ 10: warmest )</dd>
</dl>

<dl title="[NoInterfaceObject] interface ClimateControl : VehiclePropertyType" class="idl">
<dt>attribute HVAC[] hvac</dt>
<dd>current setting of HVAC per each zone.</dd>
<dt>attribute boolean airRecirculation</dt>
<dd>current setting of air recirculation. (true : on, false : pulling in outside air)</dd>
<dt>attribute unsigned short? steeringWheelHeater</dt>
<dd>current status of steering wheel heater ( 0: off, 1: least warm ~ 10: warmest )</dd>
<dt>attribute boolean airRecirculation</dt>
<dd>current setting of air recirculation. (true : on, false : pulling in outside air)</dd>
<dt>attribute unsigned short? steeringWheelHeater</dt>
<dd>current status of steering wheel heater ( 0: off, 1: least warm ~ 10: warmest )</dd>
</dl>
<p><a>ClimateControl</a> can be used to send user's request for changing setting.</p>
</section>
@@ -340,4 +222,4 @@ <h3><a>ClimateControl</a> Interface</h3>

</section>
</body>
</html>
</html>

0 comments on commit 9bd92cc

Please sign in to comment.
You can’t perform that action at this time.