FindNeoDevices Method - intrepidcs API
C/C++ declare -
VB declare - VB.NET declare
- C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB example - VB.NET
example - C# example
This method returns the neoVI hardware devices connected to the PC.
int
_stdcall icsneoFindNeoDevices(unsigned long DeviceTypes, NeoDevice *pNeoDevices, int *pNumberOfDevices);Public
Declare Function icsneoFindNeoDevices Lib "icsneo40.dll" (ByVal DeviceTypes As Long, ByRef pNeoDevice As NeoDevice, ByRef pNumDevices As Long) As Long[DllImport("icsneo40.dll")]
DeviceTypes
[in] Specifies the types of neoVI devices to find. Currently supported
values are:
NEODEVICE_BLUE = 1
NEODEVICE_DW_VCAN = 4
NEODEVICE_FIRE = 8
NEODEVICE_VCAN3 = 16
NEODEVICE_YELLOW = 32
NEODEVICE_RED = 64
NEODEVICE_ECU = 128
NEODEVICE_IEVB = 256
NEODEVICE_PENDANT = 512
NEODEVICE_ALL = &HFFFFFFFF
Constants are defined in appropriate header or module.
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. 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.
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.
The NeoDevice array elements that are returned with
this function may be passed to OpenNeoDevice
so that
individual neoVI devices can be opened.
Examples
Dim lResult As Long '//Holds the results from function call
NeoDevice Devices[255];
unsigned long lDevTypes = NEODEVICE_BLUE | NEODEVICE_FIRE;
int iNumDevices = 255;
int iRetVal = 0;
'//Set the devices to look for
lDevTypes = NEODEVICE_BLUE +
NEODEVICE_FIRE
'//Set the number of devices to find
iNumberOfDevices = 1
'//Search for connected hardware
iResult = icsneoFindNeoDevices(lDevTypes, ndNeoToOpen, iNumberOfDevices)
If (iResult = 0)
Then MsgBox("Problem
finding devices")
| intrepidcs API Documentation - (C) Copyright 2000-2012 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Monday, August 15, 2011