Replies: 2 comments 4 replies
-
The codec isn't implemented correctly. If you look at the definition of |
Beta Was this translation helpful? Give feedback.
-
I've read the documentation, I also try to debug looking at the code, but I'm still in trouble, no way to me so far to understand what is wrong; I've changed the following:
And this is the way I registered the code in the dictionary: ` NodeId nodeId = new NodeId(6, 5121);
I cannot use the usaul format like in: because the namespaceTable I need having an index of 6 (otherwise the program complain that that encoding is missing). In the class JoiningProcessIdentificationDataType, i also have changed the type of JoiningProcessId from String to ByteString but still not working, How I can understand the right way of implementing the codec? What wrong with me? |
Beta Was this translation helpful? Give feedback.
-
Hi all, Kevin
I was able to call the method AbortJoiningProcess, I have writen the exactely argument, and store the codec;
But, when I call the method with UaExpert:
and have selected all of three field and put a value on all (field) like in figure, I can get a print of the value I have inserted.
If I just eliminate one filed as in figure:
and make a call, I get:
18:28:16.664 [milo-shared-thread-pool-9] ERROR o.e.m.e.m.opcua.ModeledNamespace - Uncaught Throwable invoking method handler for methodId=NodeId{ns=8, id=92}. org.eclipse.milo.opcua.stack.core.UaSerializationException: string length exceeds max message size (length=825372928, max=2097152) at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readLengthPrefixedString(OpcUaBinaryStreamDecoder.java:434) at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readString(OpcUaBinaryStreamDecoder.java:370) at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readString(OpcUaBinaryStreamDecoder.java:592) at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessIdentificationDataType$Codec.decode(JoiningProcessIdentificationDataType.java:92) at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessIdentificationDataType$Codec.decode(JoiningProcessIdentificationDataType.java:1) at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47) at org.eclipse.milo.opcua.stack.core.types.OpcUaDefaultBinaryEncoding.decode(OpcUaDefaultBinaryEncoding.java:117) at org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject.lambda$0(ExtensionObject.java:105) at org.eclipse.milo.opcua.stack.core.util.Lazy.maybeCompute(Lazy.java:50)
How that can be possible? It seams magic.
To get the decoded object I use:
where the class JoiningProcessIdentificationDataType is
`package org.eclipse.milo.opcua.stack.core.types.structured;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.eclipse.milo.opcua.stack.core.UaSerializationException;
import org.eclipse.milo.opcua.stack.core.serialization.SerializationContext;
import org.eclipse.milo.opcua.stack.core.serialization.UaDecoder;
import org.eclipse.milo.opcua.stack.core.serialization.UaEncoder;
import org.eclipse.milo.opcua.stack.core.serialization.UaStructure;
import org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
@EqualsAndHashCode(
callSuper = false
)
@SuperBuilder(
toBuilder = true
)
@tostring
public class JoiningProcessIdentificationDataType extends Structure implements UaStructure {
}
`
Beta Was this translation helpful? Give feedback.
All reactions