/// <summary> /// Overrides the base class event delegate to fire feedbacks for event IDs that pertain to this extended class. /// Then calls the base delegate method to ensure any common event IDs are captured. /// </summary> /// <param name="device"></param> /// <param name="args"></param> protected override void OccSensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args) { 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(); } base.OccSensor_GlsOccupancySensorChange(device, args); }
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(); } }