RGVStationAnalysis.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>
/// AGV数据解析
/// </summary>
internal class RGVStationAnalysis : AnalysisBase
{
public RGVStationAnalysis(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.RGVStation, equipment.EquipmentProps, tagResult.Data);
}
catch (Exception ex)
{
return BllResultFactory.Error<EquipmentStatus>(ex.Message);
}
}
}
}