Page 1 of 1

Monitor Data Item Queue

Posted: 21 May 2013, 20:16
by thawley
I am currently attempting to set a sampling interval for a node on the OPC Server that is 250 ms, with a publish interval of 2500 ms. Whenever I add the MonitoredDataItem to the subscription, my queue size is reset to 1. Additionally, how is the queue accessible on event handlers? I cannot seem to access a queue, but I can access the queue size for an onDataChange event.

Code: Select all

MonitoredDataItem item = new MonitoredDataItem(nodeId, new UnsignedInteger(13), MonitoringMode.Reporting);
item.setSamplingInterval(SAMPLING_RATE);
item.setQueueSize(PUBLISHING_RATE / SAMPLING_RATE);
item.addChangeListener(dataChangeListener);
		
subscription.addItem(item);