A wrapper for the HDF SD interface. More...
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <time.h>
#include "sds.h"
Classes | |
struct | fileID |
Typedefs | |
typedef struct fileID | fileID |
Functions | |
fileID * | NewFileID (char *name, char *access) |
fileID * | findIDbyComponent (char *name) |
fileID * | findIDbyFilename (char *name) |
void | removeFileID (char *filename) |
long | SDScomputeSize (int32 rank, int32 *dims, int32 datatype) |
void | SDScloseAll () |
void | SDSdeactivate (char *filename) |
void | SDSreactivate (char *filename) |
void | SDSclose (char *filename) |
fileID * | getFileID (char *filename) |
void | SDSopen (char *filename, char *access) |
void | SDSflush (char *filename) |
void | SDSpurge (char *filename) |
void | SDSseek (char *filename, int setnum) |
int32 | SDSseekName (char *filename, char *dataname) |
int32 | SDSgetNT (char *filename) |
int32 | SDSisCoord (char *filename) |
void | SDSsetNT (char *filename, int32 numbertype) |
long | SDSgetDims (char *filename, char *dataname, int32 *rank, int32 *dims) |
int | SDSreadData (char *filename, int32 rank, int32 *dims, VOIDP data) |
int | SDSreadChunk (char *filename, int32 rank, int32 *dims, int32 *origin, int32 *stride, VOIDP data) |
void | SDSgetFileInfo (char *filename, int32 *nsds, int32 *nattrib) |
int32 | SDSgetDataName (char *filename, char *name) |
int32 | SDSgetIndex (char *filename) |
int32 | SDSgetDataStrs (char *filename, char *label, char *units, char *format, char *coordsys, int maxlen) |
int32 | SDSgetNumDatasets (char *filename) |
int32 | SDSallocateDataset (char *filename, char *dataname, int32 rank, int32 *dims) |
int | SDSwriteChunk (char *filename, int32 rank, int32 *dims, int32 *origin, int32 *stride, VOIDP data) |
int | SDSwriteData (char *filename, char *dataname, int32 rank, int32 *dims, VOIDP data) |
int32 | SDSgetAnnotationSize (char *filename) |
int32 | SDSgetAnnotation (char *filename, char *annotation, int32 maxlen) |
int32 | SDSaddAnnotation (char *filename, char *annotation) |
int32 | SDSgetNumAttribs (char *filename) |
int32 | SDSwriteAttrib (char *filename, char *attribname, int32 numbertype, int32 nelements, VOIDP buffer) |
int32 | SDSreadAttrib (char *filename, char *attribname2, int32 nelements, VOIDP buffer) |
int32 | SDSfindAttribInfo (char *filename, char *attribname, int32 *numbertype, int32 *nelements) |
int32 | SDSgetAttribInfo (char *filename, int32 index, char *attribname, int32 *numbertype, int32 *nelements) |
A wrapper for the HDF SD interface.
fileID* findIDbyComponent | ( | char * | name | ) |
References fileID::componentname, fileID::id, and fileID::next.
fileID* findIDbyFilename | ( | char * | name | ) |
References fileID::filename, fileID::id, and fileID::next.
Referenced by getFileID(), SDSclose(), SDSdeactivate(), SDSflush(), SDSopen(), and SDSreactivate().
fileID* getFileID | ( | char * | filename | ) |
References findIDbyFilename(), fileID::id, NewFileID(), and SDSreactivate().
Referenced by SDSaddAnnotation(), SDSallocateDataset(), SDSfindAttribInfo(), SDSgetAnnotation(), SDSgetAnnotationSize(), SDSgetAttribInfo(), SDSgetDataName(), SDSgetDataStrs(), SDSgetDims(), SDSgetFileInfo(), SDSgetIndex(), SDSgetNT(), SDSgetNumAttribs(), SDSgetNumDatasets(), SDSisCoord(), SDSreadAttrib(), SDSreadChunk(), SDSreadData(), SDSseek(), SDSseekName(), SDSsetNT(), SDSwriteAttrib(), SDSwriteChunk(), and SDSwriteData().
fileID* NewFileID | ( | char * | name, | |
char * | access | |||
) |
References fileID::accessflags, fileID::componentname, fileID::filename, fileID::id, fileID::nattrib, fileID::nsds, and fileID::sdsnumber.
Referenced by getFileID(), and SDSopen().
void removeFileID | ( | char * | filename | ) |
References fileID::id, and fileID::next.
Referenced by SDSclose().
int32 SDSaddAnnotation | ( | char * | filename, | |
char * | annotation | |||
) |
References fileID::accessflags, fileID::filename, getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
int32 SDSallocateDataset | ( | char * | filename, | |
char * | dataname, | |||
int32 | rank, | |||
int32 * | dims | |||
) |
References fileID::accessflags, getFileID(), fileID::id, fileID::numbertype, and fileID::sds_id.
void SDSclose | ( | char * | filename | ) |
References findIDbyFilename(), fileID::id, and removeFileID().
Referenced by DAGHIO_HDF_NCSA_Flush(), DAGHIO_HDF_NCSA_Read(), DAGHIO_HDF_NCSA_Write(), and SDSpurge().
void SDScloseAll | ( | ) |
References fileID::id, fileID::next, and fileID::sds_id.
Referenced by DAGHIO_HDF_NCSA_Close().
long SDScomputeSize | ( | int32 | rank, | |
int32 * | dims, | |||
int32 | datatype | |||
) |
Referenced by SDSgetDims(), and SDSreadData().
void SDSdeactivate | ( | char * | filename | ) |
References fileID::accessflags, findIDbyFilename(), fileID::id, and fileID::sds_id.
int32 SDSfindAttribInfo | ( | char * | filename, | |
char * | attribname, | |||
int32 * | numbertype, | |||
int32 * | nelements | |||
) |
References getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
void SDSflush | ( | char * | filename | ) |
References findIDbyFilename(), and fileID::sds_id.
Referenced by DAGHIO_HDF_NCSA_Flush(), and DAGHIO_HDF_NCSA_Write().
int32 SDSgetAnnotation | ( | char * | filename, | |
char * | annotation, | |||
int32 | maxlen | |||
) |
References fileID::accessflags, fileID::filename, getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
int32 SDSgetAnnotationSize | ( | char * | filename | ) |
References fileID::accessflags, fileID::filename, getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
int32 SDSgetAttribInfo | ( | char * | filename, | |
int32 | index, | |||
char * | attribname, | |||
int32 * | numbertype, | |||
int32 * | nelements | |||
) |
References getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
int32 SDSgetDataName | ( | char * | filename, | |
char * | name | |||
) |
References getFileID(), fileID::id, fileID::nattrib, fileID::numbertype, fileID::sds_id, and fileID::sdsnumber.
Referenced by AMRseek().
int32 SDSgetDataStrs | ( | char * | filename, | |
char * | label, | |||
char * | units, | |||
char * | format, | |||
char * | coordsys, | |||
int | maxlen | |||
) |
References getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
long SDSgetDims | ( | char * | filename, | |
char * | dataname, | |||
int32 * | rank, | |||
int32 * | dims | |||
) |
References getFileID(), fileID::id, fileID::numbertype, fileID::sds_id, SDScomputeSize(), and fileID::sdsnumber.
Referenced by AMRreadAttribs().
void SDSgetFileInfo | ( | char * | filename, | |
int32 * | nsds, | |||
int32 * | nattrib | |||
) |
References getFileID().
int32 SDSgetIndex | ( | char * | filename | ) |
References getFileID().
Referenced by AMRseek(), and AMRseekTime().
int32 SDSgetNT | ( | char * | filename | ) |
References getFileID(), fileID::id, fileID::numbertype, fileID::sds_id, and fileID::sdsnumber.
int32 SDSgetNumAttribs | ( | char * | filename | ) |
References getFileID(), and fileID::sds_id.
Referenced by AMRgetNumAttribs().
int32 SDSgetNumDatasets | ( | char * | filename | ) |
References getFileID().
Referenced by AMRseek(), and AMRseekTime().
int32 SDSisCoord | ( | char * | filename | ) |
References getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
Referenced by AMRseek(), and AMRseekTime().
void SDSopen | ( | char * | filename, | |
char * | access | |||
) |
References findIDbyFilename(), and NewFileID().
Referenced by SDSpurge().
void SDSpurge | ( | char * | filename | ) |
References SDSclose(), and SDSopen().
void SDSreactivate | ( | char * | filename | ) |
References fileID::accessflags, findIDbyFilename(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
Referenced by getFileID().
int32 SDSreadAttrib | ( | char * | filename, | |
char * | attribname2, | |||
int32 | nelements, | |||
VOIDP | buffer | |||
) |
References getFileID(), fileID::id, fileID::sds_id, and fileID::sdsnumber.
Referenced by AMRgetLocation(), AMRreadAttribs(), and AMRseekTime().
int SDSreadChunk | ( | char * | filename, | |
int32 | rank, | |||
int32 * | dims, | |||
int32 * | origin, | |||
int32 * | stride, | |||
VOIDP | data | |||
) |
References getFileID(), fileID::id, fileID::nattrib, fileID::numbertype, fileID::sds_id, and fileID::sdsnumber.
int SDSreadData | ( | char * | filename, | |
int32 | rank, | |||
int32 * | dims, | |||
VOIDP | data | |||
) |
References getFileID(), fileID::id, fileID::numbertype, fileID::sds_id, SDScomputeSize(), and fileID::sdsnumber.
Referenced by AMRreadData().
void SDSseek | ( | char * | filename, | |
int | setnum | |||
) |
References getFileID(), fileID::id, and fileID::sdsnumber.
Referenced by AMRseek(), and AMRseekTime().
int32 SDSseekName | ( | char * | filename, | |
char * | dataname | |||
) |
References getFileID(), fileID::id, and fileID::sdsnumber.
void SDSsetNT | ( | char * | filename, | |
int32 | numbertype | |||
) |
References getFileID().
Referenced by DAGHIO_HDF_NCSA_Write().
int32 SDSwriteAttrib | ( | char * | filename, | |
char * | attribname, | |||
int32 | numbertype, | |||
int32 | nelements, | |||
VOIDP | buffer | |||
) |
References fileID::accessflags, getFileID(), and fileID::sds_id.
Referenced by AMRwriteAttribs().
int SDSwriteChunk | ( | char * | filename, | |
int32 | rank, | |||
int32 * | dims, | |||
int32 * | origin, | |||
int32 * | stride, | |||
VOIDP | data | |||
) |
References fileID::accessflags, getFileID(), fileID::id, and fileID::sds_id.
int SDSwriteData | ( | char * | filename, | |
char * | dataname, | |||
int32 | rank, | |||
int32 * | dims, | |||
VOIDP | data | |||
) |
References fileID::accessflags, getFileID(), fileID::id, fileID::numbertype, and fileID::sds_id.
Referenced by AMRwriteData().