hil_set_integer_property hil_set_string_property navigation bar

Table of Contents

hil_set_integer_property

Sets the value of integer properties of the board.

Description

The hil_set_integer_property function sets the values of a set of integer properties of the board. There are currently no standard integer properties defined. Typically only board-specific properties may actually be reconfigured. This function can set the value of more than one integer property at the same time.

Prototype

t_error
hil_set_integer_property(t_card card, const t_hil_integer_property properties[], t_uint32 num_properties, const t_int buffer[]);
    

Parameters

t_card card

A handle to the board, as returned by hil_open.

const t_hil_integer_property [] properties

An array containing the property numbers of the properties to be set. There are currently no standard integer properties defined.

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

t_uint32 num_properties

The number of properties specified in the properties array.

t_int [] buffer

An array of the property values to be set for the board. The array must contain num_properties elements. Each element in the buffer array corresponds to the same element in the properties array.

Return value

The return value is 0 if all the properties are set successfully. Otherwise a negative error code is returned. Error codes are defined in quanser_errors.h. A suitable error message may be retrieved using msg_get_error_message.

Error codes

QERR_HIL_SET_INTEGER_PROPERTY_NOT_SUPPORTED

This function is not supported by the board-specific HIL driver for this board type.

QERR_INVALID_CARD_HANDLE

An invalid card handle was passed as an argument. Once a card has been closed using hil_close the card handle is invalid.

QERR_MISSING_PROPERTIES

No properties were specified even though the number of properties is nonzero.

QERR_MISSING_PROPERTIES_BUFFER

Properties have been specified but no values have been provided for the operation.

QERR_PROPERTY_NOT_RECOGNIZED

One or more of the specified properties were not recognized by the board-specific driver.

QERR_DRIVER_INCOMPATIBLE_WITH_BOARD_DLL

The board-specific HIL driver passed an invalid parameter to the operating system specific kernel-level driver for the board. The board-specific HIL driver is likely not compatible with the operating system specific kernel-level driver for the board. Make sure both are up-to-date and compatible versions.

QERR_INTERNAL_BUFFER_TOO_SMALL

The board-specific HIL driver used an internal buffer that was too small for the operating system specific kernel-level driver for the board. The board-specific HIL driver is likely not compatible with the operating system specific kernel-level driver for the board. Make sure both are up-to-date and compatible versions.

QERR_OUT_OF_REQUIRED_SYSTEM_RESOURCES

There are not enough system resources to perform the requested operation. Try rebooting, requesting fewer samples, or adding more memory to your machine.

Requirements

Include Files

Libraries

hil.h

hil.lib;quanser_runtime.lib;quanser_common.lib

Examples

t_hil_integer_property properties[] = { PROPERTY_INTEGER_PRODUCT_SPECIFIC + 5 };
t_int buffer[1] = { 1024 };
t_error result = hil_set_integer_property(board, properties, ARRAY_LENGTH(properties), buffer);
    

 

navigation bar