Beispiel #1
0
        static void InitSystem()
        {
            AllServiceConfig = new ServiceSetting <TimeSerialData>();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(GlobalClass.TypeDataPoints.First().Key, true);          //根据不同的数据建立不同的端口 必须使用独占模式

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run()); //打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
        }
Beispiel #2
0
        static void InitSystem()
        {
            AllServiceConfig = new ServiceSetting();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(null);

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run());//打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
        }
Beispiel #3
0
        static void InitSystem <T>() where T : TimeSerialData
        {
            LogableClass.ToLog("构建计算服务", "开始");
            //CalcService<T> cs = new CalcService<T>();
            LogableClass.ToLog("构建接收服务", "开始");
            //ReceiveService<T> rs = new ReceiveService<T>();
            //SubscriptData sd = new SubscriptData();
            //rs.CalcProcess = cs;
            AllServiceConfig = new ServiceSetting <TimeSerialData>();
            AllServiceConfig.Init(null);
            AllServiceConfig.GrpThePlan(false);
            AllServiceConfig.CreateChannel(GlobalClass.TypeDataPoints.First().Key);

            AllServiceConfig.AllAssetUnits.Values.ToList <AssetUnitClass>().ForEach(p => p.Run());//打开各开关
            //RemoteCommClass<ServiceSetting>.SetRemoteInst(AllServiceConfig);
            //AllServiceConfig.AllLogs = new LogInfo().GetLogAfterDate(DateTime.Today.AddHours(-1));
            DataRecSvr.Program.AllServiceConfig = AllServiceConfig;
            //rs.Start();
        }