Exemplo n.º 1
0
        public void ReadChannel(int sweepNumber, int channelNumber)
        {
            AssertOpen();
            Int32 errorCode       = 0;
            Int32 fileHandle      = 0;
            int   physicalChannel = header.nADCSamplingSeq[channelNumber];

            ABF_ReadChannel(fileHandle, ref header, physicalChannel, sweepNumber, ref sweepBuffer[0], ref sweepPointCount, ref errorCode);
            AbfError.AssertSuccess(errorCode);
        }
Exemplo n.º 2
0
 public void Close()
 {
     if (fileIsOpen)
     {
         Int32 fileHandle = 0;
         Int32 errorCode  = 0;
         ABF_Close(fileHandle, ref errorCode);
         AbfError.AssertSuccess(errorCode);
         fileIsOpen = false;
     }
 }
Exemplo n.º 3
0
 public void OpenAndReadHeader()
 {
     if (!fileIsOpen)
     {
         Int32 fileHandle = 0;
         Int32 errorCode  = 0;
         uint  loadFlags  = 0;
         ABF_ReadOpen(abfFilePath, ref fileHandle, loadFlags, ref header, ref sweepPointCount, ref sweepCount, ref errorCode);
         AbfError.AssertSuccess(errorCode);
         sweepBuffer = new float[sweepPointCount];
         fileIsOpen  = true;
     }
 }
Exemplo n.º 4
0
        public ABFFIOstructs.ABFTag[] ReadTags()
        {
            AssertOpen();
            Int32 fileHandle = 0;
            Int32 errorCode  = 0;

            ABFFIOstructs.ABFTag[] abfTags = new ABFFIOstructs.ABFTag[(UInt32)header.lNumTagEntries];
            for (uint i = 0; i < abfTags.Length; i++)
            {
                ABF_ReadTags(fileHandle, ref header, i, ref abfTags[i], 1, ref errorCode);
                AbfError.AssertSuccess(errorCode);
            }
            return(abfTags);
        }