using skyscraper5.Mpeg2.Descriptors;

namespace skyscraper8.Docsis.AnnexC
{
	internal class MulticastCmInterfaceMask
	{

		public MulticastCmInterfaceMask(byte[] v)
		{
			uint buffered = BitConverter.ToUInt32(v, 0);
			CmIpStack = (buffered & 0x00000001) != 0;
			PrimaryCpeInterfae = (buffered & 0x00000002) != 0;
			RfInterface = (buffered & 0x00000004) != 0;
			//Reserved = (buffered & 0x00000018) != 0;
			OtherCpeInterfaces = (buffered & 0x0000ffe0) != 0;
			PacketCableEmta = (buffered & 0x00010000) != 0;
			EstbIp = (buffered & 0x00020000) != 0;
			//Reserved = (buffered & 0x00040000) != 0;
			OtherESafeInterfaces = (buffered & 0xfff80000) != 0;
		}

		public bool CmIpStack { get; }
		public bool PrimaryCpeInterfae { get; }
		public bool RfInterface { get; }
		public bool OtherCpeInterfaces { get; }
		public bool PacketCableEmta { get; }
		public bool EstbIp { get; }
		public bool OtherESafeInterfaces { get; }
	}
}