using System; namespace arDev { public partial class Narumi { public class AgvData { /// /// S: Straight /// L: Left /// R: Right /// public char Sts { get; set; } /// /// H : High /// M : Middle /// L : Low /// S : Mark Stop /// public char Speed { get; set; } /// /// F : Front /// B : Back /// public char Direction { get; set; } public int guidesensor { get; set; } public string TagString { get; set; } = string.Empty; public ushort TagNo { get; set; } = 0; public string CallString { get; set; } = string.Empty; public int CallNo { get; set; } = -1; public string CCAString { get; set; } = string.Empty; public int CCANo { get; set; } = -1; public override string ToString() { //모든사태값을 탭으로 구분하여 문자를 생성한다 var sb = new System.Text.StringBuilder(); sb.AppendLine($"[Sts] : {Sts}"); sb.AppendLine($"[Speed] : {Speed}"); sb.AppendLine($"[Direction] : {Direction}"); sb.AppendLine($"[guidesensor] : {guidesensor}"); sb.AppendLine($"[TagNo] : {TagNo}"); sb.AppendLine($"[CallNo] : {CallNo}"); sb.AppendLine($"[CCANo] : {CCANo}"); return sb.ToString(); } public string ToRtfString() { var sb = new System.Text.StringBuilder(); sb.AppendLine(@"{\rtf1\ansi\deff0"); sb.AppendLine(@"{\colortbl ;\red0\green0\blue255;}"); // Color 1 = Blue sb.AppendLine($"[Sts] : {Sts}" + @"\line"); sb.AppendLine($"[Speed] : {Speed}" + @"\line"); sb.AppendLine($"[Direction] : {Direction}" + @"\line"); sb.AppendLine($"[guidesensor] : {guidesensor}" + @"\line"); sb.AppendLine($"[TagNo] : {TagNo}" + @"\line"); sb.AppendLine($"[CallNo] : {CallNo}" + @"\line"); sb.AppendLine($"[CCANo] : {CCANo}" + @"\line"); sb.AppendLine("}"); return sb.ToString(); } } } }