Esempio n. 1
0
 public CarpetProcessor(
     ISewinQueue sewinQueue,
     IMahloLogic mahloLogic,
     IBowAndSkewLogic bowAndSkewLogic,
     IPatternRepeatLogic patternRepeatLogic)
 {
     this.SewinQueue         = sewinQueue;
     this.MahloLogic         = mahloLogic;
     this.BowAndSkewLogic    = bowAndSkewLogic;
     this.PatternRepeatLogic = patternRepeatLogic;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
        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()),
            };
        }