#pragma once
|
#include "Context.h"
|
#include "Common.h"
|
#include <vector>
|
#include "CParam.h"
|
|
#define ITOTAL 0
|
#define IMAX 1
|
#define IMIN 2
|
#define IAVE 3
|
|
#define PANEL_DATA_SIZE 5 * 60 * 15
|
#define PARAM_RAWDATA_SIZE 4096
|
|
#define STEP_READY 0
|
#define STEP_RECEIVED 20
|
#define STEP_BEGIN_SAMPLING 1
|
#define STEP_END_SAMPLING 2
|
#define STEP_REMOVED 30
|
|
class CPanel :
|
public CContext
|
{
|
public:
|
CPanel();
|
CPanel(const char* pszQRCode, int nUnitId);
|
virtual ~CPanel();
|
|
public:
|
virtual std::string& getClassName();
|
virtual std::string toString();
|
std::string& getQRCode();
|
void setQRCode(const char* pszQRCode);
|
int getUnitId();
|
void setUnitId(int id);
|
void setStep(int step);
|
int getStep();
|
int addData(UNITDATA1& data);
|
const std::vector<UNITDATA1>& getDatas();
|
void Serialize(CArchive& ar);
|
bool getReceivedTime(int& year, int& month, int& day);
|
ULONG64 GetCurrentSampleTime();
|
ULONGLONG getReceivedTime();
|
void setReceivedTime(ULONGLONG time);
|
ULONGLONG getBeginSamplingTime();
|
void setBeginSamplingTime(ULONGLONG time);
|
ULONGLONG getEndSamplingTime();
|
void setEndSamplingTime(ULONGLONG time);
|
ULONGLONG getRemovedTime();
|
void setRemovedTime(ULONGLONG time);
|
void getDatas(std::vector<UNITDATA1>& out);
|
BOOL getNewestData(UNITDATA1& data);
|
UNITDATA1& getMathData(int index);
|
void setMathData(int index, UNITDATA1& data);
|
int getBlodLen();
|
int getBlod(char* pszBuffer, int nBufferSize);
|
int setBlod(char* pszBlod, int len);
|
|
public:
|
void setRecipeName(const char* pszName);
|
std::string& getRecipeName();
|
void setAir1(double air);
|
double getAir1();
|
void setAir2(double air);
|
double getAir2();
|
void setAir3(double air);
|
double getAir3();
|
void setPre1(int pre);
|
int getPre1();
|
void setTmp1(double tmp);
|
double getTmp1();
|
void setTmp2(double tmp);
|
double getTmp2();
|
void addIntParam(const char* pszName, const char* pszUnit, int value);
|
void addDoubleParam(const char* pszName, const char* pszUnit, double value);
|
std::vector<CParam*>& getParams();
|
void SetParamsRawData(const char* pszData);
|
|
private:
|
std::string m_strQRCode;
|
int m_nUnitId;
|
std::vector<UNITDATA1> m_datas;
|
UNITDATA1 m_dataMath[4]; // 0£º»ã×Ü£»1£º×î´ó£»2£º×îС£»3£ºÆ½¾ù
|
ULONG64 m_timeBeginSampling;
|
ULONG64 m_timeEndSampling;
|
ULONG64 m_timeReceived;
|
ULONG64 m_timeRemoved;
|
|
private:
|
int m_nStep; // µ±Ç°²½Öè;
|
std::string m_strRecipeName;
|
double m_fAir1; // ¸É±ÃÎüÕæ¿ÕÖµ
|
double m_fAir2; // ·Ö×Ó±ÃÎüÕæ¿ÕÖµ
|
double m_fAir3; // ÆøÄÒѹÁ¦Öµ
|
int m_nPre1; // ÌùºÏ×ÜѹÁ¦
|
double m_fTmp1; // ÉÏÇ»ÌåζÈ
|
double m_fTmp2; // ÏÂÇ»ÌåζÈ
|
char* m_pszParamsRawData;
|
std::vector<CParam*> m_params; // ³öվʱ¼Ç¼²ÎÊý
|
};
|