FindNeoDevices Method - intrepidcs API
C/C++ declare - Parameters - Return Values - Remarks - C/C++ example

This method returns the neoVI hardware devices connected to the PC.

C/C++ Declare

int icsneoFindNeoDevices(unsigned long DeviceTypes,  NeoDevice *pNeoDevices, int *pNumberOfDevices);


Parameters

DeviceTypes
    [in] Specifies the types of neoVI devices to find. Currently supported values are:

NEODEVICE_FIRE          8  
NEODEVICE_VCAN3         16  
NEODEVICE_YELLOW        32  
NEODEVICE_ALL           65535

          These values are defined in the icsnVC40.h file.

You may use logical OR to choose which devices to look for or use NEODEVICE_ALL to specify all devices.

pNeoDevices
[out] This is the address of the first element of an array of NeoDevice structures (defined in icsnVC40.h). This array should big enough to hold 255 devices. You must specify the size of the pNeoDevices array in the pNumberOfDevices parameter. The number of devices found will be limited to the value of pNumberofDevices or 255, whichever is lower. Each returned NeoDevice structure will contain information for each device such as its type, device ‘handle’ and serial number.

pNumberOfDevices
    [in/out] In: Specifies the size of the pNeoDevices array. Must be in the range 0 to 255.
               Out: Specifies the number of neo devices that were found. This can be in the range 0 to 255.

Return Values

1 if the function succeeded. 0 if it failed for any reason. If the function succeeds but no devices are found 1 will still be returned and pNumberOfDevices will equal 0.

Remarks

The NeoDevice array elements that are returned with this function may be passed to OpenNeoDevice so that individual neoVI devices can be opened.


Example

C/C++ Example:

NeoDevice Devices[255];
unsigned long lDevTypes = NEODEVICE_VCAN3 | NEODEVICE_FIRE;
int iNumDevices = 255;
int iRetVal = 0;  

//Search for just ValueCAN3 and FIRE
iRetVal = icsneoFindNeoDevices(lDevTypes, Devices, &iNumDevices);

//Search for all supported neoVI types
iRetVal = icsneoFindNeoDevices(NEODEVICE_ALL, Devices, &iNumDevices);

 

intrepidcs API Documentation - (C) Copyright 1997-2020 Intrepid Control Systems, Inc.  (www.intrepidcs.com)

Last Updated : Tuesday, January 19, 2010