using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class ProdTestListModeRxStatsEventInfo : PacketInfoBase
{
	public override string Name => "Prod Test List Mode Rx Stats Event";

	public override string DisplayGroup => "Vendor Specific";

	public ProdTestListModeRxStatsEventInfo(ProdTestListModeRxStatsEvent packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		ProdTestListModeRxStatsEvent prodTestListModeRxStatsEvent = (ProdTestListModeRxStatsEvent)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Command", "", 8, FormatValue(prodTestListModeRxStatsEvent.UserFields.Command, 8), "", "", "", settable: false, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Total Received Packets", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1TotalReceivedPackets, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Received Packets With Access Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithAccessOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Received Packets With HEC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithHecOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Received Packets With Pkt Type Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithPktTypeOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Received Packets With CRC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithCrcOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 Received Packets With Payload Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithPayloadOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH1 BER", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh1Ber, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Total Received Packets", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5TotalReceivedPackets, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Received Packets With Access Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithAccessOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Received Packets With HEC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithHecOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Received Packets With Pkt Type Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithPktTypeOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Received Packets With CRC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithCrcOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 Received Packets With Payload Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithPayloadOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("DH5 BER", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.Dh5Ber, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Total Received Packets", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5TotalReceivedPackets, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Received Packets With Access Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithAccessOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Received Packets With HEC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithHecOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Received Packets With Pkt Type Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithPktTypeOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Received Packets With CRC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithCrcOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 Received Packets With Payload Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithPayloadOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Two_DH5 BER", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.TwoDh5Ber, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Total Received Packets", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5TotalReceivedPackets, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Received Packets With Access Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithAccessOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Received Packets With HEC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithHecOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Received Packets With Pkt Type Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithPktTypeOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Received Packets With CRC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithCrcOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 Received Packets With Payload Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithPayloadOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("THREE_DH5 BER", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.ThreeDh5Ber, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Total Received Packets", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeTotalReceivedPackets, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Received Packets With Access Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithAccessOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Received Packets With HEC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithHecOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Received Packets With Pkt Type Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithPktTypeOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Received Packets With CRC Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithCrcOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE Received Packets With Payload Ok", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithPayloadOk, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("LE BER", "", 32, FormatValue(prodTestListModeRxStatsEvent.UserFields.LeBer, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		ProdTestListModeRxStatsEvent prodTestListModeRxStatsEvent = (ProdTestListModeRxStatsEvent)packet;
		int num = -1;
		if (index == ++num)
		{
			throw new Exception("Tried to set non-settable field Command");
		}
		if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1TotalReceivedPackets = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithAccessOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithHecOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithPktTypeOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithCrcOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1ReceivedPacketsWithPayloadOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh1Ber = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5TotalReceivedPackets = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithAccessOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithHecOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithPktTypeOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithCrcOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5ReceivedPacketsWithPayloadOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.Dh5Ber = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5TotalReceivedPackets = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithAccessOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithHecOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithPktTypeOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithCrcOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5ReceivedPacketsWithPayloadOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.TwoDh5Ber = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5TotalReceivedPackets = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithAccessOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithHecOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithPktTypeOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithCrcOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5ReceivedPacketsWithPayloadOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.ThreeDh5Ber = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeTotalReceivedPackets = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithAccessOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithHecOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithPktTypeOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithCrcOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeReceivedPacketsWithPayloadOk = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			prodTestListModeRxStatsEvent.UserFields.LeBer = Convert.ToUInt32(value, 16);
		}
	}
}
