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
Member
Members
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
Member
Members
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: 1919

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1