AgvBean.cs
695 字节
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
using System;
public class AgvBean
{
public AgvStatus agvStatus;
public AgvApi AgvApi;
public Job job;
public bool isIdle()
{
return false;
}
public bool needCharge()
{
return false;
}
public void ExecuteNewJob(Job newJob)
{
job = newJob;
}
public void JobContinue(AgvBean currentAgvBean, Dictionary<string, Node> nodeMap, Dictionary<string, AgvBean> agvBeanMap)
{
if(job != null)
{
job.execute(agvBean, nodeMap, agvBeanMap);
if (job.IsEnd())
{
//添加任务已经完成日志
job = null;
}
}
}
}