BpodSystem.Status
BpodSystem.Status
Description
BpodSystem.Status is a struct populated with system status variables. Most subfields are used internally by the GUI.
BpodSystem.Status.BeingUsed indicates whether a behavior session is running.
BeingUsed is set to 1 when:
A state machine is run using RunStateMachine() or BpodTrialManager
A session is started with RunProtocol() or the Launch Manager
BeingUsed is set to 0 when:
The 'Stop' or 'Pause' buttons are pressed on the Bpod Console GUI
The session is stopped with RunProtocol('Stop')
Example
% 1. When the user ends the session, this code calls a user-defined cleanup function before exiting
if BpodSystem.Status.BeingUsed == 0
MyCleanupFunction;
return
end