コード例 #1
0
        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());
        }
コード例 #2
0
 void PulseOutput(ISwitchedOutput output, int pulseTime)
 {
     output.On();
     CTimer pulseTimer = new CTimer(new CTimerCallbackFunction((o) => output.Off()), pulseTime);
 }