Exemple #1
0
 /// <summary>
 /// 设置ID,强制设置
 /// </summary>
 /// <param name="iAddr">旧ID,可以为0</param>
 /// <param name="iNewID">新ID</param>
 /// <returns></returns>
 public bool SetID(int iAddr, int iNewID)
 {
     ClearOldReadBuf();
     byte[] bBuf = GLLedProtocol.MakeCmdLedSetID(iNewID);
     Write(bBuf, 0, bBuf.Length);
     Thread.Sleep(1000);
     byte[] bRead = Read();
     if (bRead == null)
     {
         LogMgr.WriteErrorDefSys("Set Id RecBuf is Null");
         return(false);
     }
     return(GLLedProtocol.AnalyeseRecSetID(bRead, iNewID));
 }