I face the following problem:
I want to send sensor data through OPC-UA.
Therefore, I implemented an object type that - amongst other - consists of a variable of the type UaByteArray.
The UaByteArray variable is supposed to hold the serialized sensor data (byte stream).
I am able to write byte streams of arbitrary length (up to a million bytes long) to this variable.
But when I now want to read this variable from a client, the read service waits and then sends me a BAD-Timeout Message:
Code: Select all
TimeOut for read: 60000
** Error: UaSession::read failed [ret=BadTimeout] *********
simple_opc_client: /home/fxm/Atlas/OPC-UA/sdk_64/include/uabase/uaarraytemplates.h:50:
T& UaStackTypeArray<T, fctClear>::operator[](OpcUa_UInt32) const
[with T = _OpcUa_DataValue, OpcUa_Void (* fctClear)(OpcUa_Void*) = ClearDataValue, OpcUa_UInt32 = unsigned int]:
Assertion `index<m_noOfElements' failed.
[1]+ Killed ./bin/simple_opc_client
Aborted
I already tried to increase the Timeout by setting a higher value for the serviceSettings. But same result.
I found out that writing byte streams of a total size of less than 65535 bytes works fine and instantly.
65536 is not working anymore.
It seems to me that at one point an array size is restricted to a size that is given with a uint16_t variable.
Is there such a restriction?
How can I send large amounts of data via OPC-UA? Is there some kind of a streaming functionality?
Best regards,
Felix Meßmer