hil_get_integer_property
Gets the value of integer properties of the board.
Description
The hil_get_integer_property function gets the values of a set of integer properties from the board. This function can retrieve the value of more than one integer property at the same time. Standard integer properties are listed in the table below. The board may also support product-specific integer properties.
Property |
Description |
---|---|
PROPERTY_INTEGER_VENDOR_ID |
The identifier of the vendor associated with the board. |
PROPERTY_INTEGER_PRODUCT_ID |
The product identifier of the board. |
PROPERTY_INTEGER_SUBVENDOR_ID |
The identifier of the subvendor associated with the board. |
PROPERTY_INTEGER_SUBPRODUCT_ID |
The subproduct identifier of the board. |
PROPERTY_INTEGER_MAJOR_VERSION |
The major version number of the board. For example, if the version is 2.7.1.9 then the major version is 2. |
PROPERTY_INTEGER_MINOR_VERSION |
The minor version number of the board. For example, if the version is 2.7.1.9 then the minor version is 7. |
PROPERTY_INTEGER_BUILD |
The build number of the board. For example, if the version is 2.7.1.9 then the build number is 1. |
PROPERTY_INTEGER_REVISION |
The revision number of the board. For example, if the version is 2.7.1.9 then the revision number is 9. |
PROPERTY_INTEGER_DATE |
The date the board was designed or manufactured in days since January 1, 2000. |
PROPERTY_INTEGER_TIME |
The time the board was designed or manufactured in milliseconds. |
Prototype
t_error hil_get_integer_property(t_card card, const t_hil_integer_property properties[], t_uint32 num_properties, 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 retrieved. See the table in the description of this function for the standard integer properties currently 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 for receiving the property values retrieved from the board. The array must contain num_properties elements. Each element in the returned buffer array will correspond to the same element in the properties array.
Return value
The return value is 0 if all the properties are retrieved 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_GET_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]; t_error result = hil_get_integer_property(board, properties, ARRAY_LENGTH(properties), buffer);
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.