Ildvxlookup interface, Downlinklookup method, Ildvxlookup – Echelon OpenLDV User Manual

Page 172: Syntax, Returns

Advertising
background image

164

Custom Lookup Extension Component Programming

ILdvxLookup Interface

The lookup interface is the primary interface implemented by an xDriver lookup

extension component. It defines the methods that are used to look up session

parameters in your xDriver database.

DownlinkLookup Method

Applies to: xDriver Lookup Extension Component
This method is called by xDriver when a downlink session is initiated. It is

passed a pointer to the xDriver Session Control Object (SCO) for the session. The

SCO contains the downlink lookup key to be looked up. This lookup key comes

from the network interface name of the RNI being opened. For example, in the

"X.Custom.Location-123" NetworkInterface name, the downlink key is "Location-

123".
It is the responsibility of the xDriver lookup extension to extract the downlink

lookup key from the SCO, use it to access its xDriver database, and retrieve the

authentication and TCP parameters to be used by the rest of the xDriver

framework. Then, the lookup extension component must fill in the corresponding

fields of the SCO, including the Authentication Flag, Current Authentication

Key, Next Authentication Key, Additional Downlink Packet Header (optional),

Additional Downlink Packet Trailer (optional), Encryption Type, Remote TCP

Address, and Remote TCP Port. This information is used by xDriver to complete

the session establishment.
The ILdvxSCO interface provides methods that you can use to obtain the

downlink lookup key and fill in the SCO fields. For more information, see

ILdvxSCO Interface on page 166.

Syntax

C++

STDMETHOD(DownlinkLookup)(ILdvxSCO * xSCO)

Visual Basic Sub DownlinkLookup(ByVal xSCO As LdvxLib.ILdvxSCO)

Table 45. DownlinkLookup Parameters

Parameter

Description

xSCO

Pointer to the SCO object that contains the downlink key to be looked

up. The DownlinkLookup implementation should fill the required

fields into the SCO.

Returns

Standard xDriver LdvxResult (HRESULT) describing the result of the call. The

result is typically LDVX_S_OK (see LdvxResult). If the specified downlink key

is not recognized, the lookup extension component must return the error code

Advertising