asc.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
#include "common.h"

Include dependency graph for asc.c:

Go to the source code of this file.

Functions

FILE * OpenAscChannel (int channel)
 open an asc file for output
void CloseAscFile (int channel)
 end a ASC channel file The asc header is updated according to the previous information structure
void AbortAscFile (int channel)
 cancel a ASC channel file
void AddAscData (int channel)
 process one channel

Variables

FILE * ascChannelFile [MAX_CHANNEL]
char ascChannelFileName [MAX_CHANNEL][128]


Function Documentation

void AbortAscFile ( int  channel  ) 

cancel a ASC channel file

Parameters:
channel the channel to cancel

Definition at line 156 of file asc.c.

References ascChannelFile, ascChannelFileName, and PrintDebug.

Referenced by AddAscData().

void AddAscData ( int  channel  ) 

process one channel

Definition at line 168 of file asc.c.

References AbortAscFile(), ascChannelFile, ascChannelFileName, HWConfigType::data, HWConfig, infoHeader, InfoHeaderType::npts, Titan2SRType::npts, OpenAscChannel(), PrintError, HWConfigType::srExp, and HWConfigType::srObs.

Referenced by EndSuperFrame().

Here is the call graph for this function:

void CloseAscFile ( int  channel  ) 

end a ASC channel file The asc header is updated according to the previous information structure

Parameters:
channel the channel to close

Definition at line 84 of file asc.c.

References ascChannelFile, ascChannelFileName, auxChannelName, auxChannelUnit, correctedTime, Titan2SRType::div, FileName(), fileNameOptions, HWConfigType::formatVersion, infoHeader, MAJOR, MAX_OSIRIS_CHANNEL, MINOR, noWrite, InfoHeaderType::npts, oldHWConfig, PrintLog, PROGRAMNAME, Rename(), InfoHeaderType::sr, station, StrTime(), time2str(), UpdateInfoHeader(), and VERSION.

Referenced by FlushDataFiles().

Here is the call graph for this function:

FILE* OpenAscChannel ( int  channel  ) 

open an asc file for output

Parameters:
channel the channel number
Returns:
the correponding FILE* pointer, NULL on error

Definition at line 47 of file asc.c.

References ascChannelFile, ascChannelFileName, FILE_BUFFER_SIZE, InitInfoHeader(), OpenTempFile(), and PrintError.

Referenced by AddAscData().

Here is the call graph for this function:


Variable Documentation

FILE* ascChannelFile[MAX_CHANNEL]

Initial value:

 {
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
}

Definition at line 35 of file asc.c.

Referenced by AbortAscFile(), AddAscData(), CloseAscFile(), and OpenAscChannel().

char ascChannelFileName[MAX_CHANNEL][128]

Definition at line 42 of file asc.c.

Referenced by AbortAscFile(), AddAscData(), CloseAscFile(), and OpenAscChannel().


Generated on Tue Jul 22 23:11:56 2008 for Titan2Reader by  doxygen 1.5.6