View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006453 | 10000-004: Services | Spec | public | 2021-02-02 12:53 | 2023-03-28 15:29 |
Reporter | BjarneBostrom | Assigned To | Matthias Damm | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Summary | 0006453: Call objectId parameter definition contradicts Part 3 definition of Methods (static vs. non-static) | ||||
Description | The current text of Part 3 section 4.7. https://reference.opcfoundation.org/v104/Core/docs/Part3/4.7/ says: " NOTE The owning Object or ObjectType is specified in the service call when invoking the Method. While Methods may affect the state of the owning Object, they have no explicit state of their own. In this sense, they are stateless. Methods can have a varying number of input arguments and return resultant arguments. Each Method is described by a Node of the Method NodeClass. This Node contains the metadata that identifies the Method’s arguments and describes its behaviour. Methods are invoked by using the Call Service defined in OPC 10000-4. Clients discover the Methods supported by a Server by browsing for the owning Objects References that identify their supported Methods. Part 4 section 5.11.2.2 on Parameters of the Call service says, for the objectId:
My (personal) interpretation of the spec is that a Method is either a static (owner is the TypeDefinition node, doesn't have a ModellingRule) or non-static (owner is the instatiated Object node, does have a ModellingRule), but not both. Assuming this interpretation is correct, then the part "NOTE The owning Object or ObjectType is specified in the service call when invoking the Method." plus "Clients discover the Methods supported by a Server by browsing for the owning Objects References that identify their supported Methods." would mean you can either use the ObjectType (for static) or Object (for non-static) as the objectId. Which would contradict the current wording, but would have made sense with the wordings of 1.01 versions of the Call parameters, which just said: Thus, I either: A) The wording on Part 3 must be updated to reflect that there is no longer a concept of "static" Methods or somehow how to determine which methods are as such that they are not allowed to be called from Object instance. For example, the has-ModellingRule-references could be the logic. This matters for code-generating utils, e.g. you might generate static methods to a different place since the instances of the generated class type could e.g. only use the non-static ones (e.g. static methods vs. non-static would be directly translateable to static vs. non-static methods e.g. in Java code). B) Revert Part 4 to the original 1.01 text. I assume this will not happen. Probably the change has been made in order to support some Nano Server profiles I would assume? Or servers that wont have a Types section. Also it is possible, that I have mistanken something plus I should mention that e.g. in Java it is technically possible to call a static method through an java-object-instance, but that in general is bad programming and would result in a compiler warning. | ||||
Tags | No tags attached. | ||||
Commit Version | |||||
Fix Due Date | |||||
|
Bjarne, Can you please provide more information what your essential complain/question is. (1) Two different MethodIds are possible when calling a Method on an Object (2) It is not clear if a static method can be called on an instance |
|
No feedback from reporter in over a year. |
|
Sorry, didn't note the need for feedback. Also it is some time since, thus hopefully this is now correct. For Matthias comments, not really either, but is a combination. Basically my interpretation of the specification text that I had problems is that one would no longer need to have HasComponent references from the instance nodes to the Method nodes and could simply use them based of the TypeDefinition. The reason for that is because the text (1.05.00, https://reference.opcfoundation.org/Core/Part4/5.11.2/, the objectId parameter): "...In case of an Object the Object or the ObjectType of the Object or a super type of that ObjectType shall be the source of a HasComponent Reference (or subtype of HasComponent Reference) to the Method specified in methodId. ..." is a conflict with the idea that Method node would have a ModellingRule. However, they must have a ModellingRule, because that is the only way to differentiate static vs. non-static methods. However, in turn, IF they do have the ModellingRule, then they are also already present in the instance via the HasComponent, thus there should not be a case where the HasComponent reference is not there AND the Method would have a ModellingRule. And if it doesn't have the ModellingRule, then it is static, thus it cannot be called for the instance by the very concept of it being a static method. Therefore, the text should simply just read: "...In case of an Object the Object shall be the source of a HasComponent Reference (or subtype of HasComponent Reference) to the Method specified in methodId. ..." Alternatively some new IsStatic Attribute could be introduced for Method nodes, that would remove the need to have a ModellingRule on them (or alternatively make a rule that ModellingRule works differently for Methods, but please no). |
|
We are not able to make the requested change. Otherwise it would no longer be allowed to used the MethodId from the Method on the Object Type. The definition may be complicated but it is technically correct and required as it is. |
|
Agreed to no change required in web meeting. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-02 12:53 | BjarneBostrom | New Issue | |
2021-03-01 13:46 | Matthias Damm | Assigned To | => Matthias Damm |
2021-03-01 13:46 | Matthias Damm | Status | new => feedback |
2021-03-01 13:46 | Matthias Damm | Note Added: 0013837 | |
2022-09-06 17:07 | Jim Luth | Status | feedback => resolved |
2022-09-06 17:07 | Jim Luth | Resolution | open => won't fix |
2022-09-06 17:07 | Jim Luth | Note Added: 0017528 | |
2022-09-07 13:30 | BjarneBostrom | Status | resolved => feedback |
2022-09-07 13:30 | BjarneBostrom | Resolution | won't fix => reopened |
2022-09-07 13:30 | BjarneBostrom | Note Added: 0017538 | |
2023-03-20 05:13 | Matthias Damm | Status | feedback => resolved |
2023-03-20 05:13 | Matthias Damm | Resolution | reopened => no change required |
2023-03-20 05:13 | Matthias Damm | Note Added: 0018904 | |
2023-03-28 15:27 | Jim Luth | Note Edited: 0018904 | |
2023-03-28 15:29 | Jim Luth | Status | resolved => closed |
2023-03-28 15:29 | Jim Luth | Note Added: 0019044 |