opcua
opcua copied to clipboard
Argument encoding on methods is confusing
The generated node set code contanis code to encode InputArguments / OutputArguments data using ns=0;i=297 as directed. But that node id is Argument_Encoding_DefaultXml implying the encoding should be Xml when only binary encoding is supported by the implementation. i.e. the encoding is analogous to Argument_Encoding_DefaultBinary (ns=0;i=298).
The code might have to have a kludge Argument to encode as Xml for the benefit of the clients trying to read those values.
Some clients such as dataFEED OPC UA client still seem able to extract the Argument info. I can only assume they're looking at the variable's DataType to assume the value is binary and decode it as such even though the extension object says the encoding is XML.
Perhaps the solution is a kludge in the nodeset generating JS to substitute ns=0;i=297 for ns=0;i=298 during generation to ensure that the generated values are encoded consistent with the implementation's binary-only support.