예제 #1
0
        private void Read(BinaryReader reader)
        {
            // determine where all the sections are
            HeaderSection      = new(reader);
            ProtocolSection    = new(reader);
            AdcSection         = new(reader);
            DacSection         = new(reader);
            StringsSection     = new(reader);
            TagSection         = new(reader);
            DataSection        = new(reader);
            SynchArraySection  = new(reader);
            EpochSection       = new(reader);
            EpochPerDacSection = new(reader);
            AdcPerDacSection   = new(reader);
            UserListSection    = new(reader);
            StatsRegionSection = new(reader);
            MathSection        = new(reader);
            ScopeSection       = new(reader);
            DeltaSection       = new(reader);
            VoiceTagSection    = new(reader);
            AnnotationSection  = new(reader);
            StatsSection       = new(reader);

            // populate header values from each section
            ReadGroup1();
            ReadGroup2();
            ReadGroup3();
            ReadGroup5();
            ReadGroup6();
            ReadGroup7();
            ReadGroup9();
            ReadGroup10();
            ReadGroup12();

            // use header values to put additional information in the header object
            float tagTimeMult = (fSynchTimeUnit == 0)
                ? SamplePeriod / ChannelCount
                : fSynchTimeUnit / 1e6f;

            Tags = TagSection.GetTags(tagTimeMult);
        }
예제 #2
0
        public void ReadTagSection()
        {
            log.Debug("Reading Tag Section");
            tagSection      = new TagSection();
            tagSection.tags = new TagSectionByTag[sectionMap.Tag.itemCount];

            for (int tagNumber = 0; tagNumber < sectionMap.Tag.itemCount; tagNumber++)
            {
                log.Debug($"Reading tag Section for tag {tagNumber}");

                TagSectionByTag thisTag = new TagSectionByTag();

                int firstByte = sectionMap.Tag.byteStart;
                firstByte += sectionMap.Tag.itemSize * tagNumber;
                br.BaseStream.Seek(firstByte, SeekOrigin.Begin);

                thisTag.lTagTime       = FileReadInt(-1, 1);
                thisTag.sComment       = FileReadString(-1, 56).Trim();
                thisTag.nTagType       = FileReadShort(-1, 1);
                thisTag.nVoiceTagIndex = FileReadShort(-1, 1);

                tagSection.tags[tagNumber] = thisTag;
            }
        }
예제 #3
0
 Game(TagSection(TagPair(WS_BracketOpen, TagName, WS_TagValue, BracketClose)), NoPlies)),