Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 22:01 Go to next message
Krishna KK is currently offline Krishna KKFriend
Messages: 6
Registered: February 2015
Junior Member
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 14:32 Go to previous messageGo to next message
Jens Reimann is currently offline Jens ReimannFriend
Messages: 29
Registered: June 2013
Junior Member
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 19:05 Go to previous messageGo to next message
Krishna KK is currently offline Krishna KKFriend
Messages: 6
Registered: February 2015
Junior Member
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 19:22 Go to previous messageGo to next message
Krishna KK is currently offline Krishna KKFriend
Messages: 6
Registered: February 2015
Junior Member
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 10:52 Go to previous messageGo to next message
Jens Reimann is currently offline Jens ReimannFriend
Messages: 29
Registered: June 2013
Junior Member
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 15:39 Go to previous message
Krishna KK is currently offline Krishna KKFriend
Messages: 6
Registered: February 2015
Junior Member
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: Wed Apr 24 17:30:56 GMT 2024

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

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

Back to the top