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

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

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

        public ushort TimeOffset { get; set; }
    }
}
