IStockerExcute.cs 2.95 KB
using HHECS.Model;
using S7.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HHECS.Common
{
    /// <summary>
    /// 堆垛机通用处理接口
    /// </summary>
    public interface IStockerExcute
    {
        /// <summary>
        /// 对应的设备类型
        /// </summary>
        EquipmentType EquipmentType { get; set; }

        /// <summary>
        /// 校验是否可以完成任务
        /// </summary>
        /// <param name="stocker"></param>
        /// <returns></returns>
        BllResult ValidateStockerForCompleteTask(Equipment stocker);

        /// <summary>
        /// 校验堆垛机是否接受出库任务
        /// </summary>
        /// <param name="stocker"></param>
        /// <returns></returns>
        BllResult ValidateStockerOut(Equipment stocker);

        /// <summary>
        /// 校验堆垛机是否接受同巷道内的移库任务
        /// </summary>
        /// <param name="stocker"></param>
        /// <returns></returns>
        BllResult ValidateStockerTransferInRoadway(Equipment stocker);

        /// <summary>
        /// 校验堆垛机是否可以接受入库任务
        /// </summary>
        /// <param name="stocker"></param>
        /// <returns></returns>
        BllResult ValidateStockerIn(Equipment stocker);

        /// <summary>
        /// 响应堆垛机任务完成(执行中完成:更新放货指令;执行完成则与WMS交互)
        /// </summary>
        /// <param name="stockers"></param>
        /// <returns></returns>
        BllResult ExcuteTaskComplete(Equipment stocker, Plc plc);

        /// <summary>
        /// 响应堆垛机出库任务(新任务下发,取货任务)
        /// </summary>
        /// <param name="stockers"></param>
        /// <returns></returns>
        BllResult ExcuteTaskOut(Equipment stocker, Plc plc);

        /// <summary>
        /// 响应堆垛机入库任务(新任务下发,取货任务)
        /// </summary>
        /// <param name="stockers"></param>
        /// <returns></returns>
        BllResult ExcuteTaskIn(Equipment stocker, Plc plc);

        /// <summary>
        /// 响应同巷道内的移库任务(新任务下发,取货任务)
        /// </summary>
        /// <param name="stockers"></param>
        /// <returns></returns>
        BllResult ExcuteTaskTransferInRoadway(Equipment stocker, Plc plc);

        /// <summary>
        /// 执行堆垛机处理逻辑
        /// </summary>
        /// <param name="stockers"></param>
        /// <param name="plcs"></param>
        /// <returns></returns>
        BllResult Excute(List<Equipment> stockers, List<Plc> plcs);

        /// <summary>
        /// 下发任务错误时的处理
        /// </summary>
        /// <param name="stocker"></param>
        /// <param name="plc"></param>
        /// <returns></returns>
        BllResult ExcuteTaskError(Equipment stocker, Plc plc);


    }
}