📄 variable.c
字号:
#include "struct.h"
unsigned int frameindex=0; //IP包的序列号
unsigned int comrxdread=0; //串口接收读指针
unsigned int comtxdread=0; //串口发送读指针
unsigned int comrxdwrite=0; //串口接收写指针
unsigned int comtxdwrite=0; //串口发送写指针
unsigned int comcommandend=0;
unsigned char xdata comrxdbuf[com_rxd_buffer_size]; //串口的接收缓冲区
unsigned char xdata comtxdbuf[com_txd_buffer_size]; //串口的发送缓冲区
xdata union netcard retransmit_buffer[rt_size+1];
//xdata union netcard retransmit_tcpbuffer[rt_size];
xdata struct class_retransmit_packet retransmitpacket[rt_size+1];
xdata struct class_command_buffer rt_command_buffer[rt_cmd_length];
xdata unsigned char c_readcommand=0;
xdata unsigned char c_writecommand=0;
//xdata unsigned long l_bakpingipaddress;
xdata unsigned int c_rxcount=0; //测试收包数
xdata unsigned int c_txcount=0;
xdata unsigned char command_buffer[command_buffer_size];
unsigned int command_length;
unsigned char msec=0;//10毫秒钟
unsigned char sec=0;//秒钟
union ethernet_address_type my_ethernet_address; //本机的以太网地址
union ethernet_address_type ping_ethernet_address;//用来ping的以太网地址
union ethernet_address_type dvr_ethernet_address;//用来dvr的以太网地址
union ip_address_type my_ip_address; //本机的ip地址
union ip_address_type ping_ip_address;//用于ping命令
union ip_address_type dvr_ip_address;//用于dvr命令
xdata union ethernet_address_type gateway_ethernet_address; //网关的以太网地址
xdata union ip_address_type gateway_ip_address;//网关的ip地址
//xdata union ip_address_type temp_ip_address; //临时变量
xdata union ip_address_type mask_ip_address;//子网掩码
xdata union netcard rxdnet;
xdata union netcard txdnet;
xdata struct socket_type tcp1024;
xdata struct class_dvr_buffer dvr_buffer[dvr_length];
xdata struct class_protocol_header protocol_header;
xdata unsigned char retranslate=0;
xdata unsigned char ASCII[3];
//unsigned char linkcount=0;
xdata unsigned char ping_ip_address_ttl=0;
xdata unsigned char gateway_ip_address_ttl=0;
//unsigned char netrxdwrite=0;
xdata unsigned char c_camnumber;
xdata unsigned int socketnumber=2000;//对方使用端口号
xdata unsigned int local_use_port;//本地使用端口号
xdata unsigned int udp_dstport; //2004年7月15日为定制修改
xdata unsigned char tcp_count=0;//用于telnet连接的次数
xdata union w crctemp;
xdata unsigned char c_type=0;//0:,1:host,2:keyboard
xdata unsigned char tcpdata_buf[tcpdata_length];
xdata unsigned char c_net_delay=0;
xdata unsigned char c_DvrReadBuffer;
xdata unsigned char c_DvrWriteBuffer;
xdata unsigned char c_RstTcpCount;
xdata unsigned char c_DvrRunTime;
bit comtxdbufempty=0; //串口的发送缓冲区空的标志
bit bDataFlag=0;
bit bCommandFlag=0;
bit double_second=0;
bit overtime=0;
bit tcpconnect=0; //是否已经建立tcp连接的标志
bit b_debug=0; //调试用
bit b_cb_full=0; //命令缓冲区满标志
bit b_reset=0; //复位标志
bit b_dvrcommand;
bit b_RunDvrCommand;
bit b_100ms;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -