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() _
) |
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
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
Exception | Condition |
---|
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