1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace Rdh.SocketServer.Client.Models
- {
- public class EleMedKitProtocol : BaseEleMedKitProtocol
- {
- public EleMedKitProtocol()
- {
- MinLines = base.MinLines + 2;
- }
- /// <summary>
- /// 获取或设置药箱编号
- /// </summary>
- public string? EleMedKitCode { get; set; }
- /// <summary>
- /// 获取或设置数据传输的次数标识
- /// </summary>
- public string? CountFlag { get; set; }
-
- public override string GetContent()
- {
- return Command + EleMedKitProtocolFlags.LineEnd
- + AddLineContent(EleMedKitProtocolHelper.BuildLinePadContent(EleMedKitCode));
- }
- public override bool ParseContent(string[] lines)
- {
- if (!base.ParseContent(lines)
- || lines.Length < 3)
- {
- return false;
- }
- EleMedKitCode = lines[1];
- CountFlag = lines[lines.Length - 1];
- return true;
- }
- }
- }
|