Table of Contents
hil_task_delete_all
Deletes all tasks associated with a card.
Description
The hil_task_delete_all function deletes all tasks that are associated with the given card. Any tasks that are running, will be stopped prior to being deleted. All task handles associated with the card become invalid and may no longer be used.
Prototype
t_error hil_task_delete_all(t_card card);
Parameters
t_card card
A handle to the board, as returned by hil_open.
Return value
The return value is the number of tasks that were deleted successfully. This
number may be less than the number of tasks if not all tasks could be
deleted successfully. A negative error code may also be returned if the function
is not supported or the card handle is invalid.
Error codes are
defined in quanser_errors.h
. A suitable error message
may be retrieved using
msg_get_error_message.
Error codes
QERR_HIL_TASK_DELETE_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.
Requirements
Include Files |
Libraries |
---|---|
hil.h |
hil.lib;quanser_runtime.lib;quanser_common.lib |
Examples
try { /* Create multiple tasks */ ... } catch (...) { hil_task_delete_all(board); }
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.