
//HeaderV1
fFileSignature = FileReadString("fFileSignature", 0, 4); //4s;
fFileVersionNumber = FileReadFloat("fFileVersionNumber", 4, 1); //f;
nOperationMode = FileReadShort("nOperationMode", 8, 1); //h;
lActualAcqLength = FileReadInt("lActualAcqLength", 10, 1); //i;
nNumPointsIgnored = FileReadShort("nNumPointsIgnored", 14, 1); //h;
lActualEpisodes = FileReadInt("lActualEpisodes", 16, 1); //i;
lFileStartTime = FileReadInt("lFileStartTime", 24, 1); //i;
lDataSectionPtr = FileReadInt("lDataSectionPtr", 40, 1); //i;
lTagSectionPtr = FileReadInt("lTagSectionPtr", 44, 1); //i;
lNumTagEntries = FileReadInt("lNumTagEntries", 48, 1); //i;
lSynchArrayPtr = FileReadInt("lSynchArrayPtr", 92, 1); //i;
lSynchArraySize = FileReadInt("lSynchArraySize", 96, 1); //i;
nDataFormat = FileReadShort("nDataFormat", 100, 1); //h;
nADCNumChannels = FileReadShort("nADCNumChannels", 120, 1); //h;
fADCSampleInterval = FileReadFloat("fADCSampleInterval", 122, 1); //f;
fSynchTimeUnit = FileReadFloat("fSynchTimeUnit", 130, 1); //f;
lNumSamplesPerEpisode = FileReadInt("lNumSamplesPerEpisode", 138, 1); //i;
lPreTriggerSamples = FileReadInt("lPreTriggerSamples", 142, 1); //i;
lEpisodesPerRun = FileReadInt("lEpisodesPerRun", 146, 1); //i;
fADCRange = FileReadFloat("fADCRange", 244, 1); //f;
lADCResolution = FileReadInt("lADCResolution", 252, 1); //i;
nFileStartMillisecs = FileReadShort("nFileStartMillisecs", 366, 1); //h;
nADCPtoLChannelMap = FileReadShorts("nADCPtoLChannelMap", 378, 16); //16h;
nADCSamplingSeq = FileReadShorts("nADCSamplingSeq", 410, 16); //16h;
sADCChannelName = FileReadString("sADCChannelName", 442, 10); //10s;
sADCUnits = FileReadString("sADCUnits", 602, 8); //8s;
fADCProgrammableGain = FileReadFloats("fADCProgrammableGain", 730, 16); //16f;
fInstrumentScaleFactor = FileReadFloats("fInstrumentScaleFactor", 922, 16); //16f;
fInstrumentOffset = FileReadFloats("fInstrumentOffset", 986, 16); //16f;
fSignalGain = FileReadFloats("fSignalGain", 1050, 16); //16f;
fSignalOffset = FileReadFloats("fSignalOffset", 1114, 16); //16f;
nDigitalEnable = FileReadShort("nDigitalEnable", 1436, 1); //h;
nActiveDACChannel = FileReadShort("nActiveDACChannel", 1440, 1); //h;
nDigitalHolding = FileReadShort("nDigitalHolding", 1584, 1); //h;
nDigitalInterEpisode = FileReadShort("nDigitalInterEpisode", 1586, 1); //h;
nDigitalValue = FileReadShorts("nDigitalValue", 2588, 10); //10h;
lDACFilePtr = FileReadInts("lDACFilePtr", 2048, 2); //2i;
lDACFileNumEpisodes = FileReadInts("lDACFileNumEpisodes", 2056, 2); //2i;
fDACCalibrationFactor = FileReadFloats("fDACCalibrationFactor", 2074, 4); //4f;
fDACCalibrationOffset = FileReadFloats("fDACCalibrationOffset", 2090, 4); //4f;
nWaveformEnable = FileReadShorts("nWaveformEnable", 2296, 2); //2h;
nWaveformSource = FileReadShorts("nWaveformSource", 2300, 2); //2h;
nInterEpisodeLevel = FileReadShorts("nInterEpisodeLevel", 2304, 2); //2h;
nEpochType = FileReadShorts("nEpochType", 2308, 20); //20h;
fEpochInitLevel = FileReadFloats("fEpochInitLevel", 2348, 20); //20f;
fEpochLevelInc = FileReadFloats("fEpochLevelInc", 2428, 20); //20f;
lEpochInitDuration = FileReadInts("lEpochInitDuration", 2508, 20); //20i;
lEpochDurationInc = FileReadInts("lEpochDurationInc", 2588, 20); //20i;
nTelegraphEnable = FileReadShorts("nTelegraphEnable", 4512, 16); //16h;
fTelegraphAdditGain = FileReadFloats("fTelegraphAdditGain", 4576, 16); //16f;
sProtocolPath = FileReadString("sProtocolPath", 4898, 384); //384s;

//HeaderV2
fFileSignature = FileReadString("fFileSignature", -1, 4); //4s;
fFileVersionNumber = FileReadBytes("fFileVersionNumber", -1, 4); //4b;
uFileInfoSize = FileReadUnsignedInt("uFileInfoSize", -1, 1); //I;
lActualEpisodes = FileReadUnsignedInt("lActualEpisodes", -1, 1); //I;
uFileStartDate = FileReadUnsignedInt("uFileStartDate", -1, 1); //I;
uFileStartTimeMS = FileReadUnsignedInt("uFileStartTimeMS", -1, 1); //I;
uStopwatchTime = FileReadUnsignedInt("uStopwatchTime", -1, 1); //I;
nFileType = FileReadUnsignedShort("nFileType", -1, 1); //H;
nDataFormat = FileReadUnsignedShort("nDataFormat", -1, 1); //H;
nSimultaneousScan = FileReadUnsignedShort("nSimultaneousScan", -1, 1); //H;
nCRCEnable = FileReadUnsignedShort("nCRCEnable", -1, 1); //H;
uFileCRC = FileReadUnsignedInt("uFileCRC", -1, 1); //I;
uFileGUID = FileReadBytes("uFileGUID", -1, 16); //16B;
uCreatorVersion = FileReadBytes("uCreatorVersion", -1, 4); //4B;
uCreatorNameIndex = FileReadUnsignedInt("uCreatorNameIndex", -1, 1); //I;
uModifierVersion = FileReadUnsignedInt("uModifierVersion", -1, 1); //I;
uModifierNameIndex = FileReadUnsignedInt("uModifierNameIndex", -1, 1); //I;
uProtocolPathIndex = FileReadUnsignedInt("uProtocolPathIndex", -1, 1); //I;

//SectionMap
ProtocolSection_byteStart = FileReadUnsignedInt("ProtocolSection_byteStart", 76, 1); //IIl;
ADCSection_byteStart = FileReadUnsignedInt("ADCSection_byteStart", 92, 1); //IIl;
DACSection_byteStart = FileReadUnsignedInt("DACSection_byteStart", 108, 1); //IIl;
EpochSection_byteStart = FileReadUnsignedInt("EpochSection_byteStart", 124, 1); //IIl;
ADCPerDACSection_byteStart = FileReadUnsignedInt("ADCPerDACSection_byteStart", 140, 1); //IIl;
EpochPerDACSection_byteStart = FileReadUnsignedInt("EpochPerDACSection_byteStart", 156, 1); //IIl;
UserListSection_byteStart = FileReadUnsignedInt("UserListSection_byteStart", 172, 1); //IIl;
StatsRegionSection_byteStart = FileReadUnsignedInt("StatsRegionSection_byteStart", 188, 1); //IIl;
MathSection_byteStart = FileReadUnsignedInt("MathSection_byteStart", 204, 1); //IIl;
StringsSection_byteStart = FileReadUnsignedInt("StringsSection_byteStart", 220, 1); //IIl;
DataSection_byteStart = FileReadUnsignedInt("DataSection_byteStart", 236, 1); //IIl;
TagSection_byteStart = FileReadUnsignedInt("TagSection_byteStart", 252, 1); //IIl;
ScopeSection_byteStart = FileReadUnsignedInt("ScopeSection_byteStart", 268, 1); //IIl;
DeltaSection_byteStart = FileReadUnsignedInt("DeltaSection_byteStart", 284, 1); //IIl;
VoiceTagSection_byteStart = FileReadUnsignedInt("VoiceTagSection_byteStart", 300, 1); //IIl;
SynchArraySection_byteStart = FileReadUnsignedInt("SynchArraySection_byteStart", 316, 1); //IIl;
AnnotationSection_byteStart = FileReadUnsignedInt("AnnotationSection_byteStart", 332, 1); //IIl;
StatsSection_byteStart = FileReadUnsignedInt("StatsSection_byteStart", 348, 1); //IIl;

//ProtocolSection
nOperationMode = FileReadShort("nOperationMode", -1, 1); //h;
fADCSequenceInterval = FileReadFloat("fADCSequenceInterval", -1, 1); //f;
bEnableFileCompression = FileReadSignedChar("bEnableFileCompression", -1, 1); //b;
sUnused = FileReadBytes("sUnused", -1, 3); //3c;
uFileCompressionRatio = FileReadUnsignedInt("uFileCompressionRatio", -1, 1); //I;
fSynchTimeUnit = FileReadFloat("fSynchTimeUnit", -1, 1); //f;
fSecondsPerRun = FileReadFloat("fSecondsPerRun", -1, 1); //f;
lNumSamplesPerEpisode = FileReadInt("lNumSamplesPerEpisode", -1, 1); //i;
lPreTriggerSamples = FileReadInt("lPreTriggerSamples", -1, 1); //i;
lEpisodesPerRun = FileReadInt("lEpisodesPerRun", -1, 1); //i;
lRunsPerTrial = FileReadInt("lRunsPerTrial", -1, 1); //i;
lNumberOfTrials = FileReadInt("lNumberOfTrials", -1, 1); //i;
nAveragingMode = FileReadShort("nAveragingMode", -1, 1); //h;
nUndoRunCount = FileReadShort("nUndoRunCount", -1, 1); //h;
nFirstEpisodeInRun = FileReadShort("nFirstEpisodeInRun", -1, 1); //h;
fTriggerThreshold = FileReadFloat("fTriggerThreshold", -1, 1); //f;
nTriggerSource = FileReadShort("nTriggerSource", -1, 1); //h;
nTriggerAction = FileReadShort("nTriggerAction", -1, 1); //h;
nTriggerPolarity = FileReadShort("nTriggerPolarity", -1, 1); //h;
fScopeOutputInterval = FileReadFloat("fScopeOutputInterval", -1, 1); //f;
fEpisodeStartToStart = FileReadFloat("fEpisodeStartToStart", -1, 1); //f;
fRunStartToStart = FileReadFloat("fRunStartToStart", -1, 1); //f;
lAverageCount = FileReadInt("lAverageCount", -1, 1); //i;
fTrialStartToStart = FileReadFloat("fTrialStartToStart", -1, 1); //f;
nAutoTriggerStrategy = FileReadShort("nAutoTriggerStrategy", -1, 1); //h;
fFirstRunDelayS = FileReadFloat("fFirstRunDelayS", -1, 1); //f;
nChannelStatsStrategy = FileReadShort("nChannelStatsStrategy", -1, 1); //h;
lSamplesPerTrace = FileReadInt("lSamplesPerTrace", -1, 1); //i;
lStartDisplayNum = FileReadInt("lStartDisplayNum", -1, 1); //i;
lFinishDisplayNum = FileReadInt("lFinishDisplayNum", -1, 1); //i;
nShowPNRawData = FileReadShort("nShowPNRawData", -1, 1); //h;
fStatisticsPeriod = FileReadFloat("fStatisticsPeriod", -1, 1); //f;
lStatisticsMeasurements = FileReadInt("lStatisticsMeasurements", -1, 1); //i;
nStatisticsSaveStrategy = FileReadShort("nStatisticsSaveStrategy", -1, 1); //h;
fADCRange = FileReadFloat("fADCRange", -1, 1); //f;
fDACRange = FileReadFloat("fDACRange", -1, 1); //f;
lADCResolution = FileReadInt("lADCResolution", -1, 1); //i;
lDACResolution = FileReadInt("lDACResolution", -1, 1); //i;
nExperimentType = FileReadShort("nExperimentType", -1, 1); //h;
nManualInfoStrategy = FileReadShort("nManualInfoStrategy", -1, 1); //h;
nCommentsEnable = FileReadShort("nCommentsEnable", -1, 1); //h;
lFileCommentIndex = FileReadInt("lFileCommentIndex", -1, 1); //i;
nAutoAnalyseEnable = FileReadShort("nAutoAnalyseEnable", -1, 1); //h;
nSignalType = FileReadShort("nSignalType", -1, 1); //h;
nDigitalEnable = FileReadShort("nDigitalEnable", -1, 1); //h;
nActiveDACChannel = FileReadShort("nActiveDACChannel", -1, 1); //h;
nDigitalHolding = FileReadShort("nDigitalHolding", -1, 1); //h;
nDigitalInterEpisode = FileReadShort("nDigitalInterEpisode", -1, 1); //h;
nDigitalDACChannel = FileReadShort("nDigitalDACChannel", -1, 1); //h;
nDigitalTrainActiveLogic = FileReadShort("nDigitalTrainActiveLogic", -1, 1); //h;
nStatsEnable = FileReadShort("nStatsEnable", -1, 1); //h;
nStatisticsClearStrategy = FileReadShort("nStatisticsClearStrategy", -1, 1); //h;
nLevelHysteresis = FileReadShort("nLevelHysteresis", -1, 1); //h;
lTimeHysteresis = FileReadInt("lTimeHysteresis", -1, 1); //i;
nAllowExternalTags = FileReadShort("nAllowExternalTags", -1, 1); //h;
nAverageAlgorithm = FileReadShort("nAverageAlgorithm", -1, 1); //h;
fAverageWeighting = FileReadFloat("fAverageWeighting", -1, 1); //f;
nUndoPromptStrategy = FileReadShort("nUndoPromptStrategy", -1, 1); //h;
nTrialTriggerSource = FileReadShort("nTrialTriggerSource", -1, 1); //h;
nStatisticsDisplayStrategy = FileReadShort("nStatisticsDisplayStrategy", -1, 1); //h;
nExternalTagType = FileReadShort("nExternalTagType", -1, 1); //h;
nScopeTriggerOut = FileReadShort("nScopeTriggerOut", -1, 1); //h;
nLTPType = FileReadShort("nLTPType", -1, 1); //h;
nAlternateDACOutputState = FileReadShort("nAlternateDACOutputState", -1, 1); //h;
nAlternateDigitalOutputState = FileReadShort("nAlternateDigitalOutputState", -1, 1); //h;
fCellID = FileReadFloats("fCellID", -1, 3); //3f;
nDigitizerADCs = FileReadShort("nDigitizerADCs", -1, 1); //h;
nDigitizerDACs = FileReadShort("nDigitizerDACs", -1, 1); //h;
nDigitizerTotalDigitalOuts = FileReadShort("nDigitizerTotalDigitalOuts", -1, 1); //h;
nDigitizerSynchDigitalOuts = FileReadShort("nDigitizerSynchDigitalOuts", -1, 1); //h;
nDigitizerType = FileReadShort("nDigitizerType", -1, 1); //h;

//ADCSection
nADCNum[i] = FileReadShort("nADCNum[i]", -1, 1); //h;
nTelegraphEnable[i] = FileReadShort("nTelegraphEnable[i]", -1, 1); //h;
nTelegraphInstrument[i] = FileReadShort("nTelegraphInstrument[i]", -1, 1); //h;
fTelegraphAdditGain[i] = FileReadFloat("fTelegraphAdditGain[i]", -1, 1); //f;
fTelegraphFilter[i] = FileReadFloat("fTelegraphFilter[i]", -1, 1); //f;
fTelegraphMembraneCap[i] = FileReadFloat("fTelegraphMembraneCap[i]", -1, 1); //f;
nTelegraphMode[i] = FileReadShort("nTelegraphMode[i]", -1, 1); //h;
fTelegraphAccessResistance[i] = FileReadFloat("fTelegraphAccessResistance[i]", -1, 1); //f;
nADCPtoLChannelMap[i] = FileReadShort("nADCPtoLChannelMap[i]", -1, 1); //h;
nADCSamplingSeq[i] = FileReadShort("nADCSamplingSeq[i]", -1, 1); //h;
fADCProgrammableGain[i] = FileReadFloat("fADCProgrammableGain[i]", -1, 1); //f;
fADCDisplayAmplification[i] = FileReadFloat("fADCDisplayAmplification[i]", -1, 1); //f;
fADCDisplayOffset[i] = FileReadFloat("fADCDisplayOffset[i]", -1, 1); //f;
fInstrumentScaleFactor[i] = FileReadFloat("fInstrumentScaleFactor[i]", -1, 1); //f;
fInstrumentOffset[i] = FileReadFloat("fInstrumentOffset[i]", -1, 1); //f;
fSignalGain[i] = FileReadFloat("fSignalGain[i]", -1, 1); //f;
fSignalOffset[i] = FileReadFloat("fSignalOffset[i]", -1, 1); //f;
fSignalLowpassFilter[i] = FileReadFloat("fSignalLowpassFilter[i]", -1, 1); //f;
fSignalHighpassFilter[i] = FileReadFloat("fSignalHighpassFilter[i]", -1, 1); //f;
nLowpassFilterType[i] = FileReadSignedChar("nLowpassFilterType[i]", -1, 1); //b;
nHighpassFilterType[i] = FileReadSignedChar("nHighpassFilterType[i]", -1, 1); //b;
fPostProcessLowpassFilter[i] = FileReadFloat("fPostProcessLowpassFilter[i]", -1, 1); //f;
nPostProcessLowpassFilterType[i] = FileReadChar("nPostProcessLowpassFilterType[i]", -1, 1); //c;
bEnabledDuringPN[i] = FileReadSignedChar("bEnabledDuringPN[i]", -1, 1); //b;
nStatsChannelPolarity[i] = FileReadShort("nStatsChannelPolarity[i]", -1, 1); //h;
lADCChannelNameIndex[i] = FileReadInt("lADCChannelNameIndex[i]", -1, 1); //i;
lADCUnitsIndex[i] = FileReadInt("lADCUnitsIndex[i]", -1, 1); //i;

//DACSection
nDACNum[i] = FileReadShort("nDACNum[i]", -1, 1); //h;
nTelegraphDACScaleFactorEnable[i] = FileReadShort("nTelegraphDACScaleFactorEnable[i]", -1, 1); //h;
fInstrumentHoldingLevel[i] = FileReadFloat("fInstrumentHoldingLevel[i]", -1, 1); //f;
fDACScaleFactor[i] = FileReadFloat("fDACScaleFactor[i]", -1, 1); //f;
fDACHoldingLevel[i] = FileReadFloat("fDACHoldingLevel[i]", -1, 1); //f;
fDACCalibrationFactor[i] = FileReadFloat("fDACCalibrationFactor[i]", -1, 1); //f;
fDACCalibrationOffset[i] = FileReadFloat("fDACCalibrationOffset[i]", -1, 1); //f;
lDACChannelNameIndex[i] = FileReadInt("lDACChannelNameIndex[i]", -1, 1); //i;
lDACChannelUnitsIndex[i] = FileReadInt("lDACChannelUnitsIndex[i]", -1, 1); //i;
lDACFilePtr[i] = FileReadInt("lDACFilePtr[i]", -1, 1); //i;
lDACFileNumEpisodes[i] = FileReadInt("lDACFileNumEpisodes[i]", -1, 1); //i;
nWaveformEnable[i] = FileReadShort("nWaveformEnable[i]", -1, 1); //h;
nWaveformSource[i] = FileReadShort("nWaveformSource[i]", -1, 1); //h;
nInterEpisodeLevel[i] = FileReadShort("nInterEpisodeLevel[i]", -1, 1); //h;
fDACFileScale[i] = FileReadFloat("fDACFileScale[i]", -1, 1); //f;
fDACFileOffset[i] = FileReadFloat("fDACFileOffset[i]", -1, 1); //f;
lDACFileEpisodeNum[i] = FileReadInt("lDACFileEpisodeNum[i]", -1, 1); //i;
nDACFileADCNum[i] = FileReadShort("nDACFileADCNum[i]", -1, 1); //h;
nConditEnable[i] = FileReadShort("nConditEnable[i]", -1, 1); //h;
lConditNumPulses[i] = FileReadInt("lConditNumPulses[i]", -1, 1); //i;
fBaselineDuration[i] = FileReadFloat("fBaselineDuration[i]", -1, 1); //f;
fBaselineLevel[i] = FileReadFloat("fBaselineLevel[i]", -1, 1); //f;
fStepDuration[i] = FileReadFloat("fStepDuration[i]", -1, 1); //f;
fStepLevel[i] = FileReadFloat("fStepLevel[i]", -1, 1); //f;
fPostTrainPeriod[i] = FileReadFloat("fPostTrainPeriod[i]", -1, 1); //f;
fPostTrainLevel[i] = FileReadFloat("fPostTrainLevel[i]", -1, 1); //f;
nMembTestEnable[i] = FileReadShort("nMembTestEnable[i]", -1, 1); //h;
nLeakSubtractType[i] = FileReadShort("nLeakSubtractType[i]", -1, 1); //h;
nPNPolarity[i] = FileReadShort("nPNPolarity[i]", -1, 1); //h;
fPNHoldingLevel[i] = FileReadFloat("fPNHoldingLevel[i]", -1, 1); //f;
nPNNumADCChannels[i] = FileReadShort("nPNNumADCChannels[i]", -1, 1); //h;
nPNPosition[i] = FileReadShort("nPNPosition[i]", -1, 1); //h;
nPNNumPulses[i] = FileReadShort("nPNNumPulses[i]", -1, 1); //h;
fPNSettlingTime[i] = FileReadFloat("fPNSettlingTime[i]", -1, 1); //f;
fPNInterpulse[i] = FileReadFloat("fPNInterpulse[i]", -1, 1); //f;
nLTPUsageOfDAC[i] = FileReadShort("nLTPUsageOfDAC[i]", -1, 1); //h;
nLTPPresynapticPulses[i] = FileReadShort("nLTPPresynapticPulses[i]", -1, 1); //h;
lDACFilePathIndex[i] = FileReadInt("lDACFilePathIndex[i]", -1, 1); //i;
fMembTestPreSettlingTimeMS[i] = FileReadFloat("fMembTestPreSettlingTimeMS[i]", -1, 1); //f;
fMembTestPostSettlingTimeMS[i] = FileReadFloat("fMembTestPostSettlingTimeMS[i]", -1, 1); //f;
nLeakSubtractADCIndex[i] = FileReadShort("nLeakSubtractADCIndex[i]", -1, 1); //h;

//EpochPerDACSection
nEpochNum[i] = FileReadShort("nEpochNum[i]", -1, 1); //h;
nDACNum[i] = FileReadShort("nDACNum[i]", -1, 1); //h;
nEpochType[i] = FileReadShort("nEpochType[i]", -1, 1); //h;
fEpochInitLevel[i] = FileReadFloat("fEpochInitLevel[i]", -1, 1); //f;
fEpochLevelInc[i] = FileReadFloat("fEpochLevelInc[i]", -1, 1); //f;
lEpochInitDuration[i] = FileReadInt("lEpochInitDuration[i]", -1, 1); //i;
lEpochDurationInc[i] = FileReadInt("lEpochDurationInc[i]", -1, 1); //i;
lEpochPulsePeriod[i] = FileReadInt("lEpochPulsePeriod[i]", -1, 1); //i;
lEpochPulseWidth[i] = FileReadInt("lEpochPulseWidth[i]", -1, 1); //i;

//EpochSection
nEpochNum[i] = FileReadShort("nEpochNum[i]", -1, 1); //h;
nEpochDigitalOutput[i] = FileReadShort("nEpochDigitalOutput[i]", -1, 1); //h;

//TagSection
lTagTime[i] = FileReadInt("lTagTime[i]", -1, 1); //i;
sComment[i] = FileReadString("sComment[i]", -1, 56); //56s;
nTagType[i] = FileReadShort("nTagType[i]", -1, 1); //h;
nVoiceTagNumberorAnnotationIndex[i] = FileReadShort("nVoiceTagNumberorAnnotationIndex[i]", -1, 1); //h;

//StringsSection

//StringsIndexed
