initial commit

This commit is contained in:
2026-04-11 12:45:18 +02:00
commit 6e1b929e2f
1246 changed files with 177580 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using HC_APTBS.Infrastructure.Kwp.Packets;
using System;
using System.Collections.Generic;
using System.Text;
namespace HC_APTBS.Infrastructure.Kwp
{
/// <summary>
/// The info returned by the controller to a ReadIdent packet.
/// </summary>
public class ControllerIdent
{
public ControllerIdent(IEnumerable<Packet> packets)
{
var sb = new StringBuilder();
foreach (var packet in packets)
{
if (packet is AsciiDataPacket asciiPacket)
{
sb.Append(asciiPacket);
}
else if (packet is CodingWscPacket codingWscPacket)
{
sb.AppendLine();
sb.Append(codingWscPacket);
}
else
{
System.Diagnostics.Debug.WriteLine($"ReadIdent returned packet of type {packet.GetType()}");
}
}
Text = sb.ToString();
}
public string Text { get; }
public override string ToString()
{
return Text;
}
}
}