LAPTOP-SNT8I5JK\Boounion
2024-12-13 b67e16869a5bfbbde3896a4e5a13f1301f1b978d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "Component.h"
#include <map>
#include <list>
#include "EQState.h"
 
class CEQStateMonitor :
    public CComponent
{
public:
    CEQStateMonitor();
    ~CEQStateMonitor();
 
public:
    virtual std::string& getClassName();
    virtual void onData(int id, const void* pData, int size);
    virtual void onRecvBroadcast(void* pSender, CIntent* pIntent);
    virtual void init();
    virtual void term();
    void setBeginAddr(int nAddr);
    void enableStatusReport(BOOL bEnable);
    virtual void OnTimer(UINT nTimerid);
    void ReportStatus(int eqst);
    void ReportDoorState(int eqst, int doorst);
    virtual void Serialize(CArchive& ar);
    void getEQStateList(std::list<CEQState*>& list);
 
private:
    void AddEQState(CEQState* eqState);
 
private:
    int m_nBeginAddr;
 
private:
    BOOL m_bStatusReport;
    EQSTATE m_lastState;
    int m_nLastDoorState;
    std::list<CEQState*> m_eqStates;
};