Skip to content
Shinjiro Urata edited this page Feb 8, 2016 · 5 revisions

Welcome to the automotive wiki!

Issue#72 summary table

  1. API style
Choices Pros Cons
subscribe() style
(Current style)
- Posible to disable by 'unsubscribe'.
- Can save CPU, memory consumption?
- 'Subscribe' is not common style.
No good reputation for developers.
onchange(), ondata() style
(Suggested from Generic Sensor API)
- Common style. Developers are familiar to this. - No way to unsubscribe?
- Only one callback function can be added?
  1. Interface grouping (encapsulation)
Choices Pros Cons
Current style - Possible to get group of values by one get()/subscribe().
- Easy to use when only coarse values are needed.
- Not possible to get()/subscibe() by only one attribute.
- Not possible to set different interval/threshold to attributes
Separated style. - Possible to get()/subscribe() by only one attribute.
- Possible to set different interval/threshold to each attribute
- Need to set get()/subscribe() for each attributes one by one.
  1. Other topics
Choices Pros Cons
Using Constructor
(e.g. var door = new Vehicle.Door() )
- Modern style.
- Flexible to use.
- Memory consumption?
- -
Clone this wiki locally