JobContext.cs
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLibrary.bean.agv
{
/// <summary>
/// 任务上下文
/// </summary>
public class JobContext
{
/// <summary>
/// Agv名称
/// </summary>
public string Name { get; set; } = "";
/// <summary>
/// 任务id
/// </summary>
public string MissionId { get; set; } = "";
/// <summary>
/// job全称
/// </summary>
public string JobFullName { get; set; } = "";
/// <summary>
/// 当前步骤
/// </summary>
public string JobStep { get; set; } = "";
/// <summary>
/// 任务参数
/// </summary>
public JobParam JobParam { get; set; } = new JobParam(null);
/// <summary>
/// 任务
/// </summary>
public AgvTask AgvTask { get; set; } = new AgvTask();
public override bool Equals(object obj)
{
JobContext jobContext = obj as JobContext;
if (jobContext == null) return false;
else
{
if(MissionId.Equals(jobContext.MissionId) && JobFullName.Equals(jobContext.JobFullName)&&
JobStep.Equals(jobContext.JobStep) && AgvTask.Name.Equals(jobContext.AgvTask.Name))
{
return true;
}
else
{
return false;
}
}
}
}
}