| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- /********************************************************************
- 版权所有:
- 文件版本: V1.00
- 文件名称: Maintain.h
- 生成日期: 2013年03月05日
- 作 者: xxxxxx
- 使用范围:
- 功 能: 装置维护管理
- 更新信息:
- 更新日志1:
- 修改者:
- 修改日期:
- 修改内容:
- 修改原因:
- *********************************************************************/
- #ifndef MAINTAIN_H
- #define MAINTAIN_H
- /*------------------------------- 宏定义 --------------------------------------
- */
- #define EQU_TYPE 1
- //维护命令通道
- #define CHANNEL_MAINTAIN 1
- #define CHANNEL_IEC101 2
- struct maintain_def // 101规约处理结构体
- {
- u8 nTypeCounter; //接受帧类型
- u16 nRecvLenth; //通道A 接收到数据计数器
- u16 nRecvCnt; //有效数据记
- u16 nRecvCounter;
- u8 sum;
- u8 recvsum;
- u8 bSend;
- u8 recvbuf[512]; // 101规约,接收的报文,最大40个字节
- u8 bData;
- u8 sendbuf[512];
- u32 dValidTime;
- u8 byRetryTimes; //重发次数
- u16 framesum;
- u16 frameno;
- u16 bit_prog;
- u16 bit_echo;
- u8 hmi_mode; // 面板通讯模式
- };
- extern struct maintain_def g_mtbuf;
- struct prog_up
- {
- u16 framesum;
- u16 frameno;
- u16 bit_prog;
- u16 bit_echo;
- };
- struct mtpwd_file_head_data
- {
- // 文件头
- struct cfg_file_head cfh;
- u8 pwd[16]; //维护工具的通过密码,不以明文存储
- };
- /*------------------------------ 变量声明 -------------------------------------
- */
- extern struct maintain_def g_mtbuf;
- extern struct prog_up g_prog_up;
- /*------------------------------ 函数声明 -------------------------------------
- */
- void MainTain_Init(void);
- void Maintain_Applay(void);
- void Maintain_Recv(u8 byRevData);
- int Maintain_Manage(u8 *buf, u32 len, u8 *cmd_buf);
- int filelist_createfile(void);
- int com_trans_file(u8 *buf, u32 len, u8 *cmd_buf);
- void Maintain_Board_Recv(int len,BYTE *para);
- #endif//
- //========================== 本文件结束 =============================
|