/// <summary> /// 模块帮手2初始化,调用构造函数 /// </summary> /// <param name="list">模块集合</param> /// <param name="readTimerPeriod"></param> /// <returns></returns> public static AdamHelper2 Initialize(AdamOperation oper) { if (instance != null) { throw new AdamHelperException("AdamHelper2数据接收模块重复初始化报错!"); } instance = new AdamHelper2(oper); return(instance); }
private AdamHelper2(AdamOperation oper) { hasData = false; this.oper = oper; this.v = 0; readTimer = new Timer(_ => { ReadRailWay(); }, null, Timeout.Infinite, Timeout.Infinite); }