Skip to Navigation

Reply to comment

4.2.1 - ListAll()

Returns all the devices found of a given DeviceType and ConnectionType. Currently only USB is supported.

ListAllS() is a special version where DeviceType and ConnectionType are strings rather than longs. This is useful for passing string constants in languages that cannot include the header file. The strings should contain the constant name as indicated in the header file (such as “LJ_dtU3” and ”LJ_ctUSB”). The declaration for the S version of open is the same as below except for (const char *pDeviceType, const char *pConnectionType, …).

Declaration:


LJ_ERROR _stdcall ListAll (  long DeviceType,
                             long ConnectionType,
                             long *pNumFound,
                             long *pSerialNumbers,
                             long *pIDs,
                             double *pAddresses)

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:

  • DeviceType – The type of LabJack to search for. Constants are in the labjackud.h file.
  • ConnectionType – Enter the constant for the type of connection to use in the search. Currently, only USB is supported for this function.
  • pSerialNumbers – Must pass a pointer to a buffer with at least 128 elements.
  • pIDs – Must pass a pointer to a buffer with at least 128 elements.
  • pAddresses – Must pass a pointer to a buffer with at least 128 elements.

Outputs:

  • pNumFound – Returns the number of devices found, and thus the number of valid elements in the return arrays.
  • pSerialNumbers – Array contains serial numbers of any found devices.
  • pIDs – Array contains local IDs of any found devices.
  • pAddresses – Array contains IP addresses of any found devices. The function DoubleToStringAddress() is useful to convert these to string notation.

tags:

Reply

Totally secret. Used only if you want to be notified of new comments.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br>
  • Lines and paragraphs break automatically.

More information about formatting options