43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#pragma once
|
|
#include <TestProject/DCR/cache/TagIdCache.h>
|
|
#include <TestProject/DCR/ihdb_header.h>
|
|
#include <glob/BinaryTele.h>
|
|
#include <log4cplus/LOG.h>
|
|
#include <zlib/MemVar.h>
|
|
#include <zlib/zoneDef.h>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <vector>
|
|
#include <zlib/MemFix.hpp>
|
|
const int IHD_SIZE_MAX = 10000;
|
|
const int TAGNAME_MAXLEN = 256;
|
|
// char tagNames[IHD_SIZE_MAX][TAGNAME_MAXLEN];
|
|
|
|
struct IHD_TAGID {
|
|
int32 nTagNum = 0;
|
|
char szTagNames[IHD_SIZE_MAX][TAGNAME_MAXLEN];
|
|
HD3_TAG_TYPE tagTypes[IHD_SIZE_MAX];
|
|
uint32 tagID[IHD_SIZE_MAX];
|
|
int32 nErrCodes[IHD_SIZE_MAX];
|
|
HD3Record pRec[IHD_SIZE_MAX];
|
|
};
|
|
|
|
class SnapShot {
|
|
public:
|
|
SnapShot();
|
|
~SnapShot();
|
|
bool is_connected();
|
|
|
|
bool to_connect();
|
|
|
|
bool GetTagIDs(int eventNo);
|
|
|
|
void update_data(int eventNo);
|
|
|
|
private:
|
|
std::unique_ptr<LOG> logger_; ///< 本地logger
|
|
// BinaryTele binary_tele{2020, "T_LOV_FDAAITEM"};
|
|
BinaryTele binary_tele{CMemVar::Const()->event_eis_start, "T_LOV_FDAAITEM"};
|
|
std::map<int, IHD_TAGID> mv_tagids_;
|
|
map<int, CMemFix<PLC_DATA>*> m_mapfix;
|
|
}; |