libnewPidf/libPidfUtil Documentation
written by Carrie Gonzales and Joey Mukherjee -
carrie@crusher.swri.edu
Table of contents
- Overview
- libnewPidf information
- PIDF Documentation
- ReadPidf
- Adding structures to the PIDF
- Adding fields to the PIDF
- libPidfUtil information
libnewPidf is very tightly coupled with libPidfUtil. The reasons are mainly
historical; however, it does not make sense to call libnewPidf on its own.
Therefore, there is no "real" public interface to libnewPidf. The routine
used to access the PIDF is ReadPidf and this is actually in libPidfUtil. When
linking, make sure you reference libPidfUtil after libnewPidf. When compiling,
the only header file one needs is libPidfUtil.h.
libPidfUtil is made up several routines which may not be documented currently.
This will eventually change.
- Create a new .c file that has the appropriate keywords in it.
(I copy DataQual.c and edit it to the new one)
- Add an entry in ReadPidfRec.
- Add the prototype to pidf.h
- Add any defines to pidf_defs.h
- Add to Imakefile
To add new fields to the PIDF (programming experience necessary) :
The file you will need to edit are :
pidf.h pidf_ret.h newRead.c
- Decide on what the keywords should be. It is recommended that you
make them somewhat meaningful to the reader of the PIDF even if he
uses a builder. Also decide whether it is an int, char, string,
int list, char list, or string list.
- Add the keyword to the PIDF.
- Determine a "what" value to be used by ReadPidf. (i.e. BINSWPINDEX).
It is recommended that you use something similar to what is in the
PIDF. Make it all uppercase with no underscores and add it to the
file "pidf.h" as part of the PIDF enumerated type.
- Add the "what" value and PIDF keyword to the appropriate ".c" file.
(i.e. if its a Scan keyword, it goes in Sweep.c, a Binning keyword
goes in "Bin.c")
- Add the "what" value to the routines CheckReturnType and
PIDF_Return_Code in newRead.c.
- Add the error code to pidf_ret.h. It is recommended that you use
FORMAT_ERR_. Also change the PIDF_STOP define.
- Add the error msg in libErrorMsgs in pidf_err_str.c.