View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004281 | 10000-003: Address Space | Spec | public | 2018-05-11 13:42 | 2020-12-08 20:23 |
| Reporter | Wolfgang Mahnke | Assigned To | Jeff Harding | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | reopened | ||
| Summary | 0004281: Clarifications on overridden Methods | ||||
| Description | Section 6.2.7. defines specific rules for overridden Variables w.r.t. their data types. Currently we do not have defined clear rules for overridden Methods and their input- and output arguments. MandatoryPlaceholder and OptionalPlaceholder are defined for Methods to indicate that the arguments will be defined somewhere else. But we do not specify the bahaviour for Mandatory and Optional used on Methods. | ||||
| Tags | No tags attached. | ||||
| Commit Version | |||||
| Fix Due Date | |||||
|
|
Adding a note just in case.. OPC UA is basically an object orientend programming language (or the concepts are close enough anyway). An object-oriented language cannot break https://en.wikipedia.org/wiki/Liskov_substitution_principle. So every subtype must be able to be seen and handled as their supertype. Given that Methods are defined for an ObjectType, this means if a method is overridden, it must have the same exact number of parameters, they must have same names. Input types must be same. Output types can be subtypes of the method outputs that is being overridden. This also applies instances of that object, otherwise it cannot be used based on the type information. e.g. the AutoID model holds this true when it overrides methods. A bit dangerous but is correct. If it were to violate that constraint, it would be impossible to e.g. generate code for those types as normal object oriented language types as those methods could not be made made to compile. |
|
|
(and as additional clarification, different input signature would mean overload, not override, and OPC UA does not currently allow overloads, as the BrowseName of the method must be unique to the type, and making the same BrowseName in subtype creates an override of that Method) |
|
|
UA Working Group discussion: Agreed we need to add a statement in the spec that explains that a subtype can't change the arguments of a method defined by its super type. Agreed for methods which use abstract datatypes we could allow overriding the datatypes. Once a concrete datatype is introduced no further subtyping would be allowed. |
|
|
Added a clarification for methods to Overriding InstanceDeclarations as follows: "A subtype shall not override an argument of its supertype’s Method InstanceDeclarations which is defined with a concrete DataType. Method arguments defined with an abstract DataType may be overridden. |
|
|
On further review we concluded the June agreement was flawed and this issues was reopened. |
|
|
Agreed to limit the statement to "A subtype shall not override an argument of its supertype’s Method InstanceDeclarations" |
|
|
Agreed to changes in Virtual F2F. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-05-11 13:42 | Wolfgang Mahnke | New Issue | |
| 2018-06-29 13:40 | BjarneBostrom | Note Added: 0009219 | |
| 2018-06-29 13:44 | BjarneBostrom | Note Added: 0009220 | |
| 2018-08-14 16:27 | Jim Luth | Assigned To | => Jeff Harding |
| 2018-08-14 16:27 | Jim Luth | Status | new => assigned |
| 2020-06-09 16:49 | Jeff Harding | Note Added: 0012213 | |
| 2020-06-15 20:49 | Jeff Harding | Status | assigned => resolved |
| 2020-06-15 20:49 | Jeff Harding | Resolution | open => fixed |
| 2020-06-15 20:49 | Jeff Harding | Fixed in Version | => 1.05 |
| 2020-06-15 20:49 | Jeff Harding | Note Added: 0012322 | |
| 2020-08-25 14:11 | Jeff Harding | Status | resolved => feedback |
| 2020-08-25 14:11 | Jeff Harding | Resolution | fixed => reopened |
| 2020-08-25 14:11 | Jeff Harding | Note Added: 0012718 | |
| 2020-08-25 14:51 | Jeff Harding | Status | feedback => assigned |
| 2020-08-25 14:51 | Jeff Harding | Note Added: 0012719 | |
| 2020-12-08 20:23 | Jim Luth | Status | assigned => closed |
| 2020-12-08 20:23 | Jim Luth | Note Added: 0013409 |