public void SplitPowerReadResponse(string received, ref LMDAQ.PowerStatus p) { try { string[] aaa = received.Split('='); string[] txt = aaa[1].Split(','); int r; bool b = Int32.TryParse(txt[0], out r); if (b) { p.ACPresent = r; } b = Int32.TryParse(txt[1], out r); if (b) { p.batteryPresent = r; } b = Int32.TryParse(txt[2], out r); if (b) { p.batterylevelPct = r; } } catch (Exception e) { commlog.TraceEvent(LogLevels.Error, 892, "SplitPowerReadResponse barfed on:" + received + "; " + e.Message); } }
public void SplitPowerReadResponse(string received, ref LMDAQ.PowerStatus p) { cmdprocessor.SplitPowerReadResponse(received, ref p); }