Ldv_open(), Ee ldv_open(), Syntax – Echelon OpenLDV User Manual
Page 32: Remarks

24
Using the OpenLDV API
along with other data, such as timestamp data, that could be useful for some
applications). See Application Buffer Structure on page 58 for a description of the
SICB and LdvEx formats.
This function returns LDV_OK if the SICB data could be located and returned.
If an LdvEx packet does not contain an SICB message, the error
LDV_NOT_FOUND is returned. If the packet is not well formed (for example,
too short), the error LDV_INVALID_DATA_FORMAT is returned.
This function accepts either LdvEx or SICB formatted messages. For an SICB
formatted message, this function returns a zero offset and a decoded length.
ldv_open()
Call this function to establish communications between your application and a
network interface. This function returns a unique handle that you can provide to
the other OpenLDV functions to identify this network session.
Syntax
LDVCode ldv_open(
LPCSTR id,
LdvHandle* handle
)
Table 12. ldv_open() Parameters
Parameter
Direction Description
id
Input
The network interface 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 receives a handle which you can
use to identify the network interface with the other
OpenLDV functions. This handle is valid only if the function
returns LDV_OK. Note that zero is a valid handle.
Remarks
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. To close the session with
the network interface, use the ldv_close() function.
Each successful ldv_open(), ldv_open_cap(), or ldvx_open() call (including
nested ones) must have a matching ldv_close() call.
For local network interfaces, after the ldv_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,