Monitor Data Item Queue

Questions regarding the use of the Java SDK for Server or Client development or integration into customer products ...

Moderator: uasdkjava

Post Reply
thawley
Jr. Member
Jr. Member
Posts: 1
Joined: 21 May 2013, 16:45

Monitor Data Item Queue

Post 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);

Post Reply