public bool ReadLedDotValString(int iAddr, ref string strVals) { ClearOldReadBuf(); byte[] bBuf = GLLedProtocol.MakeCmdLedGetDecimal(iAddr); Write(bBuf, 0, bBuf.Length); Thread.Sleep(1000); byte[] bRead = Read(); if (bRead == null) { LogMgr.WriteErrorDefSys("GetCfg RecBuf is Null"); return(false); } return(GLLedProtocol.AnalyeseRecGetDecmailString(bRead, ref strVals)); }
public bool ReadLedDotValString(int iAddr, ref string strVals) { try { ClearOldReadBuf(); bool bError = false; byte[] bBuf = GLLedProtocol.MakeCmdLedGetDecimal(iAddr); Write(bBuf, 0, bBuf.Length); Thread.Sleep(100); byte[] bRead = Read(out bError); return(GLLedProtocol.AnalyeseRecGetDecmailString(bRead, ref strVals)); } catch (System.Exception ex) { LogMgr.WriteInfoDefSys("读写异常" + ex.Message); return(false); } }