Hello SDL community,
The review of "SDL 0261 - New vehicle data WindowStatus" begins now and runs through December 3, 2019. The proposal is available here:
Reviews are an important part of the SDL evolution process. All reviews should be sent to the associated Github issue at:
https://github.com/smartdevicelink/sdl_evolution/issues/869
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of SDL. When writing your review, here are some questions you might want to answer in your review:
More information about the SDL evolution process is available at
https://github.com/smartdevicelink/sdl_evolution/blob/master/process.md
Thank you,
Theresa Lech
Program Manager - Livio
[email protected]
minSize=1.GateWindowStatus.gateType needs updating for the grid.WindowState enums need better definition, like "0% open", "1-10% open", "10-49% open", "50-90% open", "90-99% open", and "100% open". Or, use an integer to represent the percentage open instead of using an enum.Just some thoughts to this proposal and the feedback.
it's a theoretical thought ... every car has windows ... but just to give an example of minSize=0
I kind of agree but I'm afraid we can't provide an integer unless it jumps from 0% to 10% to 50% etc.
With regards to implementing the RPC code generator I would suggest to remove internal_name as long as they are not mandatory in the SDL implementation. Rationale: The generator scripts will create enum elements based on the internal name. I would like the libraries to provide WindowState.CLOSED or WindowState.closed instead of WindowState.wpClosed` etc.
@kshala-ford - What'd be the different between and empty array response and result code VEHICLE_DATA_NOT_AVAILABLE in case there are no supported windows.
@joeljfischer - After agreed upon revisions for Enhance BodyInformation vehicle data, i believe we can update this proposal to cover door and window status in one param itself since both of these would be covered by Grid.
So following changes would be made to MOBILE/HMI API:
VehicleDataType:<element name="VEHICLEDATA_WINDOWSTATUS" since="X.x"/>
WindowStatus:<struct name="WindowStatus" since="X.x">
<description>Describes the status of a window of a door/liftgate etc.</description>
<param name="location" type="Grid" mandatory="true"/>
<param name="state" type="WindowState" mandatory="true"/>
</struct>
WindowState:<enum name="WindowState" since="X.x">
<description>Reflects the postion of window.</description>
<element name="UNDEFINED">
</element>
<element name="CLOSED">
</element>
<element name="BARELY_OPEN">
</element>
<element name="NEARLY_HALF_OPEN">
</element>
<element name="NEARLY_FULL_OPEN">
</element>
<element name="OPEN">
</element>
<element name="UNUSED">
</element>
</enum>
SubscribeVehicleDataUnsubscribeVehicleDataGetVehicleData<param name="windowStatus" type="Boolean" mandatory="false" since="X.x">
<description>See WindowStatus</description>
</param>
SubscribeVehicleDataUnsubscribeVehicleData<param name="windowStatus" type="VehicleDataResult" mandatory="false" since="X.x">
<description>See WindowStatus</description>
</param>
GetVehicleDataOnVehicleData<param name="windowStatus" type="WindowStatus" array="true" minsize="0" maxsize="100" mandatory="false">
<description>See WindowStatus</description>
</param>
@joeljfischer / @kshala-ford - Not all OEMs might have same mapping for window related signals, so i did not want to tie a specific %age number to enums. e.g. if an OEM has window signal sent for 0%, 1-5% , 6-40%, 41-80%, 81-95%, 95-99%, 100% then suggested enum values in previous comment do not directly apply. I personally would love to have a raw %age point as the position value but did not propose it for the same reason as stated earlier.
@kshala-ford - Ok, #ToUpdate . I have removed that from proposed changes in point 2 above,
minsize should be 0.BodyInformation proposal.<enum name="WindowState" since="X.x">
<description>Reflects the postion of window.</description>
<element name="UNDEFINED">
</element>
<element name="CLOSED">
</element>
<element name="SLIGHTLY_OPEN">
</element>
<element name="LESS_THAN_HALF_OPEN">
</element>
<element name="MORE_THAN_HALF_OPEN">
</element>
<element name="LESS_THAN_FULL_OPEN">
</element>
<element name="OPEN">
</element>
</enum>
I'm not sure what UNDEFINED would mean here, but I think it's useful in case something went wrong with the internal system. I don't think UNUSED is necessary. That's handled outside of the enum. I changed the enums to be usable by OEMs that support only two states (CLOSED / OPEN), 3 states (CLOSED, LESS_THAN_FULL_OPEN, OPEN), and more states than that. I think that an enum description and / or element subscriptions should be added to describe how the enum would be used in these various cases.
@joeljfischer
Adding to your point, any grid location outside of values defined in SeatLocationCapability would be gates.
This looks mostly OK to me as well, we should also include element HALF_OPEN as well. So the enum WindowState would be:
<enum name="WindowState" since="X.x">
<description>Reflects the postion of window.</description>
<element name="UNDEFINED">
</element>
<element name="CLOSED">
</element>
<element name="SLIGHTLY_OPEN">
</element>
<element name="LESS_THAN_HALF_OPEN">
</element>
+ <element name="HALF_OPEN">
+ </element>
<element name="MORE_THAN_HALF_OPEN">
</element>
<element name="LESS_THAN_FULL_OPEN">
</element>
<element name="OPEN">
</element>
</enum>
@atiwari9 On 3, I see what you're saying, but I disagree with the need for another enum. I don't see a need for 49.999% and less, 50%, and 50.001% and more. I would suggest changing MORE_THAN_HALF_OPEN to HALF_OPEN_OR_MORE.
I would also suggest we put these percentages into the descriptions of the elements. If we don't put guidelines on what they mean, each implementation could be different.
@joeljfischer - In that case HALF_OPEN_OR_MORE is better.
@joeygrover - Added description as well with percentage points.
<enum name="WindowState" since="X.x">
<description>Reflects the postion of window.</description>
<element name="UNDEFINED">
<description>
Window position is undefined
</description>
</element>
<element name="CLOSED">
<description>
Window position is 0% open.
</description>
</element>
<element name="SLIGHTLY_OPEN">
<description>
Window position is 1%-10% open.
</description>
</element>
<element name="LESS_THAN_HALF_OPEN">
<description>
Window position is 11%-49% open.
</description>
</element>
<element name="HALF_OPEN_OR_MORE">
<description>
Window position is 50%-89% open.
</description>
</element>
<element name="LESS_THAN_FULL_OPEN">
<description>
Window position is 90%-99% open.
</description>
</element>
<element name="OPEN">
<description>
Window position is 100% open.
</description>
</element>
</enum>
During the Steering Committee meeting, the author and project maintainer discussed possible issues with using an enum for WindowState, including the situation where an OEM doesn't support granular window positions and therefore couldn't use the enum. There was conversation about the OEM sending min and max values to be averaged, or values and deviations for developers to use, as well as the request for other SDLC Members to provide their input on which implementation of this feature would work best for them. Ultimately, the Steering Committee voted to keep this proposal in review so that an alternative to the WindowState enum could be discussed and determined.
Based on our discussion, here's what I would suggest.
Either (1):
<struct name="WindowState" since="X.X">
<param name="approximateLocation" type="Integer" minValue="0" maxValue="100">
<description>The approximate percentage that the window is open - 0 being fully closed, 100 being fully open</description>
</param>
<param name="deviation" type="Integer" minValue="0" maxValue="100">
<description>The percentage deviation of the approximateLocation. e.g. If the approximateLocation is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60.</description>
</param>
</struct>
Or (2):
<struct name="WindowState" since="X.X">
<description>The window state provides a minimum and maximum position the window could be in. The average of the min and max is an approximation of the window's location. e.g. If the minValue is 40 and the maxValue is 60, then a developer could display the window at 50% in their UI.</description>
<param name="minLocation" type="Integer" minValue="0" maxValue="100">
<description>The lowest percentage position the window could be in.</description>
</param>
<param name="maxLocation" type="Integer" minValue="0" maxValue="100">
<description>The highest percentage position the window could be in.</description>
</param>
</struct>
Personally, I would lean towards option 1. I believe app developers are mostly interested into the location even if it's only approximated. With option 2 the app developer would need to calculate the Average between min and max which doesn't sound really convenient to me...
@kshala-ford Both provide the exact same information. Option 1 simply provides the average, then the developer would have to calculate the min and max. Option 2 is the opposite. Either should work. I tend to agree that the average is more important information, and so is perhaps slightly preferred.
@joeljfischer that was my point for choosing option 1. Though both options provide the same information I believe the format of option 1 might be more interesting for most developers and the few others would convert to min/max.
@kshala-ford @joeljfischer - Thanks for your inputs, i read @joeljfischer 's comment during my vacation and i too felt like Option 1 is the way to go for same reasons discussed above. However, i'd like to change the name of param from approximateLocation to approximatePosition as that is better understood IMO.
<struct name="WindowState" since="X.X">
<param name="approximatePosition" type="Integer" minValue="0" maxValue="100">
<description>The approximate percentage that the window is open - 0 being fully closed, 100 being fully open</description>
</param>
<param name="deviation" type="Integer" minValue="0" maxValue="100">
<description>The percentage deviation of the approximatePosition. e.g. If the approximatePositionis 50 and the deviation is 10, then the window's location is somewhere between 40 and 60.</description>
</param>
</struct>
The Steering Committee voted to accept this proposal with the revision to WindowStatus described in this comment.
@atiwari9 Please advise when a new PR has been entered to update the proposal to reflect the agreed upon revisions. I'll then merge the PR so the proposal is up to date, and enter issues in the respective repositories for implementation. Thanks!
JavaScript Suite Issue: https://github.com/smartdevicelink/sdl_javascript_suite/issues/254
Most helpful comment
@kshala-ford @joeljfischer - Thanks for your inputs, i read @joeljfischer 's comment during my vacation and i too felt like Option 1 is the way to go for same reasons discussed above. However, i'd like to change the name of param from
approximateLocationtoapproximatePositionas that is better understood IMO.