Key experimental categories or task state enumerations.
More...
|
enum | Mode {
MODE_STANDARD_PRACTICE = 0
, MODE_STANDARD_RECORDING = 1
, MODE_STIMULATION_PRACTICE = 2
, MODE_STIMULATION_RECORDING = 3
,
MODE_OTHER = 8
, MODE_UNKNOWN = 9
} |
| Enumerations for task modes. More...
|
|
enum | Orientation { ORIENT_MID = 0
, ORIENT_PRO = 1
, ORIENT_SUP = 2
, ORIENT_UNKNOWN = 9
} |
| Enumerations for orientations. More...
|
|
enum | Direction { DIRECTION_IN_TO_OUT = 0
, DIRECTION_OUT_TO_IN = 1
, DIRECTION_UNKNOWN = 2
} |
| Enumerations for indicating if center->out or out->center. More...
|
|
enum | Target {
TARGET_0300 = 0
, TARGET_0130 = 1
, TARGET_1200 = 2
, TARGET_1030 = 3
,
TARGET_0900 = 4
, TARGET_0730 = 5
, TARGET_0600 = 6
, TARGET_0430 = 7
,
TARGET_UNKNOWN = 9
} |
| Enumerations for indicating if center->out or out->center. More...
|
|
enum | State {
STATE_INTERTRIAL = 0
, STATE_T1_MOVE = 1
, STATE_T1_OVERSHOOT = 2
, STATE_T1_HOLD_1 = 3
,
STATE_T2_SHOW = 4
, STATE_T1_HOLD_2 = 5
, STATE_T1_REACT = 6
, STATE_T2_MOVE = 7
,
STATE_T2_HOLD_1 = 8
, STATE_REWARD = 9
, STATE_T2_HOLD_2 = 10
, STATE_T2_OVERSHOOT = 11
,
STATE_PAUSE = 12
, STATE_INIT = 13
, STATE_UNKNOWN = 14
} |
| Enumeration of states in the task. More...
|
|
enum | Transition {
TRANSITION_PAUSE = 0
, TRANSITION_REPEAT = 1
, TRANSITION_ADVANCE = 2
, TRANSITION_OVERSHOOT = 3
,
TRANSITION_FAIL = 4
, TRANSITION_RESUME = 5
, TRANSITION_INIT = 6
, TRANSITION_UNKNOWN = 9
} |
| Enumeration of state transitions. More...
|
|
enum | Command {
CMD_PAUSE_ENTER = 0
, CMD_PAUSE_EXIT = 1
, CMD_SHUTDOWN = 2
, CMD_LOGGING_ON = 3
,
CMD_LOGGING_OFF = 4
, CMD_NEW_SET = 5
, CMD_NEW_SESSION = 6
, CMD_RESET_CLOCK = 7
,
CMD_PING = 8
, CMD_CENTER = 9
, CMD_UNKNOWN = 99
} |
| Enumerations for task modes. More...
|
|
|
const char * | stateToString (State state) |
| Returns a string corresponding to a State enumeration.
|
|
State | stringToState (const char *value) |
| Converts a string representation of a state to its corresponding State enum value.
|
|
const char * | modeToString (Mode mode) |
| Returns a string corresponding to a Mode enumeration.
|
|
Mode | stringToMode (const char *value) |
| Converts a string representation of a mode to its corresponding Mode enum value.
|
|
const char * | orientationToString (Orientation orientation) |
| Returns a string corresponding to an Orientation enumeration.
|
|
Orientation | stringToOrientation (const char *value) |
| Converts a string representation of an orientation to its corresponding Orientation enum value.
|
|
const char * | directionToString (Direction direction) |
| Returns a string corresponding to a Direction enumeration.
|
|
Direction | stringToDirection (const char *value) |
| Converts a string representation of a direction to its corresponding Direction enum value.
|
|
const char * | targetToString (Target target) |
| Returns a string corresponding to a Target enumeration.
|
|
const char * | transitionToString (Transition transition) |
| Returns a string corresponding to a Transition enumeration.
|
|
Transition | stringToTransition (const char *value) |
| Converts a string representation of a transition to its corresponding Transition enum value.
|
|
Target | stringToTarget (const char *value) |
| Converts a string representation of a target to its corresponding Target enum value.
|
|
const char * | commandToString (Command command) |
| Returns a string corresponding to a Command enumeration.
|
|
Command | stringToCommand (const char *value) |
| Converts a string representation of a command to its corresponding Command enum value.
|
|
Key experimental categories or task state enumerations.
◆ Command
Enumerations for task modes.
Enumerator |
---|
CMD_PAUSE_ENTER | CMD_PAUSE_ENTER command puts the task into "idle" mode.
|
CMD_PAUSE_EXIT | CMD_PAUSE_EXIT command sets "idle" mode to false.
|
CMD_SHUTDOWN | CMD_SHUTDOWN command shuts down the state server.
|
CMD_LOGGING_ON | CMD_LOGGING_ON command turns on logging.
|
CMD_LOGGING_OFF | CMD_LOGGING_OFF command turns off logging.
|
CMD_NEW_SET | CMD_NEW_SET command indicates a new "set" of trials.
|
CMD_NEW_SESSION | CMD_NEW_SESSION command indicates a new session.
|
CMD_RESET_CLOCK | CMD_RESET_CLOCK command to reset the elapsed milliseconds on clock to zero.
|
CMD_PING | CMD_PING command to ping the server, to retrieve current state details.
|
CMD_CENTER | CMD_CENTER command to re-center calibration on current x/y voltages.
|
CMD_UNKNOWN | CMD_UNKNOWN indicates an unknown command was parsed.
|
◆ Direction
Enumerations for indicating if center->out or out->center.
Enumerator |
---|
DIRECTION_IN_TO_OUT | From center-to-outer target
|
DIRECTION_OUT_TO_IN | From outer-to-center target
|
DIRECTION_UNKNOWN | Unknown direction
|
◆ Mode
Enumerations for task modes.
Enumerator |
---|
MODE_STANDARD_PRACTICE | Practice mode
|
MODE_STANDARD_RECORDING | Recording mode
|
MODE_STIMULATION_PRACTICE | Stimulation-only
|
MODE_STIMULATION_RECORDING | Stimulation+Recording
|
MODE_OTHER | Placeholder for other type of recording
|
MODE_UNKNOWN | Debugging placeholder for unknown recording mode.
|
◆ Orientation
Enumerations for orientations.
Enumerator |
---|
ORIENT_MID | Mid orientation
|
ORIENT_PRO | Pro orientation
|
ORIENT_SUP | Sup orientation
|
ORIENT_UNKNOWN | Unknown orientation
|
◆ State
Enumeration of states in the task.
Enumerator |
---|
STATE_INTERTRIAL | Intertrial state.
|
STATE_T1_MOVE | Target 1 movement state.
|
STATE_T1_OVERSHOOT | Target 1 overshoot state.
|
STATE_T1_HOLD_1 | Target 1 hold 1 state.
|
STATE_T2_SHOW | Target 2 show state.
|
STATE_T1_HOLD_2 | Target 1 hold 2 state.
|
STATE_T1_REACT | Target 1 go state.
|
STATE_T2_MOVE | Target 2 movement state.
|
STATE_T2_HOLD_1 | Target 2 hold 1 state.
|
STATE_REWARD | Reward state.
|
STATE_T2_HOLD_2 | Target 2 hold 2 state.
|
STATE_T2_OVERSHOOT | Target 2 overshoot state.
|
STATE_PAUSE | Pause state.
|
STATE_INIT | Initialization state.
|
STATE_UNKNOWN | Unknown state.
|
◆ Target
Enumerations for indicating if center->out or out->center.
Enumerator |
---|
TARGET_0300 | 3:00 target
|
TARGET_0130 | 1:30 target
|
TARGET_1200 | 12:00 target
|
TARGET_1030 | 10:30 target
|
TARGET_0900 | 9:00 target
|
TARGET_0730 | 7:30 target
|
TARGET_0600 | 6:00 target
|
TARGET_0430 | 4:30 target
|
TARGET_UNKNOWN | Unknown target
|
◆ Transition
Enumeration of state transitions.
Enumerator |
---|
TRANSITION_PAUSE | Pause the state machine.
|
TRANSITION_REPEAT | Repeat the current state.
|
TRANSITION_ADVANCE | Advance to the next state.
|
TRANSITION_OVERSHOOT | Move to the OVERSHOOT state.
|
TRANSITION_FAIL | Fail, returning to T1_MOVE state.
|
TRANSITION_RESUME | Resume, returning to previous state from PAUSE.
|
TRANSITION_INIT | Only set upon initialization or reset of set index.
|
TRANSITION_UNKNOWN | Unknown transition.
|
◆ commandToString()
const char * commandToString |
( |
Command | command | ) |
|
Returns a string corresponding to a Command enumeration.
- Parameters
-
command | The Command enumeration value. |
- Returns
- A string corresponding to the enumerated Command.
◆ directionToString()
const char * directionToString |
( |
Direction | direction | ) |
|
Returns a string corresponding to a Direction enumeration.
- Parameters
-
direction | The Direction enumeration value. |
- Returns
- A string corresponding to the enumerated Direction.
◆ modeToString()
const char * modeToString |
( |
Mode | mode | ) |
|
Returns a string corresponding to a Mode enumeration.
- Parameters
-
mode | The Mode enumeration value. |
- Returns
- A string corresponding to the enumerated Mode.
◆ orientationToString()
const char * orientationToString |
( |
Orientation | orientation | ) |
|
Returns a string corresponding to an Orientation enumeration.
- Parameters
-
orientation | The Orientation enumeration value. |
- Returns
- A string corresponding to the enumerated Orientation.
◆ stateToString()
const char * stateToString |
( |
State | state | ) |
|
Returns a string corresponding to a State enumeration.
- Parameters
-
state | The state enumeration value. |
- Returns
- A string corresponding to the enumerated State.
◆ stringToCommand()
Command stringToCommand |
( |
const char * | value | ) |
|
Converts a string representation of a command to its corresponding Command enum value.
This function takes a string representing a command and returns the corresponding Command enum value. If the input string does not match any known command, it returns CMD_UNKNOWN.
- Parameters
-
value | The string representation of the command. |
- Returns
- The Command enum value corresponding to the input string, or CMD_UNKNOWN if no match is found.
◆ stringToDirection()
Direction stringToDirection |
( |
const char * | value | ) |
|
Converts a string representation of a direction to its corresponding Direction enum value.
- Parameters
-
value | The string representation of the direction. |
- Returns
- The Direction enum value corresponding to the input string, or UNKNOWN if no match is found.
◆ stringToMode()
Mode stringToMode |
( |
const char * | value | ) |
|
Converts a string representation of a mode to its corresponding Mode enum value.
- Parameters
-
value | The string representation of the mode. |
- Returns
- The Mode enum value corresponding to the input string, or UNKNOWN if no match is found.
◆ stringToOrientation()
Converts a string representation of an orientation to its corresponding Orientation enum value.
- Parameters
-
value | The string representation of the orientation. |
- Returns
- The Orientation enum value corresponding to the input string, or UNKNOWN if no match is found.
◆ stringToState()
State stringToState |
( |
const char * | value | ) |
|
Converts a string representation of a state to its corresponding State enum value.
- Parameters
-
value | The string representation of the state. |
- Returns
- The State enum value corresponding to the input string, or UNKNOWN if no match is found.
◆ stringToTarget()
Target stringToTarget |
( |
const char * | value | ) |
|
Converts a string representation of a target to its corresponding Target enum value.
- Parameters
-
value | The string representation of the target. |
- Returns
- The Target enum value corresponding to the input string, or UNKNOWN_TARGET if no match is found.
◆ stringToTransition()
Transition stringToTransition |
( |
const char * | value | ) |
|
Converts a string representation of a transition to its corresponding Transition enum value.
- Parameters
-
value | The string representation of the transition. |
- Returns
- The Transition enum value corresponding to the input string, or UNKNOWN_TRANSITION if no match is found.
◆ targetToString()
const char * targetToString |
( |
Target | target | ) |
|
Returns a string corresponding to a Target enumeration.
- Parameters
-
target | The Target enumeration value. |
- Returns
- A string corresponding to the enumerated Target.
◆ transitionToString()
const char * transitionToString |
( |
Transition | transition | ) |
|
Returns a string corresponding to a Transition enumeration.
- Parameters
-
transition | The Transition enumeration value. |
- Returns
- A string corresponding to the enumerated Transition.