JSON Schema¶
State Machine¶
Definition of a Bpod finite-state machine.
https://raw.githubusercontent.com/int-brain-lab/bpod-core/main/.schema/statemachine.json |
||
type |
object |
|
properties |
||
|
State Machine Name |
|
The name of the state machine |
||
type |
string |
|
minLength |
1 |
|
default |
State Machine |
|
|
default |
|
|
default |
|
|
default |
|
|
default |
|
additionalProperties |
False |
|
Actions¶
A collection of actions.
type |
object |
|
additionalProperties |
The integer value of the output action |
|
type |
integer |
|
maximum |
255 |
|
minimum |
0 |
|
Condition¶
A condition in the state machine.
type |
object |
|
properties |
||
|
Channel |
|
The channel or global timer attached to the condition |
||
type |
string |
|
minLength |
1 |
|
|
Value |
|
The value of the condition channel if the condition is met |
||
type |
boolean |
|
additionalProperties |
False |
|
Conditions¶
A collection of conditions.
type |
object |
patternProperties |
|
|
|
additionalProperties |
False |
Global Counter¶
A global counter in the state machine.
type |
object |
|
properties |
||
|
Event |
|
A state machine event |
||
type |
string |
|
minLength |
1 |
|
|
Threshold |
|
The count threshold to generate an event |
||
type |
integer |
|
maximum |
4294967295 |
|
minimum |
0 |
|
additionalProperties |
False |
|
Global Counters¶
A collection of global counters.
type |
object |
patternProperties |
|
|
|
additionalProperties |
False |
Global Timer¶
A global timer in the state machine.
type |
object |
||
properties |
|||
|
Global Timer Duration |
||
The duration of the global timer in seconds |
|||
type |
number |
||
minimum |
0.0 |
||
|
Onset Delay |
||
The onset delay of the global timer in seconds |
|||
type |
number |
||
minimum |
0.0 |
||
default |
0.0 |
||
|
Channel |
||
default |
null |
||
anyOf |
Channel |
||
The channel affected by the global timer |
|||
type |
string |
||
minLength |
1 |
||
type |
null |
||
|
Channel Value |
||
The value a channel is set to |
|||
type |
integer |
||
maximum |
255 |
||
minimum |
0 |
||
default |
0 |
||
|
Channel Value |
||
The value a channel is set to |
|||
type |
integer |
||
maximum |
255 |
||
minimum |
0 |
||
default |
0 |
||
|
Send Events |
||
Whether the global timer is sending events |
|||
type |
boolean |
||
default |
True |
||
|
Loop Mode |
||
0 = off, 1 = loop until canceled or trial end, >1 = fixed number of iterations (max 255) |
|||
type |
integer |
||
maximum |
255 |
||
minimum |
0 |
||
default |
0 |
||
|
Loop Interval |
||
Delay in seconds between the end of a loop iteration and the start of the next |
|||
type |
number |
||
minimum |
0.0 |
||
default |
0.0 |
||
|
Onset Trigger |
||
An integer whose bits indicate other global timers to trigger |
|||
type |
integer |
||
minimum |
0 |
||
default |
0 |
||
additionalProperties |
False |
||
Global Timers¶
A collection of global timers.
type |
object |
patternProperties |
|
|
|
additionalProperties |
False |
State¶
A state in the state machine.
type |
object |
||
properties |
|||
|
State Timer |
||
The state’s timer in seconds |
|||
type |
number |
||
minimum |
0.0 |
||
default |
0.0 |
||
|
default |
||
|
default |
||
|
Comment |
||
default |
null |
||
anyOf |
Comment |
||
A comment describing the state. |
|||
type |
string |
||
type |
null |
||
additionalProperties |
False |
||
States¶
A collection of states.
type |
object |
patternProperties |
|
|
|
additionalProperties |
False |
State Transitions¶
A collection of state transitions.
type |
object |
||
additionalProperties |
anyOf |
State Name |
|
The name of the state |
|||
type |
string |
||
minLength |
1 |
||
pattern |
^(?!>)(?!exit$)(?!back$).+$ |
||
State Machine Operator |
|||
A state machine operator |
|||
type |
string |
||
examples |
>exit |
||
>back |
|||
minLength |
2 |
||
pattern |
^>.+$ |
||