-
Notifications
You must be signed in to change notification settings - Fork 18
/
TransferAgv.cpp
59 lines (51 loc) · 1.23 KB
/
TransferAgv.cpp
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
58
59
#include "TransferAgv.h"
TransferAgv::TransferAgv(const AgvType& _type,const AId_t& _id,
const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort,
const QString& _localAddr,const unsigned short& _localPort,
QObject *parent)
: AgvBase(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent)
{
}
AgvBase::CmdErr TransferAgv::Reversals()
{
return Action(1);
}
AgvBase::CmdErr TransferAgv::Corotation()
{
return Action(2);
}
std::string TransferAgv::GetActionName() const
{
std::string _act= "unknown-",_actStatus = "unknown";
switch(m_action)
{
case 0:
_act= "无动作-";
break;
case 1:
_act= "电机正转-";
break;
case 2:
_act= "电机反转-";
break;
default:
_act= "unknown-";
break;
}
switch (m_actStatus)
{
case ActSta_None:
_actStatus = "未执行";
break;
case ActSta_Exe:
_actStatus = "正在执行";
break;
case ActSta_Fin:
_actStatus = "已执行完成";
break;
default:
_actStatus = "unknown";
break;
}
return _act + _actStatus;
}