12345678910111213141516171819202122232425262728293031 |
- #ifndef _CHANNEL_H_
- #define _CHANNEL_H_
- //---------------------------------------------- CChannel ---------
- class USCADADLLEXPORT CChannel:public CObject // 通信口对象;
- {
- protected:
- DECLARE_SERIAL(CChannel);
- CChannel();
- public:
- void MoveToNextDevice();
- virtual ~CChannel();
- CChannel &operator=(CChannel& comport);
- virtual CChannel* Clone(void);
- virtual void Serialize(CArchive& ar);
- virtual void ReadData(void *pData, int nLen){};
- virtual void WriteDate(void *pData, int nLen){};
- virtual void FreshData(void);
- public:
- int GetUsedDeviceNum();
- CString m_strName; // 通信口名称
- int m_nCommunicateType; // 通信类型 0: 串口通信协议 1:网络通信协议
- CDeviceArray m_Devices; // 下挂串口设备;
- int m_nCurDeviceNo; // 当前工作的设备号,-1时所有设备都处理;
- };
- typedef CTypedPtrArray<CObArray, CChannel*> CChannelArray;
- #endif //(_CHANNEL_H_)
|