Project

General

Profile

Feature #2956 » cctvC3jt.h

yan hong, 04/19/2023 10:59 AM

 
1
// cctvC3011.h: interface for the CcctvC3JT class.
2
//
3
//////////////////////////////////////////////////////////////////////
4

    
5
#if !defined(AFX_cctvC3JT_H__2F349D15_4635_4A09_9299_92BDB042A30C__INCLUDED_)
6
#define AFX_cctvC3JT_H__2F349D15_4635_4A09_9299_92BDB042A30C__INCLUDED_
7

    
8
#if _MSC_VER > 1000
9
#pragma once
10
#endif // _MSC_VER > 1000
11

    
12
#include "daq/daq_protocol.h"
13
#include "daq/daq_cmddef.h"
14
#define HEADLEN 39
15

    
16
class CcctvC3JT : public CProtocol  
17
{
18
public:
19
	CcctvC3JT();
20
	virtual ~CcctvC3JT();
21
	virtual void Init(S_PROTOCOLCFG *pcfg);
22
	virtual void SetExtendedPara(uint16 no, sint32 val);
23
	virtual sint32 RxProc();
24
	virtual sint32 TxProc();
25
	void Login(char *name,char *pwd,char *ip,char *port);
26
	void PressKey(char *keyval,char *state,char *step);
27
	void Aim(uint8 oper,uint8 wall,uint8 task,uint8 mon,uint8 mult,uint8 win,uint8 cam);
28
//	void PTZControl(uint8 oper,uint8 wall,uint8 task,uint8 mon,uint8 mult,uint8 win,uint8 cam,uint8 ptz,uint8 ptzpara);
29
	int PTZConv(uint8 ptz);
30
protected:
31
	int GetNowSecond();
32
	virtual BOOL ProcCmd();
33
	ST_TRACK_ADDR	m_cmdAddr;	
34
private:
35
	void TrimBlank(char *buf,int len);
36
	char* GetAkeyStart(char * buf,char *key,int &len);
37
	char* GetAkeyVal(char * buf,char *key,int &len);
38
	int m_reloginTime;
39
	int m_RcvTimeOuts;
40
	uint16 m_rtuno;
41
	int m_LastSendTime;
42
	int m_ID;
43
	BOOL m_bLogin;
44
	BOOL m_bCmd;
45
	char mHead[40];
46
	int m_infotype;
47
	int m_keyval;
48
	int m_state;
49
	int m_step;
50
	int m_platinfotype;
51
	char m_msg[100];
52
	int m_mon;
53
	int m_win;
54
	int m_cam;
55
	uint8 m_mult;
56
char name[24];
57
char pwd[24];
58
char ip[16];
59
char port[8];
60
struct TxBuff{
61
	char Buf[40][256];
62
	int  Len[40];
63
	int  FrameNum;
64
}m_tBuf;
65
	int TxFlag;
66
	int TxIndex;
67
	void TxBufwrite();
68

    
69
};
70

    
71
#endif // !defined(AFX_cctvC3JT_H__2F349D15_4635_4A09_9299_92BDB042A30C__INCLUDED_)
(2-2/3)