Пример #1
0
        public DigitalInput Connect(LogicalDevice.DigitalInput logicalDevice)
        {
            StateChanged += (sender, e) =>
                {
                    logicalDevice.Trigger(e.NewState);
                };

            return this;
        }
Пример #2
0
        public MotorWithFeedback Connect(LogicalDevice.MotorWithFeedback logicalDevice)
        {
            StatusChanged += (sender, e) =>
            {
                logicalDevice.Trigger(e.NewPos, e.Failed);
            };

            logicalDevice.VectorChanged += (sender, e) =>
                {
                    this.physicalTrigger(e.Vector.Target, e.Vector.Speed, e.Vector.Timeout);
                };

            return this;
        }