I am creating an OPC UA server which connects to a remote device via proprietary RS232 serial communications. Communications with the device are sometimes slow and so I need to use an asynchronous read model. As previously advised, to deal with this asynchronous read scenario, I return null on the following read method:
Code: Select all
protected override DataValue Read(RequestContext context, NodeAttributeHandle nodeHandle, string indexRange, QualifiedName dataEncoding)
Code: Select all
protected override void Read(RequestContext context, TransactionHandle transaction, IList<NodeAttributeOperationHandle> operationHandles, IList<ReadValueId> settings)
Secondly, obviously there will quickly come a point where the serial communication bandwidth to the device is fully consumed. In this case, is there any way I can indicate to the SDK that I'm no longer able to read at the specified interval? Obviously, if the client creates a monitored item subscription to a few nodes and samples very frequently, this scenario can happen almost immediately. I end up with lots of Read calls which the device simply can't keep up with. So how can I deal with this? Am I obliged to invoke the callback for every read transaction handle?
Thanks, Lee