/*****************************************************************************/
/*
                             HyperSpi.h

Header file for Hypertext System Performance Information facility.

Data is now common between HyperSPI and HyperSPI++ (FWTW).


VERSION HISTORY
---------------
21-MAY-2011  MGD  v2.0.0, add NI data
20-JUN-1995  MGD  v1.0.0, initial development
*/
/*****************************************************************************/

#define HYPERSPI_DATA_DIRECTORY  "HYPERSPI$DATA:"
#define HYPERSPI_REFRESH_DIRECTORY  "HYPERSPI$DATA_REFRESH:"
#define HYPERSPI_DATA_VERSION "3"

#define HYPERSPI_CPU_MODE_COUNT 6

#define HYPERSPI_MODE_INTERRUPT 0
#define HYPERSPI_MODE_MULTIPROC 1
#define HYPERSPI_MODE_KERNEL 2
#define HYPERSPI_MODE_EXECUTIVE 3
#define HYPERSPI_MODE_SUPERVISOR 4
#define HYPERSPI_MODE_USER 5

typedef struct STRUCT_IOSBLK
{
   unsigned short  iosb$w_status;
   unsigned short  iosb$w_bcnt;
   unsigned int    iosb$l_reserved;
}
IOSBLK;

#ifndef __VAX
#   pragma member_alignment __save
#   pragma nomember_alignment
#endif

/* size, as of 21-MAY-2011, 139 bytes */

struct HyperSpiData
{
   unsigned char  Minute;
   unsigned char  Hour;
   unsigned char  Day;
   unsigned char  Month;
   unsigned short  Year;
   unsigned char  NumberOfCPUs;
   unsigned short  SystemMemoryMBytes;
   unsigned char  SystemMemoryPercentInUse;
   unsigned short  PageSpaceMBytes;
   unsigned char  PageSpacePercentInUse;
   unsigned short  NumberOfProcesses;
   unsigned char  PercentCPU;
   unsigned char  PeakPercentCPU;
   unsigned char  PercentUserModeCPU;
   unsigned char  PeakPercentUserModeCPU;
   unsigned long  PageFaults;
   unsigned short  PeakPageFaults;
   unsigned long  HardPageFaults;
   unsigned short  PeakHardPageFaults;
   unsigned long  BufferedIO;
   unsigned short  PeakBufferedIO;
   unsigned long  DirectIO;
   unsigned short  PeakDirectIO;
   unsigned long  MscpIO;
   unsigned short  PeakMscpIO;
   unsigned long  Computable;
   unsigned char  PercentModeCPU[HYPERSPI_CPU_MODE_COUNT];
   unsigned long  LckLoc;
   unsigned long  LckIn;
   unsigned long  LckOut;
   unsigned char  Rfu[40];
   unsigned long  NetIntRx[2];
   unsigned long  PeakNetIntRx;
   unsigned long  NetIntTx[2];
   unsigned long  PeakNetIntTx;
   unsigned long  PeakNetIntRxTx;
};

#ifndef __VAX
#   pragma member_alignment __restore
#endif

/****************************************************************************/

