00001 #ifndef sampCCS_H
00002 #define sampCCS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "sampErrors.h"
00014
00015
00016
00017
00018
00019
00020 #define ccsHIST_PT_CLASS 65411
00021 #define ccsPLOT_PT_CLASS 65501
00022
00023
00024
00025
00026
00027 #define sampNUM_OF_TYPES 8
00028 #define sampMAX_DELAYED_REPLIES 6
00029 #define sampMISSED_REPLIES 16
00030 #define sampMAX_NUM_PARAMS 40
00031 #define sampMIN_NUM_PARAMS 4
00032 #define sampMAX_NUM_SAMPLES 8
00033 #define sampMAX_NUM_VALUES_PER_MSG 505
00034 #define sampMAX_RTAP_FAILED_CATCH_UP 6
00035 #define sampSTART_SAMP_CMDID 1
00036 #define sampSTOP_SAMP_CMDID 2
00037
00038
00039
00040 #define sampPLOT_PATH ""
00041 #define sampPLOT_NAME "ccs_config:plot config:samplePlot"
00042 #define sampPLOT_TABLE "plot_table"
00043 #define sampPLOT_DATA "data"
00044 #define sampPLOT_FIRST_REC "firstRecord"
00045 #define sampPLOT_NEXT_REC "nextRecord"
00046 #define sampPLOT_OLDEST_REC "oldestRecord1"
00047
00048
00049 typedef struct {
00050 dbSYMADDRESS attrName;
00051 dbDIRADDRESS attrDirect;
00052 dbATTRTYPE attrType;
00053 dbTYPE dataType[dbMAX_FIELD_CNT+1];
00054
00055
00056 vltDBXREF xrefAddr;
00057 vltUINT8 fieldCnt;
00058 vltUINT16 recCnt;
00059 vltUINT32 recSize;
00060 } sampDB_POINT;
00061
00062
00063 typedef struct {
00064 vltUINT16 writeToDb;
00065 vltUINT16 rtapCatchUpFailed;
00066 dbSYMADDRESS plotRoot;
00067 vltUINT32 nextRecCnt;
00068 vltUINT32 newNextRecCnt;
00069 sampDB_POINT table;
00070 sampDB_POINT first;
00071 sampDB_POINT oldest;
00072 sampDB_POINT next;
00073 } sampWS_DB_CONTROL;
00074
00075
00076 typedef struct {
00077 vltINT32 numbPoints;
00078 dbSYMADDRESS plotPoint;
00079 dbTYPE sourceDataType[sampMAX_NUM_SAMPLES+1];
00080 sampWS_DB_CONTROL plotTable;
00081
00082
00083
00084 vltUINT16 dbOldest;
00085 vltUINT16 dbNext;
00086 } sampPLOT_TABLE_DESCR;
00087
00088
00089
00090
00091
00092
00093 ccsCOMPL_STAT sampDbInit(
00094 sampWS_DB_CONTROL *tb,
00095 ccsERROR *error
00096 );
00097
00098 ccsCOMPL_STAT sampClearTable (
00099 sampWS_DB_CONTROL *tb,
00100 ccsERROR *error
00101 );
00102
00103 ccsCOMPL_STAT sampWrPlotIndex(
00104 sampDB_POINT *dbInfo,
00105 char *buffer,
00106 ccsERROR *error
00107 );
00108
00109
00110 #endif