hil_set_string_property
Sets the value of a string property of the board.
Description
The hil_set_string_property function sets the value of a string property of the board. There are currently no standard string properties defined that can be set. Typically only board-specific properties may actually be reconfigured.
Prototype
t_error hil_set_string_property(t_card card, const t_hil_string_property property_code, const char * buffer, size_t buffer_size);
Parameters
t_card card
A handle to the board, as returned by hil_open.
const t_hil_string_property properties
The number of the property to be set. There are currently no standard string properties defined that may be set.
Select a board type from the list for board-specific details: .
const char * buffer
A string containing the property value to be set for the board. The string should be null terminated, although the function will not copy more than buffer_size code units (bytes) from the buffer.
size_t buffer_size
The maximum number of code units (bytes) to copy from buffer.
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_STRING_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_error result = hil_set_string_property(board, PROPERTY_STRING_PRODUCT_SPECIFIC + 5, "DB8000", 7);
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.