using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.Plugins;

namespace skyscraper5.Docsis.MacManagement
{
	[SkyscraperPlugin]
	[MacManagementMessageType(2,22)]
    internal class DynamicServiceDeletionResponse : MacManagementMessage
    {
        public DynamicServiceDeletionResponse(PhysicalAddress source, PhysicalAddress destination, byte[] buffer) : base(source, destination, buffer)
        {
            (buffer[0], buffer[1]) = (buffer[1], buffer[0]);
            TransactionId = BitConverter.ToUInt16(buffer, 0);
            ConfirmationCode = buffer[2];
            Valid = true;
        }

        public byte ConfirmationCode { get; set; }

        public ushort TransactionId { get; set; }
    }
}
