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 _
)
C#
public void SetStringProperty(
	Hil..::.StringProperty property_code,
	string value
)
Visual C++
public:
void SetStringProperty(
	Hil..::.StringProperty property_code, 
	String^ value
)
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

The SetStringProperty method sets the value of a single string property of the board. String properties include quantities such as the manufacturer, product or model name, serial number, etc., but many of these properties are read-only and cannot be set. Typically only board-specific properties may actually be reconfigured. This method can only set the value of one string property.

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

ExceptionCondition
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