public CarpetProcessor( ISewinQueue sewinQueue, IMahloLogic mahloLogic, IBowAndSkewLogic bowAndSkewLogic, IPatternRepeatLogic patternRepeatLogic) { this.SewinQueue = sewinQueue; this.MahloLogic = mahloLogic; this.BowAndSkewLogic = bowAndSkewLogic; this.PatternRepeatLogic = patternRepeatLogic; }
public CarpetProcessor( ISewinQueue sewinQueue, IMahloLogic mahloLogic, IBowAndSkewLogic bowAndSkewLogic, IPatternRepeatLogic patternRepeatLogic, ICutRollLogic cutRollLogic, IOpcServerController opcServerController, IServiceSettings appInfo) { this.SewinQueue = sewinQueue; this.MahloLogic = mahloLogic; this.BowAndSkewLogic = bowAndSkewLogic; this.PatternRepeatLogic = patternRepeatLogic; this.CutRollLogic = cutRollLogic; this.opcServerController = opcServerController; this.appInfo = appInfo; }
public MahloServer( ILogger logger, ISewinQueue sewinQueue, CutRollList cutRolls, InspectionAreaList inspectionAreaList, IMahloLogic mahloLogic, IBowAndSkewLogic bowAndSkewLogic, IPatternRepeatLogic patternRepeatLogic, IScheduler scheduler) { this.log = logger; this.sewinQueue = sewinQueue; this.cutRolls = cutRolls; this.inspectionAreaList = inspectionAreaList; this.mahloLogic = mahloLogic; this.bowAndSkewLogic = bowAndSkewLogic; this.patternRepeatLogic = patternRepeatLogic; this.disposables = new List <IDisposable> { Observable .Interval(TimeSpan.FromMilliseconds(1000), scheduler) .Subscribe(_ => { this.UpdateMeterLogic(nameof(IMahloLogic), this.mahloLogic); this.UpdateMeterLogic(nameof(IBowAndSkewLogic), this.bowAndSkewLogic); this.UpdateMeterLogic(nameof(IPatternRepeatLogic), this.patternRepeatLogic); this.UpdateCutRollList(); this.UpdateInspectionArea(); if (this.sewinQueue.IsChanged) { this.UpdateSewinQueue(); } }), Observable .FromEvent( h => this.sewinQueue.QueueChanged += h, h => this.sewinQueue.QueueChanged -= h) .Subscribe(_ => this.UpdateSewinQueue()), }; }