public override bool CustomActivate() { //Create ISwitchedOutput objects based on props OpenRelay = GetSwitchedOutputFromDevice(Config.Relays.Open); StopOrPresetRelay = GetSwitchedOutputFromDevice(Config.Relays.StopOrPreset); CloseRelay = GetSwitchedOutputFromDevice(Config.Relays.Close); return(base.CustomActivate()); }
void PulseOutput(ISwitchedOutput output, int pulseTime) { output.On(); CTimer pulseTimer = new CTimer(new CTimerCallbackFunction((o) => output.Off()), pulseTime); }