Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
Son.h File Reference
#include "machine.h"
Include dependency graph for Son.h:

Go to the source code of this file.

Classes

struct  TMarker
struct  TAdcMark
struct  TRealMark
struct  TTextMark
struct  TFilterMask
struct  TSONTimeDate
struct  TSONCreator

Macros

#define SONMAXCHANS   32 /* The old limit on channels, now the minimum number */
#define SONABSMAXCHANS   451 /* Maximum possible channels from SON file structures */
#define SON_NO_FILE   -1
#define SON_NO_DOS_FILE   -2 /* Not used by son.c - historical */
#define SON_NO_PATH   -3 /* Not used by son.c - historical */
#define SON_NO_HANDLES   -4
#define SON_NO_ACCESS   -5
#define SON_BAD_HANDLE   -6
#define SON_MEMORY_ZAP   -7 /* Not used by son.c - historical */
#define SON_OUT_OF_MEMORY   -8
#define SON_INVALID_DRIVE   -15 /* Not used by son.c - historical (Mac?) */
#define SON_OUT_OF_HANDLES   -16 /* This refers to SON file handles */
#define SON_FILE_ALREADY_OPEN   -600 /* Used on 68k Mac, not used by son.c */
#define SON_BAD_READ   -17
#define SON_BAD_WRITE   -18
#define SON_NO_CHANNEL   -9
#define SON_CHANNEL_USED   -10
#define SON_CHANNEL_UNUSED   -11
#define SON_PAST_EOF   -12
#define SON_WRONG_FILE   -13
#define SON_NO_EXTRA   -14
#define SON_CORRUPT_FILE   -19
#define SON_PAST_SOF   -20
#define SON_READ_ONLY   -21
#define SON_BAD_PARAM   -22
#define SON_NUMFILECOMMENTS   5
#define SON_COMMENTSZ   79
#define SON_CHANCOMSZ   71
#define SON_UNITSZ   5
#define SON_TITLESZ   9
#define FastWrite   0
#define NormalWrite   1
#define TSTIME_MAX   LONG_MAX
#define SON_MAXADCMARK   1024 /* maximum points in AdcMark data (arbitrary) */
#define SON_MAXAMTRACE   4 /* maximum interleaved traces in AdcMark data */
#define SON_MAXREALMARK   512 /* maximum points in RealMark (arbitrary) */
#define SON_MAXTEXTMARK   2048 /* maximum points in a Textmark (arbitrary) */
#define SON_FMASKSZ   32 /* number of TFilterElt in mask */
#define SON_FMASK_ORMODE   0x02000000 /* use OR if data rather than AND */
#define SON_FMASK_ANDMODE   0x00000000
#define SON_FMASK_VALID   0x02000000 /* bits that are valid in the mask */
#define SON_FALLLAYERS   -1
#define SON_FALLITEMS   -1
#define SON_FCLEAR   0
#define SON_FSET   1
#define SON_FINVERT   2
#define SON_FREAD   -1

Typedefs

typedef long TSTime
typedef short TAdc
typedef char TMarkBytes[4]
typedef TAdc FARTpAdc
typedef TSTime FARTpSTime
typedef TMarker FARTpMarker
typedef TAdcMark FARTpAdcMark
typedef TRealMark FARTpRealMark
typedef TTextMark FARTpTextMark
typedef char FARTpStr
typedef const char FARTpCStr
typedef WORD FARTpWORD
typedef BOOLEAN FARTpBOOL
typedef float FARTpFloat
typedef void FARTpVoid
typedef short FARTpShort
typedef TMarkBytes FARTpMarkBytes
typedef unsigned char TFilterElt
typedef TFilterElt TLayerMask[SON_FMASKSZ]
typedef TFilterMask FARTpFilterMask

Enumerations

enum  TDataKind {
  ChanOff =0 , Adc , EventFall , EventRise ,
  EventBoth , Marker , AdcMark , RealMark ,
  TextMark , RealWave
}

Functions

 SONAPI (void) SONInitFiles(void)
 SONAPI (short) SONOpenOldFile(TpCStr name
 SONAPI (BOOLEAN) SONCanWrite(short fh)
 SONAPI (WORD) SONGetusPerTime(short fh)
 SONAPI (TSTime) SONWriteADCBlock(short fh
 SONAPI (DWORD) SONFileBytes(short fh)
 SONAPI (int) SONGetVersion(short fh)
 SONAPI (TDataKind) SONChanKind(short fh
 SONAPI (float) SONIdealRate(short fh
 SONAPI (double) SONTimeBase(short fh

Variables

int iOpenMode
short fMode
short WORD extra
WORD usPerTime
WORD WORD timePerADC
WORD chan
WORD short sPhyCh
WORD short short dvd
WORD short short long lBufSz
WORD short short long TpCStr szCom
WORD short short long TpCStr TpCStr szTitle
WORD short short long TpCStr TpCStr float fRate
WORD short short long TpCStr TpCStr float float scl
WORD short short long TpCStr TpCStr float float float offs
WORD short short long TpCStr TpCStr float float float TpCStr szUnt
WORD short short long TpCStr TpCStr float float float TpCStr WORD points
WORD short short long TpCStr TpCStr float float float TpCStr WORD short preTrig
WORD short TSTime long TpCStr TpCStr float float float TpCStr WORD short int nTrace
WORD short long TpCStr TpCStr float float min
WORD short long TpCStr TpCStr float float float max
WORD BOOLEAN bLow
WORD short long TpCStr TpCStr float TDataKind evtKind
int nChan
int int nBytes
WORD which
WORD TpCStr szFCom
WORD TpStr pcFCom
WORD TpStr short sMax
WORD TpStr pcCom
WORD TpStr pcTitle
WORD TpFloat pfRate
WORD TpFloat TpFloat pfMin
WORD TpFloat TpFloat TpFloat pfMax
WORD float offset
WORD float scale
WORD TpFloat TpFloat TpStr pcUnt
WORD TpSTime plBuf
WORD TpSTime long count
WORD TpMarker pM
WORD TpAdc psBuf
WORD TpAdc long TSTime sTime
int TSTime BOOLEAN bKeep
int TSTime TSTime eTime
BOOLEAN bDelete
WORD TpSTime plTimes
WORD TpSTime long TSTime TSTime TpBOOL levLowP
WORD TpSTime long TSTime TSTime TpBOOL TpFilterMask pFiltMask
WORD TpMarker pMark
WORD TpAdc adcDataP
WORD TpAdc long TSTime TSTime TpSTime pbTime
TpVoid buff
TpVoid WORD bytes
TpVoid WORD WORD BOOLEAN writeIt
WORD TSTime time
WORD TSTime TpMarker WORD size
WORD wChan
WORD TSTime TSTime TpVoid pvVal
WORD TSTime TSTime TpVoid TpMarkBytes pMB
WORD TSTime TSTime TpVoid TpMarkBytes TpBOOL pbMk
WORD TSTime TSTime long lPoints
WORD TSTime TSTime long BOOLEAN bAdc
WORD TpMarker pBuff
WORD TpMarker int n
WORD TpMarker int TpMarker TpVoid pvData
WORD TpMarker int TpMarker TpVoid BOOLEAN bSet
TpFilterMask pFM
int layer
int int item
int int int set
TpFilterMask pFiltMask2
long lNew
int nChannels
WORD float fIR
WORD float fMin
WORD float float fMax
WORD short sPhyChan
WORD TpFloat pfBuff
WORD TpFloat pfData
TSONTimeDatepTDGet
TSONTimeDate const TSONTimeDatepTDSet
double dTB
TSONCreatorpCGet
TSONCreator const TSONCreatorpCSet

Macro Definition Documentation

◆ FastWrite

#define FastWrite   0

Definition at line 127 of file Son.h.

◆ NormalWrite

#define NormalWrite   1

Definition at line 128 of file Son.h.

◆ SON_BAD_HANDLE

#define SON_BAD_HANDLE   -6

Definition at line 70 of file Son.h.

◆ SON_BAD_PARAM

#define SON_BAD_PARAM   -22

Definition at line 94 of file Son.h.

◆ SON_BAD_READ

#define SON_BAD_READ   -17

Definition at line 78 of file Son.h.

◆ SON_BAD_WRITE

#define SON_BAD_WRITE   -18

Definition at line 79 of file Son.h.

◆ SON_CHANCOMSZ

#define SON_CHANCOMSZ   71

Definition at line 101 of file Son.h.

◆ SON_CHANNEL_UNUSED

#define SON_CHANNEL_UNUSED   -11

Definition at line 87 of file Son.h.

◆ SON_CHANNEL_USED

#define SON_CHANNEL_USED   -10

Definition at line 86 of file Son.h.

◆ SON_COMMENTSZ

#define SON_COMMENTSZ   79

Definition at line 100 of file Son.h.

◆ SON_CORRUPT_FILE

#define SON_CORRUPT_FILE   -19

Definition at line 91 of file Son.h.

◆ SON_FALLITEMS

#define SON_FALLITEMS   -1

Definition at line 229 of file Son.h.

◆ SON_FALLLAYERS

#define SON_FALLLAYERS   -1

Definition at line 228 of file Son.h.

◆ SON_FCLEAR

#define SON_FCLEAR   0

Definition at line 230 of file Son.h.

◆ SON_FILE_ALREADY_OPEN

#define SON_FILE_ALREADY_OPEN   -600 /* Used on 68k Mac, not used by son.c */

Definition at line 76 of file Son.h.

◆ SON_FINVERT

#define SON_FINVERT   2

Definition at line 232 of file Son.h.

◆ SON_FMASK_ANDMODE

#define SON_FMASK_ANDMODE   0x00000000

Definition at line 223 of file Son.h.

◆ SON_FMASK_ORMODE

#define SON_FMASK_ORMODE   0x02000000 /* use OR if data rather than AND */

Definition at line 222 of file Son.h.

◆ SON_FMASK_VALID

#define SON_FMASK_VALID   0x02000000 /* bits that are valid in the mask */

Definition at line 224 of file Son.h.

◆ SON_FMASKSZ

#define SON_FMASKSZ   32 /* number of TFilterElt in mask */

Definition at line 208 of file Son.h.

◆ SON_FREAD

#define SON_FREAD   -1

Definition at line 233 of file Son.h.

◆ SON_FSET

#define SON_FSET   1

Definition at line 231 of file Son.h.

◆ SON_INVALID_DRIVE

#define SON_INVALID_DRIVE   -15 /* Not used by son.c - historical (Mac?) */

Definition at line 73 of file Son.h.

◆ SON_MAXADCMARK

#define SON_MAXADCMARK   1024 /* maximum points in AdcMark data (arbitrary) */

Definition at line 147 of file Son.h.

◆ SON_MAXAMTRACE

#define SON_MAXAMTRACE   4 /* maximum interleaved traces in AdcMark data */

Definition at line 148 of file Son.h.

◆ SON_MAXREALMARK

#define SON_MAXREALMARK   512 /* maximum points in RealMark (arbitrary) */

Definition at line 155 of file Son.h.

◆ SON_MAXTEXTMARK

#define SON_MAXTEXTMARK   2048 /* maximum points in a Textmark (arbitrary) */

Definition at line 162 of file Son.h.

◆ SON_MEMORY_ZAP

#define SON_MEMORY_ZAP   -7 /* Not used by son.c - historical */

Definition at line 71 of file Son.h.

◆ SON_NO_ACCESS

#define SON_NO_ACCESS   -5

Definition at line 69 of file Son.h.

◆ SON_NO_CHANNEL

#define SON_NO_CHANNEL   -9

Definition at line 85 of file Son.h.

◆ SON_NO_DOS_FILE

#define SON_NO_DOS_FILE   -2 /* Not used by son.c - historical */

Definition at line 66 of file Son.h.

◆ SON_NO_EXTRA

#define SON_NO_EXTRA   -14

Definition at line 90 of file Son.h.

◆ SON_NO_FILE

#define SON_NO_FILE   -1

Definition at line 65 of file Son.h.

◆ SON_NO_HANDLES

#define SON_NO_HANDLES   -4

Definition at line 68 of file Son.h.

◆ SON_NO_PATH

#define SON_NO_PATH   -3 /* Not used by son.c - historical */

Definition at line 67 of file Son.h.

◆ SON_NUMFILECOMMENTS

#define SON_NUMFILECOMMENTS   5

Definition at line 99 of file Son.h.

◆ SON_OUT_OF_HANDLES

#define SON_OUT_OF_HANDLES   -16 /* This refers to SON file handles */

Definition at line 74 of file Son.h.

◆ SON_OUT_OF_MEMORY

#define SON_OUT_OF_MEMORY   -8

Definition at line 72 of file Son.h.

◆ SON_PAST_EOF

#define SON_PAST_EOF   -12

Definition at line 88 of file Son.h.

◆ SON_PAST_SOF

#define SON_PAST_SOF   -20

Definition at line 92 of file Son.h.

◆ SON_READ_ONLY

#define SON_READ_ONLY   -21

Definition at line 93 of file Son.h.

◆ SON_TITLESZ

#define SON_TITLESZ   9

Definition at line 103 of file Son.h.

◆ SON_UNITSZ

#define SON_UNITSZ   5

Definition at line 102 of file Son.h.

◆ SON_WRONG_FILE

#define SON_WRONG_FILE   -13

Definition at line 89 of file Son.h.

◆ SONABSMAXCHANS

#define SONABSMAXCHANS   451 /* Maximum possible channels from SON file structures */

Definition at line 60 of file Son.h.

◆ SONMAXCHANS

#define SONMAXCHANS   32 /* The old limit on channels, now the minimum number */

Definition at line 59 of file Son.h.

◆ TSTIME_MAX

#define TSTIME_MAX   LONG_MAX

Definition at line 137 of file Son.h.

Typedef Documentation

◆ TAdc

typedef short TAdc

Definition at line 138 of file Son.h.

◆ TFilterElt

typedef unsigned char TFilterElt

Definition at line 209 of file Son.h.

◆ TLayerMask

typedef TFilterElt TLayerMask[SON_FMASKSZ]

Definition at line 210 of file Son.h.

◆ TMarkBytes

typedef char TMarkBytes[4]

Definition at line 139 of file Son.h.

◆ TpAdc

typedef TAdc FAR* TpAdc

Definition at line 169 of file Son.h.

◆ TpAdcMark

Definition at line 172 of file Son.h.

◆ TpBOOL

typedef BOOLEAN FAR* TpBOOL

Definition at line 178 of file Son.h.

◆ TpCStr

typedef const char FAR* TpCStr

Definition at line 176 of file Son.h.

◆ TpFilterMask

Definition at line 226 of file Son.h.

◆ TpFloat

typedef float FAR* TpFloat

Definition at line 179 of file Son.h.

◆ TpMarkBytes

Definition at line 182 of file Son.h.

◆ TpMarker

typedef TMarker FAR* TpMarker

Definition at line 171 of file Son.h.

◆ TpRealMark

Definition at line 173 of file Son.h.

◆ TpShort

typedef short FAR* TpShort

Definition at line 181 of file Son.h.

◆ TpSTime

typedef TSTime FAR* TpSTime

Definition at line 170 of file Son.h.

◆ TpStr

typedef char FAR* TpStr

Definition at line 175 of file Son.h.

◆ TpTextMark

Definition at line 174 of file Son.h.

◆ TpVoid

typedef void FAR* TpVoid

Definition at line 180 of file Son.h.

◆ TpWORD

typedef WORD FAR* TpWORD

Definition at line 177 of file Son.h.

◆ TSTime

typedef long TSTime

Definition at line 136 of file Son.h.

Enumeration Type Documentation

◆ TDataKind

enum TDataKind
Enumerator
ChanOff 
Adc 
EventFall 
EventRise 
EventBoth 
Marker 
AdcMark 
RealMark 
TextMark 
RealWave 

Definition at line 109 of file Son.h.

Function Documentation

◆ SONAPI() [1/10]

SONAPI ( BOOLEAN )

◆ SONAPI() [2/10]

SONAPI ( double )

◆ SONAPI() [3/10]

SONAPI ( DWORD )

References chan, and sTime.

◆ SONAPI() [4/10]

SONAPI ( float )

◆ SONAPI() [5/10]

SONAPI ( int )

◆ SONAPI() [6/10]

SONAPI ( short )

◆ SONAPI() [7/10]

SONAPI ( TDataKind )

References chan.

◆ SONAPI() [8/10]

SONAPI ( TSTime )

◆ SONAPI() [9/10]

SONAPI ( void )

References extra, and fMode.

◆ SONAPI() [10/10]

SONAPI ( WORD )

References chan, and szUnt.

Variable Documentation

◆ adcDataP

WORD TpAdc adcDataP

Definition at line 326 of file Son.h.

◆ bAdc

WORD TSTime TSTime long BOOLEAN bAdc

Definition at line 350 of file Son.h.

◆ bDelete

BOOLEAN bDelete

Definition at line 319 of file Son.h.

◆ bKeep

int TSTime BOOLEAN bKeep

Definition at line 310 of file Son.h.

◆ bLow

WORD BOOLEAN bLow

Definition at line 282 of file Son.h.

◆ bSet

WORD TpMarker int TpMarker TpVoid BOOLEAN bSet

Definition at line 354 of file Son.h.

◆ buff

TpVoid buff

Definition at line 334 of file Son.h.

◆ bytes

TpVoid WORD bytes

Definition at line 334 of file Son.h.

◆ chan

WORD chan

Definition at line 264 of file Son.h.

Referenced by SONAPI(), SONAPI(), and SONAPI().

◆ count

WORD TpFloat long count

Definition at line 305 of file Son.h.

Referenced by CPReadFile(), CPReadFile2(), CPWriteFile(), ReadFromFile(), and strncpy_s().

◆ dTB

double dTB

Definition at line 403 of file Son.h.

◆ dvd

WORD short TSTime dvd

Definition at line 264 of file Son.h.

◆ eTime

WORD TpFloat long TSTime TSTime eTime

Definition at line 311 of file Son.h.

◆ evtKind

WORD short long TpCStr TpCStr float TDataKind evtKind

Definition at line 284 of file Son.h.

◆ extra

int WORD extra

Definition at line 255 of file Son.h.

Referenced by SONAPI().

◆ fIR

WORD float fIR

Definition at line 388 of file Son.h.

◆ fMax

WORD float float fMax

Definition at line 390 of file Son.h.

◆ fMin

WORD float fMin

Definition at line 390 of file Son.h.

◆ fMode

short fMode

Definition at line 255 of file Son.h.

Referenced by SONAPI().

◆ fRate

WORD short long TpCStr TpCStr float fRate

Definition at line 265 of file Son.h.

◆ iOpenMode

int iOpenMode

Definition at line 254 of file Son.h.

◆ item

int int item

Definition at line 357 of file Son.h.

◆ layer

int layer

Definition at line 357 of file Son.h.

◆ lBufSz

WORD short TSTime long lBufSz

Definition at line 265 of file Son.h.

◆ levLowP

Definition at line 322 of file Son.h.

◆ lNew

long lNew

Definition at line 362 of file Son.h.

◆ lPoints

WORD TSTime TSTime long lPoints

Definition at line 350 of file Son.h.

◆ max

WORD TpFloat long max

Definition at line 278 of file Son.h.

◆ min

WORD short long TpCStr TpCStr float float min

Definition at line 278 of file Son.h.

◆ n

◆ nBytes

int int nBytes

Definition at line 286 of file Son.h.

◆ nChan

int nChan

Definition at line 286 of file Son.h.

◆ nChannels

int nChannels

Definition at line 384 of file Son.h.

◆ nTrace

WORD short TSTime long TpCStr TpCStr float float float TpCStr WORD short int nTrace

Definition at line 275 of file Son.h.

◆ offs

WORD short TSTime long TpCStr TpCStr float float float offs

Definition at line 266 of file Son.h.

◆ offset

WORD short TSTime long TpCStr TpCStr float float offset

Definition at line 298 of file Son.h.

◆ pbMk

Definition at line 347 of file Son.h.

◆ pbTime

Definition at line 327 of file Son.h.

◆ pBuff

WORD TpMarker pBuff

Definition at line 353 of file Son.h.

◆ pcCom

WORD TpStr pcCom

Definition at line 291 of file Son.h.

◆ pcFCom

WORD TpStr pcFCom

Definition at line 289 of file Son.h.

◆ pCGet

TSONCreator* pCGet

Definition at line 405 of file Son.h.

◆ pCSet

TSONCreator const TSONCreator* pCSet

Definition at line 405 of file Son.h.

◆ pcTitle

WORD TpStr pcTitle

Definition at line 293 of file Son.h.

◆ pcUnt

WORD TpStr pcUnt

Definition at line 301 of file Son.h.

◆ pfBuff

WORD TpFloat pfBuff

Definition at line 398 of file Son.h.

◆ pfData

WORD TpFloat pfData

Definition at line 399 of file Son.h.

◆ pFiltMask

Definition at line 323 of file Son.h.

◆ pFiltMask2

TpFilterMask pFiltMask2

Definition at line 358 of file Son.h.

◆ pFM

Definition at line 356 of file Son.h.

◆ pfMax

Definition at line 294 of file Son.h.

Referenced by ABF2H_GetFirstSampleInterval().

◆ pfMin

WORD TpFloat pfMin

Definition at line 294 of file Son.h.

Referenced by ABF2H_GetFirstSampleInterval().

◆ pfRate

WORD TpFloat pfRate

Definition at line 294 of file Son.h.

◆ plBuf

WORD TpSTime plBuf

Definition at line 305 of file Son.h.

◆ plTimes

WORD TpSTime plTimes

Definition at line 321 of file Son.h.

◆ pM

Definition at line 306 of file Son.h.

Referenced by stfnum::peak().

◆ pMark

Definition at line 324 of file Son.h.

◆ pMB

Definition at line 346 of file Son.h.

◆ points

WORD TpStr TpWORD points

Definition at line 269 of file Son.h.

◆ preTrig

Definition at line 269 of file Son.h.

◆ psBuf

WORD TpAdc psBuf

Definition at line 307 of file Son.h.

Referenced by ATF_ReadHeaderLine(), and ATF_ReadHeaderNoQuotes().

◆ pTDGet

TSONTimeDate* pTDGet

Definition at line 402 of file Son.h.

◆ pTDSet

TSONTimeDate const TSONTimeDate* pTDSet

Definition at line 402 of file Son.h.

◆ pvData

Definition at line 354 of file Son.h.

◆ pvVal

Definition at line 346 of file Son.h.

◆ scale

WORD short TSTime long TpCStr TpCStr float scale

Definition at line 299 of file Son.h.

◆ scl

WORD short TSTime long TpCStr TpCStr float float scl

Definition at line 266 of file Son.h.

◆ set

int int int set

Definition at line 357 of file Son.h.

◆ size

◆ sMax

WORD TpStr short sMax

Definition at line 289 of file Son.h.

◆ sPhyCh

WORD short sPhyCh

Definition at line 264 of file Son.h.

◆ sPhyChan

WORD short sPhyChan

Definition at line 395 of file Son.h.

◆ sTime

WORD TpFloat long TSTime sTime

Definition at line 307 of file Son.h.

Referenced by SONAPI().

◆ szCom

WORD short TSTime long TpCStr szCom

Definition at line 265 of file Son.h.

◆ szFCom

WORD TpCStr szFCom

Definition at line 288 of file Son.h.

◆ szTitle

WORD short TSTime long TpCStr TpCStr szTitle

Definition at line 265 of file Son.h.

◆ szUnt

WORD short TSTime long TpCStr TpCStr float float TpCStr szUnt

Definition at line 266 of file Son.h.

Referenced by SONAPI().

◆ time

WORD TSTime time

Definition at line 336 of file Son.h.

◆ timePerADC

WORD WORD timePerADC

Definition at line 263 of file Son.h.

◆ usPerTime

WORD usPerTime

Definition at line 263 of file Son.h.

◆ wChan

WORD wChan

Definition at line 345 of file Son.h.

◆ which

WORD which

Definition at line 288 of file Son.h.

◆ writeIt

TpVoid WORD WORD BOOLEAN writeIt

Definition at line 335 of file Son.h.