From Bcontrol
Revision as of 15:26, 17 June 2007 by Pai (talk | contribs)

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).
  • Play sounds on a virtual state machine (useful when debugging your code on a laptop, as opposed to on a behaviour box)
  • Automating training sessions so that Solo changes parameter values based on animal performance, removing the need for manual intervention.

What Plugins are available?

  • saveload: Load/Save settings/data
  • water: Water Valve Calibrator and look-up table for dispense times
  • sessionmodel: Session Automation
  • soundmanager: (SP: not sure what this does) Allows playing of sound on virtual setups?

How to start using a Plugin

  1. 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);

  1. Call the method of the plugin that does the work. (for example, for Plugin 'saveload', this would be 'SavingSection').