

14:02, EET

October 21, 2014

How do we know that server is dead i.e. when the OnAlive listener is not triggered at specified interval, we conclude that server is dead. But when its dead the onAlive is not triggered at all. So do we have to keep track of how long there is no response to conclude its dead? Or is there an event that tell there is no response for > some time say 20 secs or 30 secs.
PRAMANJ
7:40, EET

April 17, 2013

Hello,
So do we have to keep track of how long there is no response to conclude its dead? Or is there an event that tell there is no response for > some time say 20 secs or 30 secs.
If you want to monitor the status of subscription, see MySubscriptionAliveListener.onTimeout.
On the other hand, if you would like to monitor the status of the OPC UA server and not individual subscription, see MyServerStatusListener in the samples.
11:16, EET

October 21, 2014

11:56, EET

April 17, 2013

Hello,
To indicate that communication between client and server is live, the normal way in the SDK is to use the ServerStatusListener. In practice, the difference is that this will be more reliable and connection problems will be noticed quicker. Server status monitoring is done every statusCheckInterval. The default value of this statusCheckInterval is one second whereas noticing subscription timeouts takes MaxKeepAliveCount times PublishingInterval. Default value of MaxKeepAliveCount is 20 and for example with publishing interval of one second, that makes 20 seconds.
In principle, you can of course make a subscription with a small MaxKeepAliveCount and use that for server status monitoring. This however is more complicated than using the SDK default functionality and ServerStatusListener. You also most probably end up duplicating features already present in the SDK, such as automatic reconnecting.
Most Users Ever Online: 1919
Currently Online: Ronaldmaymn
31 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 810
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1541
Posts: 6504
Newest Members:
Henrybal, vincent.lin1970@gmail.com, JamesLiabe, DanielMaype, RobertPrire, VirCibre, semunah, StevenMot, elinorbalke7872, CharlesGUirmModerators: Jouni Aro: 1029, Pyry: 1, Petri: 0, Bjarne Boström: 1040, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1