using System;
using System.Text;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class LeSetEventMask : PacketBase
{
	public class UserFieldsWrapper
	{
		public class LeEventMaskEnumCollection
		{
			private EnableBitEnum _LeConnectionCompleteEvent;

			private EnableBitEnum _LeAdvertisingReportEvent;

			private EnableBitEnum _LeConnectionUpdateCompleteEvent;

			private EnableBitEnum _LeReadRemoteUsedFeaturesCompleteEvent;

			private EnableBitEnum _LeLongTermKeyRequestEvent;

			private EnableBitEnum _LeRemoteConnectionParameterRequestEvent;

			private EnableBitEnum _LeDataLengthChangeEvent;

			private EnableBitEnum _LeReadLocalP256PublicKeyCompleteEvent;

			private EnableBitEnum _LeGenerateDhkeyCompleteEvent;

			private EnableBitEnum _LeEnhancedConnectionCompleteEvent;

			private EnableBitEnum _LeDirectedAdvertisingReportEvent;

			private EnableBitEnum _LePhyUpdateCompleteEvent;

			private EnableBitEnum _LeExtendedAdvertisingReportEvent;

			private EnableBitEnum _LePeriodicAdvertisingSyncEstablishedEvent;

			private EnableBitEnum _LePeriodicAdvertisingReportEvent;

			private EnableBitEnum _LePeriodicAdvertisingSyncLostEvent;

			private EnableBitEnum _LeExtendedScanTimeoutEvent;

			private EnableBitEnum _LeExtendedAdvertisingSetTerminatedEvent;

			private EnableBitEnum _LeScanRequestReceivedEvent;

			private EnableBitEnum _LeChannelSelectionAlgorithmEvent;

			private EnableBitEnum _LeConnectionlessIqReportEvent;

			private EnableBitEnum _LeConnectionIqReportEvent;

			private EnableBitEnum _LeCteRequestFailedEvent;

			private EnableBitEnum _LePeriodicAdvertisingSyncTransferReceivedEvent;

			private EnableBitEnum _LeCisEstablishedEvent;

			private EnableBitEnum _LeCisRequestEvent;

			private EnableBitEnum _LeCreateBigCompleteEvent;

			private EnableBitEnum _LeTerminateBigCompleteEvent;

			private EnableBitEnum _LeBigSyncEstablishedEvent;

			private EnableBitEnum _LeBigSyncLostEvent;

			private EnableBitEnum _LeRequestPeerScaCompleteEvent;

			private EnableBitEnum _HciLePathLossThresholdEvent;

			private EnableBitEnum _HciLeTransmitPowerReportingEvent;

			public EnableBitEnum LeConnectionCompleteEvent
			{
				get
				{
					return _LeConnectionCompleteEvent;
				}
				set
				{
					_LeConnectionCompleteEvent = value;
				}
			}

			public EnableBitEnum LeAdvertisingReportEvent
			{
				get
				{
					return _LeAdvertisingReportEvent;
				}
				set
				{
					_LeAdvertisingReportEvent = value;
				}
			}

			public EnableBitEnum LeConnectionUpdateCompleteEvent
			{
				get
				{
					return _LeConnectionUpdateCompleteEvent;
				}
				set
				{
					_LeConnectionUpdateCompleteEvent = value;
				}
			}

			public EnableBitEnum LeReadRemoteUsedFeaturesCompleteEvent
			{
				get
				{
					return _LeReadRemoteUsedFeaturesCompleteEvent;
				}
				set
				{
					_LeReadRemoteUsedFeaturesCompleteEvent = value;
				}
			}

			public EnableBitEnum LeLongTermKeyRequestEvent
			{
				get
				{
					return _LeLongTermKeyRequestEvent;
				}
				set
				{
					_LeLongTermKeyRequestEvent = value;
				}
			}

			public EnableBitEnum LeRemoteConnectionParameterRequestEvent
			{
				get
				{
					return _LeRemoteConnectionParameterRequestEvent;
				}
				set
				{
					_LeRemoteConnectionParameterRequestEvent = value;
				}
			}

			public EnableBitEnum LeDataLengthChangeEvent
			{
				get
				{
					return _LeDataLengthChangeEvent;
				}
				set
				{
					_LeDataLengthChangeEvent = value;
				}
			}

			public EnableBitEnum LeReadLocalP256PublicKeyCompleteEvent
			{
				get
				{
					return _LeReadLocalP256PublicKeyCompleteEvent;
				}
				set
				{
					_LeReadLocalP256PublicKeyCompleteEvent = value;
				}
			}

			public EnableBitEnum LeGenerateDhkeyCompleteEvent
			{
				get
				{
					return _LeGenerateDhkeyCompleteEvent;
				}
				set
				{
					_LeGenerateDhkeyCompleteEvent = value;
				}
			}

			public EnableBitEnum LeEnhancedConnectionCompleteEvent
			{
				get
				{
					return _LeEnhancedConnectionCompleteEvent;
				}
				set
				{
					_LeEnhancedConnectionCompleteEvent = value;
				}
			}

			public EnableBitEnum LeDirectedAdvertisingReportEvent
			{
				get
				{
					return _LeDirectedAdvertisingReportEvent;
				}
				set
				{
					_LeDirectedAdvertisingReportEvent = value;
				}
			}

			public EnableBitEnum LePhyUpdateCompleteEvent
			{
				get
				{
					return _LePhyUpdateCompleteEvent;
				}
				set
				{
					_LePhyUpdateCompleteEvent = value;
				}
			}

			public EnableBitEnum LeExtendedAdvertisingReportEvent
			{
				get
				{
					return _LeExtendedAdvertisingReportEvent;
				}
				set
				{
					_LeExtendedAdvertisingReportEvent = value;
				}
			}

			public EnableBitEnum LePeriodicAdvertisingSyncEstablishedEvent
			{
				get
				{
					return _LePeriodicAdvertisingSyncEstablishedEvent;
				}
				set
				{
					_LePeriodicAdvertisingSyncEstablishedEvent = value;
				}
			}

			public EnableBitEnum LePeriodicAdvertisingReportEvent
			{
				get
				{
					return _LePeriodicAdvertisingReportEvent;
				}
				set
				{
					_LePeriodicAdvertisingReportEvent = value;
				}
			}

			public EnableBitEnum LePeriodicAdvertisingSyncLostEvent
			{
				get
				{
					return _LePeriodicAdvertisingSyncLostEvent;
				}
				set
				{
					_LePeriodicAdvertisingSyncLostEvent = value;
				}
			}

			public EnableBitEnum LeExtendedScanTimeoutEvent
			{
				get
				{
					return _LeExtendedScanTimeoutEvent;
				}
				set
				{
					_LeExtendedScanTimeoutEvent = value;
				}
			}

			public EnableBitEnum LeExtendedAdvertisingSetTerminatedEvent
			{
				get
				{
					return _LeExtendedAdvertisingSetTerminatedEvent;
				}
				set
				{
					_LeExtendedAdvertisingSetTerminatedEvent = value;
				}
			}

			public EnableBitEnum LeScanRequestReceivedEvent
			{
				get
				{
					return _LeScanRequestReceivedEvent;
				}
				set
				{
					_LeScanRequestReceivedEvent = value;
				}
			}

			public EnableBitEnum LeChannelSelectionAlgorithmEvent
			{
				get
				{
					return _LeChannelSelectionAlgorithmEvent;
				}
				set
				{
					_LeChannelSelectionAlgorithmEvent = value;
				}
			}

			public EnableBitEnum LeConnectionlessIqReportEvent
			{
				get
				{
					return _LeConnectionlessIqReportEvent;
				}
				set
				{
					_LeConnectionlessIqReportEvent = value;
				}
			}

			public EnableBitEnum LeConnectionIqReportEvent
			{
				get
				{
					return _LeConnectionIqReportEvent;
				}
				set
				{
					_LeConnectionIqReportEvent = value;
				}
			}

			public EnableBitEnum LeCteRequestFailedEvent
			{
				get
				{
					return _LeCteRequestFailedEvent;
				}
				set
				{
					_LeCteRequestFailedEvent = value;
				}
			}

			public EnableBitEnum LePeriodicAdvertisingSyncTransferReceivedEvent
			{
				get
				{
					return _LePeriodicAdvertisingSyncTransferReceivedEvent;
				}
				set
				{
					_LePeriodicAdvertisingSyncTransferReceivedEvent = value;
				}
			}

			public EnableBitEnum LeCisEstablishedEvent
			{
				get
				{
					return _LeCisEstablishedEvent;
				}
				set
				{
					_LeCisEstablishedEvent = value;
				}
			}

			public EnableBitEnum LeCisRequestEvent
			{
				get
				{
					return _LeCisRequestEvent;
				}
				set
				{
					_LeCisRequestEvent = value;
				}
			}

			public EnableBitEnum LeCreateBigCompleteEvent
			{
				get
				{
					return _LeCreateBigCompleteEvent;
				}
				set
				{
					_LeCreateBigCompleteEvent = value;
				}
			}

			public EnableBitEnum LeTerminateBigCompleteEvent
			{
				get
				{
					return _LeTerminateBigCompleteEvent;
				}
				set
				{
					_LeTerminateBigCompleteEvent = value;
				}
			}

			public EnableBitEnum LeBigSyncEstablishedEvent
			{
				get
				{
					return _LeBigSyncEstablishedEvent;
				}
				set
				{
					_LeBigSyncEstablishedEvent = value;
				}
			}

			public EnableBitEnum LeBigSyncLostEvent
			{
				get
				{
					return _LeBigSyncLostEvent;
				}
				set
				{
					_LeBigSyncLostEvent = value;
				}
			}

			public EnableBitEnum LeRequestPeerScaCompleteEvent
			{
				get
				{
					return _LeRequestPeerScaCompleteEvent;
				}
				set
				{
					_LeRequestPeerScaCompleteEvent = value;
				}
			}

			public EnableBitEnum HciLePathLossThresholdEvent
			{
				get
				{
					return _HciLePathLossThresholdEvent;
				}
				set
				{
					_HciLePathLossThresholdEvent = value;
				}
			}

			public EnableBitEnum HciLeTransmitPowerReportingEvent
			{
				get
				{
					return _HciLeTransmitPowerReportingEvent;
				}
				set
				{
					_HciLeTransmitPowerReportingEvent = value;
				}
			}
		}

		public static class LeEventMaskInfo
		{
			public static LeEventMaskEnumCollection ValueToLeEventMask(ulong value)
			{
				LeEventMaskEnumCollection leEventMaskEnumCollection = new LeEventMaskEnumCollection();
				leEventMaskEnumCollection.LeConnectionCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)(value & 1));
				leEventMaskEnumCollection.LeAdvertisingReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 2) >> 1));
				leEventMaskEnumCollection.LeConnectionUpdateCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 4) >> 2));
				leEventMaskEnumCollection.LeReadRemoteUsedFeaturesCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 8) >> 3));
				leEventMaskEnumCollection.LeLongTermKeyRequestEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x10) >> 4));
				leEventMaskEnumCollection.LeRemoteConnectionParameterRequestEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x20) >> 5));
				leEventMaskEnumCollection.LeDataLengthChangeEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x40) >> 6));
				leEventMaskEnumCollection.LeReadLocalP256PublicKeyCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x80) >> 7));
				leEventMaskEnumCollection.LeGenerateDhkeyCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x100) >> 8));
				leEventMaskEnumCollection.LeEnhancedConnectionCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x200) >> 9));
				leEventMaskEnumCollection.LeDirectedAdvertisingReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x400) >> 10));
				leEventMaskEnumCollection.LePhyUpdateCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x800) >> 11));
				leEventMaskEnumCollection.LeExtendedAdvertisingReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x1000) >> 12));
				leEventMaskEnumCollection.LePeriodicAdvertisingSyncEstablishedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x2000) >> 13));
				leEventMaskEnumCollection.LePeriodicAdvertisingReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x4000) >> 14));
				leEventMaskEnumCollection.LePeriodicAdvertisingSyncLostEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x8000) >> 15));
				leEventMaskEnumCollection.LeExtendedScanTimeoutEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x10000) >> 16));
				leEventMaskEnumCollection.LeExtendedAdvertisingSetTerminatedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x20000) >> 17));
				leEventMaskEnumCollection.LeScanRequestReceivedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x40000) >> 18));
				leEventMaskEnumCollection.LeChannelSelectionAlgorithmEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x80000) >> 19));
				leEventMaskEnumCollection.LeConnectionlessIqReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x100000) >> 20));
				leEventMaskEnumCollection.LeConnectionIqReportEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x200000) >> 21));
				leEventMaskEnumCollection.LeCteRequestFailedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x400000) >> 22));
				leEventMaskEnumCollection.LePeriodicAdvertisingSyncTransferReceivedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x800000) >> 23));
				leEventMaskEnumCollection.LeCisEstablishedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x1000000) >> 24));
				leEventMaskEnumCollection.LeCisRequestEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x2000000) >> 25));
				leEventMaskEnumCollection.LeCreateBigCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x4000000) >> 26));
				leEventMaskEnumCollection.LeTerminateBigCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x8000000) >> 27));
				leEventMaskEnumCollection.LeBigSyncEstablishedEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x10000000) >> 28));
				leEventMaskEnumCollection.LeBigSyncLostEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x20000000) >> 29));
				leEventMaskEnumCollection.LeRequestPeerScaCompleteEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x40000000) >> 30));
				leEventMaskEnumCollection.HciLePathLossThresholdEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x80000000u) >> 31));
				leEventMaskEnumCollection.HciLeTransmitPowerReportingEvent = EnableBitInfo.ValueToEnableBit((uint)((value & 0x100000000L) >> 32));
				return leEventMaskEnumCollection;
			}

			public static ulong LeEventMaskToValue(LeEventMaskEnumCollection enumCollection)
			{
				ulong num = 0uL;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeConnectionCompleteEvent);
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeAdvertisingReportEvent) << 1;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeConnectionUpdateCompleteEvent) << 2;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeReadRemoteUsedFeaturesCompleteEvent) << 3;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeLongTermKeyRequestEvent) << 4;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeRemoteConnectionParameterRequestEvent) << 5;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeDataLengthChangeEvent) << 6;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeReadLocalP256PublicKeyCompleteEvent) << 7;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeGenerateDhkeyCompleteEvent) << 8;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeEnhancedConnectionCompleteEvent) << 9;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeDirectedAdvertisingReportEvent) << 10;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LePhyUpdateCompleteEvent) << 11;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeExtendedAdvertisingReportEvent) << 12;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LePeriodicAdvertisingSyncEstablishedEvent) << 13;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LePeriodicAdvertisingReportEvent) << 14;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LePeriodicAdvertisingSyncLostEvent) << 15;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeExtendedScanTimeoutEvent) << 16;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeExtendedAdvertisingSetTerminatedEvent) << 17;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeScanRequestReceivedEvent) << 18;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeChannelSelectionAlgorithmEvent) << 19;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeConnectionlessIqReportEvent) << 20;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeConnectionIqReportEvent) << 21;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeCteRequestFailedEvent) << 22;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LePeriodicAdvertisingSyncTransferReceivedEvent) << 23;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeCisEstablishedEvent) << 24;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeCisRequestEvent) << 25;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeCreateBigCompleteEvent) << 26;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeTerminateBigCompleteEvent) << 27;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeBigSyncEstablishedEvent) << 28;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeBigSyncLostEvent) << 29;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.LeRequestPeerScaCompleteEvent) << 30;
				num |= EnableBitInfo.EnableBitToValue(enumCollection.HciLePathLossThresholdEvent) << 31;
				return num | EnableBitInfo.EnableBitToValue(enumCollection.HciLeTransmitPowerReportingEvent);
			}

			public static string LeEventMaskToString(LeEventMaskEnumCollection enumCollection)
			{
				string text = "";
				text = text + "LE Connection Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeConnectionCompleteEvent) + "\r\n";
				text = text + "LE Advertising Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeAdvertisingReportEvent) + "\r\n";
				text = text + "LE Connection Update Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeConnectionUpdateCompleteEvent) + "\r\n";
				text = text + "LE Read Remote Used Features Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeReadRemoteUsedFeaturesCompleteEvent) + "\r\n";
				text = text + "LE Long Term Key Request Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeLongTermKeyRequestEvent) + "\r\n";
				text = text + "LE Remote Connection Parameter Request Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeRemoteConnectionParameterRequestEvent) + "\r\n";
				text = text + "LE Data Length Change Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeDataLengthChangeEvent) + "\r\n";
				text = text + "LE Read Local P-256 Public Key Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeReadLocalP256PublicKeyCompleteEvent) + "\r\n";
				text = text + "LE Generate DHKey Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeGenerateDhkeyCompleteEvent) + "\r\n";
				text = text + "LE Enhanced Connection Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeEnhancedConnectionCompleteEvent) + "\r\n";
				text = text + "LE Directed Advertising Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeDirectedAdvertisingReportEvent) + "\r\n";
				text = text + "LE PHY Update Complete Event: " + EnableBitInfo.EnableBitToString(enumCollection.LePhyUpdateCompleteEvent) + "\r\n";
				text = text + "LE Extended Advertising Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeExtendedAdvertisingReportEvent) + "\r\n";
				text = text + "LE Periodic Advertising Sync Established Event: " + EnableBitInfo.EnableBitToString(enumCollection.LePeriodicAdvertisingSyncEstablishedEvent) + "\r\n";
				text = text + "LE Periodic Advertising Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LePeriodicAdvertisingReportEvent) + "\r\n";
				text = text + "LE Periodic Advertising Sync Lost Event: " + EnableBitInfo.EnableBitToString(enumCollection.LePeriodicAdvertisingSyncLostEvent) + "\r\n";
				text = text + "LE Extended Scan Timeout Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeExtendedScanTimeoutEvent) + "\r\n";
				text = text + "LE Extended Advertising Set Terminated Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeExtendedAdvertisingSetTerminatedEvent) + "\r\n";
				text = text + "LE Scan Request Received Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeScanRequestReceivedEvent) + "\r\n";
				text = text + "LE Channel Selection Algorithm Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeChannelSelectionAlgorithmEvent) + "\r\n";
				text = text + "LE Connectionless IQ Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeConnectionlessIqReportEvent) + "\r\n";
				text = text + "LE Connection IQ Report Event: " + EnableBitInfo.EnableBitToString(enumCollection.LeConnectionIqReportEvent) + "\r\n";
				text = text + "LE CTE Request Failed event: " + EnableBitInfo.EnableBitToString(enumCollection.LeCteRequestFailedEvent) + "\r\n";
				text = text + "LE Periodic Advertising Sync Transfer Received event: " + EnableBitInfo.EnableBitToString(enumCollection.LePeriodicAdvertisingSyncTransferReceivedEvent) + "\r\n";
				text = text + "LE CIS Established event: " + EnableBitInfo.EnableBitToString(enumCollection.LeCisEstablishedEvent) + "\r\n";
				text = text + "LE CIS Request event: " + EnableBitInfo.EnableBitToString(enumCollection.LeCisRequestEvent) + "\r\n";
				text = text + "LE Create BIG Complete event: " + EnableBitInfo.EnableBitToString(enumCollection.LeCreateBigCompleteEvent) + "\r\n";
				text = text + "LE Terminate BIG Complete event: " + EnableBitInfo.EnableBitToString(enumCollection.LeTerminateBigCompleteEvent) + "\r\n";
				text = text + "LE BIG Sync Established event: " + EnableBitInfo.EnableBitToString(enumCollection.LeBigSyncEstablishedEvent) + "\r\n";
				text = text + "LE BIG Sync Lost event: " + EnableBitInfo.EnableBitToString(enumCollection.LeBigSyncLostEvent) + "\r\n";
				text = text + "LE Request Peer SCA Complete event: " + EnableBitInfo.EnableBitToString(enumCollection.LeRequestPeerScaCompleteEvent) + "\r\n";
				text = text + "HCI_LE_Path_Loss_Threshold event: " + EnableBitInfo.EnableBitToString(enumCollection.HciLePathLossThresholdEvent) + "\r\n";
				text = text + "HCI_LE_Transmit_Power_Reporting event: " + EnableBitInfo.EnableBitToString(enumCollection.HciLeTransmitPowerReportingEvent) + "\r\n";
				return text.TrimEnd('\r', '\n');
			}

			public static string LeEventMaskToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("Bit 0: LE Connection Complete Event");
				stringBuilder.AppendLine("Bit 1: LE Advertising Report Event");
				stringBuilder.AppendLine("Bit 2: LE Connection Update Complete Event");
				stringBuilder.AppendLine("Bit 3: LE Read Remote Used Features Complete Event");
				stringBuilder.AppendLine("Bit 4: LE Long Term Key Request Event");
				stringBuilder.AppendLine("Bit 5: LE Remote Connection Parameter Request Event");
				stringBuilder.AppendLine("Bit 6: LE Data Length Change Event");
				stringBuilder.AppendLine("Bit 7: LE Read Local P-256 Public Key Complete Event");
				stringBuilder.AppendLine("Bit 8: LE Generate DHKey Complete Event");
				stringBuilder.AppendLine("Bit 9: LE Enhanced Connection Complete Event");
				stringBuilder.AppendLine("Bit 10: LE Directed Advertising Report Event");
				stringBuilder.AppendLine("Bit 11: LE PHY Update Complete Event");
				stringBuilder.AppendLine("Bit 12: LE Extended Advertising Report Event");
				stringBuilder.AppendLine("Bit 13: LE Periodic Advertising Sync Established Event");
				stringBuilder.AppendLine("Bit 14: LE Periodic Advertising Report Event");
				stringBuilder.AppendLine("Bit 15: LE Periodic Advertising Sync Lost Event");
				stringBuilder.AppendLine("Bit 16: LE Extended Scan Timeout Event");
				stringBuilder.AppendLine("Bit 17: LE Extended Advertising Set Terminated Event");
				stringBuilder.AppendLine("Bit 18: LE Scan Request Received Event");
				stringBuilder.AppendLine("Bit 19: LE Channel Selection Algorithm Event");
				stringBuilder.AppendLine("Bit 20: LE Connectionless IQ Report Event");
				stringBuilder.AppendLine("Bit 21: LE Connection IQ Report Event");
				stringBuilder.AppendLine("Bit 22: LE CTE Request Failed event");
				stringBuilder.AppendLine("Bit 23: LE Periodic Advertising Sync Transfer Received event");
				stringBuilder.AppendLine("Bit 24: LE CIS Established event");
				stringBuilder.AppendLine("Bit 25: LE CIS Request event");
				stringBuilder.AppendLine("Bit 26: LE Create BIG Complete event");
				stringBuilder.AppendLine("Bit 27: LE Terminate BIG Complete event");
				stringBuilder.AppendLine("Bit 28: LE BIG Sync Established event");
				stringBuilder.AppendLine("Bit 29: LE BIG Sync Lost event");
				stringBuilder.AppendLine("Bit 30: LE Request Peer SCA Complete event");
				stringBuilder.AppendLine("Bit 31: HCI_LE_Path_Loss_Threshold event");
				stringBuilder.AppendLine("Bit 32: HCI_LE_Transmit_Power_Reporting event");
				stringBuilder.AppendLine("Bits 63-33: Reserved for future use");
				return stringBuilder.ToString();
			}
		}

		private ulong _LeEventMask;

		public ulong LeEventMask
		{
			get
			{
				return _LeEventMask;
			}
			set
			{
				_LeEventMask = value;
			}
		}

		public LeEventMaskEnumCollection GetLeEventMaskAsLeEventMaskEnumCollection()
		{
			return LeEventMaskInfo.ValueToLeEventMask(_LeEventMask);
		}

		public void SetLeEventMaskAsLeEventMaskEnumCollection(LeEventMaskEnumCollection enumCollection)
		{
			LeEventMask = LeEventMaskInfo.LeEventMaskToValue(enumCollection);
		}
	}

	private const uint _Opcode = 8193u;

	private Type[] expectedResponseTypes = new Type[1] { typeof(CommandCompleteForLeSetEventMask) };

	private PacketInfoBase info;

	private uint _PayloadLength;

	public UserFieldsWrapper _UserFields = new UserFieldsWrapper();

	public override PacketType Type => PacketType.Command;

	public override Type[] ExpectedResponseTypes => expectedResponseTypes;

	public override PacketInfoBase Info
	{
		get
		{
			if (info == null)
			{
				info = new LeSetEventMaskInfo(this);
			}
			return info;
		}
	}

	public uint Opcode => 8193u;

	public uint PayloadLength
	{
		get
		{
			ToBitString();
			return _PayloadLength;
		}
	}

	public UserFieldsWrapper UserFields => _UserFields;

	public override void SetDefaultValues()
	{
		UserFields.LeEventMask = 31uL;
	}

	protected override bool FromBitBuilder(ref BitBuilder bitBuilder)
	{
		if (bitBuilder.RemoveBitsAsUintLittleEndian(16) != Opcode)
		{
			return false;
		}
		_PayloadLength = bitBuilder.RemoveBitsAsUint(8);
		int numberOfBits = bitBuilder.GetNumberOfBits();
		if (numberOfBits > _PayloadLength * 8 + 7)
		{
			return false;
		}
		if (numberOfBits < _PayloadLength * 8)
		{
			return false;
		}
		UserFields.LeEventMask = bitBuilder.RemoveBitsAsUlongLittleEndian(64);
		if (bitBuilder.GetNumberOfBits() > 7)
		{
			return false;
		}
		return true;
	}

	public override string ToBitString()
	{
		BitBuilder bitBuilder = new BitBuilder();
		bitBuilder.AddBitsAsUintLittleEndian(Opcode, 16);
		int numberOfBits = bitBuilder.GetNumberOfBits();
		bitBuilder.AddBitsAsUint(0u, 8);
		bitBuilder.AddBitsAsUlongLittleEndian(UserFields.LeEventMask, 64);
		_PayloadLength = (uint)((bitBuilder.GetNumberOfBits() - numberOfBits - 8) / 8);
		if ((bitBuilder.GetNumberOfBits() - numberOfBits - 8) % 8 != 0)
		{
			_PayloadLength++;
		}
		bitBuilder.ChangeBitsAsUint(numberOfBits, _PayloadLength, 8);
		return bitBuilder.ToString();
	}
}
