using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.IO;

namespace skyscraper8.Ieee802_1AB.Model
{
	public class LldpMacPhyConfigurationStatus
	{
		private readonly byte autoNegotioationStatus;
		private readonly ushort pmdAutoNegotiation;

		public LldpMacPhyConfigurationStatus(MemoryStream ms)
		{
			autoNegotioationStatus = ms.ReadUInt8();
			pmdAutoNegotiation = ms.ReadUInt16BE();
			OperationalMauType = ms.ReadUInt16BE();
		}

		public ushort OperationalMauType { get; private set; }

		public bool AutonegotiationSupported => (autoNegotioationStatus & 0x01) != 0;
		public bool AutonegotiationStatus => (autoNegotioationStatus & 0x02) != 0;
	}
}
