/********************************************************************* * * 文 件: MapCollect.h //跟踪MAP信息 * * 版权所有: Shanghai Baosight Software Co., Ltd. * * 概述://跟踪MAP信息采集 * * 版本历史 * 1.0 2009-04-01 zoufuzhou //TODO请添加本次主要修改内容 * %USER% *********************************************************************/ #ifndef H_STRIP_BREAK_H #define H_STRIP_BREAK_H #include #include #include #include #include #include #include #include using namespace log4cplus; using namespace std; const int CS_BRK_ZONE= 45; const int CS_BRK_SIZE= 7;//<断带信号个数 电文表最前面 const int CS_WAIT_TIME= 5*1000; //ms const int CS_SBRK_SIGN_LEN=186;//断带电文数据点个数 const int CS_CACHE_SIZE=9000;//断带电文数据点个数 struct SBRK_SIGN{ float sbreak[CS_BRK_SIZE]; // float tension; // float think_dev; float spare[CS_SBRK_SIGN_LEN-CS_BRK_SIZE]; }; class StripBreak { public: StripBreak(const string& rootdir); public: ~StripBreak(void); public: int CacheTele(int eventNo, const ::Ice::ByteSeq& seq); int Dispose(int eventNo, const ::Ice::ByteSeq& seq); private: int IsBreak(void); int Archive(int break_index); private: void organize(int, Json::Value&); short Proxy(int eventNo,const string& proxyName, const char* str,int length); int save(const std::string& file,const string& strdata); int getFiles(const std::string& path,std::vector &files); std::string getPath(const string& path = ""); bool fileCompress(string file,string cfile); bool fileDeCompress(string file,string cfile); private: BinaryTele* p_tele; CMemTable* mp_table; SBRK_SIGN* mp_newsign; SBRK_SIGN* mp_oldsign; CMemFix* mp_cache; private: string m_rootdir; Json::Reader m_reader; Json::FastWriter m_writer; Json::Value::Members::iterator m_it; private: int m_sbrkindex; }; #endif