-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete property/method in inheriting entity/functionblock/etc. #822
Comments
Hi @Ebolon Long story short, here is an example where the distance is overridden from the information model by adding the max constraint to the distance functionblock sensor_value property: Abstract IPSO model:
Information model using the IPSO model and overriding it:
So instead of extending functionblocks by defining yet another functionblock for the device which would end up in tons of device specific functionblocks (which would be hard to manage), the extension is merely defined as part of the information model itself in an more embedded way. |
I understand what your motivation is. But what happens if an optional field becomes necessary in some situation, where the backend requires this optional field ? In that case, you would need to create another information model for the device including the property, re-generate code etc. That sounds pretty cumbersome to me. Instead and I guess preferable way, that device management deals with this kind of stuff depending upon context where the device is used. Regarding entity overriding: I see why not extending this principle to data types as well. I like your example :) |
Sounds a bit conflicting that a backend requires an optional field :) But lets close this issue for now. I am also not to 100% confident if this should be part of the DSL. I need first to get more hands on experience to have a better feeling for this. I create a new issue for the overriding feature. |
If a device do not support all properties/etc. it would be helpful to block those for the code generator. I would like to start a discussion if this is a feature the Vorto DSL benefits from and if how the syntax looks like.
Here an example:
Here we have a standard entity:
The device do not supports parm2:
Deleting a mandatory property should result in an error.
The text was updated successfully, but these errors were encountered: