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
![image](https://private-user-images.githubusercontent.com/23223131/347901126-b732bf6a-81c0-4ca7-aa57-c148e112d631.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1MjQzNjAsIm5iZiI6MTcyMjUyNDA2MCwicGF0aCI6Ii8yMzIyMzEzMS8zNDc5MDExMjYtYjczMmJmNmEtODFjMC00Y2E3LWFhNTctYzE0OGUxMTJkNjMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAxVDE0NTQyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4NDlmYWUzMWZmZmQ3YzgxM2ZlNmZiNjgzM2VlZWZmODYyNzY3YzQ1YTYyNjk0OTgxZDBhNjMyOWQ0ZWY3YWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gBe4GD6h2wVKzwJPzSBNATcALo7RZO9d3_G6ZZ474Wc)
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:
![image](https://private-user-images.githubusercontent.com/23223131/347902665-f9b60083-8912-4437-926a-8d1f3eb14374.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1MjQzNjAsIm5iZiI6MTcyMjUyNDA2MCwicGF0aCI6Ii8yMzIyMzEzMS8zNDc5MDI2NjUtZjliNjAwODMtODkxMi00NDM3LTkyNmEtOGQxZjNlYjE0Mzc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAxVDE0NTQyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY3Yzc3OGJmOTYyZmQxNjNiNzkzOTY5YzJiODIzZjk3ZTRmMmMxNGZmY2Q2ZTNlMDYxNjQ0NWNmMzJjZjBkYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qa2yWN3kvl9fKnLGkBR4rvgkF19HcQ1G8o1ykIIYBjk)
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