/**
 * Copyright
 * All right reserved.
 * 项目名称:
 * 创建日期:2022/3/7
 */
package org.ts.ddcs.constant;

/***
 * Date:2022/3/7
 * Title:业务常量类
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author admin
 * @mender：（文件的修改者，文件创建者之外的人）
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
public class BusinessConstant {
	public static final  int DATAGRAM_BODY_MAX_LEN =4095;

	public final static String  BASE_KEY_RTU ="rtuCode";



    public static final String SW_DATA_STREAM_CACHE_SERIAL_NO="serialNo";
	public static final String SW_DATA_STREAM_CACHE_SEND_TIME="sendPacketTime";
	public static final String SW_DATA_STREAM_CACHE_RTU_CODE="rtuCode";
	public static final String SW_DATA_STREAM_CACHE_SITE_KIND="siteKind";
	public static final String SW_DATA_STREAM_CACHE_COLLECT_TIME="collectTime";
	public static final String SW_DATA_STREAM_CACHE_REV_TIME="receiveTime";
	public static final String SW_DATA_STREAM_CACHE_VALUE="values";

	public final static String BASE_KEY_DATAGRAM ="datagram";
	public final static String REDIS_KEY ="redis_key";
	public final static String REDIS_KEY_COMMAND_QUEUE = "command:queue";
	public final static String REDIS_KEY_COMMAND_QUERY ="command:query";
	public final static String REDIS_KEY_COMMAND_SETTING = "command:setting";
	public final static String REDIS_KEY_COMMAND_FILE = "command:file";
	public final static String REDIS_KEY_SERVER_MASTER ="server_master";
	public final static String REDIS_KEY_COLLECT_SERVER ="collect_server_id";
	public final static String REDIS_KEY_RTU_SPACE_TIME ="spaceTime";
	public final static String REDIS_KEY_RTU_STATUS_DATAGRAM ="statusDatagram";

	public final static String REDIS_KEY_COMMAND_BACK_FLAG = "command_back_flag";
	public final static String REDIS_KEY_COMMAND_DATAGRAM_CODE = "command_datagram_code";
	public final static String REDIS_KEY_COMMAND_TRY_COUNT = "command_try_count";
	public final static String REDIS_KEY_COMMAND_SEND_TIME = "command_send_time";
	public final static String REDIS_KEY_COMMAND_DATAGRAM = "command_datagram";

//    public static final int featureWeight = 13;


//
//    //报文帧控制字符定义
//    public static final byte[] PACKET_BODY_END_FLAG_ETX = {0x03}; //RTU2014年报文正文结束符,后续无报文
//    public static final byte[] PACKET_BODY_END_FLAG_ETB = {0x17}; //RTU2014年报文正文结束符，后续有报文
//
//    public static final byte[] PACKET_CONTROL_FLAG_ENQ = {0x05}; //询问
//    public static final byte[] PACKET_CONTROL_FLAG_EOT = {0x04}; //传输结束退出--作为传输结束确认帧报文结束符，表示可以退出通信
//    public static final byte[] PACKET_CONTROL_FLAG_ACK = {0x06}; //肯定确认，继续发送--作为有后续报文帧的“确认帧” 报文结束符
//    public static final byte[] PACKET_CONTROL_FLAG_NAK = {0x15}; //否定应答，反馈重发--用于要求对方重发某数据包的报文结束符
//    public static final byte[] PACKET_CONTROL_FLAG_ESC = {0x1B}; //传输结束，终端保持在线---在下行确认帧代替EOT作为报文结束符，要求终端在线。保持在线10min内若没有接收到中心站命令，终端退回原先设定的工作状态


    public final static String TEMPLATE_TYPE_PROCESSOR = "processor";
    public final static String TEMPLATE_TYPE_SINK = "sink";
//
    public final static long DATAGRAM_DELAY_TIME = 5000L;



//    public static final String SYMBOL_FLAG = "FF";

	/**
	 * 数据流工作线程数量
	 */
	public static final int STREAM_THREAD_NUM = 4;

	public static final String STORE_CACHE_KEY_RTU_INLINE_COUNT = "store.cache.key.rtu.inline.count";
}
