Remarks – Echelon OpenLDV User Manual

Page 43

Advertising
background image

OpenLDV Programmer’s Guide

35

Table 20. ldvx_open() Parameters

Parameter

Direction Description

id

Input

The L

ON

W

ORKS

interface device with which to establish

communication. For example, “LON1” could be used to

identify a U10, PCLTA-10, or PCLTA-21 network interface.

Or, “X.Default.1MainStreet” could be used to identify a

SmartServer that will be opened through xDriver.

handle

Output

A pointer to a variable that you can use to identify the

network interface with the other OpenLDV functions. This

handle is valid only if the function returns LDV_OK.

hWnd

Input

The Windows handle for the session state change or

attachment notification messages, where available (for

example, from an xDriver device or a USB network

interface).
If NULL, no notification messages are sent.
See Windows Messages for Session Notifications on page 44.

tag

Input

Correlates notification messages with sessions. This tag is

supplied as the LPARAM parameter of all session state

change messages.

Remarks

This function is an extended version of the ldv_open() function that additionally

allows you to specify a Windows handle and tag for session state change or

attachment notificatgion messages. This function returns LDV_OK if the

network interface is successfully opened. In this case, the function also returns a

handle that you can use to identify the network interface with the other

OpenLDV functions. You can use the ldv_close() function to close the session

with the network interface.
For local network interfaces, after the ldvx_open() function returns the

LDV_OK success code, the network interface device has been initialized (see

below for information about remote network interfaces). For some network

interface types, the network interface enters an initial quiet mode (flush state)

after reset. To start using the network interface, the OpenLDV application must

cancel the flush state with the niFLUSH_CANCEL immediate network

interface command. For more information about immediate commands, see

Immediate Commands on page 77.
Each successful ldv_open(), ldv_open_cap(), or ldvx_open() call (including

nested ones) must have a matching ldv_close() call.
For xDriver-based remote network interfaces that use the default xDriver lookup

extension, the name specified as the id parameter must match an entry created

for a device with the L

ON

W

ORKS

Interfaces application in the Windows Control

Panel. See Chapter 5, Using the xDriver Default Profile, on page 93, for more

Advertising