/* **********************************************************************
 * *	                                                               *
 * *                  IRIS General Shared Memory                        *
 * *                                                                    *
 * **********************************************************************
 * File: include/share.h
 *
 *        COPYRIGHT (c) 1988, 1989, 1990, 1991, 1998, 2002  BY
 *              SIGMET INC, 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_SHARE_H
#define SIGMET_SHARE_H 1

#ifdef __cplusplus
extern "C" {
#endif

/* Include Requirements : sigtypes.h
 *                        headers.h
 *                        setup.h
 *                        task.h
 *                        ingest.h
 *                        product.h
 *                        output.h
 */

/* This is the primary shared memory area for IRIS.  Most control and
 * con- figuration information is put here, but no large data buffers.
 * The later are to be allocated and shared only by processes that
 * need them.
 */
struct iris_global {

  /* -------------------- Task Configuration Information -------------------- */

  /* The task schedule is locked by TSC_SEM Semaphore */
  struct task_schedule tsc;

  /* --------------------- INGEST-Related Information --------------------- */
  /* The ingest inventory is locked by ING_INV_SEM Semaphore.  This
   * structure gets its own semaphore because there are several
   * processes that need to examine and modify it.
   */
  struct ingest_inventory ingd; /* Dir of INGEST files on disk */

  /* -------------------------- INGFIO Variables --------------------------*/
  struct ingfio_control ingfio;

  /* -------------------- PRODUCT Information -------------------- */
  /* The product schedule is locked by PSC_SEM Semaphore
   */
  struct product_schedule psc;

  /* -------------------- Configuration Structures -------------------- */

  /* IRIS User Configuration
   */
  struct iris_setup iriscf;
  struct license_setup License;

  struct color_setup csetup;

  /* ---------------------- Miscellaneous Structures ----------------------
   * This also holds the current user for each of the devices.
   * Must lock DEVICE_SEM before changing these.
   */
  struct device_status devst; /* Tested state of devices */

  /* Automatic mode switching table requires locking
   * MODE_SWITCHING_SEM before changing.
   */
  struct mode_switching_table ams_table;

  /* Holds information about each process.  No lock required.
   */
  struct process_info pinfo;

  /* Holds system status information.  No lock required.
   */
  struct system_status status;

  /* ---------------- Error Handling Structures ---------------------
   */
  struct signal_rule_info sigRules ;

  /* Must lock MESSAGE_SEM before changing this.
   */
  struct error_list errorlst ;

  char ipad_end[4];
};

#ifdef __cplusplus
}
#endif
#endif /* #ifndef SIGMET_SHARE_H */
