CRIS Level 1 Data Structures



CrisConstants.h , v 1.1


/* $Source: /home/mussel9/asc/aceprog/include/RCS/CrisConstants.h,v $ */
/* $Author: rgr $ */
/* $Date: 1997/09/10 18:26:21 $ */
/* $Revision: 1.1 $ */

#define CRIS_DIAG_BIT                           0x20
#define CRIS_CMD_RESP_BIT                       0x40
#define CRIS_SYNC_BIT                           0x80

#define CRIS_QUALITY_FORMAT_ID_BIT              0x01
#define CRIS_QUALITY_MNF_COUNTER_BIT            0x02
#define CRIS_QUALITY_SC_CLOCK_BIT               0x04
#define CRIS_QUALITY_SYNC_BIT                   0x08
#define CRIS_QUALITY_CT_INDEX_BIT               0x10
#define CRIS_QUALITY_CYCLE_NUMBER_BIT           0x20
#define CRIS_QUALITY_FILL_LEVEL0_BIT            0x40
#define CRIS_QUALITY_FILL_LEVEL1_BIT            0x80

#define CRIS_UNDEFINED_8                        0xFF
#define CRIS_UNDEFINED_16                     0xFFFF
#define CRIS_UNDEFINED_32                 0xFFFFFFFF

#define CRIS_END_OF_DATA                  0xFFFFFFFF

#define CRIS_LIVETIME_UNIT_MICROSECOND           128

#define CRIS_EVENT_THRESHOLD                       3
#define CRIS_HSKP_OFFSET                           4

#define NUM_CRIS_CMD_TAB_BYTES                   844
#define NUM_CRIS_CMD_TAB_BYTES_PER_CYCLE          66
#define NUM_CRIS_EVT_BUFFERS                      64
#define NUM_CRIS_HIGH_PRIORITY_RATES               2
#define NUM_CRIS_HIGH_PRIORITY_SAMPLES            16
#define NUM_CRIS_HSKP_BYTES                        3
#define NUM_CRIS_MNFS_PER_CYCLE                  256
#define NUM_CRIS_RAW_SOFT_EVT_BYTES             2000
#define NUM_CRIS_RAW_STACK_EVT_BYTES              72
#define NUM_CRIS_TELEMETRY_BYTES                  58

#define MAX_CRIS_EVT_AGE                          64
#define MAX_NUM_CRIS_CMD_ECHO_CHARS               40
#define MAX_NUM_CRIS_DIAG_BYTES                33002
#define MAX_NUM_CRIS_EVENT_BYTES                 162
#define MAX_NUM_CRIS_EVENTS_PER_MNF                5
#define MAX_NUM_CRIS_EVT_SUB_BLOCKS               32

#define SIZE_CRIS_CMD_ECHO_QUEUE                1000
#define SIZE_CRIS_CMD_TAB_QUEUE                   24
#define SIZE_CRIS_CYCLE_QUEUE                     16
#define SIZE_CRIS_DIAG_EVENT_QUEUE                32
#define SIZE_CRIS_SUBSET_FILTER                    3
#define SIZE_CRIS_SUMMARY_QUEUE                   64
#define SIZE_CRIS_EVENT_BUFFER                 17000

#define CRIS_SC_HSKP_CURRENT_LOC                 203
#define CRIS_SC_HSKP_MAIN_BUS_VOLT_LOC            71
#define CRIS_SC_HSKP_TEMPERATURE1_LOC            194
#define CRIS_SC_HSKP_TEMPERATURE2_LOC            195
#define CRIS_SC_HSKP_TEMPERATURE_INT_LOC          22

#define CRIS_MNF_CURRENT                          10
#define CRIS_MNF_MAIN_BUS_VOLT                     3
#define CRIS_MNF_TEMPERATURE1                      9
#define CRIS_MNF_TEMPERATURE2                      9

#define CRIS_CONSISTENCY_CLOCK                     4
#define CRIS_CONSISTENCY_CYCLE_NUMBER              0
#define CRIS_CONSISTENCY_CTINDEX                   1
#define CRIS_CONSISTENCY_TOTAL                     5

CrisAdc.h , v 1.1


/* $Source: /home/mussel9/asc/aceprog/include/RCS/CrisAdc.h,v $ */
/* $Author: rgr $ */
/* $Date: 1997/09/09 18:53:00 $ */
/* $Revision: 1.1 $ */

#define NUM_CRIS_ADC                              88

#define CRIS_ADC_MONITOR_P5V                       5
#define CRIS_ADC_MONITOR_P6V                       8
#define CRIS_ADC_MONITOR_M6V                       9
#define CRIS_ADC_MONITOR_P7V                       0
#define CRIS_ADC_MONITOR_M7V                      15
#define CRIS_ADC_MONITOR_P12V                     10
#define CRIS_ADC_MONITOR_M12V                     11
#define CRIS_ADC_MONITOR_P13V                      3
#define CRIS_ADC_MONITOR_M13V                      4
#define CRIS_ADC_MONITOR_P15V                      1
#define CRIS_ADC_MONITOR_P19V                      2
#define CRIS_ADC_MONITOR_MCP1                     16
#define CRIS_ADC_MONITOR_MCP2                     17
#define CRIS_ADC_MONITOR_HVPS_1I                  18
#define CRIS_ADC_MONITOR_HVPS_2I                  19
#define CRIS_ADC_MONITOR_HVPS_3I                  20
#define CRIS_ADC_MONITOR_HVPS_4I                  21
#define CRIS_ADC_MONITOR_SOFT_PSA_I               22
#define CRIS_ADC_MONITOR_SOFT_PSB_I               23
#define CRIS_ADC_TEMP_MOTHERBOARD_ELECT           70
#define CRIS_ADC_TEMP_MOTHERBOARD_DET             56
#define CRIS_ADC_TEMP_MOTHERBOARD_C               69
#define CRIS_ADC_TEMP_ANALOG_BOARD                67
#define CRIS_ADC_TEMP_POST_REG_BOARD              68
#define CRIS_ADC_TEMP_LOGIC_BOARD                 71
#define CRIS_ADC_TEMP_E12_ELECT                   57
#define CRIS_ADC_TEMP_E12_DET                     58
#define CRIS_ADC_TEMP_E34_ELECT                   59
#define CRIS_ADC_TEMP_E34_DET                     60
#define CRIS_ADC_TEMP_E56_ELECT                   61
#define CRIS_ADC_TEMP_E56_DET                     62
#define CRIS_ADC_TEMP_E789_ELECT                  63
#define CRIS_ADC_TEMP_E789_DET                    64
#define CRIS_ADC_TEMP_LVPS                        65
#define CRIS_ADC_TEMP_HVPS                        66
#define CRIS_ADC_TEMP_FIBER_PLANE_TOP0            76
#define CRIS_ADC_TEMP_FIBER_PLANE_TOP1            77
#define CRIS_ADC_TEMP_FIBER_PLANE_MID             78
#define CRIS_ADC_TEMP_FIBER_PLANE_BOT             79
#define CRIS_ADC_TEMP_IMAGE_INT1_SIDE             80
#define CRIS_ADC_TEMP_IMAGE_INT1_REAR             82
#define CRIS_ADC_TEMP_CAMERA1_ELECT               83
#define CRIS_ADC_TEMP_HVPS1                       84
#define CRIS_ADC_TEMP_IMAGE_INT2_SIDE             81
#define CRIS_ADC_TEMP_IMAGE_INT2_REAR             85
#define CRIS_ADC_TEMP_CAMERA2_ELECT               86
#define CRIS_ADC_TEMP_HVPS2                       87
#define CRIS_ADC_POSTDCE1A                        24
#define CRIS_ADC_POSTDCE1B                        25
#define CRIS_ADC_POSTDCE2AB                       28
#define CRIS_ADC_POSTDCE3AB                       32
#define CRIS_ADC_POSTDCE4AB                       34
#define CRIS_ADC_POSTDCE5AB                       40
#define CRIS_ADC_POSTDCE6AB                       42
#define CRIS_ADC_POSTDCE7AB                       48
#define CRIS_ADC_POSTDCE8AB                       50
#define CRIS_ADC_POSTDCE9AB                       54
#define CRIS_ADC_POSTDCG2AB                       30
#define CRIS_ADC_POSTDCG3AB                       36
#define CRIS_ADC_POSTDCG4AB                       38
#define CRIS_ADC_POSTDCG5AB                       44
#define CRIS_ADC_POSTDCG6AB                       46
#define CRIS_ADC_POSTDCG7AB                       52
#define CRIS_ADC_POSTDCE1C                        26
#define CRIS_ADC_POSTDCE1D                        27
#define CRIS_ADC_POSTDCE2CD                       29
#define CRIS_ADC_POSTDCE3CD                       33
#define CRIS_ADC_POSTDCE4CD                       35
#define CRIS_ADC_POSTDCE5CD                       41
#define CRIS_ADC_POSTDCE6CD                       43
#define CRIS_ADC_POSTDCE7CD                       49
#define CRIS_ADC_POSTDCE8CD                       51
#define CRIS_ADC_POSTDCE9CD                       55
#define CRIS_ADC_POSTDCG2CD                       31
#define CRIS_ADC_POSTDCG3CD                       37
#define CRIS_ADC_POSTDCG4CD                       39
#define CRIS_ADC_POSTDCG5CD                       45
#define CRIS_ADC_POSTDCG6CD                       47
#define CRIS_ADC_POSTDCG7CD                       53

BrowseCris.h , v 1.3


/* $Source: /home/mussel9/asc/aceprog/include/RCS/BrowseCris.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:07:52 $ */
/* $Revision: 1.3 $ */

#include "hdfi.h"

struct BrowseCris {
   float64 bin_start;
   float64 bin_end;
   float32 FluxHelium_31;
   float32 FluxHelium_41;
   float32 FluxHelium_70;
   float32 FluxCno_63;
   float32 FluxCno_84;
   float32 FluxCno_144;
   float32 FluxCnoSum;
   float32 FluxHiZ_92;
   float32 FluxHiZ_124;
   float32 FluxHiZ_220;
   float32 FluxHiZSum;
   float32 FluxPen;
   float32 FluxPenSubset;
   float32 WgtFactHelium_31;
   float32 WgtFactHelium_41;
   float32 WgtFactHelium_70;
   float32 WgtFactCno_63;
   float32 WgtFactCno_84;
   float32 WgtFactCno_144;
   float32 WgtFactCnoSum;
   float32 WgtFactHiZ_92;
   float32 WgtFactHiZ_124;
   float32 WgtFactHiZ_220;
   float32 WgtFactHiZSum;
   float32 WgtFactPen;
   float32 WgtFactPenSubset;
};

CrisDac.h , v 1.1


/* $Source: /home/mussel9/asc/aceprog/include/RCS/CrisDac.h,v $ */
/* $Author: rgr $ */
/* $Date: 1997/09/09 18:53:08 $ */
/* $Revision: 1.1 $ */

#define NUM_CRIS_DACS  14

#define CRIS_DAC_G2AB   0
#define CRIS_DAC_G3AB   1
#define CRIS_DAC_G4AB   2
#define CRIS_DAC_G5AB   3
#define CRIS_DAC_G6AB   4
#define CRIS_DAC_G7AB   5
#define CRIS_DAC_E9AB   6
#define CRIS_DAC_G2CD   7
#define CRIS_DAC_G3CD   8
#define CRIS_DAC_G4CD   9
#define CRIS_DAC_G5CD  10
#define CRIS_DAC_G6CD  11
#define CRIS_DAC_G7CD  12
#define CRIS_DAC_E9CD  13

L1CrisCommandEcho.h , v 1.3


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisCommandEcho.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:39:43 $ */
/* $Revision: 1.3 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisCommandEcho
{
   uint32 ClockMinorFrame;
   uint32 Second1996;
   uint32 microsecond;
   uint8  NumberChars;
   char8  CommandEcho[MAX_NUM_CRIS_CMD_ECHO_CHARS];
};


/* Definition:                                                       */
/*    ClockMinorFrame = S/C clock of the minor frame containing the  */
/*                      command echo                                 */
/*    NumberChars = Number of characters in the command echo         */
/*    CommandEcho = Command echo characters                          */

L1CrisCommandTable.h , v 1.4


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisCommandTable.h,v $ */
/* $Author: rgr $ */
/* $Date: 1998/05/08 23:15:29 $ */
/* $Revision: 1.4 $ */

#include "hdfi.h"

struct L1CrisCommandTable
{
   uint32 ClockMinorFrame0;
   uint32 ClockMinorFrame1;
   uint32 Second1996MinorFrame0;
   uint32 MicrosecondMinorFrame0;
   uint32 Second1996MinorFrame1;
   uint32 MicrosecondMinorFrame1;
   uint16 NumberCommandEchoes;
   uint8  ecmd[6];
   uint16 phadisc;
   uint16 audgflg;
   uint16 audglim;
   uint16 valcflg;
   uint16 samplim;
   uint16 heflg;
   uint16 hyflg;
   uint16 preoflg;
   uint16 hetlim;
   uint16 hytlim;
   uint16 htcmd[8];
   uint16 rcmd;
   uint16 qctime;
   uint16 ledtime;
   uint16 sfmisc;
   uint16 camsel;
   uint16 iilima;
   uint16 iilimb;
   uint16  iilims[4];
   int16  lsarr[20];
   int16  loarr[20];
   uint16 laymax;
   uint16 remmax;
   uint8  b_xoff[2];
   uint16 rngmsk[2];
   uint8  bparams[20];
   uint16 twotelen;
   uint16 gphaen;
   uint16 stbfon;
   uint16 ncenbox;
   uint16 b_cenbox[64];
   uint16 iilim;
   uint16 iignct;
   uint16 iignrf;
   uint16 sftdisc;
   uint16 sftrig0;
   uint16 sftrig1;
   uint16 cdscoff;
   uint16 tdscoff;
   uint16 srgbits[2];
   uint8  dacvals[52];
   uint8  dacsize[52];
   uint8  hdisc2[12];
   uint8  hdisc1[12];
   uint8  hdisc0[12];
   uint8  mdisc2[12];
   uint8  mdisc1[12];
   uint8  mdisc0[12];
   uint8  adcen[12];
   uint8  gdiscen[12];
   uint8  mdiscen[12];
   uint8  hdiscen[12];
   uint16 cnoc1[7];
   uint16 cnoc2[7];
   uint16 ihiprr0;
   uint16 ihiprr1;
   uint16 stimeid;
   uint8  eidmap[256];
   uint8  QualityEcmd[6];
   uint8  QualityPhadisc;
   uint8  QualityAudgflg;
   uint8  QualityAudglim;
   uint8  QualityValcflg;
   uint8  QualitySamplim;
   uint8  QualityHeflg;
   uint8  QualityHyflg;
   uint8  QualityPreoflg;
   uint8  QualityHetlim;
   uint8  QualityHytlim;
   uint8  QualityHtcmd[8];
   uint8  QualityRcmd;
   uint8  QualityQctime;
   uint8  QualityLedtime;
   uint8  QualitySfmisc;
   uint8  QualityCamsel;
   uint8  QualityIilima;
   uint8  QualityIilimb;
   uint8  QualityIilims[4];
   uint8  QualityLsarr[20];
   uint8  QualityLoarr[20];
   uint8  QualityLaymax;
   uint8  QualityRemmax;
   uint8  QualityB_xoff[2];
   uint8  QualityRngmsk[2];
   uint8  QualityBparams[20];
   uint8  QualityTwotelen;
   uint8  QualityGphaen;
   uint8  QualityStbfon;
   uint8  QualityNcenbox;
   uint8  QualityB_cenbox[64];
   uint8  QualityIilim;
   uint8  QualityIignct;
   uint8  QualityIignrf;
   uint8  QualitySftdisc;
   uint8  QualitySftrig0;
   uint8  QualitySftrig1;
   uint8  QualityCdscoff;
   uint8  QualityTdscoff;
   uint8  QualitySrgbits[2];
   uint8  QualityDacvals[52];
   uint8  QualityDacsize[52];
   uint8  QualityHdisc2[12];
   uint8  QualityHdisc1[12];
   uint8  QualityHdisc0[12];
   uint8  QualityMdisc2[12];
   uint8  QualityMdisc1[12];
   uint8  QualityMdisc0[12];
   uint8  QualityAdcen[12];
   uint8  QualityGdiscen[12];
   uint8  QualityMdiscen[12];
   uint8  QualityHdiscen[12];
   uint8  QualityCnoc1[7];
   uint8  QualityCnoc2[7];
   uint8  QualityIhiprr0;
   uint8  QualityIhiprr1;
   uint8  QualityStimeid;
   uint8  QualityEidmap[256];
};


/* Definition:                                                       */
/*    ClockMinorFrame0 = S/C clock of the start of the instrument    */
/*                       cycle that contains the first byte of the   */
/*                       command table                               */
/*    ClockMinorFrame1 = S/C clock of the end of the instrument      */
/*                       cycle that contains the last byte of the    */
/*                       command table                               */
/*                                                                   */
/* Note: Quality bits are defined in the table below.  If the field  */
/*       which the quality byte is trying to characterize contains   */
/*       multiple bytes, the quality byte associated with the field  */
/*       is the logical "or" of the individual quality bytes.        */
/*                                                                   */
/* Quality bits:                                                     */
/*    0x01 = Format ID error                                         */
/*    0x02 = Minor/major counter error                               */
/*    0x04 = S/C clock error                                         */
/*    0x08 = Sync bit error                                          */
/*    0x10 = Command table index error                               */
/*    0x20 = Cycle number error                                      */
/*    0x40 = Level 0 quality bit                                     */
/*    0x80 = Level 1 quality bit                                     */

L1CrisDiagnosticEvent.h , v 1.2


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisDiagnosticEvent.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 16:50:59 $ */
/* $Revision: 1.2 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisDiagnosticEvent
{
   uint32 ClockMinorFrame0;
   uint32 ClockMinorFrame1;
   uint32 Second1996MinorFrame0;
   uint32 MicrosecondMinorFrame0;
   uint32 Second1996MinorFrame1;
   uint32 MicrosecondMinorFrame1;
   uint16 RawStack[NUM_CRIS_RAW_STACK_EVT_BYTES/2];
   uint16 SoftEvent[NUM_CRIS_RAW_SOFT_EVT_BYTES/2];
   uint8  NormalEvent[MAX_NUM_CRIS_EVENT_BYTES];
   uint8  ContinuationFlag;
};


/* Definition:                                                       */
/*    ClockMinorFrame = S/C clock of the minor frame containing the  */
/*                      start of the diagnostic event                */
/*    RawStack = Raw stack event portion of the diagnostic event     */
/*    SoftEvent = Raw SOFT event portion of the diagnostic event     */
/*    NormalEvent = Normal event portion of the diagnostic event     */
/*    ContinuationFlag = Flag indicating the SOFT portion of the     */
/*                       event is continued in the next cycle        */

L1CrisEventCycle.h , v 1.3


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisEventCycle.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.3 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisEventCycle
{
   uint32 ClockCycle;
   uint32 Second1996;
   uint32 microsecond;
   uint16 NumberNormalEventBytes[MAX_CRIS_EVT_AGE];
   uint16 NumberEvents;
   uint8  EventBuffer[SIZE_CRIS_EVENT_BUFFER];
   uint8  ContinuationFlag;
};


/* Definition:                                                       */
/*    ClockCycle = S/C clock of the first minor frame of the cycle   */
/*                 in which CRIS processed the event                 */
/*    NumberNormalEventBytes = Number of bytes used for normal event */
/*                             processing from each of the cycles    */
/*                             that can contribute events to this    */
/*                             structure.                            */
/*    NumberEvents = Number of events stored in the event buffer     */
/*    EventBuffer = Event buffer                                     */
/*    ContinuationFlag = Flag indicating events from this cycle are  */
/*                       continued in the next structure             */
/*                                                                   */
/* Note: Each event in the event buffer is preceded by two bytes.    */
/*       The first is the relative age of the event in cycles.  The  */
/*       second is the minor frame in which the first byte of the    */
/*       event was transmitted.                                      */

L1CrisSubset.h , v 1.2


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisSubset.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.2 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisSubset
{
   uint32 ClockMinorFrame;
   uint32 Second1996;
   uint32 microsecond;
   uint8  FormatId;
   uint8  MajorFrameCount;
   uint8  MinorFrameCount;
   uint8  quality;
   uint8  MainBusVoltage;
   uint8  CrisCurrent;
   uint8  CrisInternalTemperature1;
   uint8  CrisInternalTemperature2;
   uint8  CrisInterfaceTemperature;
   uint8  CrisData[NUM_CRIS_TELEMETRY_BYTES];
};


/* Definition:                                                       */
/*    ClockMinorFrame = S/C clock of the minor frame                 */
/*    Second1996 = Time of the minor frame in seconds since 00:00:00 */
/*                 of January 1, 1996                                */
/*    microsecond = Microseconds of the time of the minor frame      */
/*    FormatId = Format of the minor frame                           */
/*    MajorFrameCount = Major frame count of the minor frame         */
/*    MinorFrameCount = Minor frame count of the minor frame         */
/*    quality = Quality flag associated with the minor frame         */
/*              0x01 = Format ID error                               */
/*              0x02 = Minor/major counter error                     */
/*              0x04 = S/C clock error                               */
/*              0x08 = Sync bit error                                */
/*              0x10 = Command table index error                     */
/*              0x20 = Cycle number error                            */
/*              0x40 = Level 0 quality bit                           */
/*              0x80 = Level 1 quality bit                           */
/*    MainBusVoltage = Main bus voltage value (255=no data)          */
/*    CrisCurrent = CRIS I/F & survial heater current (255=no data)  */
/*    CrisInternalTemperature1 =                                     */
/*                         CRIS internal temperature 1 (255=no data) */
/*    CrisInternalTemperature2 =                                     */
/*                         CRIS internal temperature 2 (255=no data) */
/*    CrisInterfaceTemperature =                                     */
/*                         CRIS interface temperature (255=no data)  */
/*    CrisData = CRIS data                                           */

/* Note: This structure is only written when the instrument is in    */
/*       diagnostic mode and/or command response mode.               */

L1CrisSummary.h , v 1.3


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisSummary.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.3 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisSummary
{
   uint32  ClockMinorFrame;
   uint32  Second1996;
   uint32  microsecond;
    uint8  FormatId;
    uint8  MajorFrameCount;
    uint8  MinorFrameCount;
    uint8  quality;
    uint8  MainBusVoltage;
    uint8  CrisCurrent;
    uint8  CrisInternalTemperature1;
    uint8  CrisInternalTemperature2;
    uint8  CrisInterfaceTemperature;
    uint8  CrisHskp[NUM_CRIS_HSKP_BYTES];
};


/* Definition:                                                       */
/*    ClockMinorFrame = S/C clock of the minor frame                 */
/*    FormatId = Format of the minor frame                           */
/*    MajorFrameCount = Major frame count of the minor frame         */
/*    MinorFrameCount = Minor frame count of the minor frame         */
/*    quality = Quality flag associated with the minor frame         */
/*              0x01 = Format ID error                               */
/*              0x02 = Minor/major counter error                     */
/*              0x04 = S/C clock error                               */
/*              0x08 = Sync bit error                                */
/*              0x10 = Command table index error                     */
/*              0x20 = Cycle number error                            */
/*              0x40 = Level 0 quality bit                           */
/*              0x80 = Level 1 quality bit                           */
/*    MainBusVoltage = Main bus voltage value (255=no data)          */
/*    CrisCurrent = CRIS I/F & survial heater current (255=no data)  */
/*    CrisInternalTemperature1 = CRIS internal temperature 1         */
/*                              (255=no data)                        */
/*    CrisInternalTemperature2 = CRIS internal temperature 2         */
/*                              (255=no data)                        */
/*    CrisInterfaceTemperature = CRIS interface temperature          */
/*                              (255=no data)                        */
/*    CrisHskp = Housekeeping/rate bytes from CRIS telemetry         */

L1CrisHighPriorityRate.h , v 1.2


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisHighPriorityRate.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.2 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisHighPriorityRate
{
   uint32 ClockMinorFrame;
   uint32 Second1996;
   uint32 microsecond;
   uint32 hp[NUM_CRIS_HIGH_PRIORITY_RATES];
   uint8  QualityHp[NUM_CRIS_HIGH_PRIORITY_RATES];
};


/* Definition:                                                       */
/*    ClockMinorFrame = S/C clock of the minor frame in which the    */
/*                      high priority rate accumulation began        */
/*    hp = high priority rates                                       */
/*    QualityHp = Quality data flags for high priority rates         */
/*                                                                   */
/* Note: All rates are decompressed.                                 */
/*                                                                   */
/* Note: Quality bits are defined in the table below.  If the field  */
/*       which the quality byte is trying to characterize contains   */
/*       multiple bytes, the quality byte associated with the field  */
/*       is the logical "or" of the individual quality bytes.        */
/*                                                                   */
/* Quality bits:                                                     */
/*    0x01 = Format ID error                                         */
/*    0x02 = Minor/major counter error                               */
/*    0x04 = S/C clock error                                         */
/*    0x08 = Sync bit error                                          */
/*    0x10 = Command table index error                               */
/*    0x20 = Cycle number error                                      */
/*    0x40 = Level 0 quality bit                                     */
/*    0x80 = Level 1 quality bit                                     */

L1CrisHskp.h , v 1.2


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisHskp.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.2 $ */

#include "hdfi.h"

struct L1CrisHskp
{
   uint32 ClockCycle;
   uint32 Second1996;
   uint32 microsecond;
   uint16 CommandTableIndex;
   uint16 MonitorP5V;
   uint16 MonitorP6V;
   uint16 MonitorM6V;
   uint16 MonitorP7V;
   uint16 MonitorM7V;
   uint16 MonitorP12V;
   uint16 MonitorM12V;
   uint16 MonitorP13V;
   uint16 MonitorM13V;
   uint16 MonitorP15V;
   uint16 MonitorP19V;
   uint16 MonitorMcp1;
   uint16 MonitorMcp2;
   uint16 MonitorHvps1I;
   uint16 MonitorHvps2I;
   uint16 MonitorHvps3I;
   uint16 MonitorHvps4I;
   uint16 MonitorSoftPsaI;
   uint16 MonitorSoftPsbI;
   uint16 TemperatureMotherBoardElect;
   uint16 TemperatureMotherBoardDet;
   uint16 TemperatureMotherBoardC;
   uint16 TemperatureAnalogBoard;
   uint16 TemperaturePostRegBoard;
   uint16 TemperatureLogicBoard;
   uint16 TemperatureE12Elect;
   uint16 TemperatureE12Det;
   uint16 TemperatureE34Elect;
   uint16 TemperatureE34Det;
   uint16 TemperatureE56Elect;
   uint16 TemperatureE56Det;
   uint16 TemperatureE789Elect;
   uint16 TemperatureE789Det;
   uint16 TemperatureLvps;
   uint16 TemperatureHvps;
   uint16 TemperatureFiberPlaneTop0;
   uint16 TemperatureFiberPlaneTop1;
   uint16 TemperatureFiberPlaneMid;
   uint16 TemperatureFiberPlaneBot;
   uint16 TemperatureImageInt1Side;
   uint16 TemperatureImageInt1Rear;
   uint16 TemperatureCamera1Elect;
   uint16 TemperatureHvps1;
   uint16 TemperatureImageInt2Side;
   uint16 TemperatureImageInt2Rear;
   uint16 TemperatureCamera2Elect;
   uint16 TemperatureHvps2;
   uint16 PostDcE1a;
   uint16 PostDcE1b;
   uint16 PostDcE2ab;
   uint16 PostDcE3ab;
   uint16 PostDcE4ab;
   uint16 PostDcE5ab;
   uint16 PostDcE6ab;
   uint16 PostDcE7ab;
   uint16 PostDcE8ab;
   uint16 PostDcE9ab;
   uint16 PostDcG2ab;
   uint16 PostDcG3ab;
   uint16 PostDcG4ab;
   uint16 PostDcG5ab;
   uint16 PostDcG6ab;
   uint16 PostDcG7ab;
   uint16 PostDcE1c;
   uint16 PostDcE1d;
   uint16 PostDcE2cd;
   uint16 PostDcE3cd;
   uint16 PostDcE4cd;
   uint16 PostDcE5cd;
   uint16 PostDcE6cd;
   uint16 PostDcE7cd;
   uint16 PostDcE8cd;
   uint16 PostDcE9cd;
   uint16 PostDcG2cd;
   uint16 PostDcG3cd;
   uint16 PostDcG4cd;
   uint16 PostDcG5cd;
   uint16 PostDcG6cd;
   uint16 PostDcG7cd;
   uint8  DacG2ab;
   uint8  DacG3ab;
   uint8  DacG4ab;
   uint8  DacG5ab;
   uint8  DacG6ab;
   uint8  DacG7ab;
   uint8  DacE9ab;
   uint8  DacG2cd;
   uint8  DacG3cd;
   uint8  DacG4cd;
   uint8  DacG5cd;
   uint8  DacG6cd;
   uint8  DacG7cd;
   uint8  DacE9cd;
   uint8  HeaterCcdA;
   uint8  HeaterCcdB;
   uint8  HeaterCris;
   uint8  StatusTmSide;
   uint8  StatusRefresh;
   uint8  QualityCommandTableIndex;
   uint8  QualityMonitorP5V;
   uint8  QualityMonitorP6V;
   uint8  QualityMonitorM6V;
   uint8  QualityMonitorP7V;
   uint8  QualityMonitorM7V;
   uint8  QualityMonitorP12V;
   uint8  QualityMonitorM12V;
   uint8  QualityMonitorP13V;
   uint8  QualityMonitorM13V;
   uint8  QualityMonitorP15V;
   uint8  QualityMonitorP19V;
   uint8  QualityMonitorMcp1;
   uint8  QualityMonitorMcp2;
   uint8  QualityMonitorHvps1I;
   uint8  QualityMonitorHvps2I;
   uint8  QualityMonitorHvps3I;
   uint8  QualityMonitorHvps4I;
   uint8  QualityMonitorSoftPsaI;
   uint8  QualityMonitorSoftPsbI;
   uint8  QualityTemperatureMotherBoardElect;
   uint8  QualityTemperatureMotherBoardDet;
   uint8  QualityTemperatureMotherBoardC;
   uint8  QualityTemperatureAnalogBoard;
   uint8  QualityTemperaturePostRegBoard;
   uint8  QualityTemperatureLogicBoard;
   uint8  QualityTemperatureE12Elect;
   uint8  QualityTemperatureE12Det;
   uint8  QualityTemperatureE34Elect;
   uint8  QualityTemperatureE34Det;
   uint8  QualityTemperatureE56Elect;
   uint8  QualityTemperatureE56Det;
   uint8  QualityTemperatureE789Elect;
   uint8  QualityTemperatureE789Det;
   uint8  QualityTemperatureLvps;
   uint8  QualityTemperatureHvps;
   uint8  QualityTemperatureFiberPlaneTop0;
   uint8  QualityTemperatureFiberPlaneTop1;
   uint8  QualityTemperatureFiberPlaneMid;
   uint8  QualityTemperatureFiberPlaneBot;
   uint8  QualityTemperatureImageInt1Side;
   uint8  QualityTemperatureImageInt1Rear;
   uint8  QualityTemperatureCamera1Elect;
   uint8  QualityTemperatureHvps1;
   uint8  QualityTemperatureImageInt2Side;
   uint8  QualityTemperatureImageInt2Rear;
   uint8  QualityTemperatureCamera2Elect;
   uint8  QualityTemperatureHvps2;
   uint8  QualityPostDcE1a;
   uint8  QualityPostDcE1b;
   uint8  QualityPostDcE2ab;
   uint8  QualityPostDcE3ab;
   uint8  QualityPostDcE4ab;
   uint8  QualityPostDcE5ab;
   uint8  QualityPostDcE6ab;
   uint8  QualityPostDcE7ab;
   uint8  QualityPostDcE8ab;
   uint8  QualityPostDcE9ab;
   uint8  QualityPostDcG2ab;
   uint8  QualityPostDcG3ab;
   uint8  QualityPostDcG4ab;
   uint8  QualityPostDcG5ab;
   uint8  QualityPostDcG6ab;
   uint8  QualityPostDcG7ab;
   uint8  QualityPostDcE1c;
   uint8  QualityPostDcE1d;
   uint8  QualityPostDcE2cd;
   uint8  QualityPostDcE3cd;
   uint8  QualityPostDcE4cd;
   uint8  QualityPostDcE5cd;
   uint8  QualityPostDcE6cd;
   uint8  QualityPostDcE7cd;
   uint8  QualityPostDcE8cd;
   uint8  QualityPostDcE9cd;
   uint8  QualityPostDcG2cd;
   uint8  QualityPostDcG3cd;
   uint8  QualityPostDcG4cd;
   uint8  QualityPostDcG5cd;
   uint8  QualityPostDcG6cd;
   uint8  QualityPostDcG7cd;
   uint8  QualityDacG2ab;
   uint8  QualityDacG3ab;
   uint8  QualityDacG4ab;
   uint8  QualityDacG5ab;
   uint8  QualityDacG6ab;
   uint8  QualityDacG7ab;
   uint8  QualityDacE9ab;
   uint8  QualityDacG2cd;
   uint8  QualityDacG3cd;
   uint8  QualityDacG4cd;
   uint8  QualityDacG5cd;
   uint8  QualityDacG6cd;
   uint8  QualityDacG7cd;
   uint8  QualityDacE9cd;
   uint8  QualityHeaterCcdA;
   uint8  QualityHeaterCcdB;
   uint8  QualityHeaterCris;
   uint8  QualityStatusTmSide;
   uint8  QualityStatusRefresh;
};


/* Definition:                                                       */
/*    ClockCycle = S/C clock of the first minor frame of the cycle   */
/*                                                                   */
/* Note: Quality bits are defined in the table below.  If the field  */
/*       which the quality byte is trying to characterize contains   */
/*       multiple bytes, the quality byte associated with the field  */
/*       is the logical "or" of the individual quality bytes.        */
/*                                                                   */
/* Quality bits:                                                     */
/*    0x01 = Format ID error                                         */
/*    0x02 = Minor/major counter error                               */
/*    0x04 = S/C clock error                                         */
/*    0x08 = Sync bit error                                          */
/*    0x10 = Command table index error                               */
/*    0x20 = Cycle number error                                      */
/*    0x40 = Level 0 quality bit                                     */
/*    0x80 = Level 1 quality bit                                     */

L1CrisLowPriorityRate.h , v 1.3


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisLowPriorityRate.h,v $ */
/* $Author: jeff $ */
/* $Date: 1997/09/11 00:37:38 $ */
/* $Revision: 1.3 $ */

#include "hdfi.h"
#include "CrisConstants.h"

struct L1CrisLowPriorityRate
{
   uint32 ClockCycle;
   uint32 Second1996;
   uint32 microsecond;
   uint32 stmco;
   uint32 stmoff;
   uint32 z1ab;
   uint32 z2ab;
   uint32 z_gt_2ab;
   uint32 z1cd;
   uint32 z2cd;
   uint32 z_gt_2cd;
   uint32 hazard;
   uint32 gh;
   uint32 mor;
   uint32 hor;
   uint32 adc2ab;
   uint32 mnrgab;
   uint32 adc2cd;
   uint32 mnrgcd;
   uint32 e1a;
   uint32 e1b;
   uint32 e2ab;
   uint32 e3ab;
   uint32 e4ab;
   uint32 e5ab;
   uint32 e6ab;
   uint32 e7ab;
   uint32 e8ab;
   uint32 e9ab;
   uint32 g2ab;
   uint32 g3ab;
   uint32 g4ab;
   uint32 g5ab;
   uint32 g6ab;
   uint32 g7ab;
   uint32 e1c;
   uint32 e1d;
   uint32 e2cd;
   uint32 e3cd;
   uint32 e4cd;
   uint32 e5cd;
   uint32 e6cd;
   uint32 e7cd;
   uint32 e8cd;
   uint32 e9cd;
   uint32 g2cd;
   uint32 g3cd;
   uint32 g4cd;
   uint32 g5cd;
   uint32 g6cd;
   uint32 g7cd;
   uint32 EventBuffer[NUM_CRIS_EVT_BUFFERS];
   uint32 livetim;
   uint32 helivet;
   uint32 hylivet;
   uint32 trg0rat;
   uint32 trg1rat;
   uint32 trg01;
   uint32 ntagint;
   uint32 nvldint;
   uint32 nevproc;
   uint32 nrtproc;
   uint32 nsfterr;
   uint32 nbadid;
   uint32 ncebful;
   uint32 nrebful;
   uint32 nmacsys;
   uint32 nhdwrej;
   uint16 NumberEvents[NUM_CRIS_EVT_BUFFERS];
   uint8  QualityStmco;
   uint8  QualityStmoff;
   uint8  QualityZ1ab;
   uint8  QualityZ2ab;
   uint8  QualityZ_gt_2ab;
   uint8  QualityZ1cd;
   uint8  QualityZ2cd;
   uint8  QualityZ_gt_2cd;
   uint8  QualityHazard;
   uint8  QualityGh;
   uint8  QualityMor;
   uint8  QualityHor;
   uint8  QualityAdc2ab;
   uint8  QualityMnrgab;
   uint8  QualityAdc2cd;
   uint8  QualityMnrgcd;
   uint8  QualityE1a;
   uint8  QualityE1b;
   uint8  QualityE2ab;
   uint8  QualityE3ab;
   uint8  QualityE4ab;
   uint8  QualityE5ab;
   uint8  QualityE6ab;
   uint8  QualityE7ab;
   uint8  QualityE8ab;
   uint8  QualityE9ab;
   uint8  QualityG2ab;
   uint8  QualityG3ab;
   uint8  QualityG4ab;
   uint8  QualityG5ab;
   uint8  QualityG6ab;
   uint8  QualityG7ab;
   uint8  QualityE1c;
   uint8  QualityE1d;
   uint8  QualityE2cd;
   uint8  QualityE3cd;
   uint8  QualityE4cd;
   uint8  QualityE5cd;
   uint8  QualityE6cd;
   uint8  QualityE7cd;
   uint8  QualityE8cd;
   uint8  QualityE9cd;
   uint8  QualityG2cd;
   uint8  QualityG3cd;
   uint8  QualityG4cd;
   uint8  QualityG5cd;
   uint8  QualityG6cd;
   uint8  QualityG7cd;
   uint8  QualityEventBuffer[NUM_CRIS_EVT_BUFFERS];
   uint8  QualityLivetim;
   uint8  QualityHelivet;
   uint8  QualityHylivet;
   uint8  QualityTrg0rat;
   uint8  QualityTrg1rat;
   uint8  QualityTrg01;
   uint8  QualityNtagint;
   uint8  QualityNvldint;
   uint8  QualityNevproc;
   uint8  QualityNrtproc;
   uint8  QualityNsfterr;
   uint8  QualityNbadid;
   uint8  QualityNcebful;
   uint8  QualityNrebful;
   uint8  QualityNmacsys;
   uint8  QualityNhdwrej;
   uint8  QualityNumberEvents;
};


/* Definition:                                                       */
/*    ClockCycle = Adjusted S/C clock of the first minor frame of    */
/*                 the cycle in which the rate was accumulated.      */
/*                 The value 256 is subtracted from the S/C clock of */
/*                 the first minor frame of the cycle in which the   */
/*                 low priority rates were readout.                  */
/*                                                                   */
/* Note: All rates are decompressed.                                 */
/*                                                                   */
/* Note: Quality bits are defined in the table below.  If the field  */
/*       which the quality byte is trying to characterize contains   */
/*       multiple bytes, the quality byte associated with the field  */
/*       is the logical "or" of the individual quality bytes.        */
/*                                                                   */
/* Quality bits:                                                     */
/*    0x01 = Format ID error                                         */
/*    0x02 = Minor/major counter error                               */
/*    0x04 = S/C clock error                                         */
/*    0x08 = Sync bit error                                          */
/*    0x10 = Command table index error                               */
/*    0x20 = Cycle number error                                      */
/*    0x40 = Level 0 quality bit                                     */
/*    0x80 = Level 1 quality bit                                     */

L1CrisState.h , v 1.1


/* $Source: /home/mussel9/asc/aceprog/include/RCS/L1CrisState.h,v $ */
/* $Author: rgr $ */
/* $Date: 1997/08/11 02:46:49 $ */
/* $Revision: 1.1 $ */

#include "L1CrisSubsetState.h"
#include "L1CrisCycleState.h"
#include "L1CrisEventBlockState.h"
#include "L1CrisHskpState.h"
#include "L1CrisLowPriorityRateState.h"
#include "L1CrisHighPriorityRateState.h"
#include "L1CrisCommandTableState.h"
#include "L1CrisSummaryState.h"
#include "L1CrisCommandEchoState.h"
#include "L1CrisDiagEventState.h"
#include "L1CrisDiagModeState.h"
#include "L1CrisFlags.h"

struct L1CrisState {
             struct L1CrisSubsetState  SubsetState;
           struct L1CrisDiagModeState  DiagModeState;
        struct L1CrisCommandEchoState  CommandEchoState;
          struct L1CrisDiagEventState  DiagEventState;
            struct L1CrisSummaryState  SummaryState;
              struct L1CrisCycleState  CycleState;
         struct L1CrisEventBlockState  EventBlockState;
               struct L1CrisHskpState  HskpState;
    struct L1CrisLowPriorityRateState  LowPriorityRateState;
   struct L1CrisHighPriorityRateState  HighPriorityRateState;
       struct L1CrisCommandTableState  CommandTableState;
                   struct L1CrisFlags  flag;
};

CrisRate.h , v 1.1


/* $Source: /home/mussel9/asc/aceprog/include/RCS/CrisRate.h,v $ */
/* $Author: rgr $ */
/* $Date: 1997/09/09 18:53:17 $ */
/* $Revision: 1.1 $ */

#define NUM_CRIS_LOW_PRIORITY_RATES  128

#define CRIS_RATE_STMCO                0
#define CRIS_RATE_STMOFF               1
#define CRIS_RATE_Z1AB                 2
#define CRIS_RATE_Z2AB                 3
#define CRIS_RATE_Z_GT_2AB             4
#define CRIS_RATE_Z1CD                 5
#define CRIS_RATE_Z2CD                 6
#define CRIS_RATE_Z_GT_2CD             7
#define CRIS_RATE_HAZARD               8
#define CRIS_RATE_GH                   9
#define CRIS_RATE_MOR                 10
#define CRIS_RATE_HOR                 11
#define CRIS_RATE_ADC2AB              12
#define CRIS_RATE_MNRGAB              13
#define CRIS_RATE_ADC2CD              14
#define CRIS_RATE_MNRGCD              15
#define CRIS_RATE_E1A                 16
#define CRIS_RATE_E1B                 17
#define CRIS_RATE_E2AB                18
#define CRIS_RATE_E3AB                19
#define CRIS_RATE_E4AB                20
#define CRIS_RATE_E5AB                21
#define CRIS_RATE_E6AB                22
#define CRIS_RATE_E7AB                23
#define CRIS_RATE_E8AB                24
#define CRIS_RATE_E9AB                25
#define CRIS_RATE_G2AB                26
#define CRIS_RATE_G3AB                27
#define CRIS_RATE_G4AB                28
#define CRIS_RATE_G5AB                29
#define CRIS_RATE_G6AB                30
#define CRIS_RATE_G7AB                31
#define CRIS_RATE_E1C                 32
#define CRIS_RATE_E1D                 33
#define CRIS_RATE_E2CD                34
#define CRIS_RATE_E3CD                35
#define CRIS_RATE_E4CD                36
#define CRIS_RATE_E5CD                37
#define CRIS_RATE_E6CD                38
#define CRIS_RATE_E7CD                39
#define CRIS_RATE_E8CD                40
#define CRIS_RATE_E9CD                41
#define CRIS_RATE_G2CD                42
#define CRIS_RATE_G3CD                43
#define CRIS_RATE_G4CD                44
#define CRIS_RATE_G5CD                45
#define CRIS_RATE_G6CD                46
#define CRIS_RATE_G7CD                47
#define CRIS_RATE_EVENT_BUFFER        48
#define CRIS_RATE_LIVETIM            112
#define CRIS_RATE_HELIVET            113
#define CRIS_RATE_HYLIVET            114
#define CRIS_RATE_TRG0RAT            115
#define CRIS_RATE_TRG1RAT            116
#define CRIS_RATE_TRG01              117
#define CRIS_RATE_NTAGINT            118
#define CRIS_RATE_NVLDINT            119
#define CRIS_RATE_NEVPROC            120
#define CRIS_RATE_NRTPROC            121
#define CRIS_RATE_NSFTERR            122
#define CRIS_RATE_NBADID             123
#define CRIS_RATE_NCEBFUL            124
#define CRIS_RATE_NREBFUL            125
#define CRIS_RATE_NMACSYS            126
#define CRIS_RATE_NHDWREJ            127

For comments, questions or suggestions regarding these data structures,
email: asc@srl.caltech.edu
Last update: Wed Nov 3 12:45:31 PST 1999