123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- #pragma once
- #ifndef __SAILING_CONST_H
- #define __SAILING_CONST_H
- #define DEBUG_SMS 0
- #define DEBUG_NOTICE 0
- #define DEBUG_HC_CARD 0
- #define DEBUG_UPS 0
- #define DEBUG_TEPW 0
- #define DEBUG_MAKEWATER 0
- #define DEBUG_AIRCONDITION_CM 0
- #define DEBUG_CFI 0
- #define DEBUG_KND 1
- #define DEBUG_UPS_APC_MGE 1
- #define DEBUG_AIRCONDITION_MCQUAY 0
- #define DEBUG_HG 0
- #define IS_USE_DOG 0
- #define FLOPW(ray,val) (ray)[0] = ((val)/256); (ray)[1] = ((val) & 0xFF)
- #define HG_BUFFER_LEN 80
- #define MAX_ADDR_NUM 128
- #define THREADSTOPWAITTIME 1000
- // Modbus Ascii 设备Dll错误代码定义
- enum __ERRO_CODE_MODBUS_ASC
- {
- ERR_CODE_MODBUS_ASC_COM_FAULT = 20001 , // Modbus asc设备串口通信故障
- ERR_CODE_MODBUS_ASC_COM_BUSY , // Modbus asc设备串口通信忙
- ERR_CODE_MODBUS_ASC_COM_READ_NO_DATA , // Modbus asc设备没有读到数据
- ERR_CODE_MODBUS_ASC_COM_READ_LEN_OVER , // Modbus asc设备读到数据长度超时限制
- ERR_CODE_MODBUS_ASC_COM_LRC_LOST , // Modbus asc设备lrc校验失败
- };
- //信息类型
- enum AlarmType
- {
- MSG_DATA_LOG = 0, //0:数据日志
- MSG_OK, //1:正确
- MSG_ERROR, //2:错误
- MSG_WARNING //3:警告
- };
- //功能模块类型
- enum ModuleType
- {
- MSG_MAIN_THREAD_MD = 0, //主线程
- MSG_DB_MD, //数据库操作模块
- MSG_EMAIL_MD, //email模块
- MSG_SMS_MD, //sms模块
- MSG_PING_MD, //ping模块
- MSG_TRAP_MD, //Trap模块
- MSG_SNMP_MD, //SNMP操作模块
- MSG_DOG_MD, //狗操作模块
- MSG_NOTICE_MD, //语音通知模块
- MSG_VIDEO_MD //视频模块
- };
- #define MAX_ERROR_LEN 500
- #define random(x) (rand()%x)
- #define MAX_COMM_NUM 128
- #define PATH_MAX 255
- #define MAX_THREAD_TIME 1000
- //缓冲区长度限制
- #define MAX_BOARDTYPE_LENGTH 50
- #define MAX_PROTOCOL_LENGTH 50
- #define MAX_BOARD_COUNT 10
- #define MAX_BOARD_CHANNEL_COUNT 120
- #define MAX_IVR_COUNT MAX_BOARD_COUNT * MAX_BOARD_CHANNEL_COUNT
- #define MAX_VOICE_COUNT 100
- #define MAX_TEL_LENGTH 20
- #define MAX_EMAIL_LENGTH 30
- #define MAX_DTMF_LENGTH 30
- #define MAX_FSK_LENGTH MAX_PATH
- #define MAX_PATH_LENGTH MAX_PATH
- #define MAX_FILE_LENGTH MAX_PATH
- #define MAX_LIST_LENGTH 10240
- #define MAX_DIGIT_LENGTH 30
- #define MAX_MSGNO_LENGTH 4
- #define MAX_MSG_LENGTH 1024 * 4
- #define MAX_STATUS_LENGTH 50
- #define MAX_RESULT_LENGTH 50
- #define MAX_FUNC_LENGTH 4
- #define MAX_CHANNELID_LENGTH 10
- #define MAX_VARNAME_LENGTH 100
- #define MAX_VARVALUE_LENGTH 1024
- #define MAX_VAR_COUNT 100
- #define MAX_VARSYS_COUNT 30
- #define MAX_LABLE_COUNT 100
- #define MAX_CASE_COUNT 100
- #define MAX_LINE_COUNT 1024
- #define MAX_LINE_LENGTH 1024
- #define MAX_REPLAY_TIME 3
- #define MAX_FIRST_TIME 3
- #define MAX_INTER_TIME 3
- #define MAX_TIME_LENGTH 20
- #define MAX_DESCRIPTION_LENGTH 50
- #define MAX_BOX_LENGTH 10
- #define MAX_VALUE_LENGTH 100
- #define MAX_DBVALUE_LENGTH 1024
- #define MAX_EMPLOYEENO_LENGTH 10
- #define MAX_NAME_LENGTH 100
- #define MAX_FAXNO_LENGTH 20
- #define MAX_REMARKS_LENGTH 100
- #define MAX_SQL_LENGTH 1024*1//1024 * 10
- #define MAX_PLAY_LENGTH 100
- #define MAX_LANG_LENGTH 100
- #define MAX_VOL_LENGTH 20
- #define MAX_IA_LENGTH 20
- //DB字段长度限制
- #define MAX_EQUIP_TYPE 40
- #define MAX_EQUIP_IP 50
- #define MAX_EQUIP_DESC 255
- #define MAX_EQUIP_ADDR 5
- #define MAX_COMM_PORT 5
- #define MAX_OBJ_OID 100
- #define MAX_SENSOR_TYPE 40
- #define MAX_SENSOR_DESC 255
- #define MAX_SENSOR_CURR 10
- #define MAX_SENSOR_STATUS 5
- #define MAX_SENSOR_PORT 5
- #define MAX_LEF_POS 10
- #define MAX_BG_DESC 255
- #define MAX_RATE 10
- #define MAX_SENSOR_UNIT 10
- #define MAX_SENSOR_UNIT_TYPE 5
- #define MAX_OFFSET 10
- #define MAX_REARM 10
- #define MAX_ID 10
- #define MAX_DOUBLE_DATA 50
- #define MAX_PURVIEW_NAME 255
- #define MAX_SET_POINT 10
- //Email
- #define MAX_MAILSERVER_LENGTH 50
- #define MAX_MAILFROM_LENGTH 100
- #define MAX_MAILTO_LENGTH 100
- #define MAX_MAILSUBJECT_LENGTH 100
- #define MAX_MAILBODY_LENGTH 500
- #define MAX_MALIACCOUNT_LENGTH 100
- #define MAX_MAILPASSWORD_LENGTH 50
- #define MAX_EMAIL_QUEUE_NUM 100
- //Sms
- #define MAX_SMS_QUEUE_NUM 100
- //语音通知
- #define MAX_NOTICE_QUEUE_NUM 100
- //ConfirmSensor
- #define MAX_CONFIRM_SENSOR_NUM 100
- //Database
- #define MAX_SERVER_LENGTH 50
- #define MAX_DATABASE_LENGTH 50
- #define MAX_USER_LENGTH 50
- #define MAX_PASSWORD_LENGTH 64
- // 常量
- // 联合类型变量ID范围
- const UNION_TYPE_MIN_ID = 100;
- const UNION_TYPE_MAX_ID = 120;
- #endif
|