Symphony-DAS/Symphony — pull request #2 by cafarm (2013-03-28 00:09:22+00:00)
Title: Async running of the epochs

I've implemented the ability to asynchronously run epochs from the core and brought it up into the UI.

This enables creating protocols that produce indefinite epochs; allowing for things like fast seal/leak (zero delay between pulses).

It also enables the UI to listen for events during data acquisition; allowing for things like displaying data AS it's recorded and stopping protocols in the middle of epochs (incomplete epochs are discarded).

I've built an example seal/leak protocol that labs can use as a good starting place for their own custom version. I've also built an example chart recorder protocol that demonstrates the ability to display data as it's recorded.

Check out the chart recorder while it displays me turning the knob on a variable DC power supply (the lag is due to the screen recording software, not Symphony):
http://www.youtube.com/watch?v=3b6TneOmekg&feature=youtu.be

This proposal requires some minor changes to your protocols:

1) You will need to include a single parameter constructor in each protocol even if you don't need it. It will look like this:
function obj = ExamplePulse(rigConfig)
% Call the base constructor.
obj = obj@SymphonyProtocol(rigConfig);
end

2) You are encouraged to move away from overriding prepareEpoch and instead override new methods prepareEpochStimuli, prepareEpochResponses, prepareEpochAttributes. Definitely don't write any new protocols overriding prepareEpoch.