#pragma once
|
#include "Log.h"
|
#include "CCLinkIEControl.h"
|
|
namespace SERVO {
|
// Memory Block ½á¹¹Ì嶨Òå
|
typedef struct _MemoryBlock {
|
unsigned int type;
|
unsigned int start;
|
unsigned int end;
|
unsigned int size;
|
} MemoryBlock;
|
|
class CEquipment
|
{
|
public:
|
CEquipment();
|
virtual ~CEquipment();
|
|
|
public:
|
virtual const char* getClassName() = 0;
|
void setName(const char* pszName);
|
std::string& getName();
|
void setDescription(const char* pszDescription);
|
std::string& getDescription();
|
void setStation(int network, int station);
|
const StationIdentifier& getStation();
|
void setReadBitBlock(unsigned int start, unsigned int end);
|
MemoryBlock& getReadBitBlock();
|
void setWriteBitBlock(unsigned int start, unsigned int end);
|
MemoryBlock& getWriteBitBlock();
|
virtual void init();
|
virtual void term();
|
virtual void onTimer(UINT nTimerid);
|
virtual void serialize(CArchive& ar);
|
|
protected:
|
inline void Lock() { EnterCriticalSection(&m_criticalSection); }
|
inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
|
|
protected:
|
std::string m_strName;
|
std::string m_strDescription;
|
CRITICAL_SECTION m_criticalSection;
|
StationIdentifier m_station;
|
MemoryBlock m_blockReadBit;
|
MemoryBlock m_blockWriteBit;
|
};
|
}
|