using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class DbfwScoDebugInfoInfo : PacketInfoBase
{
	public override string Name => "Dbfw Sco Debug Info";

	public override string DisplayGroup => "Vendor Specific";

	public DbfwScoDebugInfoInfo(DbfwScoDebugInfo packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		DbfwScoDebugInfo dbfwScoDebugInfo = (DbfwScoDebugInfo)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("DBFW_Event_Code", "DBFW debug event", 8, FormatValue(dbfwScoDebugInfo.UserFields.DbfwEventCode, 8), "", "", "", settable: false, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Sub_Event_Code", "DBFW SCO debug info", 8, FormatValue(dbfwScoDebugInfo.UserFields.SubEventCode, 8), "", "", "", settable: false, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Connection_Handle", "", 16, FormatValue(dbfwScoDebugInfo.UserFields.ConnectionHandle, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Flags", DbfwScoDebugInfo.UserFieldsWrapper.FlagsInfo.FlagsToDescription(), 8, FormatValue(dbfwScoDebugInfo.UserFields.Flags, 8), DbfwScoDebugInfo.UserFieldsWrapper.FlagsInfo.FlagsToString(DbfwScoDebugInfo.UserFieldsWrapper.FlagsInfo.ValueToFlags(dbfwScoDebugInfo.UserFields.Flags)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("SCO_ESCO_Mode", DbfwScoDebugInfo.UserFieldsWrapper.ScoEscoModeInfo.ScoEscoModeToDescription(), 8, FormatValue(dbfwScoDebugInfo.UserFields.ScoEscoMode, 8), DbfwScoDebugInfo.UserFieldsWrapper.ScoEscoModeInfo.ScoEscoModeToString(DbfwScoDebugInfo.UserFieldsWrapper.ScoEscoModeInfo.ValueToScoEscoMode(dbfwScoDebugInfo.UserFields.ScoEscoMode)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Dropped_Packet_Group_1", "Tx consecutive dropped packet range 1~3", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Dropped_Packet_Group_2", "Tx consecutive dropped packet range 4~6", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Dropped_Packet_Group_3", "Tx consecutive dropped packet range 7~9", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Dropped_Packet_Group_4", "Tx consecutive dropped packet range 10~12", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Dropped_Packet_Group_5", "Tx consecutive dropped packet range 13~15", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Missed_Packet_Group_1", "Tx consecutive missed packet range 1~3", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Missed_Packet_Group_2", "Tx consecutive missed packet range 4~6", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Missed_Packet_Group_3", "Tx consecutive missed packet range 7~9", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Missed_Packet_Group_4", "Tx consecutive missed packet range 10~12", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Consecutive_Missed_Packet_Group_5", "Tx consecutive missed packet range 13~15", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Dropped_Packet_Group_1", "Rx consecutive dropped packet range 1~3", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Dropped_Packet_Group_2", "Rx consecutive dropped packet range 4~6", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Dropped_Packet_Group_3", "Rx consecutive dropped packet range 7~9", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Dropped_Packet_Group_4", "Rx consecutive dropped packet range 10~12", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Dropped_Packet_Group_5", "Rx consecutive dropped packet range 13~15", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Missed_Packet_Group_1", "Rx consecutive missed packet range 1~3", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Missed_Packet_Group_2", "Rx consecutive missed packet range 4~6", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Missed_Packet_Group_3", "Rx consecutive missed packet range 7~9", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Missed_Packet_Group_4", "Rx consecutive missed packet range 10~12", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Consecutive_Missed_Packet_Group_5", "Rx consecutive missed packet range 13~15", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Retransmitted_Packet_Group_1", "Tx retransmitted packet count 1", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Retransmitted_Packet_Group_2", "Tx retransmitted packet count 2", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Retransmitted_Packet_Group_3", "Tx retransmitted packet count 3", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Retransmitted_Packet_Group_4", "Tx retransmitted packet count 4", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Tx_Retransmitted_Packet_Group_5", "Rx retransmitted packet count 5", 32, FormatValue(dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Retransmitted_Packet_Group_1", "Rx retransmitted packet count 1", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup1, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Retransmitted_Packet_Group_2", "Rx retransmitted packet count 2", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup2, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Retransmitted_Packet_Group_3", "Rx retransmitted packet count 3", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup3, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Retransmitted_Packet_Group_4", "Rx retransmitted packet count 4", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup4, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Rx_Retransmitted_Packet_Group_5", "Rx retransmitted packet count 5", 32, FormatValue(dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup5, 32), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		DbfwScoDebugInfo dbfwScoDebugInfo = (DbfwScoDebugInfo)packet;
		int num = -1;
		if (index == ++num)
		{
			throw new Exception("Tried to set non-settable field DbfwEventCode");
		}
		if (index == ++num)
		{
			throw new Exception("Tried to set non-settable field SubEventCode");
		}
		if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.ConnectionHandle = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.Flags = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.ScoEscoMode = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveDroppedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxConsecutiveMissedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveDroppedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxConsecutiveMissedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.TxRetransmittedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup1 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup2 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup3 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup4 = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			dbfwScoDebugInfo.UserFields.RxRetransmittedPacketGroup5 = Convert.ToUInt32(value, 16);
		}
	}
}
