Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Clearing PIDataPipe

$
0
0

All,

 

I'm writing a polling service that initialises a PIDataPipe:

 
 
_eventPipe = new PIDataPipe(AFDataPipeType.Snapshot);
 _eventPipe.AddSignups(pointList);

 

 

Then every x seconds does this:

 

AFListResults<PIPoint, AFDataPipeEvent> events = _eventPipe.GetUpdateEvents(1000);

 

Lets say that my server is generating 2000 events every second, and I'm polling and getting 1000 events every second.

 

Does this mean that:

 

1 - On my first read after a second I get 1000 of the 2000 events generated in that second

2 - On my read after 2 seconds, I get the other 1000 events from the 1st second interval?

 

Or, does my first GetUpdateEvents clear the other 1000 events I didn't read so that when I read again after 2 seconds I'm getting new events rather than ones left over?

 

If it is the first case, is there a method to clear the pipe so I could do :

 

1 - Read 1000 events after a seond

2 - Clear the pipe

3 - Read 100 new events after 2 seonds

 

etc..

 

Couldn't see an obvious method in the SDK...

 

Sam R


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>