
#line 468 "histogram.w"

/*---------------------------------------------------------------------------
                        H I S T D R I V
  internal header file which includes the definition of the Histogram memory
  driver structure.

  Mark Koennecke, April 1997
----------------------------------------------------------------------------*/
#ifndef SICSHISTDRIV
#define SICSHISTDRIV
#define MAXCHAN 4096


#line 81 "histogram.w"

   typedef struct __HistDriver {
                               /* configuration data */
                                 HistMode eHistMode;
                                 OverFlowMode eFlow;
                                 int iRank;
                                 int iDims[MAXDIM];
                                 int nDim;
                                 int iLength;
                                 int iBinWidth;
                                 float fTime[MAXCHAN];
                                 int iTimeChan;
                               /* counting operations data */
                                 CounterMode  eCount;
                                 float fCountPreset;
                               /* status flags */
                                 int iReconfig;
                                 int iUpdate;
                               /* interface functions */
                                 int (*Configure)(pHistDriver self,
                                               SConnection *pCon,
                                               pStringDict pOpt,
                                               SicsInterp *pSics);
                                 int (*Start)(pHistDriver self, 
                                           SConnection *pCon);
                                 int (*Halt)(pHistDriver self);
                                 int (*GetCountStatus)(pHistDriver self,
                                                    SConnection *pCon);
                                 int (*GetError)(pHistDriver self, 
                                              int *iCode,
                                              char *perror,
                                              int iErrlen);
                                 int (*TryAndFixIt)(pHistDriver self,
                                                 int iCode);
                                 int (*GetData)(pHistDriver self,
                                             SConnection *pCon);
                                 int (*GetHistogram)(pHistDriver self,
                                                  SConnection *pCon,
                                                  int i,
                                                  int iStart, int iEnd,
                                                  HistInt *pData);

                                 int (*SetHistogram)(pHistDriver self,
                                                  SConnection *pCon,
                                                  int i,
                                                  int iStart, int iEnd,
                                                  HistInt *pData);
                                 long (*GetMonitor)(pHistDriver self, 
                                                    int i,
                                                    SConnection *pCon);
                                 float (*GetTime)(pHistDriver self,
                                                  SConnection *pCon);
                                 int (*Preset)(pHistDriver self,
                                            SConnection *pCon,
                                            HistInt iVal);
                                 int (*Pause)(pHistDriver self,
                                              SConnection *pCon);
                                 int (*Continue)(pHistDriver self,
                                                 SConnection *pCon);
                                 int (*FreePrivate)(pHistDriver self);
                                 void *pPriv;
                               } HistDriver;

#line 480 "histogram.w"


#line 238 "histogram.w"

   pHistDriver CreateHistDriver(pStringDict pDict);
   void        DeleteHistDriver(pHistDriver self);
   int         HistDriverConfig(pHistDriver self, pStringDict pOpt,
                                SConnection *pCon);

#line 481 "histogram.w"


#endif
