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

namespace ProjectManagementSystem.Device.Command
{
    public class CommandSkq : IDeviceCommand
    {
        public byte Command { get; set; }
        public List<Station> Stations { get; set; }

        public CommandSkq()
        {
            Stations = new List<Station>();
        }

        public byte[] Serialization()
        {
            byte[] data = new byte[3 + 1 + (Stations.Count * 4) + 2];
            data[0] = 0x4A;
            data[1] = 0x54;
            data[2] = 0x58;
            data[3] = (byte)(1 + (Stations.Count * 4));

            return data;
        }

        public class Station
        {
            public int Mark { get; set; }
            public int Status { get; set; }
            public int AgvId { get; set; }
            public int AgvStatus { get; set; }
        }
    }
}
