/// <summary> /// 解析报文内容 /// </summary> /// <param name="message"></param> public virtual void Analyze(ref string message) { this.ErrorMessage = string.Empty; message = this.regex_message.Match(message).Value; if (string.IsNullOrEmpty(message)) { this.ErrorMessage = "未找到符合格式的GNSS消息"; } //假如校验和与CRC32均未校验通过 //else if (!BaseFunc.IsChecksumVerified(message) && !BaseFunc.IsCrc32Verified(message)) else if (!HexHelper.IsGnssChecksumVerified(message) && !HexHelper.IsGnssCRC32Verified(message)) { this.ErrorMessage = "GNSS消息未通过校验"; } if (string.IsNullOrWhiteSpace(this.ErrorMessage)) { this.OriginalMessage = message; } }