using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class CommandCompleteForSetMwsSignalingInfo : PacketInfoBase
{
	public override string Name => "Command Complete For Set Mws Signaling";

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

	public CommandCompleteForSetMwsSignalingInfo(CommandCompleteForSetMwsSignaling packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		CommandCompleteForSetMwsSignaling commandCompleteForSetMwsSignaling = (CommandCompleteForSetMwsSignaling)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Num HCI Command Packets", "", 8, FormatValue(commandCompleteForSetMwsSignaling.UserFields.NumHciCommandPackets, 8), "", "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Command OpCode", CommandOpcodeInfo.CommandOpcodeToDescription(), 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.CommandOpcode, 16), CommandOpcodeInfo.CommandOpcodeToString(CommandOpcodeInfo.ValueToCommandOpcode(commandCompleteForSetMwsSignaling.UserFields.CommandOpcode)), "", "", settable: false, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Status", ErrorCodeInfo.ErrorCodeToDescription(), 8, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Status, 8), ErrorCodeInfo.ErrorCodeToString(ErrorCodeInfo.ValueToErrorCode(commandCompleteForSetMwsSignaling.UserFields.Status)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_RX_Priority_Assert_Offset", "BLUETOOTH_RX_PRI signal assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityAssertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_RX_Priority_Assert_Jitter", "BLUETOOTH_RX_PRI signal assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityAssertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_RX_Priority_Deassert_Offset", "BLUETOOTH_RX_PRI signal de-assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityDeassertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_RX_Bluetooth_RX_Priority_Deassert_Jitter", "BLUETOOTH_RX_PRI signal de-assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802RxBluetoothRxPriorityDeassertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Priority_Assert_Offset", "802_RX_PRI signal assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.PriorityAssertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_RX_Priority_Assert_Jitter", "802_RX_PRI signal assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityAssertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_RX_Priority_Deassert_Offset", "802_RX_PRI signal de-assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityDeassertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_RX_Priority_Deassert_Jitter", "802_RX_PRI signal de-assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityDeassertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_TX_On_Assert_Offset", "BLUETOOTH_TX_ON signal assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnAssertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_TX_On_Assert_Jitter", "BLUETOOTH_TX_ON signal assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnAssertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_TX_On_Deassert_Offset", "BLUETOOTH_TX_ON signal de-assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnDeassertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("Bluetooth_TX_On_Deassert_Jitter", "BLUETOOTH_TX_ON signal de-assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnDeassertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_TX_On_Assert_Offset", "802_TX_ON signal assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnAssertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_TX_On_Assert_Jitter", "802_TX_ON signal assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnAssertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_TX_On_Deassert_Offset", "802_TX_ON signal de-assert offset in microseconds (signed integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnDeassertOffset, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
		fieldInfoList.Add(new PacketFieldInfo("IEEE_802_TX_On_Deassert_Jitter", "802_TX_ON signal de-assert jitter in microseconds (unsigned integer).", 16, FormatValue(commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnDeassertJitter, 16), "", "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		CommandCompleteForSetMwsSignaling commandCompleteForSetMwsSignaling = (CommandCompleteForSetMwsSignaling)packet;
		int num = -1;
		if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.NumHciCommandPackets = Convert.ToUInt32(value, 16);
			return;
		}
		if (index == ++num)
		{
			throw new Exception("Tried to set non-settable field CommandOpcode");
		}
		if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Status = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityAssertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityAssertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothRxPriorityDeassertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802RxBluetoothRxPriorityDeassertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.PriorityAssertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityAssertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityDeassertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802RxPriorityDeassertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnAssertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnAssertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnDeassertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.BluetoothTxOnDeassertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnAssertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnAssertJitter = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnDeassertOffset = Convert.ToUInt32(value, 16);
		}
		else if (index == ++num)
		{
			commandCompleteForSetMwsSignaling.UserFields.Ieee802TxOnDeassertJitter = Convert.ToUInt32(value, 16);
		}
	}
}
