W3C home > Mailing lists > Public > public-autowebplatform@w3.org > April 2014

Re: Vehicle Availability RFC

From: Paul Boyes <pb@opencar.com>
Date: Thu, 10 Apr 2014 16:52:33 +0000
To: "andy@cx3marketing.com" <andy@cx3marketing.com>
CC: "Rees, Kevron" <kevron.m.rees@intel.com>, "public-autowebplatform@w3.org" <public-autowebplatform@w3.org>
Message-ID: <75A8F078-5BE6-44C8-AD61-816B8130590C@opencar.com>
I agree with Andy on both points.

Paul J. Boyes
Mobile:   206-276-9675
Skype:  pauljboyes

On Apr 9, 2014, at 12:57 PM, andy@cx3marketing.com<mailto:andy@cx3marketing.com> wrote:

Hey Kevron,
Just so I understand this properly: if the API returns “security” then this means “not supported because the OEM thinks this feature is a security risk and it isn’t implemented” and not “not supported because your application does not have adequate security credentials”. If the first is what you intend, could I recommend still prefixing the security, policy and other enums with “not_supported”?

Would it be better to have the availability return a boolean and provide an optional way to get the rationale? It seems that it would make the use of the API a lot easier for the developer, since there may be quite a few availability tests required. If we make them all test === “available”, a simple typo could silently break the code.


Andy Gryc | Co-founder
M: +1 613.618.8730 | E: andy@cx3marketing.com<mailto:nyoung@cx3marketing.com>
W: www.cx3marketing.com<http://www.cx3marketing.com/>

On Apr 9, 2014, at 3:38 PM, Rees, Kevron <kevron.m.rees@intel.com<mailto:kevron.m.rees@intel.com>> wrote:

The purpose of the availability API additions is to allow developers
to not only determine if a particular data is supported, but also tell
them exactly why it isn't supported.  It also handles the scenario
that if an attribute is not available at the moment, applications can
be notified when the attribute becomes available.

enum Availability

partial Interface VehicleInterface {

 Availability available();
 short availabilityChangedListener( AvailableCallback callback );
 void removeAvailabilityChangedListener( short handle );

Example 1:

if( ( var a = vehicle.vehicleSpeed.available() ) === "available" )
 // we can use it.
 // tell us why:

Example 2:

var canHasVehicleSpeed = vehicle.vehicleSpeed.available() == "available";

vehicle.vehicle.availabilityChangedListener( function (available) {
 canHasVehicleSpeed = available == "available";



Received on Thursday, 10 April 2014 16:53:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:52 UTC