using ProjectManagementSystem.Device.Function;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjectManagementSystem.Device.CasunBox
{
    public class CommandSetLight : BoxCommandBase
    {
        private byte[] light_buffer = new byte[16] { 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10 };
        public byte LightType { get; set; }

        public override byte[] Serialization()
        {
            light_buffer[4] = LightType;
            light_buffer[14] = (byte)Route;
            light_buffer[15] = Tools.XOR_Check(light_buffer, 15);

            return light_buffer;
        }
    }
}

