Sets the value of integer properties of the board.

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

Syntax

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

Parameters

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

An array containing the property numbers of the properties to be set. 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 of the property values to be set for 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 SetIntegerProperty method sets 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., but many of these properties are read-only and cannot be set. Typically, only board-specific properties may actually be reconfigured. For a list of the standard integer properties refer to the Hil..::.IntegerProperty enumeration. Boards may have custom properties as well. This method can set the value of more than one integer property at the same time.

Examples

This sample illustrates how to use the SetIntegerProperty(array<Hil..::.IntegerProperty>[]()[], array<Int32>[]()[]) method. It sets the value of a board-specific integer property to 0x1234.
C# Copy Code
Hil.IntegerProperty [] properties = { Hil.IntegerProperty.ProductSpecific + 5 };
int [] values = { 0x1234 };

board.SetIntegerProperty(properties, values);
Visual Basic Copy Code
Dim properties() As Hil.IntegerProperty = {Hil.IntegerProperty.ProductSpecific + 5}
Dim values() As Integer = { &H1234 }

board.SetIntegerProperty(properties, values)
Visual C++ Copy Code
array<Hil::IntegerProperty>^ properties = { Hil::IntegerProperty::ProductSpecific + (Hil::IntegerProperty) 5 };
array<int>^ values = { 0x1234 };

board->SetIntegerProperty(properties, values);

Exceptions

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

See Also