49 lines
1.3 KiB
C
49 lines
1.3 KiB
C
#include <winsock.h>
|
|
#include <time.h>
|
|
#include "string.h"
|
|
#include "windows.h"
|
|
#include "Base64.h"
|
|
#include "NetSocket.h"
|
|
#include "CrcUtil.h"
|
|
|
|
#define _HK_CAMERA
|
|
|
|
#ifdef _HK_CAMERA
|
|
#include "HCNetSDK.h"
|
|
|
|
#pragma comment(lib, "./lib/HCNetSDK/x64/HCNetSDK.lib")
|
|
#endif
|
|
|
|
#define MAX_BUF_SIZE 2048
|
|
#define MAX_CMD_SIZE 1024
|
|
|
|
//char szDhImagePath[MAX_CMD_SIZE] = { 0 };
|
|
HANDLE hEvent = 0;
|
|
|
|
struct TEXT_CONTEXT
|
|
{
|
|
unsigned char LID; //显示行号
|
|
unsigned int TextColor;//文本颜色
|
|
char * Text;//显示文本
|
|
};
|
|
|
|
double readWeight(char * pPort, unsigned long BaudRate, unsigned char ByteSize, unsigned char Parity, unsigned char StopBits);
|
|
|
|
void manualTrigger(char * ip, int port);
|
|
void createDateTimeData(char * cmd, int rs485Port);
|
|
|
|
void createDisplayData(char * text, int textLen, int line, char * cmd, int rs485Port);
|
|
|
|
void createVoiceData(char * text, int textLen, char * cmd, int rs485Port);
|
|
|
|
void saveBase64ToFile(char * fileName, string retData);
|
|
|
|
void displayInfoV2(char * ip, int port, char * szCarPlate, char * szWeight, char * szAmount, int rs485Port);
|
|
|
|
void openDoorV1(char * ip, int port, int ioPort);
|
|
|
|
void closeDoorV4(char * ip);
|
|
|
|
void playVoiceV3(char * ip, char *json, int port, int maxVol);
|
|
|
|
bool captureImageV2(char *ip, char *fileName, unsigned short pPort, char *userName, char *password); |