MicrophonePrivacyController progress

This commit is contained in:
Neil Dorin
2017-10-31 13:17:00 -06:00
parent 8a9a8ac6a7
commit bc47c65e48
10 changed files with 203 additions and 64 deletions

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core.Crestron_IO
{
public class GenericDigitalInputDevice : IDigitalInput
{
DigitalInput InputPort { get; private set; }
BoolFeedback InputStateFeedback { get; private set; }
Func<bool> InputStateFeedbackFunc
{
get
{
return () => InputPort.State;
}
}
public GenericDigitalInputDevice(DigitalInput inputPort)
{
InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc);
InputPort = inputPort;
InputPort.StateChange += new DigitalInputEventHandler(InputPort_StateChange);
}
void InputPort_StateChange(DigitalInput digitalInput, DigitalInputEventArgs args)
{
InputStateFeedback.FireUpdate();
}
}
}