| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
#ifndef INC_PROTOCOLSTRUCTS_HPP |
| 49 |
#define INC_PROTOCOLSTRUCTS_HPP |
| 50 |
|
| 51 |
#pragma once |
| 52 |
#pragma pack(push, 1) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
#define bool int |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
struct GUID |
| 61 |
{ |
| 62 |
uint32_t Data1; |
| 63 |
unsigned short Data2; |
| 64 |
unsigned short Data3; |
| 65 |
unsigned char Data4[8]; |
| 66 |
}; |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
typedef struct ABF_Section |
| 73 |
{ |
| 74 |
unsigned int uBlockIndex; |
| 75 |
unsigned int uBytes; |
| 76 |
long long llNumEntries; |
| 77 |
} ABF_Section; |
| 78 |
|
| 79 |
#define ABF_FILESIGNATURE 0x32464241 // PC="ABF2", MAC="2FBA" |
| 80 |
|
| 81 |
struct ABF_FileInfo |
| 82 |
{ |
| 83 |
unsigned int uFileSignature; |
| 84 |
unsigned int uFileVersionNumber; |
| 85 |
|
| 86 |
|
| 87 |
unsigned int uFileInfoSize; |
| 88 |
|
| 89 |
unsigned int uActualEpisodes; |
| 90 |
unsigned int uFileStartDate; |
| 91 |
unsigned int uFileStartTimeMS; |
| 92 |
unsigned int uStopwatchTime; |
| 93 |
short nFileType; |
| 94 |
short nDataFormat; |
| 95 |
short nSimultaneousScan; |
| 96 |
short nCRCEnable; |
| 97 |
unsigned int uFileCRC; |
| 98 |
struct GUID FileGUID; |
| 99 |
unsigned int uCreatorVersion; |
| 100 |
unsigned int uCreatorNameIndex; |
| 101 |
unsigned int uModifierVersion; |
| 102 |
unsigned int uModifierNameIndex; |
| 103 |
unsigned int uProtocolPathIndex; |
| 104 |
|
| 105 |
|
| 106 |
ABF_Section ProtocolSection; |
| 107 |
ABF_Section ADCSection; |
| 108 |
ABF_Section DACSection; |
| 109 |
ABF_Section EpochSection; |
| 110 |
ABF_Section ADCPerDACSection; |
| 111 |
ABF_Section EpochPerDACSection; |
| 112 |
ABF_Section UserListSection; |
| 113 |
ABF_Section StatsRegionSection; |
| 114 |
ABF_Section MathSection; |
| 115 |
ABF_Section StringsSection; |
| 116 |
|
| 117 |
|
| 118 |
ABF_Section DataSection; |
| 119 |
ABF_Section TagSection; |
| 120 |
ABF_Section ScopeSection; |
| 121 |
ABF_Section DeltaSection; |
| 122 |
ABF_Section VoiceTagSection; |
| 123 |
ABF_Section SynchArraySection; |
| 124 |
ABF_Section AnnotationSection; |
| 125 |
ABF_Section StatsSection; |
| 126 |
|
| 127 |
char sUnused[148]; |
| 128 |
}; |
| 129 |
|
| 130 |
struct ABF_ProtocolInfo |
| 131 |
{ |
| 132 |
short nOperationMode; |
| 133 |
float fADCSequenceInterval; |
| 134 |
bool bEnableFileCompression; |
| 135 |
char sUnused1[3]; |
| 136 |
unsigned int uFileCompressionRatio; |
| 137 |
|
| 138 |
float fSynchTimeUnit; |
| 139 |
float fSecondsPerRun; |
| 140 |
ABFLONG lNumSamplesPerEpisode; |
| 141 |
ABFLONG lPreTriggerSamples; |
| 142 |
ABFLONG lEpisodesPerRun; |
| 143 |
ABFLONG lRunsPerTrial; |
| 144 |
ABFLONG lNumberOfTrials; |
| 145 |
short nAveragingMode; |
| 146 |
short nUndoRunCount; |
| 147 |
short nFirstEpisodeInRun; |
| 148 |
float fTriggerThreshold; |
| 149 |
short nTriggerSource; |
| 150 |
short nTriggerAction; |
| 151 |
short nTriggerPolarity; |
| 152 |
float fScopeOutputInterval; |
| 153 |
float fEpisodeStartToStart; |
| 154 |
float fRunStartToStart; |
| 155 |
ABFLONG lAverageCount; |
| 156 |
float fTrialStartToStart; |
| 157 |
short nAutoTriggerStrategy; |
| 158 |
float fFirstRunDelayS; |
| 159 |
|
| 160 |
short nChannelStatsStrategy; |
| 161 |
ABFLONG lSamplesPerTrace; |
| 162 |
ABFLONG lStartDisplayNum; |
| 163 |
ABFLONG lFinishDisplayNum; |
| 164 |
short nShowPNRawData; |
| 165 |
float fStatisticsPeriod; |
| 166 |
ABFLONG lStatisticsMeasurements; |
| 167 |
short nStatisticsSaveStrategy; |
| 168 |
|
| 169 |
float fADCRange; |
| 170 |
float fDACRange; |
| 171 |
ABFLONG lADCResolution; |
| 172 |
ABFLONG lDACResolution; |
| 173 |
|
| 174 |
short nExperimentType; |
| 175 |
short nManualInfoStrategy; |
| 176 |
short nCommentsEnable; |
| 177 |
ABFLONG lFileCommentIndex; |
| 178 |
short nAutoAnalyseEnable; |
| 179 |
short nSignalType; |
| 180 |
|
| 181 |
short nDigitalEnable; |
| 182 |
short nActiveDACChannel; |
| 183 |
short nDigitalHolding; |
| 184 |
short nDigitalInterEpisode; |
| 185 |
short nDigitalDACChannel; |
| 186 |
short nDigitalTrainActiveLogic; |
| 187 |
|
| 188 |
short nStatsEnable; |
| 189 |
short nStatisticsClearStrategy; |
| 190 |
|
| 191 |
short nLevelHysteresis; |
| 192 |
ABFLONG lTimeHysteresis; |
| 193 |
short nAllowExternalTags; |
| 194 |
short nAverageAlgorithm; |
| 195 |
float fAverageWeighting; |
| 196 |
short nUndoPromptStrategy; |
| 197 |
short nTrialTriggerSource; |
| 198 |
short nStatisticsDisplayStrategy; |
| 199 |
short nExternalTagType; |
| 200 |
short nScopeTriggerOut; |
| 201 |
|
| 202 |
short nLTPType; |
| 203 |
short nAlternateDACOutputState; |
| 204 |
short nAlternateDigitalOutputState; |
| 205 |
|
| 206 |
float fCellID[3]; |
| 207 |
|
| 208 |
short nDigitizerADCs; |
| 209 |
short nDigitizerDACs; |
| 210 |
short nDigitizerTotalDigitalOuts; |
| 211 |
short nDigitizerSynchDigitalOuts; |
| 212 |
short nDigitizerType; |
| 213 |
|
| 214 |
char sUnused[304]; |
| 215 |
}; |
| 216 |
|
| 217 |
struct ABF_MathInfo |
| 218 |
{ |
| 219 |
short nMathEnable; |
| 220 |
short nMathExpression; |
| 221 |
unsigned int uMathOperatorIndex; |
| 222 |
unsigned int uMathUnitsIndex; |
| 223 |
float fMathUpperLimit; |
| 224 |
float fMathLowerLimit; |
| 225 |
short nMathADCNum[2]; |
| 226 |
char sUnused[16]; |
| 227 |
float fMathK[6]; |
| 228 |
|
| 229 |
char sUnused2[64]; |
| 230 |
}; |
| 231 |
|
| 232 |
struct ABF_ADCInfo |
| 233 |
{ |
| 234 |
|
| 235 |
short nADCNum; |
| 236 |
|
| 237 |
short nTelegraphEnable; |
| 238 |
short nTelegraphInstrument; |
| 239 |
float fTelegraphAdditGain; |
| 240 |
float fTelegraphFilter; |
| 241 |
float fTelegraphMembraneCap; |
| 242 |
short nTelegraphMode; |
| 243 |
float fTelegraphAccessResistance; |
| 244 |
|
| 245 |
short nADCPtoLChannelMap; |
| 246 |
short nADCSamplingSeq; |
| 247 |
|
| 248 |
float fADCProgrammableGain; |
| 249 |
float fADCDisplayAmplification; |
| 250 |
float fADCDisplayOffset; |
| 251 |
float fInstrumentScaleFactor; |
| 252 |
float fInstrumentOffset; |
| 253 |
float fSignalGain; |
| 254 |
float fSignalOffset; |
| 255 |
float fSignalLowpassFilter; |
| 256 |
float fSignalHighpassFilter; |
| 257 |
|
| 258 |
char nLowpassFilterType; |
| 259 |
char nHighpassFilterType; |
| 260 |
float fPostProcessLowpassFilter; |
| 261 |
char nPostProcessLowpassFilterType; |
| 262 |
bool bEnabledDuringPN; |
| 263 |
|
| 264 |
short nStatsChannelPolarity; |
| 265 |
|
| 266 |
ABFLONG lADCChannelNameIndex; |
| 267 |
ABFLONG lADCUnitsIndex; |
| 268 |
|
| 269 |
char sUnused[46]; |
| 270 |
}; |
| 271 |
|
| 272 |
struct ABF_DACInfo |
| 273 |
{ |
| 274 |
|
| 275 |
short nDACNum; |
| 276 |
|
| 277 |
short nTelegraphDACScaleFactorEnable; |
| 278 |
float fInstrumentHoldingLevel; |
| 279 |
|
| 280 |
float fDACScaleFactor; |
| 281 |
float fDACHoldingLevel; |
| 282 |
float fDACCalibrationFactor; |
| 283 |
float fDACCalibrationOffset; |
| 284 |
|
| 285 |
ABFLONG lDACChannelNameIndex; |
| 286 |
ABFLONG lDACChannelUnitsIndex; |
| 287 |
|
| 288 |
ABFLONG lDACFilePtr; |
| 289 |
ABFLONG lDACFileNumEpisodes; |
| 290 |
|
| 291 |
short nWaveformEnable; |
| 292 |
short nWaveformSource; |
| 293 |
short nInterEpisodeLevel; |
| 294 |
|
| 295 |
float fDACFileScale; |
| 296 |
float fDACFileOffset; |
| 297 |
ABFLONG lDACFileEpisodeNum; |
| 298 |
short nDACFileADCNum; |
| 299 |
|
| 300 |
short nConditEnable; |
| 301 |
ABFLONG lConditNumPulses; |
| 302 |
float fBaselineDuration; |
| 303 |
float fBaselineLevel; |
| 304 |
float fStepDuration; |
| 305 |
float fStepLevel; |
| 306 |
float fPostTrainPeriod; |
| 307 |
float fPostTrainLevel; |
| 308 |
short nMembTestEnable; |
| 309 |
|
| 310 |
short nLeakSubtractType; |
| 311 |
short nPNPolarity; |
| 312 |
float fPNHoldingLevel; |
| 313 |
short nPNNumADCChannels; |
| 314 |
short nPNPosition; |
| 315 |
short nPNNumPulses; |
| 316 |
float fPNSettlingTime; |
| 317 |
float fPNInterpulse; |
| 318 |
|
| 319 |
short nLTPUsageOfDAC; |
| 320 |
short nLTPPresynapticPulses; |
| 321 |
|
| 322 |
ABFLONG lDACFilePathIndex; |
| 323 |
|
| 324 |
float fMembTestPreSettlingTimeMS; |
| 325 |
float fMembTestPostSettlingTimeMS; |
| 326 |
|
| 327 |
short nLeakSubtractADCIndex; |
| 328 |
|
| 329 |
char sUnused[124]; |
| 330 |
}; |
| 331 |
|
| 332 |
struct ABF_EpochInfoPerDAC |
| 333 |
{ |
| 334 |
|
| 335 |
short nEpochNum; |
| 336 |
short nDACNum; |
| 337 |
|
| 338 |
|
| 339 |
short nEpochType; |
| 340 |
float fEpochInitLevel; |
| 341 |
float fEpochLevelInc; |
| 342 |
ABFLONG lEpochInitDuration; |
| 343 |
ABFLONG lEpochDurationInc; |
| 344 |
ABFLONG lEpochPulsePeriod; |
| 345 |
ABFLONG lEpochPulseWidth; |
| 346 |
|
| 347 |
char sUnused[18]; |
| 348 |
}; |
| 349 |
|
| 350 |
struct ABF_EpochInfo |
| 351 |
{ |
| 352 |
|
| 353 |
short nEpochNum; |
| 354 |
|
| 355 |
|
| 356 |
short nDigitalValue; |
| 357 |
short nDigitalTrainValue; |
| 358 |
short nAlternateDigitalValue; |
| 359 |
short nAlternateDigitalTrainValue; |
| 360 |
bool bEpochCompression; |
| 361 |
|
| 362 |
char sUnused[21]; |
| 363 |
}; |
| 364 |
|
| 365 |
struct ABF_StatsRegionInfo |
| 366 |
{ |
| 367 |
|
| 368 |
short nRegionNum; |
| 369 |
short nADCNum; |
| 370 |
|
| 371 |
short nStatsActiveChannels; |
| 372 |
short nStatsSearchRegionFlags; |
| 373 |
short nStatsSelectedRegion; |
| 374 |
short nStatsSmoothing; |
| 375 |
short nStatsSmoothingEnable; |
| 376 |
short nStatsBaseline; |
| 377 |
ABFLONG lStatsBaselineStart; |
| 378 |
ABFLONG lStatsBaselineEnd; |
| 379 |
|
| 380 |
|
| 381 |
ABFLONG lStatsMeasurements; |
| 382 |
ABFLONG lStatsStart; |
| 383 |
ABFLONG lStatsEnd; |
| 384 |
short nRiseBottomPercentile; |
| 385 |
short nRiseTopPercentile; |
| 386 |
short nDecayBottomPercentile; |
| 387 |
short nDecayTopPercentile; |
| 388 |
short nStatsSearchMode; |
| 389 |
short nStatsSearchDAC; |
| 390 |
short nStatsBaselineDAC; |
| 391 |
|
| 392 |
char sUnused[78]; |
| 393 |
}; |
| 394 |
|
| 395 |
struct ABF_UserListInfo |
| 396 |
{ |
| 397 |
|
| 398 |
short nListNum; |
| 399 |
|
| 400 |
|
| 401 |
short nULEnable; |
| 402 |
short nULParamToVary; |
| 403 |
short nULRepeat; |
| 404 |
ABFLONG lULParamValueListIndex; |
| 405 |
|
| 406 |
char sUnused[52]; |
| 407 |
}; |
| 408 |
|
| 409 |
struct ABF_SynchArray |
| 410 |
{ |
| 411 |
ABFLONG lStart; |
| 412 |
ABFLONG lLength; |
| 413 |
}; |
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
#pragma pack(pop) // return to default packing |
| 418 |
|
| 419 |
#endif |