Marwen Gharsalli
Marwen Gharsalli

Reputation: 9

OPC UA Milo custom Data Type Structure no codec?

I tried the example to read a Custom DataType variable value which is defined in another cpp opcua-server, but I still get no codec registered for encodingId=NodeId{ns=1, id=5554}. Shall the codecs registration (registerCustomCodec() function) be on the client or server side?

In my client, I set up the dataTypeId and the binaryEncodeingId accordingly:

ExpandedNodeId TYPE_ID = new ExpandedNodeId(
        UShort.valueOf(2), "mvn.mvn.de", 5552, UInteger.MIN);
ExpandedNodeId BINARY_ENCODING_ID = new ExpandedNodeId(
        UShort.valueOf(2), "mvn.mvn.de", 5554, UInteger.MIN);    
NodeId dataTypeId = TYPE_ID.toNodeId(client.getNamespaceTable())
        .orElseThrow(() -> new IllegalStateException("namespace not found"));
NodeId binaryEncodingId = BINARY_ENCODING_ID.toNodeId(client.getNamespaceTable())
        .orElseThrow(() -> new IllegalStateException("namespace not found"));

The namespaces URI & Index are the same for the cpp OPC UA server.
Do I miss something?

Upvotes: 0

Views: 270

Answers (0)

Related Questions