Beispiel #1
0
        /// <summary>
        /// FG设置光源亮度
        /// </summary>
        /// <param name="controlNo"></param>
        /// <param name="channelNo"></param>
        /// <param name="brightness"></param>
        //LightControl lc1 = new LightControl();
        public int SendBrightness(List <int> strList, ChannelBrightness channelBrightness)
        {
            LightControl lc = null;

            dicLightControl.TryGetValue(channelBrightness.ControlNo, out lc);

            if (0 != lc.ChannelLight(strList))
            {
                return(ERR_SendData);
            }

            return(0);
        }
Beispiel #2
0
        public int TurnOFF(ChannelBrightness channelBrightness)
        {
            if (channelBrightness == null)
            {
                return(-1);
            }

            LightControl lc = null;

            dicLightControl.TryGetValue(channelBrightness.ControlNo, out lc);

            if (lc == null)
            {
                return(ERR_NoControlNo);
            }


            if (0 != lc.ChannelOFF(channelBrightness.ChannelNo))
            {
                return(ERR_SendData);
            }

            return(0);
        }