using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper5.T2MI.Packets.AdressingFunctions
{
    internal class _0x02_TransmitterPower : AddressingFunction
    {
        public _0x02_TransmitterPower(byte[] buffer)
            : base(0x02, true, true)
        {
            if (buffer.Length != 2)
            {
                Valid = false;
                return;
            }

            (buffer[1], buffer[0]) = (buffer[0], buffer[1]);
            TxPower = BitConverter.ToUInt16(buffer, 0);
            Valid = true;
        }

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