Esempio n. 1
0
 public bool EnableCss(EnumCssChannel Channel, bool IsEnable)
 {
     lock (ComportLock)
     {
         try
         {
             CommandEnCss.CssChannel = Channel;
             CommandEnCss.IsEnable   = IsEnable;
             byte[] cmd = CommandEnCss.ToBytes();
             this.ExcuteCmd(cmd);
             return(true);
         }
         catch (Exception ex)
         {
             return(false);
         }
     }
 }
Esempio n. 2
0
 public bool SetCssThreshold(EnumCssChannel Channel, UInt16 LowThreshold, UInt16 HightThreshold)
 {
     lock (ComportLock)
     {
         try
         {
             CommandSetCssThreshold.CssChannel     = Channel;
             CommandSetCssThreshold.LowThreshold   = LowThreshold;
             CommandSetCssThreshold.HightThreshold = HightThreshold;
             byte[] cmd = CommandSetCssThreshold.ToBytes();
             this.ExcuteCmd(cmd);
             return(true);
         }
         catch (Exception ex)
         {
             return(false);
         }
     }
 }