GetDeviceParameters Method - intrepidcs API
C/C++ declare -
VB.NET declare - C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB.NET example - C# example
This method reads individual neoVI device
parameters.
C/C++ Declare
int _stdcall icsneoGetDeviceParameters(void * hObject, char *pParameters, char *pValues, short ValuesLength);
[DllImport("icsneo40.dll")]
Public Declare Function icsneoGetDeviceParameters Lib "icsneo40.dll" (ByVal hObject As IntPtr, ByRef pParameters As Byte, ByRef pValues As Byte, ByVal ValuesLength As short) As Integer
hObject
[in] Specifies the driver object created by OpenNeoDevice.
pParameters
[in] This is an array containing parameter names.
Each parameter is separated by a comma. The parameter names are matched without regard
to case. All spaces are ignored. The size of this array must be 1024 bytes or
less. The format of the array is:
ParameterName,ParameterName, , . . .
See Valid
Parameters for a list of parameter names for each device and supported
network.
See examples below on how to build a
parameter string.
pValues
[out] This array will contain the values requested in the
pParameters array. The values will be separated by comma's and in the order of
the parameter names specified in the pParameters array. If a parameter name is
not recognized the word "Error" will be placed in that value's
location. If the pValues array length (specified by the ValuesLength parameter)
is not long enough to store all of the values, the retrieval of parameter values
will end and only a portion of the values will have be read and stored. The
return value of the function, if greater than 0, will indicate the number of
values read.
-1 if there
was an error while reading parameter values from the device. A return value
greater than 0 indicates the total number of parameters read. A return value of
0 indicates that ValueLength was greater than 1024. GetLastAPIError
must be called to obtain the specific error. The errors that can be generated by
this function are:
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
It is ineffecient to use this function to read one parameter value at a time. If multiple parameters need to be read, combine them into a long string and call this function once.
Examples
C/C++ Example
char
pGetFireParms[] = "network_enables,can1/Mode,can1/Baudrate";
char Values[500];
int iRetVal;
iRetVal = icsneoGetDeviceParameters(hObject, pGetFireParms, Values, 499);
Visual Basic .NET Example
C# Example
IntrepidCS API Documentation - (C) Copyright 2000-2022 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Monday, April 27, 2020