/**C*
 *
 * Vaisala software source code file
 *
 * Copyright (c) Vaisala Oyj 2003, 2005, 2013.
 * All rights reserved.
 *
 **C*/

/** @file
 *
 * Time Series Archive Format Library Header
 *
 * $URL: https://subversion.vaisala.com/svn/repos/sigmet/wr_iris_rda/branches/release8.13.5/rda/ts/archfmt/tsarchfmt_lib.h $
 *
 * $Id: tsarchfmt_lib.h 29253 2013-03-26 16:25:57Z jho $
 *
 */

#ifndef SIGMET_TSARCHFMT_LIB_H
#define SIGMET_TSARCHFMT_LIB_H 1

/* Messages here, if any */

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 rvptsPulseInfo *pInfo_a,
      UINT4 *isize_a);

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

  SINT4 PulseHdrFromAscii
    ( struct rvptsPulseHdr *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 rvptsPulseInfo *pInfo_a,
      volatile const struct rvptsPulseHdr *pHdr_a, 
      char sFilename_a[FILENAME_SIZE] );

};

#endif /* #ifndef SIGMET_TSARCHIVE_LIB_H */
