Skip to content
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

MethodState Call method does not assign output arguments when status Uncertain is returned #2896

Closed
2 of 5 tasks
larws opened this issue Dec 10, 2024 · 0 comments · Fixed by #2898
Closed
2 of 5 tasks

Comments

@larws
Copy link
Contributor

larws commented Dec 10, 2024

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

In case a method call returns any other status than Good the default implementation of MethodState will not assign the outputArguments values. This behavior is not conforming to the specification as defined in OPC Reference - Part 4 - StatusCodes. In the case of a return value of Uncertain the output arguments should get assigned as well, since the application specific return values need to be evaluated on the client side.

The cause can be found at: MethodState.cs - Line 709. This should also include Uncertain as a return value.

A related issue can be found at CustomNodeManager2 - Line 3088. Here should not a general Good be returned since the Uncertain case cannot be addressed this way.

Expected Behavior

The output arguments values should be assigned in the Uncertain case as well as for the Good case.

Steps To Reproduce

  1. Define a nodeset with a method call which returns values through the outputArguments
  2. Create a server with the nodes defined in the nodeset
  3. Issue a method call, assing the outputArguments and return StatusCode.Uncertain from that call as a return value.
  4. Expect the client to receive the output arguments if the StatusCode.Uncertain was returned.

Environment

- OS: win, linux
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

No response

mrsuciu pushed a commit that referenced this issue Dec 17, 2024
* #2896: Write output arguments for good and uncertain status code

When a method state's call method is invoked the output arguments should be written in case the status code is good or uncertain. This behavior would be conform with the current specification.

* #2896: The service result corresponds the method call result

The result of the Call method in the CustomNodeManager2 class represents the status of the CallMethodResult. It does not correspond to the ServiceResult of the CallResponse, thus returning Good as a general response is incorrect behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant