using System;
using QCRPG.Framework;

namespace QCRPG.TSL.ZigBee.Packets;

public class VsNvmGetInfo : PacketInfoBase
{
	public override string Name => "Vs Nvm Get";

	public override string DisplayGroup => "Vendor Specific Packets";

	public VsNvmGetInfo(VsNvmGet packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		VsNvmGet vsNvmGet = (VsNvmGet)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("NVMTag", "", 16, FormatValue(vsNvmGet.UserFields.Nvmtag, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

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