00001 #ifndef agwsCON_CAT_H
00002 #define agwsCON_CAT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __cplusplus
00033 #error This is a C++ include file and cannot be used from plain C
00034 #endif
00035
00036
00037
00038
00039 extern "C" {
00040 #include "tcsVcc.h"
00041 }
00042 #include "agws.h"
00043 #include "agwsGUIDE_STAR.h"
00044 #include "eccsDB_TABLE.h"
00045
00046
00047
00048
00049 #include <evhDB_TASK.h>
00050 #include <evhCOMMAND.h>
00051
00052 enum agwsSEARCH_MODE { agwsTARGET_POS, agwsACTUAL_POS, agwsAUTO_POS };
00053
00054 class agwsCON_ADAPTER;
00055
00056
00057
00058 class agwsCON_CAT : public evhDB_TASK
00059 {
00060 public:
00061 agwsCON_CAT(const dbSYMADDRESS dbPoint, agwsCON_ADAPTER *checker = NULL);
00062 virtual ~agwsCON_CAT();
00063
00064 virtual evhCB_COMPL_STAT AddCandGsCB(msgMESSAGE &msg, void *);
00065 virtual evhCB_COMPL_STAT GetGsCB(msgMESSAGE &msg, void *);
00066 virtual evhCB_COMPL_STAT GetGssCB(msgMESSAGE &msg, void *);
00067 virtual evhCB_COMPL_STAT SelectGsCB(msgMESSAGE &msg, void *);
00068 virtual evhCB_COMPL_STAT SearchGsCB(msgMESSAGE &msg, void *);
00069 virtual evhCB_COMPL_STAT PrintCatCB(msgMESSAGE &msg, void *);
00070
00071 virtual ccsCOMPL_STAT Init();
00072 virtual ccsCOMPL_STAT Reset();
00073 virtual ccsCOMPL_STAT AddCandGs(vltDOUBLE alpha,
00074 vltDOUBLE delta,
00075 vltDOUBLE mag,
00076 agwsGS_PROBE_POS probePos,
00077 vltDOUBLE wavelen = 650.0,
00078 vltINT32 index = 0);
00079
00080 virtual ccsCOMPL_STAT SearchGs(agwsSEARCH_MODE searchMode = agwsAUTO_POS,
00081 vltLOGICAL noDefCriteria = ccsFALSE,
00082 vltDOUBLE minMag = 0.0, vltDOUBLE maxMag = 0.0,
00083 vltBYTES256 vigLimit = (unsigned char*)"",
00084 vltDOUBLE rotAngle = 0.0);
00085
00086 virtual ccsCOMPL_STAT GetNewCandidate(agwsGUIDE_STAR &candidate);
00087 virtual vltINT32 UntriedEntries();
00088
00089 virtual ccsCOMPL_STAT SetProbeChecker(agwsCON_ADAPTER *checkObj);
00090
00091 virtual ccsCOMPL_STAT ResetInUse();
00092
00093 protected:
00094 virtual int ComparePriority(agwsGUIDE_STAR &star1,
00095 agwsGUIDE_STAR &star2);
00096 virtual ccsCOMPL_STAT PopCandidate(vltINT32 index);
00097 virtual ccsCOMPL_STAT StoreCurrentGs();
00098 virtual ccsCOMPL_STAT StoreCurrentGsTable();
00099 virtual ccsCOMPL_STAT QueryExtCat(vltDOUBLE alpha, vltDOUBLE delta,
00100 vltDOUBLE minRad, vltDOUBLE maxRad,
00101 vltDOUBLE minMag, vltDOUBLE maxMag,
00102 int & numFound, TcsQueryResult & result);
00103 virtual ccsCOMPL_STAT FilterResult(int & numFound, TcsQueryResult & result);
00104 virtual ccsCOMPL_STAT UpdateInUse();
00105
00106 private:
00107 TcsCatalog* catalog;
00108 vltBYTES32 catalogName;
00109 agwsGUIDE_STAR gsCat[agwsGS_CAT_SIZE];
00110
00111 vltINT32 inUse;
00112 vltINT32 selected;
00113
00114 agwsCON_ADAPTER *checker;
00115 };
00116
00117 #endif