00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef STRAP_WS_H
00012 #define STRAP_WS_H
00013
00014 #include "strapDb.h"
00015
00016 #define strapFORMAT_IDL "IDL"
00017 #define strapFORMAT_SAMP "SAMP"
00018 #define strapDSP_REC_SIZE 6
00019
00020
00021
00022 #define CNT1 0
00023 #define CNT2 1
00024 #define CNT3 2
00025 #define CNT4 3
00026 #define TOTC 4
00027 #define CX 5
00028 #define CY 6
00029 #define MX 7
00030 #define MY 8
00031
00032
00033
00034
00035
00036 typedef struct {
00037 vltUINT32 apdCount[4];
00038 vltINT32 totCounts;
00039 vltDOUBLE cx;
00040 vltDOUBLE cy;
00041 vltDOUBLE mx;
00042 vltDOUBLE my;
00043 vltLOGICAL lowFlux;
00044 } strapDATA_RECORD;
00045
00046
00047
00048
00049 typedef struct {
00050
00051 vltLOGICAL verbose;
00052
00053
00054
00055 vltUINT16 arcsecToBit;
00056 vltUINT16 intTime;
00057 vltFLOAT intMatrix[4];
00058 vltINT32 skyBack;
00059 vltINT32 lowFluxThr;
00060 vltUINT16 actualRecs;
00061
00062
00063
00064 char *disturbData;
00065 vltUINT16 *strapDspData;
00066 strapDATA_RECORD *strapRtData;
00067
00068 vltINT32 dspDataSize;
00069 vltINT32 rtDataSize;
00070
00071
00072
00073 vltUINT16 recCnt;
00074 vltUINT32 recSize;
00075 dbTYPE dataType[20];
00076
00077
00078 } strapGlobalStruct;
00079
00080
00081 extern strapGlobalStruct strapInfo;
00082
00083
00084
00085
00086
00087 ccsCOMPL_STAT strapRdDisturbFile (
00088 char *msgBug,
00089 ccsERROR *error
00090 );
00091
00092 ccsCOMPL_STAT strapGetData (
00093 ccsENVNAME strapEnv,
00094 vltINT32 numRecs,
00095 char *replyStr,
00096 ccsERROR *error
00097 );
00098
00099 ccsCOMPL_STAT strapWriteDataFile (
00100 char *fileName,
00101 vltINT32 numRecs,
00102 ccsERROR *error
00103 );
00104
00105
00106 ccsCOMPL_STAT strapWriteSampling (
00107 char *fileName,
00108 vltINT32 numRecs,
00109 vltINT32 index,
00110 ccsERROR *error
00111 );
00112
00113
00114 ccsCOMPL_STAT strapProcessCmd (
00115 ccsENVNAME strapEnv,
00116 char *command,
00117 const msgPROCESSID *origId,
00118 msgCMDID commandId,
00119 char *msgBuf,
00120 msgLENGTH len,
00121 ccsERROR *error
00122 );
00123
00124 ccsCOMPL_STAT strapSampleData(
00125 ccsENVNAME strapEnv,
00126 char *msgBuf,
00127 ccsERROR *error
00128 );
00129
00130 ccsCOMPL_STAT strapReadSetup (
00131 ccsENVNAME strapEnv,
00132 ccsERROR *error
00133 );
00134
00135 void strapGetDspData (
00136 vltUINT16 *dspData,
00137 strapDATA_RECORD *dbData,
00138 vltUINT16 recCnt,
00139 vltUINT16 arcsecToBit,
00140 vltUINT16 intTime,
00141 vltFLOAT *intMatrix,
00142 vltINT32 skyBack,
00143 vltINT32 lowFluxTHR
00144 );
00145
00146 ccsCOMPL_STAT strapProcessDspData (
00147 ccsENVNAME strapEnv,
00148 vltINT32 numRecs,
00149 ccsERROR *error
00150 );
00151
00152 #endif