Synchronous HD Items and Values [message #1631599] |
Mon, 23 February 2015 17:01  |
Eclipse User |
|
|
|
Hello,
I have a scenario where we need to get the hd item tags and values synchronously rather using the listeners?
1. Are listeners the "only" way to get the data? If not, can you please provide the class or a sample that can be achieved synchronously. Any already existing tests would be grateful.
2. I am following your HMI HD Client and trying to see if you already have something like this.
Thanks for the great project!!!
krishna
|
|
|
|
|
|
|
Re: Synchronous HD Items and Values [message #1635040 is a reply to message #1634597] |
Wed, 25 February 2015 10:39  |
Eclipse User |
|
|
|
Jen,
Sorry, I meant HD items. Here is the code that am referring to:
import org.eclipse.scada.hd.ItemListListener;
import org.eclipse.scada.hd.client.Connection;
import org.eclipse.scada.hd.data.HistoricalItemInformation;
public class ItemListObserver implements ItemListListener
{
private final Map<String, HistoricalItemInformation> items = new HashMap<String, HistoricalItemInformation> ();
public ItemListObserver ( final Connection connection)
{
synchronized ( this )
{
connection.addListListener ( this );
}
}
@Override
public void listChanged ( final Set<HistoricalItemInformation> addedOrModified, final Set<String> removed, final boolean full )
{
handleUpdate ( addedOrModified, removed, full );
}
Is there a way for me to find if the retrieval is complete in the ItemListListener or should I be using a different approach?
Appreciate your help,
Regards,
Krishna
|
|
|
Powered by
FUDForum. Page generated in 0.03637 seconds