internal ClosedLoopOut(NRTask CLE, int fs, DataSrv DatSrv, StimSrv StimSrv, Task buffLoadTask, Logger Debugger, string NRFilePath, bool NRRecording, NeuroRighter NR) { this.CLE = CLE; this.outputSampFreq = fs; this.DatSrv = DatSrv; this.StimSrv = StimSrv; this.useManStimWave = false; this.buffLoadTask = buffLoadTask; this.Debugger = Debugger; this.NRFilePath = NRFilePath; this.NRRecording = NRRecording; this.NR = NR; }
// Method to set up the output (dig, aux, stim) side of neurorighter // acquisition setup must have been called previously private Task NROutputSetup() { if (stimSrv != null) stimSrv = null; stimSrv = new StimSrv((int)(Properties.Settings.Default.DACPollingPeriodSec * STIM_SAMPLING_FREQ), STIM_SAMPLING_FREQ, spikeTask[0], Debugger,Properties.Settings.Default.stimRobust ); stimSrv.Setup(); stimSrv.StartAllTasks(); return stimSrv.buffLoadTask; }
internal ClosedLoopOut(NRTask CLE, int fs, DataSrv DatSrv, StimSrv StimSrv, Task buffLoadTask, Logger Debugger, string NRFilePath, bool NRRecording, NeuroRighter NR, double[] standardWave) : this(CLE, fs, DatSrv, StimSrv, buffLoadTask,Debugger,NRFilePath, NRRecording, NR) { this.guiWave = standardWave; this.useManStimWave = true; }
internal void Grab(DataSrv DatSrv, StimSrv StimSrv, Logger Debugger, string NRFilePath, bool NRRecording, NeuroRighter NR) { this.NRDataSrv = DatSrv; this.NRStimSrv = StimSrv; this.debugger = Debugger; this.nrFilePath = NRFilePath; this.nrRecording = NRRecording; this.NR = NR;//we need a reference back to NR to initiate the stop sequence }