public override string ToString() { try { StringBuilder sb = new StringBuilder(); sb.Append("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:"); sb.Append("【流水号】:" + SerialNumber + ","); sb.Append("【发报时间】:" + SendTime.ToString("yyyy-MM-dd HH:mm:ss") + ","); sb.Append("【遥测终端】:" + Iden_F1.ToString()); if (List_RTUParam != null) { foreach (RTUParam ib in List_RTUParam) { sb.Append(ib.ToString()); } } else { sb.Append("数据解析失败!"); } return(sb.ToString().TrimEnd(',')); } catch { return("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:" + " ToString error"); } }
public override string ToString() { try { StringBuilder sb = new StringBuilder(); sb.Append("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:"); sb.Append("【流水号】:" + SerialNumber + ","); sb.Append("【发报时间】:" + SendTime.ToString("yyyy-MM-dd HH:mm:ss") + ","); sb.Append("【遥测终端】:" + Iden_F1.ToString()); for (int i = 0; i < stateDec.Length; i++) { if (States.Count > i) { sb.Append("【" + stateDec[i] + "】:" + States[i] + ","); } else { sb.Append("【" + stateDec[i] + "】:0,"); } } return(sb.ToString().TrimEnd(',')); } catch { return("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:" + " ToString error"); } }
public override string ToString() { try { StringBuilder sb = new StringBuilder(); sb.Append("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:"); sb.Append("【流水号】:" + SerialNumber + ","); sb.Append("【发报时间】:" + SendTime.ToString("yyyy-MM-dd HH:mm:ss") + ","); sb.Append("【遥测终端】:" + Iden_F1.ToString() + ","); if (RC == 0xFF) { sb.Append("【定值控制】:定值控制投入,"); } else if (RC == 0x00) { sb.Append("【定值控制】:定值控制退出,"); } else { sb.Append("【定值控制】:非法字符" + RC + ","); } return(sb.ToString().TrimEnd(',')); } catch { return("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:" + " ToString error"); } }
public override string ToString() { try { StringBuilder sb = new StringBuilder(); sb.Append("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:"); sb.Append("【流水号】:" + SerialNumber + ","); sb.Append("【发报时间】:" + SendTime.ToString("yyyy-MM-dd HH:mm:ss") + ","); sb.Append(Iden_F1.ToString()); sb.Append("【IC卡功能有效 】:" + (isUsed ? "IC卡有效" : "关闭") + ","); return(sb.ToString().TrimEnd(',')); } catch { return("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:" + " ToString error"); } }
public override string ToString() { try { StringBuilder sb = new StringBuilder(); sb.Append("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:"); sb.Append("【流水号】:" + SerialNumber + ","); sb.Append("【发报时间】:" + SendTime.ToString("yyyy-MM-dd HH:mm:ss") + ","); sb.Append("【遥测终端】:" + Iden_F1.ToString() + ","); if (Ps != null && Ps.Length > 0) { for (int i = 0; i < Ps.Length; i++) { sb.Append("【" + (i + 1) + "号泵】:" + (Ps[i] ? "开" : "关") + ","); } } return(sb.ToString().TrimEnd(',')); } catch { return("【" + EnumUtils.GetDescription(typeof(WaterBaseProtocol.AFN), AFN) + "】:" + " ToString error"); } }