Giter VIP home page Giter VIP logo

Comments (4)

tripzero avatar tripzero commented on June 28, 2024

Whether or not this becomes recursive is an implementation detail. I got
it to work avoiding infinite recursion by, iirc, overriding the getter in
the "driver" attribute and making it not enumerable (which iirc is the
default).

On Wed, Jul 29, 2015, 1:40 PM Shinjiro Urata [email protected]
wrote:

interface Zone {
attribute ZonePosition[] value;
readonly attribute Zone driver;
boolean equals (Zone zone);
boolean contains (Zone zone);
};

interface Zone uses Zone itself inside the definition.
To think straight forward, constructor of Zone need to construct another
Zone inside and it is recursive. I suppose this is problematic.
To avoid this recursion, one idea is to use getDriverPosition() method.

But another thing I think is, if we need driver position inside Zone
definition or not.
It looks we can get driver position from interface
steeringwheelConfigutation.
So I guess it would be no problem to remove driver position from Zone
definition.

interface Zone {
attribute ZonePosition[] value;
boolean equals (Zone zone);
boolean contains (Zone zone);
};


Reply to this email directly or view it on GitHub
#55.

from automotive.

aShinjiroUrata avatar aShinjiroUrata commented on June 28, 2024

@tripzero thanks for the comment.
I suppose you mean this.

window.Zone = function(zone) {
    this.value = zone ? zone : [];

    Object.defineProperty(this, 'driver',
                          { enumerable: false, get: function() {
                              return new Zone(['Front', 'Left']);
                          } });
};

https://raw.githubusercontent.com/otcshare/automotive-message-broker/master/xwalk/vehicle_api.js

OK. I get it.
We are thinking about C++ layer implementation and maybe there is some workaround.

Then how about this point?

But another thing I think is, if we need driver position inside Zone definition or not.
It looks we can get driver position from interface steeringwheelConfigutation.
So I guess it would be no problem to remove driver position from Zone definition.

From a point of view, driver position is suitable to be handled by Configuration and Ideintification interface and enough by having steeringWheelConfigutation interface.
Is there a special reason to have it inside Zone interface?

from automotive.

tripzero avatar tripzero commented on June 28, 2024

There is a valid point about the redundancy. There should only be one way
to avoid confusion.

On Thu, Jul 30, 2015, 4:32 AM Shinjiro Urata [email protected]
wrote:

@tripzero https://github.com/tripzero thanks for the comment.
I suppose you mean this.

window.Zone = function(zone) {
this.value = zone ? zone : [];

Object.defineProperty(this, 'driver',
                      { enumerable: false, get: function() {
                          return new Zone(['Front', 'Left']);
                      } });

};

https://raw.githubusercontent.com/otcshare/automotive-message-broker/master/xwalk/vehicle_api.js

OK. I get it.
We are thinking about C++ layer implementation and maybe there is some
workaround.

Then how about this point?

But another thing I think is, if we need driver position inside Zone
definition or not.
It looks we can get driver position from interface
steeringwheelConfigutation.
So I guess it would be no problem to remove driver position from Zone
definition.

From a point of view, driver position is suitable to be handled by
Configuration and Ideintification interface and enough by having
steeringWheelConfigutation interface.
Is there a special reason to have it inside Zone interface?


Reply to this email directly or view it on GitHub
#55 (comment).

from automotive.

aShinjiroUrata avatar aShinjiroUrata commented on June 28, 2024

I understand.
Personally, still I think, driver position can be located in Configuration and Identification interface.

from automotive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.