Project

General

Profile

Feature #3003 » DHacs.h

yan hong, 05/29/2023 10:39 AM

 
1
#if _MSC_VER > 1000
2
#pragma once
3
#endif // _MSC_VER > 1000
4

    
5
#include "daq/daq_protocol.h"
6
#include "dhnetsdk.h"
7
#include "dhconfigsdk.h"
8
#include <string>
9

    
10
#if !defined(FALSE)
11
#define FALSE  0
12
#endif
13

    
14

    
15

    
16

    
17
class DHacs : public CProtocol {
18
public:
19

    
20
//	char	logName[256];
21
	char	ip[64];
22
	int		port;
23
	char	username[64];
24
	char	password[64];
25
	LLONG	ILoginHandle;	//??¼???
26
	int		nchannelnum;	//?Ž?ͨ??????
27
	//	int		listen;			//?????ļ?ѡ???Ƿ??ı???
28
	//	bool	listenstate;	//?Ƿ??ڶ??ı???
29

    
30
	bool	sdkflag;
31
	bool	rxflag;
32
	bool	txflag;
33

    
34
public:
35

    
36
	virtual		~DHacs();
37
	virtual		sint32 RxProc();
38
	virtual		sint32 TxProc();
39
	virtual void Init(S_PROTOCOLCFG* pcfg);
40
	void		ReadIni();
41

    
42

    
43
	int			LoginDev();
44
	int			SelectDoor(int channel, LLONG iloginhandle);
45
	int			SelectDoorState(int channel, LLONG iloginhandle);		//??ͨ??1???????أ?2??????????3????ʧ?ܣ?0??
46
	int			OpenDoor(int channel, LLONG iloginhandle);				//?̿??ɹ???1????ʧ?ܣ?0??
47
	int			CloseDoor(int channel, LLONG iloginhandle);				//?̹سɹ???1????ʧ?ܣ?0??
48
	int			SetDoorNorOpen(int channel, LLONG iloginhandle);		//?????ɹ???1????ʧ?ܣ?0??
49
	int			SetDoorNorClose(int channel, LLONG iloginhandle);		//???سɹ???1????ʧ?ܣ?0??
50
	int			SetDoorNorNormal(int channel, LLONG iloginhandle);		//??ͨ?ɹ???1????ʧ?ܣ?0??
51

    
52
	//	void		CALLBACK DisConnectFunc(LLONG lLoginID, char *pchDVRIP, LONG nDVRPort, DWORD dwUser);
53
	//	BOOL		CALLBACK afMassCallBack(LONG lCommand, LLONG lLinID, char *pBuf, DWORD dwBufLen, char *pchDVRIP, LONG nDVRPort, LDWORD dwUser);
54
	sint32		Get_rtuno();
55
	sint32		Get_CmdNum();
56
	sint32		Get_ACmd(sint32 rtuno, S_RAWCMD* cmd);
57
	sint32		Del_ACmd(sint32 rtuno);
58
	sint32		Rpt_AResult(sint32 rtuno, S_RAWCMD cmd);
59
	void		PutSoe(S_RAWSOE tsoeex);
60
	void		Register_Frm();
61
	void		SetCallBack();
62
	BOOL		GetGroups();
63

    
64
private:
65

    
66

    
67

    
68
};
69

    
70

    
71

    
72

    
(2-2/3)