locmsgdef.h
来自「用VC编写的设备通讯程序,里面有很多规约,自己下载」· C头文件 代码 · 共 71 行
H
71 行
//**************************************************************************
//
//
//**************************************************************************
//
// Filename : Msghdler.h
//
// Subsystem :
//
// Description: Protocol message handlers.
//
//**************************************************************************
#ifndef __MSGHDLER_H__
#define __MSGHDLER_H__
// protocol handle function definition
//
/*
* UPS polling commands
*/
#define POLLST1CMD "^P003ST1"
#define POLLST2CMD "^P003ST2"
#define POLLST3CMD "^P003ST3"
/*
* UPS message length
*/
#define POLLREQLEN 8
#define POLLST1LEN 23
#define POLLST2LEN 14
#define POLLST3LEN 27
/*
* UPS message types
*/
typedef enum {
BATTERYGOOD = 0,
BATTERYWEAK,
BATTERYREPLACE
} BATTERYSTS;
typedef enum {
NORMAL = 0,
ONBATTERY,
ONBYPASS
} POWERSTS;
// RTU I/O module and point table for UPS device
// =============================================
// DI 0 (32)
// PA 1 (32)
#define DINORMSLOT 0
#define PANORMSLOT 1
#define BATTSTSPNT 0
#define POWESTSPNT 2
#define BATTCHGPNT 5
#define BATTOUTPNT 0
#define INPVOLTPNT 1
#define OUTFREQPNT 2
#define OUTVOLTPNT 3
#define OUTCURRPNT 4
#define OUTLOADPNT 5
// meter device type
#define UPSRTUTYPE 530
#endif /* __MSGHDLER_H__ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?