beautypg.com

Echelon OpenLNS User Manual

Page 760

background image

OpenLNS Programmer's Reference

723

This event is also fired each time the state of your client’s

NetworkServiceDevice

changes from the online state to the

offline state, or vice versa. You could use this event to keep

track of when the NetworkServiceDevice

is offline, as polling

is suspended, and monitor and control events will not be

delivered to your application, while the NetworkServiceDevice

is in the offline state. You can also check the state of the

NetworkServiceDevice

by reading the State property of the

AppDevice object that represents the NetworkServiceDevice.

Syntax

OnSessionChangeEvent

(networkName, sessionState)

Element

Description

networkName

A String containing the name of the

network involved in the session.

sessionState

The current status of the xDriver

session, or of the Network Service

Device.
The values that can be returned as

this element are as follows (these

values are stored in the

ConstSessionStates constant):
0 lcaSessionStateClosed
The xDriver session has been closed.
1 lcaSessionStateConnecting
The connection to the RNI device

involved in the session has been

lost, and xDriver is attempting to

reconnect to the RNI.
If xDriver is able to reestablish the

connection, the event will be fired

again with the

lcaSessionStateEstablished (2)

value as the sessionState element.
If xDriver is not able to reestablish

the connection, the event will be

fired again with the

lcaSessionStateFailed (3) value

as the sessionState element.
2 lcaSessionStateEstablished
xDriver has successfully

reestablished connection to the RNI

device in the connection, after

communication with the device was

lost.
3 lcaSessionStateFailed
Connection between your

application and the RNI device has