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
        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();
            }
        }
        public void SetTestOccupiedState(bool state)
        {
            if (!InTestMode)
            {
                Debug.Console(1, "Mock mode not enabled");
            }
            else
            {
                TestRoomIsOccupiedFeedback = state;

                RoomIsOccupiedFeedback.FireUpdate();
            }
        }