Sets the value of a string property of the board.
Namespace:
Quanser.Hardware
Assembly:
Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub SetStringProperty ( _
property_code As Hil..::.StringProperty, _
value As String _
) |
JavaScript |
---|
function setStringProperty(property_code, value); |
Parameters
- property_code
- Type: Quanser.Hardware..::.Hil..::.StringProperty
The property number of the property to be set. For a list of the standard string properties refer
to the Hil..::.StringProperty enumeration. Boards may have custom properties as well.
Select a board type from the list for board-specific details:
.
- value
- Type: System..::.String
A string containing the value to which to set the specified property of the board.
Remarks
Examples
This sample illustrates how to use the
SetStringProperty(Hil..::.StringProperty, String) method.
It sets the value of a board-specific string property to "eth0".
C# | Copy Code |
---|
Hil.StringProperty property_code = Hil.StringProperty.ProductSpecific + 5
board.SetStringProperty(property_code, "eth0");
|
Visual Basic | Copy Code |
---|
Hil.StringProperty property_code = Hil.StringProperty.ProductSpecific + 5
board.SetStringProperty(property_code, "eth0")
|
Visual C++ | Copy Code |
---|
Hil::StringProperty property_code = Hil::StringProperty::ProductSpecific + (Hil::StringProperty) 5
board->SetStringProperty(property_code, L"eth0");
|
Exceptions
Exception | Condition |
---|
Quanser.Hardware..::.HilException |
If the property value cannot be set then an exception is thrown. This situtation
typically arises when the property is not supported by the board.
|
See Also