3 Replies Latest reply on Nov 10, 2016 9:00 PM by Anatoly

    PiDataPipe.GetObserverEvents network timeout & exception handling

    Anatoly

      Hi All,

       

      I'm currently working on streaming real-time data from PI. Implementation itself is pretty common - get some pipoints, add subscriptions and then constantly call PiDataPipe.GetObserverEvents to get new events. I use AF SDK version 2.7.5

       

      What I found out recently is that if something goes wrong with network connection to PI server then two things happening

      • GetObserverEvents call waits 60 seconds before it gets timed-out (I assume it is normal since it makes some synchronous calls inside)
      • I don't get any errors after time-out is actually happened, neither as non-null AFErrors object nor as Runtime exception thrown by AF SDK

       

      Since GetObserverEvents is a very critical part of real-time data stream I'd expect any network errors to be returned either in the result as an AFErrors object or some timeout exception thrown by AF SDK but for some reason I don't see anything at the moment. Is there a way to track such errors every time they happen?

      And also a couple of related question:

      • How can I track PI client network connection state, is there some monitoring endpoints in API to do that?
      • How can I change GetObserverEvents call network timeout?

       

      Thanks in advance!