Descriptions of the Perl-generated Subroutines Used to Read/Write ACE data in HDF format.





/****----  init create function  ----****/

int32 init_cr_<data-type>( int32 hdf_fp, int32 sd_id, int32 an_id, char *classname)

    purpose:
       Set up HDF file to handle writing of <data-type> records.  Must be 
       done before you can write any <data-type> records.

    return value: 
      -1 on error
       0 otherwise

    input values: 
       int32 hdf_fp - Generated with Hopen()
       int32 sd_id  - Generated with SDstart()
       int32 an_id  - Generated with ANstart()
       char *classname - User defined name to attach to the data type

/* Included for backwards compatibility */
int32 init_wr_<data-type>() : same as init_cr_<data-type>()


/******---- write function ----******/ int32 write_<data-type>(struct <data-type-struct> struct_name, int32 recnum) purpose: write one record of <data-type> to HDF file. Location in file (record number) is specified by recnum. return value: -1 on error 0 otherwise input values: struct <data-type-struct> struct_name - C structure describing data record to be written to the HDF file. int32 recnum - record number you wish to write to. Can be used to overwrite old records. Using a -1 for this value will cause it to write to the record after the last one written in this run. Will start at 0 if no previous record.
/*---- close write function ----*/ void close_wr_<data-type>() purpose: shut down all HDF write access to <data-type>. Use when done writing data to <data-type>. return value : none input values : none
/*---- init access function ----*/ int32 init_acc_<data-type>(int32 hdf_fp, int32 sd_id, char *access_mode) purpose: Set up HDF file to handle reading or overwriting of <data-type> records. Must be done before you can read any <data-type> records. return value: number of valid records of <data-type> in file. -1 on error input values: int32 hdf_fp - Generated with Hopen() int32 sd_id - Generated with SDstart() char *access_mode - "r" for reading, "w" for writing /* Included for backwards compatability */ int32 init_rd_<data-type>() : same as init_acc_<data-type>()
/******---- read function ----******/ int32 read_<data-type>(struct <data-type-struct> *struct_name, int32 recnum_rd) purpose: read one record of <data-type> from HDF file. Location in file (record number) is specified by recnum_rd. return value: -1 on error or EOF 0 otherwise input values: struct <data-type-struct> *struct_name - pointer to C structure where the record of <data-type> will we stored. int32 recnum_rd - record number you wish to read from. Using a -1 for this value will cause it to read the record after the last one read in this run. Will start at 0 if no previous record.
/*---- close read function ----*/ void close_rd_<data-type>() purpose: shut down all HDF access to <data-type>. Use when done accessing data from <data-type>. return value : none input values : none
/*---- Get V group id, function ----*/ int32 get_vgrp_id_<data-type>() purpose: pass the vgroup_id of <data-type> return value : vgroup_id input values : none
/*---- V group description function ----*/ int32 wr_Vgrp_desc_<data-type>(char *wr_strval) purpose: pass the vgroup description of <data-type>, which is the C structure describing <data-type>. return value : 0 input values : *wr_strval - pointer to character array which will hold the description

Our Email Address: asc@srl.caltech.edu

Last Updated: 3 Dec 1998

Return to ASC Home Page