Overriding properties inline
See original GitHub issueLike discussed in #822 it should be possible to override some attributes inline in a functionblock/entity.
Here some examples: Example1:
namespace com.ipso.smartobjects
functionblock Distance {
status {
mandatory sensor_value as float
optional sensor_units as string
...
}
}
Information model using the IPSO model and overriding it:
using com.ipso.smartobjects.Distance;0.0.1
infomodel MyDistance100MeterDevice {
functionblocks {
distance as Distance with {
mandatory sensor_value as float <max:100>
}
}
}
Example2:
entity EntityA {
mandatory valueA as int
optional valueB as int
}
using de.vorto.EntityA;0.0.1
functionblock FunctionblockA {
status {
mandatory entityA as EntityA
optional unit as string
}
}
using de.vorto.FunctionblockA;0.0.1
infomodel DeviceA {
functionblocks {
distance as FunctionblockA with {
mandatory entityA as EntityA with {
valueA as int <MAX 100>
}
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (18 by maintainers)
Top Results From Across the Web
How can I override inline styles with external CSS?
The only way to override inline style is by using !important keyword beside the CSS rule. The following is an example of it....
Read more >Override Inline Styles with CSS
Often we think of inline styles as a way to override styles we set up in the CSS. 99% of the time, this...
Read more >How to override inline styles with external in CSS
In this article, we are going to learn how we can override inline styles with external CSS. Generally, we use inline CSS to...
Read more >How to Override CSS Styles - W3docs
You must place inline styles in the <body> of the HTML document, while embedded style sheets must be placed in the <head> of...
Read more >How To Override Inline CSS With “!important” Property Using ...
This video is going to show you How To Override Inline CSS With “!important” Property Using jQuery.Subscribe to Garnatti one: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My understanding on this topic is that there are:
If this feature is integrated, no such thing like “description” will exist any more. The application has to merge the info model with the function block to find the function block complete description. To me, it’ll break the main goal of Vorto: clear models.
To compare with OOP, the subsclass should not change the contract from the base class - Liskov substitution principle
Do I understand correctly that by this I can no longer rely on that a functionblock always contains a well defined (and versioned) contract but that it depends on the context? And even worse I cannot rely on the defined entities because they may also be changed by the context (infomodel).
What is the point of a functionblock then if I cannot rely that it is the same when used in different infomodels?