You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB
C#

using CFX;
using CFX.Production;
using CFX.Structures;
using Sln.Iot.Serilog;
namespace Sln.Iot.CFX.Event
{
/// <summary>
/// 工单启动事件
/// 带扫码枪的设备Units栏位中的UnitIdentifier必须填写
/// </summary>
public class WorkStartedEvent
{
/// <summary>
/// 数据封装处理
/// </summary>
/// <returns></returns>
public CFXMessage Handle()
{
CFXMessage eve = null;
try
{
eve = new WorkStarted()
{
TransactionID = Guid.NewGuid(),
Lane = 1,
Units = new List<UnitPosition>()
{
new UnitPosition()
{
UnitIdentifier = "UNIT123456789",
PositionNumber = 1,
PositionName = "位置1",
X = 50.0,
Y = 80.0,
Rotation = 0.0,
FlipX = false,
FlipY = false
},
}
};
}
catch (Exception e)
{
SerilogHelper.Instance.Error("终端节点连接事件数据封装异常", e);
}
return eve;
}
}
}