Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Alive listener
February 8, 2016
14:02, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

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.

PRAMANJConfused

February 9, 2016
7:40, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

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.

February 9, 2016
11:16, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Ok. I think then monitoring the status of subscription will be better as it will also take care of server monitoring.
What is improtant is for me to indicate if communication between cleint and server is live.

February 9, 2016
11:56, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

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.

February 9, 2016
12:28, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Ok fine , I will use server status monitoring. All i want is something simple and just meets my requirement of indicating to my client if its working fine with server or not. I don’t want any thing more than that. I will use what ever is naturally provided.

regards
PRAMANJ

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1