Giter VIP home page Giter VIP logo

Comments (3)

goldhoorn avatar goldhoorn commented on July 30, 2024

The problem is related how orogen handles subclassing.

the metadata creating on each parent and child class a property "metadata".
This yields into the problem, that the parent and child itself have the metadata property, this internally and externally.

The same is truth for input/output ports either. I see currently no easy was to solve this. It might be the best solution if a port with the same name and type is generated on a superclass to not generate the respective member on the child. But i don't know if this would have other side-effects within the framework.

The current solution is not good either, because a superclass might call metadata.set('something') but the metadata object on the parent is another instance and would not updated here.

from orogen.

goldhoorn avatar goldhoorn commented on July 30, 2024

It seems the complete orogen loading mechanism is partwise broken which makes this bug even harder.

the metadata plugin checks if it's already registered and skipts the generation otherwise.

 10                 if !find_extension("MetaDataPlugin")

the find_extension should check the superclasses too, but the problem is that this does not work. on this step of loading the @superclass is either empty or only the RTT::TaskContext therefore the check fails.

Even is the check would be there. the c++ code generation should be done on the child to build up the port-model for the child too. This starts to get tricky for the same reasons than in my previous post...

from orogen.

doudou avatar doudou commented on July 30, 2024

👍 on the general analysis, in addition:

(1) the Spec's each_ methods should never yield two interface objects that have the same name, as a matter of rule
(2) the extension should register itself as each level of the hierarchy (same than e.g. the stream aligner), as it stores information that is specific to that specific level of the hierarchy (metadata set on the subclass should not "appear" on the superclass)
(3) the subclass issue you fished is indeed a problem. We'll have to move to having the superclass as a parameter of #task_context in order to fix that problem (e.g. having the superclass "fixed" at construction, which is obvious in hindsight). Calling #superclass would be deprecated.
(4) until we get (3) widely deployed, we should simply "ignore" duplicate properties that have same name and type.

from orogen.

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.