#include <SmarAct.h>
|
| MoveToHomeTask (CallbackType CallbackFunc) noexcept |
|
| TaskBase (CallbackType CallbackFunc=nullptr) noexcept |
| Constructs an instrument task.
|
|
virtual | ~TaskBase ()=0 |
| The destructor aborts a waiting task setting State to TaskState::Aborted. Then, it calls CallbackFunc with a default-constructed ExceptionContainer instance.
|
|
TaskState | GetState () const noexcept |
| Getter for the instrument task's current state.
|
|
bool | IsLocked () const noexcept |
| Determines whether the task is locked.
|
|
bool | IsAborting () const noexcept |
| Determines whether the task should abort. A derived task is encouraged to call this method before performing any action or in between the individual steps of a more complex action.
|
|
int | GetErrorCode () const noexcept |
| Getter for the error code related to an error possibly occurred while the task was executed.
|
|
void | Abort () |
| Requests the task to abort. There is no guarantee that the derived task does call IsAborting() to check whether it should abort. The task could have finished already or the implementation of RunChild() in the derived class does not allow for aborting.
|
|
Definition at line 77 of file SmarAct.h.
◆ MoveToHomeTask()
DynExpInstr::SmarActTasks::MoveToHomeTask::MoveToHomeTask |
( |
CallbackType |
CallbackFunc | ) |
|
|
inlinenoexcept |
◆ RunChild()
Runs the task. Override RunChild()
to define a derived task's action(s). Any exception leaving RunChild()
will terminate the instrument thread. In this case, the instrument has to be reset in order to restart it. For minor errors occurring in RunChild()
, return a TaskResultType
instance with TaskResultType::ErrorCode set to an appropriate (non-zero) value. This sets State to TaskState::Failed. Note that in this case there might be no way to retrieve the error if finished tasks are not kept (i.e. KeepFinishedTask()
returns false) and if no CallbackFunc has been set. RunChild()
is supposed to check the return value of IsAborting()
.
- Parameters
-
Instance | Handle to the instrument thread's data |
- Returns
- Returns true if task handling should continue, false if the instrument thread should terminate.
- Exceptions
-
Implements DynExp::TaskBase.
Definition at line 115 of file SmarAct.cpp.
The documentation for this class was generated from the following files: