#include <task.hpp>
Collaboration diagram for Task:
Public Member Functions | |
Task () | |
Constructor. | |
Task (int, const timespec &, const timespec &, const timespec &, const TimeInterval &) | |
Constructor. | |
Task (int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int) | |
Constructor. | |
Task (const Task &) | |
Copy constructor. | |
virtual | ~Task () |
Destructor. | |
virtual void | prepare () |
virtual void | run () |
virtual void | finish () |
int | getId () const |
Get the identifier of a task. | |
timespec | getWaitPrepareExecute () const |
Get the duration of time which will be waited between prepare and execute phase. | |
timespec | getWaitExecuteFinish () const |
Get the duration of time which will be waited between execute and finish phase. | |
timespec | getWaitFinishNextTask () const |
Get the duration of time which will be waited between finish phase and the start of the prepare phase of the next task. | |
const TimeInterval & | getReactionWindow () const |
Get the vector telling how a successful reaction should look like. | |
const vector< bool > & | getSuccessfulReaction () const |
Get the vector telling how a successful reaction should look like. | |
void | setReactionWindow (long int, long int, long int, long int) |
Set the duration of time in which a reaction may be valid. | |
void | setReactionWindow (const timespec &, const timespec &) |
Set the duration of time in which a reaction may be valid. | |
void | setReactionWindow (const TimeInterval &) |
Set the duration of time in which a reaction may be valid. | |
void | setWaitPrepareExecute (long int, long int) |
Set the duration of time which will be waited between prepare and execute phase. | |
void | setWaitExecuteFinish (long int, long int) |
Set the duration of time which will be waited between execute and finish phase. | |
void | setWaitFinishNextTask (long int, long int) |
Set the duration of time which will be waited until the next task enters preparation phase. | |
void | setWaitPrepareExecute (const timespec &) |
Set the duration of time which will be waited between prepare and execute phase. | |
void | setWaitExecuteFinish (const timespec &) |
Set the duration of time which will be waited between execute and finish phase. | |
void | setWaitFinishNextTask (const timespec &) |
Set the duration of time which will be waited until the next task enters preparation phase. | |
void | setSuccessfulReaction (const vector< bool > &) |
Set the vector of booleans telling how a successful reaction looks like. | |
Protected Attributes | |
int | id |
unique identifier | |
timespec | waitPrepareExecute |
wait time between preparation and execution phase | |
timespec | waitExecuteFinish |
wait time between execution and finish phase | |
timespec | waitFinishNextTask |
wait time between preparation and execution phase | |
TimeInterval | reactionWindow |
time in which a reaction is sucessful relative to end of execution phase | |
vector< bool > | successfulReaction |
vector of booleans which tell how a sucessful reaction should look like |
Tasks are used to present stimulus to test persons. Each task is divided in three phases, a prepare, execute and finish phase. In the prepare phase it is common to display a fixation cross on screen and prepare all things which will be shown on the screen in the execute phase. In the finish phase the screen is cleaned for the next task. The main task for the programmer of test is overwriting the prepare(), run() and finish() methods wit their own code to make a custom task. Furthermore three wait times must be defined. This are the delays between the phases and the wait time between the end of this task and the start of the next one. Finally a reaction window has to be defined. This is the time relative to the end of the execute phase in which the test person is supposed to react. How she/he is supposed is defined by a vector of booleans representing the desired pattern of user actions.
Definition at line 41 of file task.hpp.
|
Constructor. All wait times are set to 2 seconds and the task id is 0. Furthermore the vector telling how a successfull reaction looks like is empty. Definition at line 24 of file task.cpp. References setReactionWindow(), setWaitExecuteFinish(), setWaitFinishNextTask(), and setWaitPrepareExecute(). Here is the call graph for this function: ![]() |
|
Constructor.
References TimeInterval::getInterval(), reactionWindow, TimeInterval::setInterval(), setWaitExecuteFinish(), setWaitFinishNextTask(), and setWaitPrepareExecute(). Here is the call graph for this function: ![]() |
|
Constructor.
References setReactionWindow(), setWaitExecuteFinish(), setWaitFinishNextTask(), and setWaitPrepareExecute(). Here is the call graph for this function: ![]() |
|
Copy constructor. Definition at line 81 of file task.cpp. References id, reactionWindow, waitExecuteFinish, waitFinishNextTask, and waitPrepareExecute. |
|
Destructor. |
|
|
Get the identifier of a task.
Referenced by PtfCore::taskRegistrationHelper(). |
|
Get the vector telling how a successful reaction should look like.
References reactionWindow. |
|
Get the vector telling how a successful reaction should look like.
References successfulReaction. |
|
Get the duration of time which will be waited between execute and finish phase.
References waitExecuteFinish. |
|
Get the duration of time which will be waited between finish phase and the start of the prepare phase of the next task.
References waitFinishNextTask. |
|
Get the duration of time which will be waited between prepare and execute phase.
References waitPrepareExecute. |
|
|
|
Set the duration of time in which a reaction may be valid. This time is relative to the end of the execute phase.
References reactionWindow. |
|
Set the duration of time in which a reaction may be valid. This time is relative to the end of the execute phase.
References reactionWindow, and TimeInterval::setInterval(). Here is the call graph for this function: ![]() |
|
Set the duration of time in which a reaction may be valid. This time is relative to the end of the execute phase.
References reactionWindow, and TimeInterval::setInterval(). Referenced by Task(). Here is the call graph for this function: ![]() |
|
Set the vector of booleans telling how a successful reaction looks like.
References successfulReaction. |
|
Set the duration of time which will be waited between execute and finish phase.
References waitExecuteFinish. |
|
Set the duration of time which will be waited between execute and finish phase.
References waitExecuteFinish. Referenced by Task(). |
|
Set the duration of time which will be waited until the next task enters preparation phase.
References waitFinishNextTask. |
|
Set the duration of time which will be waited until the next task enters preparation phase.
References waitFinishNextTask. Referenced by Task(). |
|
Set the duration of time which will be waited between prepare and execute phase.
References waitPrepareExecute. |
|
Set the duration of time which will be waited between prepare and execute phase.
References waitPrepareExecute. Referenced by Task(). |
|
unique identifier Definition at line 70 of file task.hpp. Referenced by Task(). |
|
time in which a reaction is sucessful relative to end of execution phase Definition at line 74 of file task.hpp. Referenced by getReactionWindow(), setReactionWindow(), and Task(). |
|
vector of booleans which tell how a sucessful reaction should look like Definition at line 75 of file task.hpp. Referenced by getSuccessfulReaction(), and setSuccessfulReaction(). |
|
wait time between execution and finish phase Definition at line 72 of file task.hpp. Referenced by getWaitExecuteFinish(), setWaitExecuteFinish(), and Task(). |
|
wait time between preparation and execution phase Definition at line 73 of file task.hpp. Referenced by getWaitFinishNextTask(), setWaitFinishNextTask(), and Task(). |
|
wait time between preparation and execution phase Definition at line 71 of file task.hpp. Referenced by getWaitPrepareExecute(), setWaitPrepareExecute(), and Task(). |