Exemplo n.º 1
0
 // Cleanup
 internal void Flush()
 {
     if (spkOut != null)
     {
         spkOut.flush(); spkOut = null;
     }
     if (spkOutRaw != null)
     {
         spkOutRaw.flush(); spkOutRaw = null;
     }
     if (spkOutSalpa != null)
     {
         spkOutSalpa.flush(); spkOutSalpa = null;
     }
     if (rawOut != null)
     {
         rawOut.flush(); rawOut = null;
     }
     if (salpaOut != null)
     {
         salpaOut.flush(); salpaOut = null;
     }
     if (spkFiltOut != null)
     {
         spkFiltOut.flush(); spkFiltOut = null;
     }
     if (lfpOut != null)
     {
         lfpOut.flush(); lfpOut = null;
     }
     ;
     if (stimOut != null)
     {
         stimOut.flush(); stimOut = null;
     }
     if (auxAnalogOut != null)
     {
         auxAnalogOut.flush(); auxAnalogOut = null;
     }
     ;
     if (auxDigitalOut != null)
     {
         auxDigitalOut.flush(); auxDigitalOut = null;
     }
 }
Exemplo n.º 2
0
        // For spike-type streams
        internal void Setup(string dataType, Task dataTask, int numPreSamp, int numPostSamp, bool recordingUnits)
        {
            //Create the nessesary file writers
            switch (dataType)
            {
            case "spk":
                // Check if we need to create this stream
                if (recordSpike)
                {
                    spkOut = new SpikeFileOutput(fid, numElectrodes,
                                                 dataTask.Timing.SampleClockRate,
                                                 Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                                                 dataTask, "." + dataType, recordingUnits);
                }
                break;

            case "salpaspk":
                if (recordSalpaSpike)
                {
                    spkOutSalpa = new SpikeFileOutput(fid, numElectrodes,
                                                      dataTask.Timing.SampleClockRate,
                                                      Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                                                      dataTask, "." + dataType, recordingUnits);
                }
                break;

            case "rawspk":
                if (recordRawSpike)
                {
                    spkOutRaw = new SpikeFileOutput(fid, numElectrodes,
                                                    dataTask.Timing.SampleClockRate,
                                                    Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                                                    dataTask, "." + dataType, recordingUnits);
                }
                break;

            default:
                Console.WriteLine("Unknown data type specified during RecordingSetup.Setup()");
                break;
            }
        }
Exemplo n.º 3
0
 // Cleanup
 internal void Flush()
 {
     if (spkOut != null) { spkOut.flush(); spkOut = null; }
     if (spkOutRaw != null) { spkOutRaw.flush(); spkOutRaw = null; }
     if (spkOutSalpa != null) { spkOutSalpa.flush(); spkOutSalpa = null; }
     if (rawOut != null) { rawOut.flush(); rawOut = null; }
     if (salpaOut != null) { salpaOut.flush(); salpaOut = null; }
     if (spkFiltOut != null) { spkFiltOut.flush(); spkFiltOut = null; }
     if (lfpOut != null) { lfpOut.flush(); lfpOut = null; };
     if (stimOut != null) { stimOut.flush(); stimOut = null; }
     if (auxAnalogOut != null) { auxAnalogOut.flush(); auxAnalogOut = null; };
     if (auxDigitalOut != null) { auxDigitalOut.flush(); auxDigitalOut = null; }
 }
Exemplo n.º 4
0
        // For spike-type streams
        internal void Setup(string dataType, Task dataTask, int numPreSamp, int numPostSamp, bool recordingUnits)
        {
            //Create the nessesary file writers
            switch (dataType)
            {
                case "spk":
                    // Check if we need to create this stream
                    if (recordSpike)
                    {
                        spkOut = new SpikeFileOutput(fid, numElectrodes,
                            dataTask.Timing.SampleClockRate,
                            Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                            dataTask, "." + dataType, recordingUnits);
                    }
                    break;
                case "salpaspk" :
                    if (recordSalpaSpike)
                    {
                        spkOutSalpa = new SpikeFileOutput(fid, numElectrodes,
                            dataTask.Timing.SampleClockRate,
                            Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                            dataTask, "." + dataType, recordingUnits);
                    }
                    break;
                case "rawspk":
                    if (recordRawSpike)
                    {
                        spkOutRaw = new SpikeFileOutput(fid, numElectrodes,
                            dataTask.Timing.SampleClockRate,
                            Convert.ToInt32(numPreSamp + numPostSamp) + 1,
                            dataTask, "." + dataType, recordingUnits);
                    }
                    break;

                default:
                    Console.WriteLine("Unknown data type specified during RecordingSetup.Setup()");
                    break;

            }
        }