You can use the following functions to establish communication with DLN series adapters, identify them using ID and serial numbers, and obtain version information for all components involved in the communication.
The DlnConnect()
function establishes the connection to the DLN server.
The DlnDisconnect()
function closes the connection to the specified DLN server.
The DlnDisconnectAll()
function closes connections to all servers at once.
The DlnGetDeviceCount()
function retrieves the total number of DLN devices available. If connection is established with several DLN servers, this function will return the total number of DLN adapters, connected to all servers.
The DlnOpenDevice()
function opens the specified device. This function uses an index number of the device. This number is randomly system-assigned to each connected device. It cannot be used to identify the device. If you need to open a specific device, use the DlnOpenDeviceBySn() or DlnOpenDeviceById() functions.
The DlnOpenDeviceById()
function opens the device defined by its ID number.
The DlnOpenDeviceBySn()
function opens the device defined by its serial number. A device serial number is factory-assigned and cannot be changed.
The DlnOpenDeviceByHwType()
function opens the DLN-series device defined by its type.
The DlnOpenUsbDevice()
function opens the device connected to the USB port of local PC. Use this function if your application is intended to work with single device. It cannot be used to select the specific device when multiple devices are connected. If you need to open a specific device, use the DlnOpenUsbDeviceBySn() or DlnOpenUsbDeviceById() functions.
The DlnOpenUsbDeviceById()
function opens the device, connected to the USB bus of the local computer, with ID number equal to the value passed in the id
parameter.
The DlnOpenUsbDeviceBySn()
function opens the device, connected to the USB bus of the local computer, with serial number equal to the value passed in the sn
parameter. A device serial number is factory-assigned and cannot be changed.
The DlnOpenUsbDeviceByHwType()
function opens the DLN-series device, connected to the USB bus of the local computer, defined by its type.
The DlnCloseHandle()
function closes the handle to an opened DLN-series adapter (stream).
The DlnCloseAllHandles()
function closes handles to all opened DLN-series adapters and streams.
The DlnGetVersion()
function retrieves the following data about the DLN-series adapter:
Hardware type - the type of the device (for example, DLN-4M).
Hardware version - the version of the hardware, used in the device.
Firmware version - the version of the firmware, installed in the device.
Server version - the version of the server.
Library version - the version of the DLN-library.
The DlnGetHardwareType()
function determines the type of the connected DLN device.
The DlnGetDeviceId()
function retrieves the device ID number.
The DlnSetDeviceId()
function sets a new ID number to the DLN-series adapter.
The DlnGetDeviceSn()
function retrieves the device serial number. A serial number is factory-assigned and cannot be changed.
The DlnGetPinCfg()
function retrieves the current configuration of the specified pin of the DLN adapter.
The DlnRegisterNotification()
function registers notification settings.
The DlnUnregisterNotification()
function unregisters notification settings.
The DlnGetMessage()
function retrieves a message (response or event) sent by the device.
The DlnSendMessage()
function sends a specified message (an asynchronous command) to the device.
The DlnTransaction()
function sends a synchronous command, waits for a response and returns the response details.
The DlnRestart()
function restarts the currently opened DLN-series device by its handle.
The DlnGetCommandRestriction()
function retrieves the command restrictions under the current conditions. This allows to avoid errors when executing functions. For details, read Specific Command Restrictions.