Skip to main content



      Home
Home » Archived » Eclipse SCADA » Synchronous HD Items and Values(Getting HD items and values without listeners.)
Synchronous HD Items and Values [message #1631599] Mon, 23 February 2015 17:01 Go to next message
Eclipse UserFriend
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 #1632867 is a reply to message #1631599] Tue, 24 February 2015 09:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

yes, right now listeners are the only way for Java. There still is the HTTP interface which is synchronous.

However it is pretty easy to make an asynchronous call synchronous by just waiting for the listener to notify the state change to complete.

Jens
Re: Synchronous HD Items and Values [message #1633230 is a reply to message #1632867] Tue, 24 February 2015 14:05 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Jen for the prompt reply - will try that!!!

Krishna
Re: Synchronous HD Items and Values [message #1633249 is a reply to message #1633230] Tue, 24 February 2015 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Jen,
I see that the query has an update state notification, is there a similiar one for item retreival. I would like to know when am done retreiving the items/tags. I am looking at ListItemListener and only see ListChanged?

Appreciate it,

Krishna
Re: Synchronous HD Items and Values [message #1634597 is a reply to message #1633249] Wed, 25 February 2015 05:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

you mean for DA items?

Jens

On 02/24/2015 08:22 PM, Krishna KK wrote:
> Jen,
> I see that the query has an update state notification, is there a
> similiar one for item retreival. I would like to know when am done
> retreiving the items/tags. I am looking at ListItemListener and only see
> ListChanged?
>
> Appreciate it,
>
> Krishna
Re: Synchronous HD Items and Values [message #1635040 is a reply to message #1634597] Wed, 25 February 2015 10:39 Go to previous message
Eclipse UserFriend
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
Previous Topic:Welcome to eclipse.scada
Next Topic:Test Server
Goto Forum:
  


Current Time: Fri Mar 21 03:42:34 EDT 2025

Powered by FUDForum. Page generated in 0.03637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top