コード例 #1
0
        protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args)
        {
            Debug.Console(2, this, "GlsOccupancySensorChange  EventId: {0}", args.EventId);

            if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId ||
                args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId)
            {
                Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue);
                RoomIsOccupiedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId)
            {
                CurrentTimeoutFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId)
            {
                LocalTimoutFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId)
            {
                GraceOccupancyDetectedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId)
            {
                RawOccupancyFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId)
            {
                InternalPhotoSensorValue.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId)
            {
                ExternalPhotoSensorValue.FireUpdate();
            }
        }
コード例 #2
0
        protected virtual void OccSensor_BaseEvent(Crestron.SimplSharpPro.GenericBase device, Crestron.SimplSharpPro.BaseEventArgs args)
        {
            Debug.Console(2, this, "PoEOccupancySensorChange  EventId: {0}", args.EventId);

            if (args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomOccupiedFeedbackEventId ||
                args.EventId == Crestron.SimplSharpPro.GeneralIO.GlsOccupancySensorBase.RoomVacantFeedbackEventId)
            {
                Debug.Console(1, this, "Occupancy State: {0}", OccSensor.OccupancyDetectedFeedback.BoolValue);
                RoomIsOccupiedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId)
            {
                CurrentTimeoutFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId)
            {
                RemoteTimeoutFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId)
            {
                GraceOccupancyDetectedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId)
            {
                RawOccupancyFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId)
            {
                InternalPhotoSensorValue.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId)
            {
                ExternalPhotoSensorValue.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.AndWhenVacatedFeedbackEventId)
            {
                AndWhenVacatedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.OrWhenVacatedFeedbackEventId)
            {
                OrWhenVacatedFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.UsAEnabledFeedbackEventId)
            {
                UltrasonicAEnabledFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.UsBEnabledFeedbackEventId)
            {
                UltrasonicBEnabledFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInOccupiedStateFeedbackEventId)
            {
                UltrasonicSensitivityInOccupiedStateFeedback.FireUpdate();
            }
            else if (args.EventId == GlsOccupancySensorBase.UsSensitivityInVacantStateFeedbackEventId)
            {
                UltrasonicSensitivityInVacantStateFeedback.FireUpdate();
            }
        }
コード例 #3
0
 /// <summary>
 /// Catches events for feedbacks on the base class.  Any extending wrapper class should call this delegate after it checks for it's own event IDs.
 /// </summary>
 /// <param name="device"></param>
 /// <param name="args"></param>
 protected virtual void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args)
 {
     if (args.EventId == GlsOccupancySensorBase.PirEnabledFeedbackEventId)
     {
         PirSensorEnabledFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.LedFlashEnabledFeedbackEventId)
     {
         LedFlashEnabledFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.ShortTimeoutEnabledFeedbackEventId)
     {
         ShortTimeoutEnabledFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInOccupiedStateFeedbackEventId)
     {
         PirSensitivityInOccupiedStateFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.PirSensitivityInVacantStateFeedbackEventId)
     {
         PirSensitivityInVacantStateFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.TimeoutFeedbackEventId)
     {
         CurrentTimeoutFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.TimeoutLocalFeedbackEventId)
     {
         LocalTimoutFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.GraceOccupancyDetectedFeedbackEventId)
     {
         GraceOccupancyDetectedFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.RawOccupancyFeedbackEventId)
     {
         RawOccupancyFeedback.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.InternalPhotoSensorValueFeedbackEventId)
     {
         InternalPhotoSensorValue.FireUpdate();
     }
     else if (args.EventId == GlsOccupancySensorBase.ExternalPhotoSensorValueFeedbackEventId)
     {
         ExternalPhotoSensorValue.FireUpdate();
     }
 }