GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / dev > lci_host / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

create.c File Reference

Calibration configuration file creation functions. More...

#include "LCI/LCI_msgs.h"
#include "create.h"
#include "configure_p.h"
#include "enums_p.h"
#include "macros_p.h"
#include "LSEC/LSEC_ctx.h"
#include "FBS/FBS_pubrtos.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/BSWP.h"
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>

Functions

static unsigned flush (void *inp, size_t size, int fd)
 Write data to a file, swapping the bytes if necessary.
unsigned LCI_create (LCI_configuration *cnf, const char *filename, int mode)
 Open the file and associate it with this configuration structure.
unsigned LCI_writeHdr (LCI_configuration *cnf)
 Write the configuration header to its file.
unsigned LCI_write (LCI_configuration *cnf)
 Write the configuration structure to its file.
unsigned LCI_finish (LCI_configuration *cnf)
 Close the configuration file.


Detailed Description

Calibration configuration file creation functions.

Author:
James Swain & Owen Saxton
Id

Function Documentation

unsigned flush ( void *  inp,
size_t  size,
int  fd 
) [static]

Write data to a file, swapping the bytes if necessary.

Parameters:
inp Pointer to the location to holding the output data
size Size of the block to write
fd File descriptor
Return values:
LCI_SUCCESS if data was written successfully
LCI_FWRITE if there was an error during the write

unsigned LCI_create ( LCI_configuration *  cnf,
const char *  filename,
int  mode 
)

Open the file and associate it with this configuration structure.

Parameters:
cnf Pointer to an initialised configuration structure
filename Name of the file to create
mode Calibration mode
Return values:
LCI_SUCCESS if the file opens successfully
LCI_FOPEN if the file failed to open successfully
LCI_TYPE if the specified type is not one of ACD, CAL or TKR
LCI_FWRITE if an error occurs writing the file verion information

unsigned LCI_finish ( LCI_configuration *  cnf  ) 

Close the configuration file.

Parameters:
cnf Pointer to an opened configuration
Return values:
LCI_SUCCESS If the file closes successfully
LCI_FCLOSE If there is an error closing the file

unsigned LCI_write ( LCI_configuration *  cnf  ) 

Write the configuration structure to its file.

Parameters:
cnf Pointer to an opened configuration
Return values:
LCI_SUCCESS if a configuration was written successfully
LCI_FWRITE if there was an error during the write
LCI_TYPE if the configuration type is bad (not reported)

unsigned LCI_writeHdr ( LCI_configuration *  cnf  ) 

Write the configuration header to its file.

Parameters:
cnf Pointer to an opened configuration
Return values:
LCI_SUCCESS if a configuration was written successfully
LCI_FWRITE if there was an error during the write


Generated on Wed Mar 3 14:48:14 2010 by  doxygen 1.5.3