/* **********************************************************************
 * *                                                                    *
 * *  NORDRAD receiver process header file                              *
 * *                                                                    *
 * **********************************************************************
 * File: iris/nordrad/nordrad.h
 *
 *          COPYRIGHT (c) 1993, 1996, 1997, 1999, 2001, 2003 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.
 */


#define     NOT_CONVERTABLE 1
#define NOR_NOT_CONVERTABLE (NOR_FACILITY+ NOT_CONVERTABLE)
#define     NO_AREA         2
#define NOR_NO_AREA         (NOR_FACILITY+ NO_AREA)
#define     NO_INTSTORE     3
#define NOR_NO_INTSTORE     (NOR_FACILITY+ NO_INTSTORE)
#define     NO_PIXEL        4
#define NOR_NO_PIXEL        (NOR_FACILITY+ NO_PIXEL)
#define     NO_PTYPE        5
#define NOR_NO_PTYPE        (NOR_FACILITY+ NO_PTYPE)
#define     NO_RESOLUTION   6
#define NOR_NO_RESOLUTION   (NOR_FACILITY+ NO_RESOLUTION)
#define     NO_QUANTITY     7
#define NOR_NO_QUANTITY     (NOR_FACILITY+ NO_QUANTITY)
#define     AREA_CONVERT    8
#define NOR_AREA_CONVERT    (NOR_FACILITY+ AREA_CONVERT)
#define     AREA_ERROR      9
#define NOR_AREA_ERROR      (NOR_FACILITY+ AREA_ERROR)

#ifndef MESSAGE_ONLY

/* Function prototypes in the nordrad routines. */
/* Structure to hold information needed to convert the data */
struct nor_head_info
{
  UINT1 lIntStoreSet;  /* Intstore has been set */
  struct NRD_IntStore_t intstore;
  UINT2 lperiod_set;
  struct NRD_Period_t   period;
  UINT1 *pdata;
  UINT1 lSizeSet;
  SINT4 inord_colcnt;

  UINT1 lProjectionSet; /* Projection has be set */
  UINT1 iProjection;
  struct NRD_LatLong_t SouthWest, NorthEast, Ref;

  UINT2 lheight_set;   /* Height has been set */
  SINT4 iheight;       /* Height in cm */

  UINT2 lres_set;      /* Resolution has been set */
  SINT2 inord_res;
  UINT2 lptype_set;    /* Product type has been set */
  UINT1 lDTypeSet;     /* Data type has been set */
  char  spname[20];
};

#ifdef SIGMET_PRODUCT_H
void nor_parse_header   /* File: nor_convert.c */
  (const UINT1 *pnord_head_a,
   struct product_hdr *piris_head_a,
   struct nor_head_info *info_a,
   const struct nor_convert_header *pConvert_a
   );
#endif  /* #ifdef SIGMET_PRODUCT_H */

/* Below here are defined all the simulated entry points */
void SubscribeAviSim        /* File: nor_stub.c */
  (char *access_a,
   char *node_a,
   char *recid_a,
   SINT4 iwaittime_a,
   SINT4 *isocket_a,
   SINT4 *istatus_a );

void CancelAviSim           /* File: nor_stub.c */
(SINT4 isocket_a);

void GetProductSim          /* File: nor_stub.c */
(char  *access_a,
 char  *node_a,
 struct NRD_Avi_t        *advice_a,
 char  *file_a,
 SINT4 iwaittime_a,
 SINT4 *istatus_a );

void ReceiveAviSim          /* File: nor_stub.c */
(SINT4 isocket_a,
 struct NRD_Avi_t *padvice_a,
 SINT4 iwaittime_a,
 SINT4 *istatus_a );


#endif  /* #ifndef MESSAGE_ONLY */
