LMS API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Initialization/deinitialization

Typedefs

typedef void lms_device_t
 LMS Device handle.
 
typedef char lms_info_str_t [256]
 Convenience type for fixed length LMS Device information string.
 

Functions

API_EXPORT int CALL_CONV LMS_GetDeviceList (lms_info_str_t *dev_list)
 
API_EXPORT int CALL_CONV LMS_Open (lms_device_t **device, const lms_info_str_t info, void *args)
 
API_EXPORT int CALL_CONV LMS_Close (lms_device_t *device)
 
API_EXPORT int CALL_CONV LMS_Disconnect (lms_device_t *device)
 
API_EXPORT bool CALL_CONV LMS_IsOpen (lms_device_t *device, int port)
 

Detailed Description

The functions in this section provide the ability to query available devices, initialize them, and deinitialize them.

Function Documentation

API_EXPORT int CALL_CONV LMS_Close ( lms_device_t device)

Close device

Postcondition
device is deallocated and may no longer be used.
Parameters
deviceDevice handle previously obtained by LMS_Open().
Returns
0 on success, (-1) on failure
API_EXPORT int CALL_CONV LMS_Disconnect ( lms_device_t device)

Disconnect device but keep configuration cache (device is not deallocated).

Parameters
deviceDevice handle previously obtained by LMS_Open().
Returns
0 on success, (-1) on failure
API_EXPORT int CALL_CONV LMS_GetDeviceList ( lms_info_str_t dev_list)

Obtain a list of LMS devices attached to the system

Parameters
[out]dev_listList of available devices
Returns
number of devices in the list on success, (-1) on failure
API_EXPORT bool CALL_CONV LMS_IsOpen ( lms_device_t device,
int  port 
)

Check if device port is opened

Parameters
deviceDevice handle previously obtained by LMS_Open().
portport index (ignored if device has only 1 port)
Returns
true(1) if port is open, false (0) if - closed
API_EXPORT int CALL_CONV LMS_Open ( lms_device_t **  device,
const lms_info_str_t  info,
void *  args 
)

Opens device specified by the provided lms_info_str_t string This function should be used to open a device based upon the results of LMS_GetDeviceList()

Precondition
device should be initialized to NULL
Parameters
[out]deviceUpdated with device handle on success
[in]infoDevice information string. If NULL, the first available device will be opened.
[in]argsadditional arguments. Can be NULL.
Returns
0 on success, (-1) on failure