Esempio n. 1
0
        /// <summary>
        /// 读取某个通道亮度
        /// </summary>
        /// <param name="Channel"></param>
        /// <returns></returns>
        public int ReadIntensity(LightChn lightType)
        {
            int Value = 0;

            opt.ReadIntensity(SwitchChannel(lightType), ref Value);
            return(Value);
        }
Esempio n. 2
0
        public ItensityClass FindChn(LightChn chanel)
        {
            //Itensity itensity = new Itensity() { Chanel = Chanels.None, On = false, Value = 0 };
            int chn = LightingOPT.SwitchChannel(chanel);

            return(FindChn(chn));
        }
Esempio n. 3
0
        private ExecutePrmOPT AddChanel(LightChn chn, int value)
        {
            ItensityClass itensity;

            itensity = FindChn(chn);
            //存在就修改
            if (itensity != null)
            {
                itensity.On    = true;
                itensity.Value = value;
            }
            //不存在
            else
            {
                int chnInt = LightingOPT.SwitchChannel(chn);
                itensity = new ItensityClass()
                {
                    Chanel = (Chanels)chnInt,
                    On     = true,
                    Value  = value
                };
                this.ListCls.Add(itensity);
            }
            return(this);
        }
Esempio n. 4
0
        /// <summary>
        /// 获取各个通道连接状态
        /// </summary>
        /// <param name="lightType">通道类型</param>
        /// <returns>-1:函数执行失败,0:已连接光源,1:没有连接光源,2:短路保护3:过压保护4:过流保护</returns>
        public int GetChannelState(LightChn lightType)
        {
            int i = 0;

            unsafe
            {
                int *p   = &i;
                int  ret = opt.GetChannelState(SwitchChannel(lightType), p);
                if (ret == 0)
                {
                    return(i);
                }
                return(-1);
            }
        }
Esempio n. 5
0
        //选择rgb通道
        private LightChn RGBSwitch(ComboBox combobox)
        {
            LightChn rgb = 0;

            switch (combobox.SelectedItem.ToString())
            {
            case "R":
                rgb = LightChn.Red;
                break;

            case "G":
                rgb = LightChn.Green;
                break;

            case "B":
                rgb = LightChn.Blue;
                break;

            default:
                break;
            }
            return(rgb);
        }
Esempio n. 6
0
        /// <summary>
        /// 切换通道
        /// </summary>
        /// <param name="lightType"></param>
        /// <returns></returns>
        private int SwitchChannel(LightChn lightType)
        {
            int channel = 0;

            switch (lightType)
            {
            case LightChn.Red:
                channel = 1;
                break;

            case LightChn.Green:
                channel = 2;
                break;

            case LightChn.Blue:
                channel = 3;
                break;

            default:
                break;
            }
            return(channel);
        }
Esempio n. 7
0
 public int SetHBTriggerWidth(LightChn lightType, int Value)
 {
     throw new NotImplementedException();
 }
Esempio n. 8
0
 public int ReadTriggerWidth(LightChn lightType, ref int Value)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 public int ReadIntensity(LightChn lightType)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public int GetChannelState(LightChn lightType)
 {
     throw new NotImplementedException();
 }
Esempio n. 11
0
 /// <summary>
 /// 打开单通道
 /// </summary>
 /// <param name="lightType"></param>
 /// <returns></returns>
 public int TurnOnChannel(LightChn lightType)
 {
     throw new NotImplementedException();
 }
Esempio n. 12
0
 public int SoftwareTrigger(LightChn lightType, int time)
 {
     throw new NotImplementedException();
 }
Esempio n. 13
0
 public int SetMaxCurrent(LightChn lightType, int Value)
 {
     throw new NotImplementedException();
 }
Esempio n. 14
0
 /// <summary>
 /// 设置单个通道亮度
 /// </summary>
 /// <param name="lightType"></param>
 /// <param name="Value"></param>
 /// <returns></returns>
 public int SetIntensity(LightChn lightType, int Value)
 {
     throw new NotImplementedException();
 }
Esempio n. 15
0
 /// <summary>
 /// 软触发
 /// </summary>
 /// <param name="channelIdx"></param>
 /// <param name="time"></param>
 /// <returns></returns>
 public int SoftwareTrigger(LightChn lightType, int time)
 {
     return(opt.SoftwareTrigger(SwitchChannel(lightType), time));
 }
Esempio n. 16
0
 /// <summary>
 /// 设置单个通道最大电流
 /// </summary>
 /// <param name="Channel"></param>
 /// <param name="Value"></param>
 /// <returns></returns>
 public int SetMaxCurrent(LightChn lightType, int Value)
 {
     return(opt.SetMaxCurrent(SwitchChannel(lightType), Value));
 }
Esempio n. 17
0
 /// <summary>
 /// 读取单个通道高亮触发脉宽
 /// </summary>
 /// <param name="Channel"></param>
 /// <param name="Value"></param>
 /// <returns></returns>
 public int ReadHBTriggerWidth(LightChn lightType, ref int Value)
 {
     return(opt.ReadHBTriggerWidth(SwitchChannel(lightType), ref Value));
 }
Esempio n. 18
0
 /// <summary>
 /// 设置高亮触发脉宽
 /// </summary>
 /// <param name="Channel"></param>
 /// <param name="Value"></param>
 /// <returns></returns>
 public int SetHBTriggerWidth(LightChn lightType, int Value)
 {
     return(opt.SetHBTriggerWidth(SwitchChannel(lightType), Value));
 }
Esempio n. 19
0
 /// <summary>
 /// 关闭单个通道
 /// </summary>
 /// <param name="lightType"></param>
 /// <returns></returns>
 public int TurnOffChannel(LightChn lightType)
 {
     return(opt.TurnOffChannel(SwitchChannel(lightType)));
 }
Esempio n. 20
0
 /// <summary>
 /// 设置单个通道亮度
 /// </summary>
 /// <param name="Channel"></param>
 /// <param name="Value"></param>
 /// <returns></returns>
 public int SetIntensity(LightChn lightType, int Value)
 {
     return(opt.SetIntensity(SwitchChannel(lightType), Value));
 }