📄 carditfa.h
字号:
// CardItfa.h : main header file for the CARDITFA DLL
//
#if !defined(AFX_CARDITFA_H__7CFA91A7_9D1F_441D_A9D9_64349034C7CB__INCLUDED_)
#define AFX_CARDITFA_H__7CFA91A7_9D1F_441D_A9D9_64349034C7CB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "setstruct.h"
/////////////////////////////////////////////////////////////////////////////
// CCardItfaApp
// See CardItfa.cpp for the implementation of this class
//
BOOL WINAPI InitCard(char * ServerAddr, int Port, char * Name = NULL, char * Passwd = NULL);
BOOL WINAPI CloseCard();
int WINAPI ReadCardUnlock();
int WINAPI ReadCard(unsigned char *data,
int size,
unsigned char *chanel,
unsigned char * group = NULL,
unsigned char *abnormal = NULL,
unsigned int * pTime = NULL,
unsigned char * trunc = NULL);
BOOL WINAPI WriteCard(unsigned char* Data,
int DataLength,
UINT Times,
UINT Interval,
unsigned char Type,
unsigned char * pSendID = NULL,
unsigned int * pSucNum = NULL,
unsigned int * pFailNum = NULL,
unsigned int * pTimeStamp = NULL,
unsigned char *pError = NULL);
int WINAPI SetAppMode(unsigned char appmode,unsigned char* Error = NULL);
int WINAPI SetProtocol(unsigned char protocol, unsigned char * Error = NULL);
int WINAPI SetInterface(unsigned char interfacetype, unsigned char * Error = NULL);
int WINAPI SetSpeed(UINT speed, unsigned char * Error = NULL);
int WINAPI SetItfaState(unsigned char status,unsigned char * Error = NULL);
int WINAPI SetDteDce(unsigned char DteDce, unsigned char * Error = NULL);
int WINAPI SetMode(unsigned char Mode, unsigned char * Error = NULL);
int WINAPI SetMonitor(unsigned char clock, unsigned char * Error = NULL);
int WINAPI SetLineSel(unsigned char Line, unsigned char *Error = NULL);
int WINAPI SetClock(unsigned char clock, unsigned char * Error = NULL);
int WINAPI SetFLAGShare(unsigned char flag, unsigned char * Error = NULL);
int WINAPI SetIntSignal(unsigned char signal, unsigned char * Error = NULL);
int WINAPI SetEncodeFormat(unsigned char format, unsigned char * Error = NULL);
int WINAPI SetBitsLen(unsigned char bitslen, unsigned char * Error = NULL);
int WINAPI SetStopBits(unsigned char len, unsigned char * Error = NULL);
int WINAPI SetParity(unsigned char type, unsigned char * Error = NULL);
int WINAPI SetSync(BYTE sync1,BYTE sync2, unsigned char *Error = NULL);
int WINAPI SetMaxLen(UINT length, unsigned char * Error = NULL);
int WINAPI CtlReset(unsigned char Reset);
int WINAPI CtlSimula(unsigned char Code);
int WINAPI CtlMonitor(unsigned char Code);
int WINAPI CtlBert(unsigned char Code);
int WINAPI CtlBertPat(unsigned char Code);
int WINAPI CtlBertEBI(unsigned char Code);
int WINAPI CtlE1Test(unsigned char Code);
int WINAPI CtlGetBaud(UINT *baud);
int WINAPI CtlGetItfaState(unsigned char *stat);
int WINAPI CtlGetAbn(unsigned char *Abn);
int WINAPI CtlQSend(unsigned char SendID,
UINT * SucNum,
UINT * FailNum,
UINT * TimeStamp,
unsigned char * Error = NULL
);
int WINAPI CtlMsiAdd(ULONG Assemble1, ULONG Assemble2, unsigned char * pGroupID);
int WINAPI CtlMsiDel(BYTE GroupID);
int WINAPI CtlMsiQuery(BYTE GroupID, unsigned char * Value, unsigned char ValueLen);
int WINAPI CtlMsiSet(BYTE CtlCode);
int WINAPI AsyReportGet(unsigned char * AsyReport, unsigned char BufLen);
int WINAPI AsyReportUnlock();
//Local Functions
int sendconfig(unsigned char CmdType, unsigned char CmdLen, unsigned char * CmdContent, unsigned char * Error);
void cmdcompose
(
unsigned char * tempTx,
unsigned char chFrameType,
unsigned char chFrameID,
unsigned char chCmdType,
unsigned char chCmdLen,
unsigned char * CmdContent
);
int cmdsend//发送打包好的指令,等待同ID的响应
(
unsigned char * Send, //待发送帧
unsigned char * Response //响应帧
);
int sendctl(unsigned char CmdType, unsigned char CmdLen, unsigned char * CmdContent);
int sendquery
(
unsigned char CmdType, //命令字
unsigned char CmdLen, //命令长度
unsigned char * CmdContent, //命令内容
unsigned char *Value, //返回值
unsigned char ValueLen //返回值缓冲区长度
);
int sendmsi
(
unsigned char CmdType,
unsigned char CmdLen,
unsigned char * CmdContent,
unsigned char *Value,
unsigned char ValueLen
);
class CCardItfaApp : public CWinApp
{
public:
CCardItfaApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCardItfaApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CCardItfaApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CARDITFA_H__7CFA91A7_9D1F_441D_A9D9_64349034C7CB__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -