DoubleForkSRMAnalysis.cs
1.1 KB
using HHECS.BllModel;
using HHECS.DAQHandle.Dto;
using HHECS.DAQShared.Common.Enums;
using HHECS.DAQShared.Common.Utils;
using HHECS.DAQShared.Models;
namespace HHECS.DAQHandle.EquipmentHandle
{
/// <summary>
/// 双叉堆垛机数据解析
/// </summary>
internal class DoubleForkSRMAnalysis : AnalysisBase
{
public DoubleForkSRMAnalysis(AnalysisParameter parameter) : base(parameter) { }
protected override BllResult<EquipmentStatus> GetEquipmentStatus(EquipmentExtend equipment, EquipmentDataRecord record)
{
try
{
var tagResult = JsonConvertToTagList(record.Tags);
if (!tagResult.Success)
{
return BllResultFactory.Error<EquipmentStatus>(tagResult.Msg);
}
return EquipmentStatusHelper.GetEquipmentStatus(EquipmentTypeConst.DoubleForkSRM, equipment.EquipmentProps, tagResult.Data);
}
catch (Exception ex)
{
return BllResultFactory.Error<EquipmentStatus>(ex.Message);
}
}
}
}