Gets the values of integer properties of the board.

Namespace:  Quanser.Hardware
Assembly:  Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)

Syntax

Visual Basic (Declaration)
Public Sub GetIntegerProperty ( _
	properties As Hil..::.IntegerProperty(), _
	values As Integer() _
)
C#
public void GetIntegerProperty(
	Hil..::.IntegerProperty[] properties,
	int[] values
)
Visual C++
public:
void GetIntegerProperty(
	array<Hil..::.IntegerProperty>^ properties, 
	array<int>^ values
)
JavaScript
function getIntegerProperty(properties, values);

Parameters

properties
Type: array< Quanser.Hardware..::.Hil..::.IntegerProperty >[]()[]

An array containing the property numbers of the properties to be retrieved. For a list of the standard integer properties refer to the Hil..::.IntegerProperty enumeration. Boards may have custom properties as well.

Select a board type from the list for board-specific details: .

values
Type: array< System..::.Int32 >[]()[]
An array for receiving the property values retrieved from the board. Each element in the values array corresponds to the same element in the properties array. Hence, there must be as many elements in the values array as there are properties.

Remarks

The GetIntegerProperty method gets the values of a set of integer properties from the board. Integer properties include quantities such as the vendor ID, product or device ID, etc. For a list of the standard integer properties refer to the Hil..::.IntegerProperty enumeration. Boards may have custom properties as well. This method can retrieve the value of more than one integer property at the same time.

Examples

This sample illustrates how to use the GetIntegerProperty(array<Hil..::.IntegerProperty>[]()[], array<Int32>[]()[]) method. It reads the product/device ID of the board.
C# Copy Code
Hil.IntegerProperty [] properties = { Hil.IntegerProperty.ProductId };
int [] values = new int [properties.Length];

board.GetIntegerProperty(properties, values);
Console.WriteLine("Product ID: " + values[0]);
Visual Basic Copy Code
Dim properties() As Hil.IntegerProperty = {Hil.IntegerProperty.ProductId}
Dim values(properties.Length - 1) As Integer

board.GetIntegerProperty(properties, values)
Console.WriteLine("Product ID: " & values(0))
Visual C++ Copy Code
array<Hil::IntegerProperty>^ properties = { Hil::IntegerProperty::ProductId };
array<int>^ values = gcnew array<int>(properties->Length);

board->GetIntegerProperty(properties, values);
Console::WriteLine(L"Product ID: " + values[0]);

Exceptions

ExceptionCondition
Quanser.Hardware..::.HilException If the property values cannot be retrieved then an exception is thrown. This situtation typically arises when one of the properties is not supported by the board.

See Also