LALPulsar  6.1.0.1-b72065a
SFTReferenceLibrary.c File Reference

Prototypes

unsigned long long crc64 (const unsigned char *data, unsigned int length, unsigned long long crc)
 
static void swap2 (char *location)
 
static void swap4 (char *location)
 
static void swap8 (char *location)
 
static int validate_sizes (void)
 
static int validate_version (double version)
 
const charSFTErrorMessage (int errorcode)
 
int WriteSFT (FILE *fp, int gps_sec, int gps_nsec, double tbase, int firstfreqindex, int nsamples, const char *detector, unsigned short windowspec, const char *comment, float *data)
 
int ReadSFTHeader (FILE *fp, struct headertag2 *info, char **comment, int *swapendian, int validate)
 
int ReadSFTData (FILE *fp, float *data, int firstbin, int nsamples, char **comment, struct headertag2 *info)
 
int CheckSFTHeaderConsistency (struct headertag2 *headerone, struct headertag2 *headertwo)
 
int unknownDetector (const char *detector)
 
int ValidateSFTFile (const char *fname)
 Verify that the contents of a SFT file are valid. More...
 

Go to the source code of this file.

Macros

#define POLY64   0xd800000000000000ULL
 
#define TABLELEN   256
 
#define BLOCKSIZE   65536
 

Macro Definition Documentation

◆ POLY64

#define POLY64   0xd800000000000000ULL

Definition at line 45 of file SFTReferenceLibrary.c.

◆ TABLELEN

#define TABLELEN   256

Definition at line 46 of file SFTReferenceLibrary.c.

◆ BLOCKSIZE

#define BLOCKSIZE   65536

Definition at line 47 of file SFTReferenceLibrary.c.

Function Documentation

◆ crc64()

unsigned long long crc64 ( const unsigned char data,
unsigned int  length,
unsigned long long  crc 
)

Definition at line 61 of file SFTReferenceLibrary.c.

◆ swap2()

static void swap2 ( char location)
static

Definition at line 102 of file SFTReferenceLibrary.c.

◆ swap4()

static void swap4 ( char location)
static

Definition at line 110 of file SFTReferenceLibrary.c.

◆ swap8()

static void swap8 ( char location)
static

Definition at line 119 of file SFTReferenceLibrary.c.

◆ validate_sizes()

static int validate_sizes ( void  )
static

Definition at line 134 of file SFTReferenceLibrary.c.

◆ validate_version()

static int validate_version ( double  version)
static

Definition at line 149 of file SFTReferenceLibrary.c.