#include #include "tcs.h" #pragma once class CPCOcomm { public: CPCOcomm(void); public: ~CPCOcomm(void); // Initialize variable, create and register PCO object, obtain proxies to HQ object int Initialize(void); // parses and takes appropriate actions on XML command string received int CommandParser(std::string command); // parses and takes appropriate actions on XML request string received, returns answer XML string int InfRequestParser(const std::string& request, std::string& answer); // parses and takes appropriate action on XML notification string received // void NotificationMessageParser(const std::string& message); // takes appropriate action on Register message void OnRegister(const std::string& name); // takes appropriate action on Unregister message void OnUnRegister(const std::string& name); private: // contains error message from last operation CString m_strErrorMessage; Ice::CommunicatorPtr m_communicator; IceGrid::AdminPrx m_admin; Ice::ObjectPrx PCOproxy; tcs::TCScomPrx m_HQproxy; public: int m_nStatus; CString makeUniqueID(void); void NotificationMessageParser(std::string notification); void GetLastError(CString& error) { error=m_strErrorMessage; } public: bool IsConnected(void); public: int GetCoordinates(double* X, double* Y, double *Pa); public: int sendQuery(CString& instrument, CString& queryname, CString& answer); public: int GetTargetInfo(CString& TargetInfo); public: int sendCommand(CString& command, CString& instrument, CString& parameter, unsigned long long* id); public: unsigned long long createUniqueID(void); public: int MoveGuider(double xcoor, double ycoor); public: int MoveGuiderIncr(int xcoor, int ycoor); public: int GetCoordinatesNoTrans(double* X, double* Y); public: int EnableGuider(bool enable); public: int MoveTelescopeWithHandBox(char direction, bool start); public: // set guide rate in arcsec per sec int SetGuideRate(int rate); };