using System.IO;
using System.Net.NetworkInformation;
using skyscraper5.Docsis.AnnexC;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Plugins;

namespace skyscraper5.Docsis.MacManagement
{
	[SkyscraperPlugin]
	[MacManagementMessageType(2, 18)]
    internal class T18_V2_DynamicServiceChangeRequest : MacManagementMessage
    {
        public T18_V2_DynamicServiceChangeRequest(PhysicalAddress source, PhysicalAddress destination, byte[] buffer) : base(source, destination, buffer)
        {
            MemoryStream ms = new MemoryStream(buffer, false);
            TransactionId = ms.ReadUInt16BE();
            TlvEncodedInformation = new CommonTlvEncodingObject(ms);
        }

        public CommonTlvEncodingObject TlvEncodedInformation { get; private set; }

        public ushort TransactionId { get; private set; }
    }
}
