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

Writing Complex Types #2826

Open
2 of 5 tasks
KircMax opened this issue Oct 30, 2024 · 0 comments
Open
2 of 5 tasks

Writing Complex Types #2826

KircMax opened this issue Oct 30, 2024 · 0 comments

Comments

@KircMax
Copy link
Contributor

KircMax commented Oct 30, 2024

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

I have some issues with writing some complex types:
The most simple write that failed that I found now was this one:
image
The node looks like this:
image
The read worked fine.
AdditionalInfo of InnerResult:

Cannot encode bodies of type 'Opc.Ua.ComplexTypes..10.IEC_COUNTER' in ExtensionObject unless the NamespaceUri (http://asm_dynamicarray/) is in the encoder's NamespaceTable.
--- bei Opc.Ua.BinaryEncoder.WriteExtensionObject(String fieldName, ExtensionObject value)
--- bei Opc.Ua.BinaryEncoder.WriteExtensionObjectArray(String fieldName, IList1 values) --- bei Opc.Ua.BinaryEncoder.WriteVariantValue(String fieldName, Variant value) --- bei Opc.Ua.BinaryEncoder.WriteVariant(String fieldName, Variant value) --- bei Opc.Ua.BinaryEncoder.WriteDataValue(String fieldName, DataValue value) --- bei Opc.Ua.WriteValue.Encode(IEncoder encoder) --- bei Opc.Ua.BinaryEncoder.WriteEncodeable(String fieldName, IEncodeable value, Type systemType) --- bei Opc.Ua.BinaryEncoder.WriteEncodeableArray(String fieldName, IList1 values, Type systemType)
--- bei Opc.Ua.WriteRequest.Encode(IEncoder encoder)
--- bei Opc.Ua.BinaryEncoder.WriteEncodeable(String fieldName, IEncodeable value, Type systemType)
--- bei Opc.Ua.BinaryEncoder.EncodeMessage(IEncodeable message)
--- bei Opc.Ua.BinaryEncoder.EncodeMessage(IEncodeable message, Stream stream, IServiceMessageContext context, Boolean leaveOpen)
--- bei Opc.Ua.Bindings.UaSCUaBinaryChannel.WriteSymmetricMessage(UInt32 messageType, UInt32 requestId, ChannelToken token, Object messageBody, Boolean isRequest, Boolean& limitsExceeded)
--- bei Opc.Ua.Bindings.UaSCUaBinaryClientChannel.SendRequest(WriteOperation operation, Int32 timeout, IServiceRequest request)

Result | {BadEncodingError 'Could not send request to server.'} | Opc.Ua.ServiceResult

bei Opc.Ua.Bindings.ChannelAsyncOperation`1.End(Int32 timeout, Boolean throwOnError) in Opc.Ua.Bindings\ChannelAsyncOperation.cs: Zeile218

bei Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result) in Opc.Ua.Bindings\UaSCUaBinaryClientChannel.cs: Zeile280
bei Opc.Ua.SessionClient.Write(RequestHeader requestHeader, WriteValueCollection nodesToWrite, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos) in Opc.Ua\SessionClient.cs: Zeile1373
bei Opc.Ua.SessionClientBatched.Write(RequestHeader requestHeader, WriteValueCollection nodesToWrite, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos) in Opc.Ua\SessionClientBatched.cs: Zeile472

Expected Behavior

Sending the WriteRequest works fine

Steps To Reproduce

I probably will have to provide a repro in a sample server/client combination, right?

Environment

- OS: Windows 10 22H2 Build 19045.5011
- Environment: Windows 10
- Runtime: 
- Nuget Version: 1.5.374.126
- Component: Opc.Ua.BinaryEncoder
- Server: S7-1500
- Client: SessionClientBatched (Opc.Ua)

Anything else?

No response

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

No branches or pull requests

1 participant