Beispiel #1
0
        void lampDimmer_LoadStateChange(LightingBase lightingObject, LoadEventArgs args)
        {
            if (EventIds.ContainsKey(args.EventId))
            {
                CrestronConsole.PrintLine("Lamp dimmer: {0}", EventIds[args.EventId]);
            }

            // use this structure to react to the different events
            switch (args.EventId)
            {
            case LoadEventIds.IsOnEventId:
                xp.BooleanInput[1].BoolValue = !lampDimmer.DimmingLoads[1].IsOn;
                xp.BooleanInput[2].BoolValue = lampDimmer.DimmingLoads[1].IsOn;
                break;

            case LoadEventIds.LevelChangeEventId:
                xp.UShortInput[1].UShortValue = lampDimmer.DimmingLoads[1].LevelFeedback.UShortValue;
                break;

            case LoadEventIds.LevelInputChangedEventId:
                xp.UShortInput[1].CreateRamp(lampDimmer.DimmingLoads[1].Level.RampingInformation);
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        void wallDimmer_LoadStateChange(LightingBase lightingObject, LoadEventArgs args)
        {
            if (EventIds.ContainsKey(args.EventId))
            {
                CrestronConsole.PrintLine("Wall dimmer: {0}", EventIds[args.EventId]);
            }

            // see below
        }