/* *********************************************************************
 * *                                                                   *
 * *         SIGMET Time Series Archive Format Library                 *
 * *                                                                   *
 * *********************************************************************
 * File: include/tsarchfmt_lib.h
 *
 *                     COPYRIGHT (c) 2003, 2005  BY
 *          SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */
#ifndef SIGMET_TSARCHFMT_LIB_H
#define SIGMET_TSARCHFMT_LIB_H 1

/* Messages here, if any */

#ifndef MESSAGE_ONLY


class TsArchFormat
{
 private:
  char *sFileNameCpy
    ( char *sDest_a, 
      const char *sSource_a,
      UINT4 iSize_a );   /* Size of dest.  Will be all zeroed, and null terminated */

 public:
  /* Caller must free the pointer */
  char *AsciiFromPulseInfo
    ( volatile const struct rvp8PulseInfo *pInfo_a,
      UINT4 *isize_a);

  SINT4 PulseInfoFromAscii
    ( struct rvp8PulseInfo *pInfo_a,
      const char* sPtr_a,
      SINT4 iSize_a);      /* Size of input data */
    
  /* Caller must free the pointer */
  char *AsciiFromPulseHdr
    ( volatile const struct rvp8PulseHdr *pHdr_a, 
      UINT4 *isize_a);

  SINT4 PulseHdrFromAscii
    ( struct rvp8PulseHdr *pHdr_a,
      const char* sPtr_a, /* Pointer to input data, not necessarily null terminated */
      SINT4 iSize_a);      /* Size of input data */

  void createArchiveFilename
    ( volatile const struct rvp8PulseInfo *pInfo_a,
      volatile const struct rvp8PulseHdr *pHdr_a, 
      char sFilename_a[FILENAME_SIZE] );

};

#endif /* #ifndef MESSAGE_ONLY */
#endif /* #ifndef SIGMET_TSARCHIVE_LIB_H */
