Overview
An interface for linking events with user-defined actions. Many different types of events can be used to trigger callbacks (programs, Matlab functions). Ephus comes with a number of pre-defined user functions, some of which are required as integral components of programs (e.g. mapper-related user functions). The ability to link events with user functions provides a highly flexible way for users to customize Ephus for their own experimental needs.
For example, a typical usage would be to link the ephys:SamplesAcquired event to run a custom routine that analyzes the most-recently acquired trace, adding the result to an ongoing on-line analysis.
File>Open
n/a
Events
A list of available events, displayed in the form of <program>:<event>.
Note that some of these are directly I/O related, and some are not. For example, the hotswitch events are not, meaning that a hotswitch can be configured to launch a user-created program (but see note below regarding hotswitch events).
Hover the mouse over any event in order to see any arguments that will be passed to the event handler (callback).
Callbacks Panel
Shows the callbacks that are associated with the currently selected event in the Events panel. Note that the Enable checkbox applies to all events, not just the currently selected one. The Add pushbutton is used to select a userFcn file (a Matlab script or function with the *.m extension), which then appears in the listbox; the Delete function removes the entry.
Args
User-specified arguments for the selected userFcn, as a Matlab cell array.
Notes
When a hotswitch is newly configured (i.e. named and tied to a directory), an event is created that will fire whenever the hotswitch button is clicked. However, you may need to force the Events list to refresh, in order to display this newly created event. To do this, simply select any item in the Events list, other than the currently selected item. This will cause the list to refresh, and the new hotswitch event will appear.