using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class WriteDefaultErroneousDataReportingInfo : PacketInfoBase
{
	public override string Name => "Write Default Erroneous Data Reporting";

	public override string DisplayGroup => "Host Control and Baseband";

	public WriteDefaultErroneousDataReportingInfo(WriteDefaultErroneousDataReporting packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		WriteDefaultErroneousDataReporting writeDefaultErroneousDataReporting = (WriteDefaultErroneousDataReporting)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Erroneous_Data_Reporting", WriteDefaultErroneousDataReporting.UserFieldsWrapper.ErroneousDataReportingInfo.ErroneousDataReportingToDescription(), 8, FormatValue(writeDefaultErroneousDataReporting.UserFields.ErroneousDataReporting, 8), WriteDefaultErroneousDataReporting.UserFieldsWrapper.ErroneousDataReportingInfo.ErroneousDataReportingToString(WriteDefaultErroneousDataReporting.UserFieldsWrapper.ErroneousDataReportingInfo.ValueToErroneousDataReporting(writeDefaultErroneousDataReporting.UserFields.ErroneousDataReporting)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		WriteDefaultErroneousDataReporting writeDefaultErroneousDataReporting = (WriteDefaultErroneousDataReporting)packet;
		int num = -1;
		if (index == ++num)
		{
			writeDefaultErroneousDataReporting.UserFields.ErroneousDataReporting = Convert.ToUInt32(value, 16);
		}
	}
}
