package com.yeejoin.amos.iec104.tcp.client;

import java.util.Properties;
import java.util.concurrent.ScheduledExecutorService;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.yeejoin.amos.iec104.tcp.utils.FileUtils;

import net.sf.json.JSONArray;

public class Init {
    private static Log log = LogFactory.getLog(Init.class);

    public static Properties typeIdProp = null;
    public static Properties causeProp = null;
    public static Properties debugProp = null;
    public static JSONArray points = null;
    public static JSONArray soePoints = null;
    
    public static int consecutiveTransNum = 5;
    public static int zzTransNum = 10;
    public static int soeTransNum = 1;
    public static int secTransNum = 1;
    public static int infomationStartAddress = 1;

    public static void  start(){
        initBusinessData();
    }
   
	public static void initBusinessData(){
        try {
            log.debug("解析配置文件");
            typeIdProp = FileUtils.loadPropFile("typeId.properties");
            causeProp = FileUtils.loadPropFile("cause.properties");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
