📄 netsend.h
字号:
/*#########################################################################
netsend.h - definitions/declarations of data sending.
Copyright (c) 2005-2006, RICHISLAND All rights reserved.
Purpose :
Version :1.00
Author :
Complete Date :
Function List :
History :
_________________________________________________________________________
DATE AUTHOR VERSION DESCRIBE
-------------------------------------------------------------------------
2006-06-15 Ver1.00 Create
#########################################################################*/
#ifndef __F_NETSEND_H__
#define __F_NETSEND_H__
#include "stadx.h"
#include "fiosock.h"
#include "crclrc.h"
#include "gcontrol.h"
#define PACKHEAD_SIZE 28
#define PACKDATA_SIZE 1000
#define VERIFYCODE_SIZE 1
#ifdef __cplusplus
extern "C" {
#endif
/* configuation */
typedef struct tag_NConfig
{
BYTE key[16];
CHAR remoteIP[30];
UINT32 port;
BYTE bah[2];
BYTE MAC[50];
}NConfig;
/* pack head data */
typedef struct tag_NPackHEAD
{
UINT32 remoteIP;
UINT32 localIP;
UINT16 u16BAH;
BYTE key[16];
UINT16 bytesNum;
}NPackHEAD;
/* define verify code */
typedef struct tag_VerifyCode
{
BYTE verifyCode;
}VerifyCode;
typedef union tag_NVal
{
/* long val*/
INT32 n32val;
/* double val*/
DOUBLE dval;
/* union buffer*/
BYTE bBuffer[8];
}NVal;
/* tag info */
typedef struct tag_NTag
{
CHAR Name[F_NAME_SIZE];
UINT16 wValue;
NVal value;
BYTE status;
}NTag;
/* initialization */
Boolean nsend_Init(BYTE* MacID, CHAR *remoteIP, UINT32 port, UINT16 bah, BYTE* key);
/* Non-blocking mode*/
Boolean nsend_Connect();
/* disconnect */
VOID nsend_DisConnect();
/* send by taggroup */
Boolean nsend_SendGrp(FTagGroup* grp);
#ifdef __cplusplus
}
#endif
#endif // __F_NETSEND_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -