Typical downlink scenario, Openldv programmer’s guide 103 – Echelon OpenLDV User Manual

Page 111

Advertising
background image

OpenLDV Programmer’s Guide

103

Call ObjectServer.open()

Does the network

exist?

Get the network from Local network collection

Add the network to the network collection

No

Call myNetwork.open()

Open System Object.

Set NetworkServiceDevice.NetworkInterface to desired xDriver

networkInterface e.g. “x.[profileName].[DownlinkLookupKey]”

Code ILdvxConfigure.SetInstance() to return S_OK

(This optional method is fired once in the lifetime of an Instance)

Code ILdvxConfigure.SetOptions() to return S_OK

(This optional method is fired once in the lifetime of an Instance)

Code ILdvxLookup.DownlinkLookup() to:

Call xSCO.GetDownlinkKey()

Do an external database query using the retrieved DownlinkKey

If (query Result = NULL) then

Exit by returning an appropriate COM error i.e. E_HANDLE

Else

Call xSCO.SetAuthenticationFlag([Recommended: True]|[False])

Call xSCO.SetCurrentAuthenticationKey([a])

Call xSCO.SetNextAuthenticationKey(a|b)

Define ILdvxSCO_TCPPtr pxSCO_TCP(pxSCO)

Call xSCO_TCP.SetRemoteTCPAddress("x.x.x.x")

Call xSCO_TCP.SetRemoteTCPPort(n)

return S_OK

Do Network and Monitoring Task(s)

If Not myNetwork.IsOpenIndependent Then Close System Object

If Not myNetwork.IsOpenIndependent Then myNetwork.close()

Else myNetwork.CloseIndependent()

Other networks to

open?

Call ObjectServer.close()

No

Define network to be opened

Typical Downlink Scenario

Open network in Local or

serverIndependant mode?

Local

Yes

Yes

Indp.

Get network from MyVNI network collection

Call myNetwork.OpenIndependent()

xD

riv

er

L

oo

ku

p

Ex

te

ns

io

n

C

om

po

ne

nt

xDriver Lookup Extension Component called.

Figure 15. Typical Downlink Session for LNS Server

Advertising