Plugins

From Bcontrol
Revision as of 21:38, 11 August 2007 by CarlosBrody (talk | contribs) (What Plugins are available?)

This page will (eventually) tell you how to set up a plugin. Right now, it contains ad-hoc comments.

What are Plugins and when would I use them?

A plugin is a piece of code that provides generic functionality useful to a host of training protocols. Examples are:

  • Graphically seeing state progression and interaction with pokes on a trial-by-trial basis (like the graph on the top-left side of this page).
  • Code for saving/loading of data and settings, and associated GUI buttons
  • Automating training sessions so that Solo changes parameter values based on animal performance, removing the need for manual intervention.
  • Using water delivery calibration tables

What Plugins are available?

Plugin class
(what you inherit from in your 'class' statement)
What it does Main method
(what you call in your protocol)
@antibias Uses history of hits and misses to bias the next trial towards the type of trial the animal has been getting wrong most often AntibiasSection
@pokesplot trial-by-trial, graphical display of behavioral events and RTLSM states PokesPlotSection
@saveload Load/Save Settings/Data files SavingSection
@sessionmodel Automate progression through training stages, both over trials and over days SessionDefinition
@soundmanager Manages naming and uploading sounds to the SoundServer SoundManagerSection
@soundui Creates UI elements for sounds (like Volume, Balance, etc) and talks to the SoundManager plug-in SoundInterface
@water Water valve calibrator and look-up table for dispense times WaterValvesSection

How to start using a Plugin

  • In the constructor of your protocol, inherit from all the plugins you want to use.
    For example, if you want to use 'saveload' and 'water', you would inherit from these Plugins are part of your 'class' statement.
         obj = class(obj, mfilename, saveload, water);
  • Call the method of the plugin that does the work. (for example, for Plugin 'saveload', this would be 'SavingSection').
        [x, y] = SavingSection(obj, 'init', x, y);