private static bool OnReportStatus(ByteArray byteArray, IPortalReportClientService clientService) { PortalState status = new PortalState(); status.ReadFromByteArray(byteArray); int crc = byteArray.readIntNCRC(); if (crc == byteArray.CRC) { clientService.OnReportStatus(ref status); } byteArray.Recycle(); return(true); }
private static string ParseReportStatus(ByteArray byteArray) { StringBuilder sb = new StringBuilder(); sb.Append("ReportStatus("); sb.Append("status : PortalState"); sb.Append(")\r\n{\r\n"); int crc = byteArray.readIntNCRC(); // parse global seq PortalState status = new PortalState(); status.ReadFromByteArray(byteArray); sb.AppendFormat(@"status = ""{0}""", status); sb.Append("}"); return(sb.ToString()); }