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

namespace SIASUN.Autopilot.Device.Message
{
    public class 控制器上电命令
    {
        private const string OperationCode = "5f1";

        public 控制器上电命令() 
        {
        }

        public string GetId
        {
            get { return OperationCode; }
        }


        /// <summary>
        /// 换挡臂Y电机控制器上电
        /// </summary>
        [Data(BitStart = 32, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 1)]
        public string 换挡臂Y电机控制器上电 { get; set; }

        /// <summary>
        /// 转向电机控制器上电
        /// </summary>
        [Data(BitStart = 40, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 2)]
        public string 转向电机控制器上电 { get; set; }

        /// <summary>
        /// 换挡臂X电机控制器上电
        /// </summary>
        [Data(BitStart = 44, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 3)]
        public string 换挡臂X电机控制器上电 { get; set; }

        /// <summary>
        /// 制动电机控制器上电
        /// </summary>
        [Data(BitStart = 48, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 4)]
        public string 制动电机控制器上电 { get; set; }

        /// <summary>
        /// 离合电机控制器上电
        /// </summary>
        [Data(BitStart = 52, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 5)]
        public string 离合电机控制器上电 { get; set; }

        /// <summary>
        /// RCU上电
        /// </summary>
        [Data(BitStart = 56, BitLength = 2,  DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 6)]
        public string RCU上电 { get; set; }

        /// <summary>
        /// 油门电机控制器上电
        /// </summary>
        [Data(BitStart = 60, BitLength = 2, DataType = "binary", Description = "0=Power Off;1=Power ON;2=无效命令", Sequence = 7)]
        public string 油门电机控制器上电 { get; set; } 
    }

    [Flags]
    public enum PowerStatus : int
    {
        PowerOff = 0,
        PowerOn = 1,
        Invalid = 2,

    }
}
