├── Document ├── 分布式智能AGV调度系统通信协议.docx ├── 仓库平面布局图(2.3横梁不含一区货架)V3.0-20191021.dwg └── IntelligentAGVSchedulingSystem.mdj ├── main.cpp ├── mainwindow.cpp ├── ArmAgv.cpp ├── PullAgv.cpp ├── mainwindow.h ├── ArmAgv.h ├── PullAgv.h ├── mainwindow.ui ├── ForkAgv.h ├── LiftingAgv.h ├── ProtocolPlc.h ├── ProtocolStm32.h ├── SubmersibleAgv.h ├── TransferAgv.h ├── .gitignore ├── ProtocolBase.h ├── RfidBase.h ├── ForkAgv.cpp ├── LiftingAgv.cpp ├── TransferAgv.cpp ├── SubmersibleAgv.cpp ├── IntelligentAGVSchedulingSystem.pro ├── ProtocolBase.cpp ├── RfidBase.cpp ├── ProtocolPlc.cpp ├── ProtocolStm32.cpp ├── AgvBase.h └── AgvBase.cpp /Document/分布式智能AGV调度系统通信协议.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markkun/IntelligentAGVSchedulingSystemByQt/HEAD/Document/分布式智能AGV调度系统通信协议.docx -------------------------------------------------------------------------------- /Document/仓库平面布局图(2.3横梁不含一区货架)V3.0-20191021.dwg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/markkun/IntelligentAGVSchedulingSystemByQt/HEAD/Document/仓库平面布局图(2.3横梁不含一区货架)V3.0-20191021.dwg -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.show(); 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | MainWindow::MainWindow(QWidget *parent) 5 | : QMainWindow(parent) 6 | , ui(new Ui::MainWindow) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | MainWindow::~MainWindow() 12 | { 13 | delete ui; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ArmAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "ArmAgv.h" 2 | 3 | ArmAgv::ArmAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : AgvBase(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /PullAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "PullAgv.h" 2 | 3 | PullAgv::PullAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : AgvBase(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | namespace Ui { class MainWindow; } 8 | QT_END_NAMESPACE 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | MainWindow(QWidget *parent = nullptr); 16 | ~MainWindow(); 17 | 18 | private: 19 | Ui::MainWindow *ui; 20 | }; 21 | #endif // MAINWINDOW_H 22 | -------------------------------------------------------------------------------- /ArmAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef ARMAGV_H 2 | #define ARMAGV_H 3 | 4 | #include "AgvBase.h" 5 | 6 | class ArmAgv : public AgvBase 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit ArmAgv(const AgvType& _type,const AId_t& _id, 11 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 12 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 13 | QObject *parent = nullptr); 14 | }; 15 | 16 | #endif // ARMAGV_H 17 | -------------------------------------------------------------------------------- /PullAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef PULLAGV_H 2 | #define PULLAGV_H 3 | 4 | #include "AgvBase.h" 5 | 6 | class PullAgv : public AgvBase 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit PullAgv(const AgvType& _type,const AId_t& _id, 11 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 12 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 13 | QObject *parent = nullptr); 14 | }; 15 | 16 | #endif // PULLAGV_H 17 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ForkAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef FORKAGV_H 2 | #define FORKAGV_H 3 | 4 | #include "LiftingAgv.h" 5 | 6 | 7 | class ForkAgv : public LiftingAgv 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit ForkAgv(const AgvType& _type,const AId_t& _id, 12 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 13 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 14 | QObject *parent = nullptr); 15 | 16 | public: 17 | /*! 18 | * @brief 获取动作信息 19 | * @return string 动作信息 20 | */ 21 | std::string GetActionName() const; 22 | }; 23 | 24 | #endif // FORKAGV_H 25 | -------------------------------------------------------------------------------- /LiftingAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef LIFTINGAGV_H 2 | #define LIFTINGAGV_H 3 | 4 | #include "SubmersibleAgv.h" 5 | 6 | class LiftingAgv : public SubmersibleAgv 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit LiftingAgv(const AgvType& _type,const AId_t& _id, 11 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 12 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 13 | QObject *parent = nullptr); 14 | public: 15 | /*! 16 | * @brief 获取动作信息 17 | * @return string 动作信息 18 | */ 19 | std::string GetActionName() const; 20 | }; 21 | 22 | #endif // LIFTINGAGV_H 23 | -------------------------------------------------------------------------------- /ProtocolPlc.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTOCOLPLC_H 2 | #define PROTOCOLPLC_H 3 | 4 | #include "ProtocolBase.h" 5 | 6 | class ProtocolPlc : public ProtocolBase 7 | { 8 | public: 9 | ProtocolPlc(); 10 | ~ProtocolPlc() override; 11 | 12 | public: 13 | typedef short DATA_LEN; 14 | 15 | protected: 16 | static const unsigned char PACKET_HEAD; /*!< 报文头 */ 17 | static const unsigned char PACKET_TAIL; /*!< 报文尾 */ 18 | 19 | public: 20 | QByteArrayList ProcessData(QByteArray &_data) override; 21 | QByteArray CreatePacket(const QByteArray &_data) override; 22 | QByteArray Encoding(const QByteArray& _data); 23 | QByteArray Encoding(const char* _data,const size_t& _size); 24 | QByteArray Decoding(const QByteArray& _data); 25 | QByteArray Decoding(const char* _data,const size_t& _size); 26 | }; 27 | 28 | #endif // PROTOCOLPLC_H 29 | -------------------------------------------------------------------------------- /ProtocolStm32.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTOCOLSTM32_H 2 | #define PROTOCOLSTM32_H 3 | 4 | #include "ProtocolBase.h" 5 | 6 | class ProtocolStm32 : public ProtocolBase 7 | { 8 | public: 9 | ProtocolStm32(); 10 | ~ProtocolStm32() override; 11 | 12 | public: 13 | typedef short DATA_LEN; 14 | 15 | protected: 16 | static const unsigned char PACKET_HEAD; /*!< 报文头 */ 17 | static const unsigned char PACKET_TAIL; /*!< 报文尾 */ 18 | 19 | public: 20 | QByteArrayList ProcessData(QByteArray &_data) override; 21 | QByteArray CreatePacket(const QByteArray &_data) override; 22 | QByteArray Encoding(const QByteArray& _data); 23 | QByteArray Encoding(const char* _data,const size_t& _size); 24 | QByteArray Decoding(const QByteArray& _data); 25 | QByteArray Decoding(const char* _data,const size_t& _size); 26 | }; 27 | 28 | #endif // PROTOCOLSTM32_H 29 | -------------------------------------------------------------------------------- /SubmersibleAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef SUBMERSIBLEAGV_H 2 | #define SUBMERSIBLEAGV_H 3 | 4 | #include "AgvBase.h" 5 | 6 | /*! 7 | * @class SubmersibleAgv 8 | * @brief 描述潜入式AGV属性和功能的类 9 | */ 10 | class SubmersibleAgv : public AgvBase 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit SubmersibleAgv(const AgvType& _type,const AId_t& _id, 15 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 16 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 17 | QObject *parent = nullptr); 18 | 19 | public: 20 | /*! 21 | * @brief 升降杆上升 22 | * @return CmdErr 指令发送成功返回0 23 | */ 24 | CmdErr Up(); 25 | 26 | /*! 27 | * @brief 升降杆下降 28 | * @return CmdErr 指令发送成功返回0 29 | */ 30 | CmdErr Down(); 31 | 32 | /*! 33 | * @brief 获取动作信息 34 | * @return string 动作信息 35 | */ 36 | std::string GetActionName() const; 37 | }; 38 | 39 | #endif // SUBMERSIBLEAGV_H 40 | -------------------------------------------------------------------------------- /TransferAgv.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSFERAGV_H 2 | #define TRANSFERAGV_H 3 | 4 | #include "AgvBase.h" 5 | 6 | /*! 7 | * @class TransferAgv 8 | * @brief 描述移载式AGV属性与功能的类 9 | */ 10 | class TransferAgv : public AgvBase 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit TransferAgv(const AgvType& _type,const AId_t& _id, 15 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 16 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 17 | QObject *parent = nullptr); 18 | 19 | public: 20 | /*! 21 | * @brief 电机正转 22 | * @return CmdErr 指令发送成功返回0 23 | */ 24 | CmdErr Reversals(); 25 | 26 | /*! 27 | * @brief 电机反转 28 | * @return CmdErr 指令发送成功返回0 29 | */ 30 | CmdErr Corotation(); 31 | 32 | /*! 33 | * @brief 获取动作信息 34 | * @return string 动作信息 35 | */ 36 | std::string GetActionName() const; 37 | }; 38 | 39 | #endif // TRANSFERAGV_H 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used to ignore files which are generated 2 | # ---------------------------------------------------------------------------- 3 | 4 | *~ 5 | *.autosave 6 | *.a 7 | *.core 8 | *.moc 9 | *.o 10 | *.obj 11 | *.orig 12 | *.rej 13 | *.so 14 | *.so.* 15 | *_pch.h.cpp 16 | *_resource.rc 17 | *.qm 18 | .#* 19 | *.*# 20 | core 21 | !core/ 22 | tags 23 | .DS_Store 24 | .directory 25 | *.debug 26 | Makefile* 27 | *.prl 28 | *.app 29 | moc_*.cpp 30 | ui_*.h 31 | qrc_*.cpp 32 | Thumbs.db 33 | *.res 34 | *.rc 35 | /.qmake.cache 36 | /.qmake.stash 37 | 38 | # qtcreator generated files 39 | *.pro.user* 40 | 41 | # xemacs temporary files 42 | *.flc 43 | 44 | # Vim temporary files 45 | .*.swp 46 | 47 | # Visual Studio generated files 48 | *.ib_pdb_index 49 | *.idb 50 | *.ilk 51 | *.pdb 52 | *.sln 53 | *.suo 54 | *.vcproj 55 | *vcproj.*.*.user 56 | *.ncb 57 | *.sdf 58 | *.opensdf 59 | *.vcxproj 60 | *vcxproj.* 61 | 62 | # MinGW generated files 63 | *.Debug 64 | *.Release 65 | 66 | # Python byte code 67 | *.pyc 68 | 69 | # Binaries 70 | # -------- 71 | *.dll 72 | *.exe 73 | 74 | -------------------------------------------------------------------------------- /ProtocolBase.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * @file ProtocolBase 3 | * @brief 描述协议类型的文件 4 | * @date 2019-10-21 5 | * @author FanKaiyu 6 | * @version 1.0 7 | */ 8 | #ifndef PROTOCOLBASE_H 9 | #define PROTOCOLBASE_H 10 | 11 | #include 12 | 13 | /*! 14 | * @class ProtocolBase 15 | * @brief 描述协议的类型的基类 16 | */ 17 | class ProtocolBase 18 | { 19 | public: 20 | ProtocolBase(const unsigned char& _type); 21 | virtual ~ProtocolBase(); 22 | 23 | public: 24 | typedef short CRC_16; 25 | 26 | protected: 27 | unsigned char m_type; 28 | 29 | protected: 30 | static unsigned char auchCRCHi[]; 31 | static unsigned char auchCRCLo[]; 32 | 33 | public: 34 | virtual QByteArrayList ProcessData(QByteArray& _data) = 0; 35 | virtual QByteArray CreatePacket(const QByteArray& _data) = 0; 36 | 37 | protected: 38 | static short CRC16(const char *puchMsg,unsigned int _len); 39 | 40 | public: 41 | unsigned char GetType() const; 42 | }; 43 | 44 | /*! @brief 协议类型 */ 45 | enum ProtocolType 46 | { 47 | Protocol_PLC, /*!< 与PLC通信的协议 */ 48 | Protocol_STM32, /*!< 与STM32通信的协议 */ 49 | }; 50 | 51 | #endif // PROTOCOLBASE_H 52 | -------------------------------------------------------------------------------- /RfidBase.h: -------------------------------------------------------------------------------- 1 | #ifndef RFIDBASE_H 2 | #define RFIDBASE_H 3 | #include 4 | 5 | class RfidBase 6 | { 7 | public: 8 | typedef unsigned short Rfid_t; 9 | public: 10 | RfidBase(); 11 | RfidBase(const Rfid_t& _no); 12 | RfidBase(const RfidBase& _rfid); 13 | 14 | public: 15 | operator bool() const; 16 | void operator=(const RfidBase& _rfid); 17 | bool operator==(const bool& _bool) const; 18 | bool operator!=(const bool& _bool) const; 19 | bool operator>(const RfidBase& _rfid) const; 20 | bool operator<(const RfidBase& _rfid) const; 21 | 22 | protected: 23 | Rfid_t m_id; /*!< 编号 */ 24 | std::chrono::steady_clock::time_point m_lockTime; /*!< 锁定RFID卡的时间 */ 25 | void* m_pLocker; /*!< 锁定RFID卡的对象 */ 26 | void* m_pPeerLocker; /*!< 远程锁定RFID卡的对象:即对象不在RFID卡上,提前锁定RFID卡 */ 27 | 28 | public: 29 | bool Lock(void* _locker); 30 | bool Free(void* _locker = nullptr); 31 | bool PeerLock(void* _locker); 32 | bool Cancel(void* _locker = nullptr); 33 | void Clear(); 34 | void* GetLocker() const; 35 | void* GetPeerLocker() const; 36 | }; 37 | 38 | #endif // RFIDBASE_H 39 | -------------------------------------------------------------------------------- /ForkAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "ForkAgv.h" 2 | 3 | ForkAgv::ForkAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : LiftingAgv(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | 12 | std::string ForkAgv::GetActionName() const 13 | { 14 | std::string _act= "unknown-",_actStatus = "unknown"; 15 | 16 | switch(m_action) 17 | { 18 | case 0: 19 | _act= "无动作-"; 20 | break; 21 | case 1: 22 | _act= "载货-"; 23 | break; 24 | case 2: 25 | _act= "卸货-"; 26 | break; 27 | default: 28 | _act= "unknown-"; 29 | break; 30 | } 31 | 32 | switch (m_actStatus) 33 | { 34 | case ActSta_None: 35 | _actStatus = "未执行"; 36 | break; 37 | case ActSta_Exe: 38 | _actStatus = "正在执行"; 39 | break; 40 | case ActSta_Fin: 41 | _actStatus = "已执行完成"; 42 | break; 43 | default: 44 | _actStatus = "unknown"; 45 | break; 46 | } 47 | 48 | return _act + _actStatus; 49 | } 50 | -------------------------------------------------------------------------------- /LiftingAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "LiftingAgv.h" 2 | 3 | LiftingAgv::LiftingAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : SubmersibleAgv(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | 12 | std::string LiftingAgv::GetActionName() const 13 | { 14 | std::string _act= "unknown-",_actStatus = "unknown"; 15 | 16 | switch(m_action) 17 | { 18 | case 0: 19 | _act= "无动作-"; 20 | break; 21 | case 1: 22 | _act= "顶升-"; 23 | break; 24 | case 2: 25 | _act= "下落-"; 26 | break; 27 | default: 28 | _act= "unknown-"; 29 | break; 30 | } 31 | 32 | switch (m_actStatus) 33 | { 34 | case ActSta_None: 35 | _actStatus = "未执行"; 36 | break; 37 | case ActSta_Exe: 38 | _actStatus = "正在执行"; 39 | break; 40 | case ActSta_Fin: 41 | _actStatus = "已执行完成"; 42 | break; 43 | default: 44 | _actStatus = "unknown"; 45 | break; 46 | } 47 | 48 | return _act + _actStatus; 49 | } 50 | -------------------------------------------------------------------------------- /TransferAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "TransferAgv.h" 2 | 3 | TransferAgv::TransferAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : AgvBase(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | 12 | AgvBase::CmdErr TransferAgv::Reversals() 13 | { 14 | return Action(1); 15 | } 16 | 17 | AgvBase::CmdErr TransferAgv::Corotation() 18 | { 19 | return Action(2); 20 | } 21 | 22 | std::string TransferAgv::GetActionName() const 23 | { 24 | std::string _act= "unknown-",_actStatus = "unknown"; 25 | 26 | switch(m_action) 27 | { 28 | case 0: 29 | _act= "无动作-"; 30 | break; 31 | case 1: 32 | _act= "电机正转-"; 33 | break; 34 | case 2: 35 | _act= "电机反转-"; 36 | break; 37 | default: 38 | _act= "unknown-"; 39 | break; 40 | } 41 | 42 | switch (m_actStatus) 43 | { 44 | case ActSta_None: 45 | _actStatus = "未执行"; 46 | break; 47 | case ActSta_Exe: 48 | _actStatus = "正在执行"; 49 | break; 50 | case ActSta_Fin: 51 | _actStatus = "已执行完成"; 52 | break; 53 | default: 54 | _actStatus = "unknown"; 55 | break; 56 | } 57 | 58 | return _act + _actStatus; 59 | } 60 | -------------------------------------------------------------------------------- /SubmersibleAgv.cpp: -------------------------------------------------------------------------------- 1 | #include "SubmersibleAgv.h" 2 | 3 | SubmersibleAgv::SubmersibleAgv(const AgvType& _type,const AId_t& _id, 4 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 5 | const QString& _localAddr,const unsigned short& _localPort, 6 | QObject *parent) 7 | : AgvBase(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort,parent) 8 | { 9 | 10 | } 11 | 12 | AgvBase::CmdErr SubmersibleAgv::Up() 13 | { 14 | return Action(1); 15 | } 16 | 17 | AgvBase::CmdErr SubmersibleAgv::Down() 18 | { 19 | return Action(2); 20 | } 21 | 22 | std::string SubmersibleAgv::GetActionName() const 23 | { 24 | std::string _act= "unknown-",_actStatus = "unknown"; 25 | 26 | switch(m_action) 27 | { 28 | case 0: 29 | _act= "无动作-"; 30 | break; 31 | case 1: 32 | _act= "升降杆上升-"; 33 | break; 34 | case 2: 35 | _act= "升降杆下降-"; 36 | break; 37 | default: 38 | _act= "unknown-"; 39 | break; 40 | } 41 | 42 | switch (m_actStatus) 43 | { 44 | case ActSta_None: 45 | _actStatus = "未执行"; 46 | break; 47 | case ActSta_Exe: 48 | _actStatus = "正在执行"; 49 | break; 50 | case ActSta_Fin: 51 | _actStatus = "已执行完成"; 52 | break; 53 | default: 54 | _actStatus = "unknown"; 55 | break; 56 | } 57 | 58 | return _act + _actStatus; 59 | } 60 | -------------------------------------------------------------------------------- /IntelligentAGVSchedulingSystem.pro: -------------------------------------------------------------------------------- 1 | QT += core gui network 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++11 6 | 7 | # The following define makes your compiler emit warnings if you use 8 | # any Qt feature that has been marked deprecated (the exact warnings 9 | # depend on your compiler). Please consult the documentation of the 10 | # deprecated API in order to know how to port your code away from it. 11 | DEFINES += QT_DEPRECATED_WARNINGS 12 | 13 | # You can also make your code fail to compile if it uses deprecated APIs. 14 | # In order to do so, uncomment the following line. 15 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 16 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 17 | 18 | SOURCES += \ 19 | AgvBase.cpp \ 20 | ArmAgv.cpp \ 21 | ForkAgv.cpp \ 22 | LiftingAgv.cpp \ 23 | ProtocolBase.cpp \ 24 | ProtocolPlc.cpp \ 25 | ProtocolStm32.cpp \ 26 | PullAgv.cpp \ 27 | RfidBase.cpp \ 28 | SubmersibleAgv.cpp \ 29 | TransferAgv.cpp \ 30 | main.cpp \ 31 | mainwindow.cpp 32 | 33 | HEADERS += \ 34 | AgvBase.h \ 35 | ArmAgv.h \ 36 | ForkAgv.h \ 37 | LiftingAgv.h \ 38 | ProtocolBase.h \ 39 | ProtocolPlc.h \ 40 | ProtocolStm32.h \ 41 | PullAgv.h \ 42 | RfidBase.h \ 43 | SubmersibleAgv.h \ 44 | TransferAgv.h \ 45 | mainwindow.h 46 | 47 | FORMS += \ 48 | mainwindow.ui 49 | 50 | # Default rules for deployment. 51 | qnx: target.path = /tmp/$${TARGET}/bin 52 | else: unix:!android: target.path = /opt/$${TARGET}/bin 53 | !isEmpty(target.path): INSTALLS += target 54 | 55 | DISTFILES += \ 56 | ../../Document/3206c6b60775ba2f86cc0aaf13fcda8.png \ 57 | Document/IntelligentAGVSchedulingSystem.mdj \ 58 | Document/仓库平面布局图(2.3横梁不含一区货架)V3.0-20191021.dwg \ 59 | Document/分布式智能AGV调度系统通信协议.docx 60 | -------------------------------------------------------------------------------- /ProtocolBase.cpp: -------------------------------------------------------------------------------- 1 | #include "ProtocolBase.h" 2 | 3 | unsigned char ProtocolBase::auchCRCHi[] = 4 | { 5 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0, 6 | 7 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41, 8 | 9 | 0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0, 10 | 11 | 0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40, 12 | 13 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1, 14 | 15 | 0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41, 16 | 17 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1, 18 | 19 | 0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41, 20 | 21 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0, 22 | 23 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40, 24 | 25 | 0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1, 26 | 27 | 0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40, 28 | 29 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0, 30 | 31 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40, 32 | 33 | 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0, 34 | 35 | 0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40, 36 | 37 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0, 38 | 39 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41, 40 | 41 | 0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0, 42 | 43 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41, 44 | 45 | 0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0, 46 | 47 | 0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40, 48 | 49 | 0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1, 50 | 51 | 0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41, 52 | 53 | 0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0, 54 | 55 | 0x80,0x41,0x00,0xC1,0x81,0x40 56 | }; 57 | 58 | unsigned char ProtocolBase::auchCRCLo[] = 59 | { 60 | 0x00,0xC0,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06, 61 | 62 | 0x07,0xC7,0x05,0xC5,0xC4,0x04,0xCC,0x0C,0x0D,0xCD, 63 | 64 | 0x0F,0xCF,0xCE,0x0E,0x0A,0xCA,0xCB,0x0B,0xC9,0x09, 65 | 66 | 0x08,0xC8,0xD8,0x18,0x19,0xD9,0x1B,0xDB,0xDA,0x1A, 67 | 68 | 0x1E,0xDE,0xDF,0x1F,0xDD,0x1D,0x1C,0xDC,0x14,0xD4, 69 | 70 | 0xD5,0x15,0xD7,0x17,0x16,0xD6,0xD2,0x12,0x13,0xD3, 71 | 72 | 0x11,0xD1,0xD0,0x10,0xF0,0x30,0x31,0xF1,0x33,0xF3, 73 | 74 | 0xF2,0x32,0x36,0xF6,0xF7,0x37,0xF5,0x35,0x34,0xF4, 75 | 76 | 0x3C,0xFC,0xFD,0x3D,0xFF,0x3F,0x3E,0xFE,0xFA,0x3A, 77 | 78 | 0x3B,0xFB,0x39,0xF9,0xF8,0x38,0x28,0xE8,0xE9,0x29, 79 | 80 | 0xEB,0x2B,0x2A,0xEA,0xEE,0x2E,0x2F,0xEF,0x2D,0xED, 81 | 82 | 0xEC,0x2C,0xE4,0x24,0x25,0xE5,0x27,0xE7,0xE6,0x26, 83 | 84 | 0x22,0xE2,0xE3,0x23,0xE1,0x21,0x20,0xE0,0xA0,0x60, 85 | 86 | 0x61,0xA1,0x63,0xA3,0xA2,0x62,0x66,0xA6,0xA7,0x67, 87 | 88 | 0xA5,0x65,0x64,0xA4,0x6C,0xAC,0xAD,0x6D,0xAF,0x6F, 89 | 90 | 0x6E,0xAE,0xAA,0x6A,0x6B,0xAB,0x69,0xA9,0xA8,0x68, 91 | 92 | 0x78,0xB8,0xB9,0x79,0xBB,0x7B,0x7A,0xBA,0xBE,0x7E, 93 | 94 | 0x7F,0xBF,0x7D,0xBD,0xBC,0x7C,0xB4,0x74,0x75,0xB5, 95 | 96 | 0x77,0xB7,0xB6,0x76,0x72,0xB2,0xB3,0x73,0xB1,0x71, 97 | 98 | 0x70,0xB0,0x50,0x90,0x91,0x51,0x93,0x53,0x52,0x92, 99 | 100 | 0x96,0x56,0x57,0x97,0x55,0x95,0x94,0x54,0x9C,0x5C, 101 | 102 | 0x5D,0x9D,0x5F,0x9F,0x9E,0x5E,0x5A,0x9A,0x9B,0x5B, 103 | 104 | 0x99,0x59,0x58,0x98,0x88,0x48,0x49,0x89,0x4B,0x8B, 105 | 106 | 0x8A,0x4A,0x4E,0x8E,0x8F,0x4F,0x8D,0x4D,0x4C,0x8C, 107 | 108 | 0x44,0x84,0x85,0x45,0x87,0x47,0x46,0x86,0x82,0x42, 109 | 110 | 0x43,0x83,0x41,0x81,0x80,0x40 111 | }; 112 | 113 | ProtocolBase::ProtocolBase(const unsigned char& _type) 114 | { 115 | m_type = _type; 116 | } 117 | 118 | short ProtocolBase::CRC16(const char *puchMsg,unsigned int _len) 119 | { 120 | unsigned char uchCRCHi = 0xFF; 121 | unsigned char uchCRCLo = 0xFF; 122 | unsigned char uIndex; 123 | 124 | while (_len--) 125 | { 126 | uIndex = static_cast(uchCRCHi ^ *puchMsg++); 127 | uchCRCHi = uchCRCLo ^ auchCRCHi[uIndex]; 128 | uchCRCLo = auchCRCLo[uIndex]; 129 | } 130 | 131 | return static_cast(((uchCRCHi << 8) | uchCRCLo)); 132 | } 133 | 134 | unsigned char ProtocolBase::GetType() const 135 | { 136 | return m_type; 137 | } 138 | -------------------------------------------------------------------------------- /RfidBase.cpp: -------------------------------------------------------------------------------- 1 | #include "RfidBase.h" 2 | 3 | #include "AgvBase.h" 4 | 5 | RfidBase::RfidBase() 6 | { 7 | m_id = 0; 8 | m_pLocker = nullptr; 9 | m_pPeerLocker = nullptr; 10 | m_lockTime = std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 11 | } 12 | 13 | RfidBase::RfidBase(const RfidBase::Rfid_t &_no) 14 | { 15 | m_id = _no; 16 | m_pLocker = nullptr; 17 | m_pPeerLocker = nullptr; 18 | m_lockTime = std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 19 | } 20 | 21 | RfidBase::RfidBase(const RfidBase &_rfid) 22 | { 23 | m_id = _rfid.m_id; 24 | m_pLocker = _rfid.m_pLocker; 25 | m_pPeerLocker = _rfid.m_pPeerLocker; 26 | m_lockTime = _rfid.m_lockTime; 27 | } 28 | 29 | void RfidBase::operator=(const RfidBase &_rfid) 30 | { 31 | m_id = _rfid.m_id; 32 | m_pLocker = _rfid.m_pLocker; 33 | m_pPeerLocker = _rfid.m_pPeerLocker; 34 | m_lockTime = _rfid.m_lockTime; 35 | } 36 | 37 | bool RfidBase::operator==(const bool &_bool) const 38 | { 39 | if(m_id == 0) 40 | { 41 | return false == _bool; 42 | } 43 | 44 | return true == _bool; 45 | } 46 | 47 | bool RfidBase::operator!=(const bool &_bool) const 48 | { 49 | if(m_id == 0) 50 | { 51 | return false != _bool; 52 | } 53 | 54 | return true != _bool; 55 | } 56 | 57 | bool RfidBase::operator>(const RfidBase &_rfid) const 58 | { 59 | // 为0的时间为无效时间 60 | // 任何有效时间与无效时间对比 61 | // 有效时间 小于 无效时间 62 | 63 | auto _left = m_lockTime - std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 64 | auto _right = m_lockTime - std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 65 | auto _dis = std::chrono::duration_cast(m_lockTime - _rfid.m_lockTime); 66 | 67 | if(_dis.count() > 0) 68 | { 69 | // 时间对比结果,当期时间大于比对时间 70 | 71 | if(_right.count() == 0) 72 | { 73 | // 比对的时间为0,则比对时间无效,当前时间小 74 | return false; 75 | } 76 | 77 | // 比对的时间不为0,则当前时间大 78 | return true; 79 | } 80 | 81 | // 时间对比结果,当前时间小于等于比对时间 82 | if(_left.count() == 0 && _left.count()!= _right.count()) 83 | { 84 | // 当前时间为0,且当前时间与比对时间不相等,则当前时间大,比对时间小 85 | return true; 86 | } 87 | 88 | return false; 89 | } 90 | 91 | bool RfidBase::operator<(const RfidBase &_rfid) const 92 | { 93 | // 为0的时间为无效时间 94 | // 任何有效时间与无效时间对比 95 | // 有效时间 小于 无效时间 96 | 97 | auto _left = m_lockTime - std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 98 | auto _right = m_lockTime - std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 99 | auto _dis = std::chrono::duration_cast(m_lockTime - _rfid.m_lockTime); 100 | 101 | if(_dis.count() < 0) 102 | { 103 | // 时间对比结果,当期时间小于比对时间 104 | 105 | if(_left.count() == 0) 106 | { 107 | // 当前的时间为0,则比对时间小 108 | return false; 109 | } 110 | 111 | // 当前的时间不为0,则比对时间大 112 | return true; 113 | } 114 | 115 | // 时间对比结果,当前时间大于等于比对时间 116 | if(_right.count() == 0 && _left.count() != _right.count()) 117 | { 118 | // 比对时间为0,且当前时间与比对时间不相等,则比对时间大,当前时间小 119 | return true; 120 | } 121 | 122 | return false; 123 | } 124 | 125 | RfidBase::operator bool() const 126 | { 127 | if(m_id == 0) 128 | { 129 | return false; 130 | } 131 | 132 | return true; 133 | } 134 | 135 | bool RfidBase::Lock(void *_locker) 136 | { 137 | if(m_pLocker != nullptr) 138 | { 139 | if(m_pLocker != _locker) 140 | { 141 | return false; 142 | } 143 | 144 | return true; 145 | } 146 | 147 | m_pLocker = _locker; 148 | 149 | m_lockTime = std::chrono::steady_clock::now(); 150 | 151 | if(m_pPeerLocker == _locker) 152 | { 153 | Cancel(); 154 | } 155 | 156 | return true; 157 | } 158 | 159 | bool RfidBase::Free(void *_locker) 160 | { 161 | if(_locker == nullptr || m_pLocker == _locker) 162 | { 163 | m_pLocker = nullptr; 164 | m_lockTime = std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 165 | 166 | return true; 167 | } 168 | 169 | return false; 170 | } 171 | 172 | bool RfidBase::PeerLock(void *_locker) 173 | { 174 | if(m_pPeerLocker != nullptr) 175 | { 176 | if(m_pPeerLocker != _locker) 177 | { 178 | return false; 179 | } 180 | 181 | return true; 182 | } 183 | 184 | m_pPeerLocker = _locker; 185 | 186 | return true; 187 | } 188 | 189 | bool RfidBase::Cancel(void *_locker) 190 | { 191 | if(_locker == nullptr || m_pPeerLocker == _locker) 192 | { 193 | m_pPeerLocker = nullptr; 194 | 195 | return true; 196 | } 197 | 198 | return false; 199 | } 200 | 201 | void RfidBase::Clear() 202 | { 203 | m_pLocker = nullptr; 204 | m_pPeerLocker = nullptr; 205 | 206 | return; 207 | } 208 | 209 | void *RfidBase::GetLocker() const 210 | { 211 | return m_pLocker; 212 | } 213 | 214 | void *RfidBase::GetPeerLocker() const 215 | { 216 | return m_pPeerLocker; 217 | } 218 | -------------------------------------------------------------------------------- /ProtocolPlc.cpp: -------------------------------------------------------------------------------- 1 | #include "ProtocolPlc.h" 2 | 3 | const unsigned char ProtocolPlc::PACKET_HEAD = static_cast(0xBA); 4 | const unsigned char ProtocolPlc::PACKET_TAIL = static_cast(0xBE); 5 | 6 | ProtocolPlc::ProtocolPlc() : ProtocolBase(ProtocolType::Protocol_PLC) 7 | { 8 | 9 | } 10 | 11 | QByteArrayList ProtocolPlc::ProcessData(QByteArray &_data) 12 | { 13 | QByteArrayList _list; 14 | 15 | const unsigned int _sizeHead = sizeof(PACKET_HEAD); /*!< 报文头大小 */ 16 | const unsigned int _sizeTail = sizeof(PACKET_TAIL); /*!< 报文尾大小 */ 17 | const unsigned int _sizeLen = sizeof(DATA_LEN); /*!< 数据长度大小 */ 18 | const unsigned int _sizeCrc = sizeof(CRC_16); /*!< 校验码大小 */ 19 | 20 | const unsigned int MIN_PACKET_LEN = _sizeHead+_sizeLen+_sizeCrc+_sizeTail; /*!< 最小数据长度 */ 21 | 22 | const char* _begin = _data.data(); /*!< 指向数据起始位的指针 */ 23 | const unsigned int _size = static_cast(_data.size()); /*!< 数据的大小 */ 24 | const char* _last = const_cast(_begin); /*!< 指向待处理数据的指针 */ 25 | unsigned int _lastSize = _size; /*!< 待处理数据的大小 */ 26 | 27 | while(1) 28 | { 29 | if(_lastSize < MIN_PACKET_LEN) 30 | { 31 | // 待处理数据太少 32 | break; 33 | } 34 | 35 | // 1、查找报文头 36 | const char* _head = reinterpret_cast(memchr(_last,PACKET_HEAD,_lastSize)); /*!< 指向报文头的指针 */ 37 | 38 | if(_head == nullptr) 39 | { 40 | // 在数据中未找到报文头 41 | _lastSize = 0; 42 | break; 43 | } 44 | 45 | // 舍弃报文头前无效的数据 46 | _last = _head; 47 | _lastSize = _size - static_cast(_head - _begin); 48 | 49 | // 2、查找报文尾 50 | char* _tail = reinterpret_cast(memchr(_last + 1,PACKET_TAIL,_lastSize -1)); /*!< 指向报文尾的指针 */ 51 | 52 | if(_tail == nullptr) 53 | { 54 | // 在数据中未找到报文尾,数据未接收完全 55 | break; 56 | } 57 | 58 | // 3、反转义获取源数据 59 | // 3.1、获取数据内容 60 | const char* _data = _head + _sizeHead; /*!< 指向数据内容的指针 */ 61 | unsigned int _dataSzie = static_cast(_tail - _data); /*!< 数据内容的大小 */ 62 | 63 | // 4、 反转义获取源数据 64 | QByteArray _source = Decoding(_data,_dataSzie); /*!< 源数据 */ 65 | const char* _srcData = _source.data(); /*!< 指向源数据起始地址的指针 */ 66 | const unsigned int _srcSize = static_cast(_source.size()); /*!< 源数据大小 */ 67 | 68 | // 5、获取数据长度 69 | unsigned int _packetSize = 0; /*!< 报文上传的数据长度 */ 70 | // 获取报文长度 71 | for(int i = 0; i < static_cast(sizeof(DATA_LEN));++i) 72 | { 73 | _packetSize |= static_cast(*(_srcData + i) << (8 * i)); 74 | } 75 | 76 | // 7、获取数据校验码 77 | const char* _crcPtr = _srcData + (_packetSize - _sizeHead - _sizeCrc - _sizeTail); /*!< 指向报文上传的CRC校验码起始位的指针 */ 78 | CRC_16 _packetCrc =static_cast((*_crcPtr) << 8 | *(_crcPtr + 1)); /*!< 报文上传的CRC校验码 */ 79 | CRC_16 _srcCrc = CRC16(_srcData ,_srcSize - _sizeCrc); /*!< 获取数据的实际校验码 */ 80 | 81 | // 8、校验数正确性 82 | if(_srcSize + _sizeHead + _sizeTail == _packetSize && _srcCrc == _packetCrc) 83 | { 84 | // 长度与校验码校验通过校验 85 | _list.push_back(QByteArray(_srcData,static_cast(_srcSize - _sizeCrc))); 86 | } 87 | 88 | _last = _tail + sizeof(PACKET_TAIL); 89 | _lastSize = _size - static_cast(_last - _begin); 90 | } 91 | 92 | if(_lastSize > 0) 93 | { 94 | _data.clear(); 95 | _data = QByteArray(_last,static_cast(_lastSize)); 96 | } 97 | else 98 | { 99 | _data.clear(); 100 | } 101 | 102 | return _list; 103 | } 104 | 105 | QByteArray ProtocolPlc::CreatePacket(const QByteArray &_data) 106 | { 107 | const unsigned int _sizeHead = sizeof(PACKET_HEAD); /*!< 报文头大小 */ 108 | const unsigned int _sizeTail = sizeof(PACKET_TAIL); /*!< 报文尾大小 */ 109 | const unsigned int _sizeLen = sizeof(DATA_LEN); /*!< 数据长度大小 */ 110 | const unsigned int _sizeCrc = sizeof(CRC_16); /*!< 校验码大小 */ 111 | 112 | unsigned int _tmpLen = _sizeLen + static_cast(_data.size()) + _sizeCrc; /*!< 数据体长度 */ 113 | char * _packet = new char[_tmpLen]; /*!< 数据体数组 */ 114 | 115 | // 初始化数据体 116 | memset(_packet,0,_tmpLen); 117 | 118 | unsigned int _packetSize = _sizeHead + _tmpLen + _sizeTail; /*!< 数据总长度 */ 119 | 120 | // 储存数据长度 121 | for(unsigned int i = _sizeLen; i > 0; --i) 122 | { 123 | _packet[_sizeLen - i] = static_cast((_packetSize >> 8 * (i-1)) & 0xFF); 124 | } 125 | 126 | // 储存数据内容 127 | memcpy(_packet + _sizeLen,_data.data(), static_cast(_data.size())); 128 | 129 | // 获取校验码 130 | CRC_16 _crc = CRC16(_packet,_tmpLen - _sizeCrc); 131 | 132 | // 储存校验码 133 | for(unsigned int i = 1;i<= _sizeCrc;++i) 134 | { 135 | _packet[_tmpLen - i] = static_cast((_crc >> 8 * (i-1)) & 0xFF); 136 | } 137 | 138 | // 转义数据 139 | QByteArray tf = Encoding(_packet,_tmpLen); 140 | 141 | // 释放内存空间 142 | delete[] _packet; 143 | 144 | // 获取新的数据长度 145 | _packetSize = _sizeHead + _sizeTail + static_cast(tf.size()); 146 | 147 | // 创建内存空间 148 | _packet = new char[_packetSize]; 149 | 150 | // 存放报文头 151 | for(unsigned int i = _sizeHead; i > 0; --i) 152 | { 153 | _packet[_sizeHead - i] = static_cast((PACKET_HEAD >> 8 * (i-1)) & 0xFF); 154 | } 155 | 156 | // 存放数据体 157 | memcpy(_packet + _sizeHead,tf.data(), static_cast(tf.size())); 158 | 159 | // 存放报文尾 160 | for(unsigned int i = 1;i<= _sizeTail;++i) 161 | { 162 | _packet[_packetSize - i] = static_cast((PACKET_TAIL >> 8 * (i-1)) & 0xFF); 163 | } 164 | 165 | QByteArray _package = QByteArray(_packet,static_cast(_packetSize)); /*!< 报文包 */ 166 | 167 | // 释放内存空间 168 | delete[] _packet; 169 | 170 | return _package; 171 | } 172 | 173 | QByteArray ProtocolPlc::Encoding(const QByteArray &_data) 174 | { 175 | return Encoding(_data.data(),static_cast(_data.size())); 176 | } 177 | 178 | QByteArray ProtocolPlc::Encoding(const char *_data, const size_t &_size) 179 | { 180 | char* _encode = new char[_size * 2]; 181 | 182 | size_t _len = 0; 183 | for(size_t i = 0; i < _size;++i,++_len) 184 | { 185 | switch(_data[i]) 186 | { 187 | case 0xB0: 188 | _encode[_len] = static_cast(0xB0); 189 | _encode[++_len] = 0x00; 190 | break; 191 | case 0xBA: 192 | _encode[_len] = static_cast(0xB0); 193 | _encode[++_len] = 0x02; 194 | break; 195 | case 0xBE: 196 | _encode[_len] = static_cast(0xB0); 197 | _encode[++_len] = 0x01; 198 | break; 199 | default: 200 | _encode[_len] = _data[i]; 201 | break; 202 | } 203 | } 204 | 205 | QByteArray _tf(_encode,static_cast(_len)); 206 | 207 | return _tf; 208 | } 209 | 210 | QByteArray ProtocolPlc::Decoding(const QByteArray &_data) 211 | { 212 | return Decoding(_data.data(),static_cast(_data.size())); 213 | } 214 | 215 | QByteArray ProtocolPlc::Decoding(const char *_data, const size_t &_size) 216 | { 217 | char* _decode = new char[_size]; 218 | 219 | size_t _len = 0; 220 | for(size_t i = 0; i < _size;++i,++_len) 221 | { 222 | if(_data[i] == static_cast(0xB0)) 223 | { 224 | switch(_data[++i]) 225 | { 226 | case 0x00: 227 | _decode[_len] = static_cast(0xB0); 228 | break; 229 | case 0x01: 230 | _decode[_len] = static_cast(0xBA); 231 | break; 232 | case 0x02: 233 | _decode[_len] = static_cast(0xBE); 234 | break; 235 | } 236 | } 237 | else 238 | { 239 | _decode[_len] = _data[i]; 240 | } 241 | } 242 | 243 | QByteArray _src(_decode,static_cast(_len)); 244 | 245 | return _src; 246 | } 247 | -------------------------------------------------------------------------------- /ProtocolStm32.cpp: -------------------------------------------------------------------------------- 1 | #include "ProtocolStm32.h" 2 | 3 | #include 4 | 5 | const unsigned char ProtocolStm32::PACKET_HEAD = static_cast(0xBA); 6 | const unsigned char ProtocolStm32::PACKET_TAIL = static_cast(0xBE); 7 | 8 | ProtocolStm32::ProtocolStm32() : ProtocolBase(ProtocolType::Protocol_STM32) 9 | { 10 | 11 | } 12 | 13 | QByteArrayList ProtocolStm32::ProcessData(QByteArray &_data) 14 | { 15 | QByteArrayList _list; 16 | 17 | const unsigned int _sizeHead = sizeof(PACKET_HEAD); /*!< 报文头大小 */ 18 | const unsigned int _sizeTail = sizeof(PACKET_TAIL); /*!< 报文尾大小 */ 19 | const unsigned int _sizeLen = sizeof(DATA_LEN); /*!< 数据长度大小 */ 20 | const unsigned int _sizeCrc = sizeof(CRC_16); /*!< 校验码大小 */ 21 | 22 | const unsigned int MIN_PACKET_LEN = _sizeHead+_sizeLen+_sizeCrc+_sizeTail; /*!< 最小数据长度 */ 23 | 24 | const char* _begin = _data.data(); /*!< 指向数据起始位的指针 */ 25 | const unsigned int _size = static_cast(_data.size()); /*!< 数据的大小 */ 26 | const char* _last = const_cast(_begin); /*!< 指向待处理数据的指针 */ 27 | unsigned int _lastSize = _size; /*!< 待处理数据的大小 */ 28 | 29 | while(1) 30 | { 31 | if(_lastSize < MIN_PACKET_LEN) 32 | { 33 | // 待处理数据太少 34 | break; 35 | } 36 | 37 | // 1、查找报文头 38 | const char* _head = reinterpret_cast(memchr(_last,PACKET_HEAD,_lastSize)); /*!< 指向报文头的指针 */ 39 | 40 | if(_head == nullptr) 41 | { 42 | // 在数据中未找到报文头 43 | _lastSize = 0; 44 | break; 45 | } 46 | 47 | // 舍弃报文头前无效的数据 48 | _last = _head; 49 | _lastSize = _size - static_cast(_head - _begin); 50 | 51 | // 2、查找报文尾 52 | char* _tail = reinterpret_cast(memchr(_last + 1,PACKET_TAIL,_lastSize -1)); /*!< 指向报文尾的指针 */ 53 | 54 | if(_tail == nullptr) 55 | { 56 | // 在数据中未找到报文尾,数据未接收完全 57 | break; 58 | } 59 | 60 | // 3、反转义获取源数据 61 | // 3.1、获取数据内容 62 | const char* _data = _head + _sizeHead; /*!< 指向数据内容的指针 */ 63 | unsigned int _dataSzie = static_cast(_tail - _data); /*!< 数据内容的大小 */ 64 | 65 | // 4、 反转义获取源数据 66 | QByteArray _source = Decoding(_data,_dataSzie); /*!< 源数据 */ 67 | const char* _srcData = _source.data(); /*!< 指向源数据起始地址的指针 */ 68 | const unsigned int _srcSize = static_cast(_source.size()); /*!< 源数据大小 */ 69 | 70 | // 5、获取数据长度 71 | unsigned int _packetSize = 0; /*!< 报文上传的数据长度 */ 72 | // 获取报文长度 73 | for(int i = 0; i < static_cast(sizeof(DATA_LEN));++i) 74 | { 75 | _packetSize |= static_cast(*(_srcData + i) << (8 * i)); 76 | } 77 | 78 | // 7、获取数据校验码 79 | const char* _crcPtr = _srcData + (_packetSize - _sizeHead - _sizeCrc - _sizeTail); /*!< 指向报文上传的CRC校验码起始位的指针 */ 80 | CRC_16 _packetCrc =static_cast((*_crcPtr) << 8 | *(_crcPtr + 1)); /*!< 报文上传的CRC校验码 */ 81 | CRC_16 _srcCrc = CRC16(_srcData ,_srcSize - _sizeCrc); /*!< 获取数据的实际校验码 */ 82 | 83 | // 8、校验数正确性 84 | if(_srcSize + _sizeHead + _sizeTail == _packetSize && _srcCrc == _packetCrc) 85 | { 86 | // 长度与校验码校验通过校验 87 | _list.push_back(QByteArray(_srcData,static_cast(_srcSize - _sizeCrc))); 88 | } 89 | 90 | _last = _tail + sizeof(PACKET_TAIL); 91 | _lastSize = _size - static_cast(_last - _begin); 92 | } 93 | 94 | if(_lastSize > 0) 95 | { 96 | _data.clear(); 97 | _data = QByteArray(_last,static_cast(_lastSize)); 98 | } 99 | else 100 | { 101 | _data.clear(); 102 | } 103 | 104 | return _list; 105 | } 106 | 107 | QByteArray ProtocolStm32::CreatePacket(const QByteArray &_data) 108 | { 109 | const unsigned int _sizeHead = sizeof(PACKET_HEAD); /*!< 报文头大小 */ 110 | const unsigned int _sizeTail = sizeof(PACKET_TAIL); /*!< 报文尾大小 */ 111 | const unsigned int _sizeLen = sizeof(DATA_LEN); /*!< 数据长度大小 */ 112 | const unsigned int _sizeCrc = sizeof(CRC_16); /*!< 校验码大小 */ 113 | 114 | unsigned int _tmpLen = _sizeLen + static_cast(_data.size()) + _sizeCrc; /*!< 数据体长度 */ 115 | char * _packet = new char[_tmpLen]; /*!< 数据体数组 */ 116 | 117 | // 初始化数据体 118 | memset(_packet,0,_tmpLen); 119 | 120 | unsigned int _packetSize = _sizeHead + _tmpLen + _sizeTail; /*!< 数据总长度 */ 121 | 122 | // 储存数据长度 123 | for(unsigned int i = _sizeLen; i > 0; --i) 124 | { 125 | _packet[_sizeLen - i] = static_cast((_packetSize >> 8 * (i-1)) & 0xFF); 126 | } 127 | 128 | // 储存数据内容 129 | memcpy(_packet + _sizeLen,_data.data(), static_cast(_data.size())); 130 | 131 | // 获取校验码 132 | CRC_16 _crc = CRC16(_packet,_tmpLen - _sizeCrc); 133 | 134 | // 储存校验码 135 | for(unsigned int i = 1;i<= _sizeCrc;++i) 136 | { 137 | _packet[_tmpLen - i] = static_cast((_crc >> 8 * (i-1)) & 0xFF); 138 | } 139 | 140 | // 转义数据 141 | QByteArray tf = Encoding(_packet,_tmpLen); 142 | 143 | // 释放内存空间 144 | delete[] _packet; 145 | 146 | // 获取新的数据长度 147 | _packetSize = _sizeHead + _sizeTail + static_cast(tf.size()); 148 | 149 | // 创建内存空间 150 | _packet = new char[_packetSize]; 151 | 152 | // 存放报文头 153 | for(unsigned int i = _sizeHead; i > 0; --i) 154 | { 155 | _packet[_sizeHead - i] = static_cast((PACKET_HEAD >> 8 * (i-1)) & 0xFF); 156 | } 157 | 158 | // 存放数据体 159 | memcpy(_packet + _sizeHead,tf.data(), static_cast(tf.size())); 160 | 161 | // 存放报文尾 162 | for(unsigned int i = 1;i<= _sizeTail;++i) 163 | { 164 | _packet[_packetSize - i] = static_cast((PACKET_TAIL >> 8 * (i-1)) & 0xFF); 165 | } 166 | 167 | QByteArray _package = QByteArray(_packet,static_cast(_packetSize)); /*!< 报文包 */ 168 | 169 | // 释放内存空间 170 | delete[] _packet; 171 | 172 | return _package; 173 | } 174 | 175 | QByteArray ProtocolStm32::Encoding(const QByteArray &_data) 176 | { 177 | return Encoding(_data.data(),static_cast(_data.size())); 178 | } 179 | 180 | QByteArray ProtocolStm32::Encoding(const char *_data, const size_t &_size) 181 | { 182 | char* _encode = new char[_size * 2]; 183 | 184 | size_t _len = 0; 185 | for(size_t i = 0; i < _size;++i,++_len) 186 | { 187 | switch(_data[i]) 188 | { 189 | case 0xB0: 190 | _encode[_len] = static_cast(0xB0); 191 | _encode[++_len] = 0x00; 192 | break; 193 | case 0xBA: 194 | _encode[_len] = static_cast(0xB0); 195 | _encode[++_len] = 0x02; 196 | break; 197 | case 0xBE: 198 | _encode[_len] = static_cast(0xB0); 199 | _encode[++_len] = 0x01; 200 | break; 201 | default: 202 | _encode[_len] = _data[i]; 203 | break; 204 | } 205 | } 206 | 207 | QByteArray _tf(_encode,static_cast(_len)); 208 | 209 | return _tf; 210 | } 211 | 212 | QByteArray ProtocolStm32::Decoding(const QByteArray &_data) 213 | { 214 | return Decoding(_data.data(),static_cast(_data.size())); 215 | } 216 | 217 | QByteArray ProtocolStm32::Decoding(const char *_data, const size_t &_size) 218 | { 219 | char* _decode = new char[_size]; 220 | 221 | size_t _len = 0; 222 | for(size_t i = 0; i < _size;++i,++_len) 223 | { 224 | if(_data[i] == static_cast(0xB0)) 225 | { 226 | switch(_data[++i]) 227 | { 228 | case 0x00: 229 | _decode[_len] = static_cast(0xB0); 230 | break; 231 | case 0x01: 232 | _decode[_len] = static_cast(0xBA); 233 | break; 234 | case 0x02: 235 | _decode[_len] = static_cast(0xBE); 236 | break; 237 | } 238 | } 239 | else 240 | { 241 | _decode[_len] = _data[i]; 242 | } 243 | } 244 | 245 | QByteArray _src(_decode,static_cast(_len)); 246 | 247 | return _src; 248 | } 249 | -------------------------------------------------------------------------------- /AgvBase.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * @file AgvBase 3 | * @brief 描述AGV基本属性信息与功能的文件 4 | * @date 2019-10-16 5 | * @author Fankaiyu 6 | * @version 2.0 7 | */ 8 | #ifndef AGVBASE_H 9 | #define AGVBASE_H 10 | 11 | #include 12 | #include 13 | #include 14 | #include "ProtocolStm32.h" 15 | #include "ProtocolPlc.h" 16 | #include "RfidBase.h" 17 | 18 | /*! 19 | * @brief 描述AGV类型信息的结构体 20 | * @date 2019-10-16 21 | */ 22 | struct AgvType 23 | { 24 | public: 25 | AgvType(const std::string& _name,ProtocolBase& _protocol,const unsigned char& _type,const float& _speed, 26 | const float& _weright = 0.0f,const std::string& _brand = "",const std::string& _version = ""); 27 | AgvType(const AgvType& _type); 28 | ~AgvType(); 29 | 30 | public: 31 | operator bool() const; 32 | bool operator== (const bool& _bool) const; 33 | void operator=(const AgvType& _type); 34 | /*! 35 | * @brief 判断是否为有效类型 36 | * @return bool 类型参数有效返回true,否则返回false 37 | */ 38 | bool IsNull() const; 39 | 40 | public: 41 | std::string m_name; /*!< 名称 */ 42 | std::string m_brand; /*!< 品牌 */ 43 | std::string m_version; /*!< 型号 */ 44 | unsigned char m_type; /*!< 类型 */ 45 | float m_maxSpeed; /*!< 最大速度:单位(m/min) */ 46 | float m_maxWeight; /*!< 最大载重量:单位(kg) */ 47 | ProtocolBase* m_pProtocol; /*!< 通信协议 */ 48 | 49 | public: 50 | /*! @brief 描述AGV功能的枚举 */ 51 | enum AgvAbility 52 | { 53 | Type_Transfer = 1, /*!< 移载式AGV */ 54 | Type_Lifting, /*!< 举升式AGV */ 55 | Type_Pull, /*!< 牵引式AGV */ 56 | Type_Submersible, /*!< 潜入式AGV */ 57 | Type_Arm, /*!< 机械臂式AGV */ 58 | Type_Fork, /*!< 叉车式AGV */ 59 | }; 60 | }; 61 | 62 | /*! 63 | * @class AgvBase 64 | * @brief 描述AGV基本属性信息与功能的类 65 | * @date 2019-10-16 66 | */ 67 | class AgvBase : public QObject 68 | { 69 | Q_OBJECT 70 | public: 71 | typedef unsigned short AId_t; 72 | typedef unsigned char AMode_t; 73 | typedef unsigned char AStatus_t; 74 | typedef char ASpeed_t; 75 | typedef unsigned char ABattery_t; 76 | typedef unsigned char ACargo_t; 77 | typedef char AError_t; 78 | typedef unsigned char AAction_t; 79 | typedef unsigned char AActStatus_t; 80 | typedef unsigned char CmdErr; 81 | 82 | public: 83 | explicit AgvBase(const AgvType& _type,const AId_t& _id, 84 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 85 | const QString& _localAddr = "",const unsigned short& _localPort = 0, 86 | QObject *parent = nullptr); 87 | ~AgvBase(); 88 | 89 | protected: 90 | const AgvType* m_pType; /*!< 类型 */ 91 | AId_t m_id; /*!< 编号 */ 92 | 93 | protected: 94 | AMode_t m_mode; /*!< 模式 */ 95 | AStatus_t m_status; /*!< 状态 */ 96 | ASpeed_t m_speed; /*!< 速度:单位(%),正向移动式速度为正数,反向移动时速度为负数 */ 97 | ABattery_t m_battery; /*!< 电量:单位(%) */ 98 | ACargo_t m_cargo; /*!< 载货数量 */ 99 | AError_t m_error; /*!< 异常信息,由AGV上传的异常信息 */ 100 | AError_t m_errSelf; /*!< 异常信息,系统自检测出的异常 */ 101 | 102 | protected: 103 | AAction_t m_action; /*!< 动作 */ 104 | AActStatus_t m_actStatus; /*!< 动作状态 */ 105 | std::chrono::steady_clock::time_point m_actCount; /*!< 动作计时器 */ 106 | 107 | protected: 108 | RfidBase::Rfid_t m_curRfid; /*!< 当前RFID地标卡编号 */ 109 | RfidBase::Rfid_t m_oldRfid; /*!< 历史RFID地标卡编号 */ 110 | RfidBase::Rfid_t m_endRfid; /*!< 终点RFID地标卡编号 */ 111 | RfidBase::Rfid_t m_oldEndRfid; /*!< 历史终点RFID地标卡编号 */ 112 | 113 | protected: 114 | QTcpSocket* m_pSocket; /*!< 连接客户端的Socket对象指针 */ 115 | bool m_bClient; /*!< AGV网络模块的模式 */ 116 | QString m_peerAddr; /*!< AGVIP地址 */ 117 | unsigned short m_peerPort; /*!< AGV端口 */ 118 | QString m_localAddr; /*!< 本地IP地址 */ 119 | unsigned short m_localPort; /*!< 本地端口 */ 120 | QByteArray m_buf; /*!< 接受数据的缓存区 */ 121 | QByteArrayList m_listPacket; /*!< 用以储存待处理的报文 */ 122 | QThread m_thread; /*!< 用以发送数据的线程 */ 123 | QByteArrayList m_listSend; /*!< 待发送的报文列表 */ 124 | QTimer m_timer; /*!< 发送报文的时间间隔 计时器 */ 125 | 126 | protected: 127 | /*! 128 | * @brief 初始化 129 | * @param const AgvType& AGV类型 130 | * @param const unsigned short& AGV编号 131 | * @param const bool& AGV网络模块的运行模式 132 | * @param const QString& AGVIP地址 133 | * @param const unsigned short& AGV端口 134 | * @param const QString& 本地IP地址 135 | * @param const unsigned short& 本地端口 136 | * @throw string 如果AGV类型为空或AGVIP地址为空,则抛出异常 137 | */ 138 | void Initialize(const AgvType& _type,const AId_t& _id, 139 | const bool& _bClient,const QString& _peerAddr,const unsigned short& _peerPort, 140 | const QString& _localAddr = "",const unsigned short& _localPort = 0); 141 | 142 | /*! 143 | * @brief 初始化属性 144 | */ 145 | void InitAttribute(); 146 | 147 | public: 148 | /*! 149 | * @brief 获取类型信息 150 | * @return AgvType 类型信息 151 | */ 152 | AgvType GetType() const; 153 | 154 | /*! 155 | * @brief 获取编号 156 | * @return AId_t 编号 157 | */ 158 | AId_t GetID() const; 159 | 160 | public: 161 | /*! 162 | * @brief 更新模式状态 163 | * @param const AMode_t& 新的模式状态 164 | * @return bool 当模式发生改变时返回true,否则返回false 165 | */ 166 | bool UpdateMode(const AMode_t& _mode); 167 | 168 | /*! 169 | * @brief 获取模式状态信息 170 | * @return AMode_t 模式状态信息 171 | */ 172 | AMode_t GetMode() const; 173 | 174 | /*! 175 | * @brief 更新状态信息 176 | * @param const AStatus_t& 新的状态信息 177 | * @return bool 当状态发生改变时返回true,否则返回false 178 | */ 179 | bool UpdateStatus(const AStatus_t& _status); 180 | 181 | /*! 182 | * @brief 获取状态信息 183 | * @return AStatus_t 状态信息 184 | */ 185 | AStatus_t GetStatus() const; 186 | 187 | /*! 188 | * @brief 获取状态信息的说明 189 | * @return string 状态信息的说明 190 | */ 191 | std::string GetStatusText() const; 192 | 193 | /*! 194 | * @brief 更新速度信息 195 | * @param const ASpeed_t& 新的速度信息 196 | * @return bool 当速度发生改变时返回true,否则返回false 197 | */ 198 | bool UpdateSpeed(const ASpeed_t& _speed); 199 | 200 | /*! 201 | * @brief 获取速度信息 202 | * @return ASpeed_t 速度信息 203 | */ 204 | ASpeed_t GetSpeed() const; 205 | 206 | /*! 207 | * @breif 获取实际速度 208 | * @return float 实际速度值:单位m/min 209 | */ 210 | float GetActualSpeed() const; 211 | 212 | /*! 213 | * @brief 更新电量信息 214 | * @param const ABattery_t& 新的电量信息 215 | * @return bool 当电量信息发生改变时返回true,否则返回false 216 | */ 217 | bool UpdateBattery(const ABattery_t& _battery); 218 | 219 | /*! 220 | * @brief 获取电量信息 221 | * @return ABattery_t 电量信息 222 | */ 223 | ABattery_t GetBattery() const; 224 | 225 | /*! 226 | * @brief 更新载货数量信息 227 | * @param const ACargo_t& 新的载货数量信息 228 | * @return bool 当载货数量发生改变时返回true,否则返回false 229 | */ 230 | bool UpdateCargo(const ACargo_t& _cargo); 231 | 232 | /*! 233 | * @brief 获取载货数量信息 234 | * @return ACargo_t 载货数量信息 235 | */ 236 | ACargo_t GetCargo() const; 237 | 238 | /*! 239 | * @brief 更新异常信息 240 | * @param const AError_t& 新的异常信息 241 | * @return bool 当异常信息发生改变时返回true,否则返回false 242 | */ 243 | bool UpdateError(const AError_t& _error); 244 | 245 | /*! 246 | * @brief 获取异常信息 247 | * @return AError_t 异常信息 248 | */ 249 | AError_t GetError() const; 250 | 251 | /*! 252 | * @brief 获取异常信息说明 253 | * @param const AError_t& 异常信息 254 | * @return string 异常信息说明 255 | */ 256 | std::string GetErrorText(const AError_t& _error); 257 | std::string GetErrorText(); 258 | std::string GetSlefErrorText(); 259 | 260 | /*! 261 | * @brief 更新系统自检测的异常信息 262 | * @Signal 当检测到异常时发出ThrowError信号 263 | */ 264 | void UpdateErrorSelf(const AError_t& _error); 265 | 266 | public: 267 | /*! 268 | * @brief 更新动作信息 269 | * @param const AAction_t& 新的动作信息 270 | * @param const AActStatus_t& 新的动作状态信息 271 | * @return bool 当动作信息发生改变时返回true,否则返回true 272 | */ 273 | bool UpdateAction(const AAction_t& _action,const AActStatus_t& _actStatus); 274 | 275 | /*! 276 | * @brief 获取动作信息 277 | * @return AAction_t 动作信息 278 | */ 279 | AAction_t GetAction() const; 280 | 281 | /*! 282 | * @brief 获取动作状态信息 283 | * @return AActStatus_t 动作状态信息 284 | */ 285 | AActStatus_t GetActionStatus() const; 286 | 287 | /*! 288 | * @brief 获取动作已经执行的时间 289 | * @return size_t 动作执行时间:单位(ms) 290 | */ 291 | size_t GetActionExecutionTime() const; 292 | 293 | /*! 294 | * @breif 设置动作已经执行的时间 295 | * @param size_t 动作执行时间:单位(ms) 296 | */ 297 | void SetActionExecutionTime(const size_t& _time); 298 | 299 | /*! 300 | * @brief 获取动作信息 301 | * @param AAction_t& 动作信息 302 | * @param AActStatus_t& 动作状态信息 303 | * @return size_t 动作执行时间:单位(ms) 304 | */ 305 | size_t GetAction(AAction_t& _action,AActStatus_t& _actStatus) const; 306 | 307 | public: 308 | /*! 309 | * @brief 更新当前RFID地标卡信息 310 | * @param const Rfid_t& 新的当前RFID地标卡信息 311 | * @return bool 当RFID地标卡发生改变时返回true,否则返回false 312 | */ 313 | bool UpdateCurRfid(const RfidBase::Rfid_t& _rfid); 314 | 315 | /*! 316 | * @brief 获取当期RFID地标卡信息 317 | * @return Rfid_t 当前RFID地标卡信息 318 | */ 319 | RfidBase::Rfid_t GetCurRfid() const; 320 | 321 | /*! 322 | * @brief 获取历史RFID地标卡信息 323 | * @return Rfid_t 历史RFID地标卡信息 324 | */ 325 | RfidBase::Rfid_t GetOldRfid() const; 326 | 327 | /*! 328 | * @brief 更新终点RFID地标卡信息 329 | * @param const Rfid_t& 新的终点RFID地标卡信息 330 | * @return bool 当RFID地标卡发生改变时返回true,否则返回false 331 | */ 332 | bool UpdateEndRfid(const RfidBase::Rfid_t& _rfid); 333 | 334 | /*! 335 | * @brief 获取终点RFID地标卡信息 336 | * @return unsigned shortRfid_t 终点RFID地标卡信息 337 | */ 338 | RfidBase::Rfid_t GetEndRfid() const; 339 | 340 | /*! 341 | * @brief 获取历史终点RFID地标卡信息 342 | * @return Rfid_t 历史终点RFID地标卡信息 343 | */ 344 | RfidBase::Rfid_t GetOldEndRfid() const; 345 | 346 | public: 347 | /*! 348 | * @brief 将休眠的AGV唤醒 349 | * @return CmdErr 指令发送成功返回0 350 | */ 351 | CmdErr WakeUp(); 352 | 353 | /*! 354 | * @brief 将处于急停状态的AGV复位至待机状态 355 | * @return CmdErr 指令发送成功返回0 356 | */ 357 | CmdErr Reset(); 358 | 359 | /*! 360 | * @brief 将AGV恢复初始状态 361 | * @return CmdErr 指令发送成功返回0 362 | */ 363 | CmdErr Restart(); 364 | 365 | /*! 366 | * @brief 将AGV紧急停止 367 | * @return CmdErr 指令发送成功返回0 368 | */ 369 | CmdErr Scream(); 370 | 371 | /*! 372 | * @brief 将AGV休眠 373 | * @return CmdErr 指令发送成功返回0 374 | */ 375 | CmdErr Sleep(); 376 | 377 | /*! 378 | * @brief 将AGV正在进行的动作暂停 379 | * @return CmdErr 指令发送成功返回0 380 | */ 381 | CmdErr Pause(); 382 | 383 | /*! 384 | * @brief 将AGV恢复之前未完成的动作 385 | * @return CmdErr 指令发送成功返回0 386 | */ 387 | CmdErr Continue(); 388 | 389 | /*! 390 | * @brief 通过接入调度系统的其他设备,使AGV紧急停止(全线急停) 391 | * @return CmdErr 指令发送成功返回0 392 | */ 393 | CmdErr RemoteScream(); 394 | 395 | /*! 396 | * @brief 将AGV关机 397 | * @return CmdErr 指令发送成功返回0 398 | */ 399 | CmdErr Shutdown(); 400 | 401 | /*! 402 | * @brief 使AGV移动至指定的RFID地标卡 403 | * @param const unsigned short& 指定的目的地RFID地标卡 404 | * @return CmdErr 指令发送成功返回0 405 | */ 406 | CmdErr Move(const unsigned short& _rfid); 407 | 408 | /*! 409 | * @brief 允许AGV通过交通管制点 410 | * @return CmdErr 指令发送成功返回0 411 | */ 412 | CmdErr TrafficPass(); 413 | 414 | /*! 415 | * @brief 调整AGV最大速度 416 | * @param const char& AGV的最大速度 417 | * @return CmdErr 指令发送成功返回0 418 | */ 419 | CmdErr SetSpeed(const char& _speed); 420 | 421 | /*! 422 | * @brief 获取指令错误的说明 423 | * @param const CmdErr& 错误码 424 | * @return string 指令的错误说明 425 | */ 426 | std::string GetCmdError(const CmdErr& _err); 427 | 428 | /*! 429 | * @brief 停止动作 430 | * @return CmdErr 指令发生成功返回0 431 | */ 432 | CmdErr StopAction(); 433 | 434 | protected: 435 | /*! 436 | * @brief 发生心跳报文至AGV 437 | */ 438 | void Heartbeat(); 439 | 440 | /*! 441 | * @brief 发送状态控制报文 442 | * @param const unsigned char& 状态控制码 443 | */ 444 | CmdErr SetStatus(const unsigned char& _cmd); 445 | 446 | /*! 447 | * @brief 使AGV在指定的位置执行动作 448 | * @param const unsigned char& 动作码 449 | * @return CmdErr 指令发送成功返回0 450 | */ 451 | CmdErr Action(const unsigned char& _act); 452 | 453 | /*! 454 | * @brief 处理通信报文 455 | * @param const QByteArray& 待处理的报文 456 | */ 457 | void ProcessPacket(const QByteArray& _packet); 458 | 459 | protected: 460 | /*! 461 | * @brief 连接AGV 462 | * 463 | * 此时AGV网络以服务端模式运行 464 | */ 465 | void Connect(); 466 | 467 | public: 468 | /*! 469 | * @brief 连接AGV 470 | * 471 | * 此时AGV网络以客户端模式运行 472 | * @param const QTcpSocket& 客户端Socket对象 473 | * @return bool 连接成功返回true,否则返回false 474 | */ 475 | bool Connect(QTcpSocket& _socket); 476 | 477 | /*! 478 | * @brief 是否已连接AGV 479 | * @return bool 已连接返回true,否则返回false 480 | */ 481 | bool IsConnected() const; 482 | 483 | signals: 484 | /*! 485 | * @brief 当与AGV通信中断时发出此信号 486 | */ 487 | void LinkBreak(); 488 | 489 | /*! 490 | * @brief 当AGV更新时发出此信号 491 | */ 492 | void Update(); 493 | 494 | /*! 495 | * @breif 当AGV发生异常时发出此信息 496 | */ 497 | void ThrowError(); 498 | 499 | protected slots: 500 | 501 | /*! 502 | * @brief 当连接服务端成功时触发的槽函数 503 | */ 504 | void Connected(); 505 | 506 | /*! 507 | * @brief 当服务端中断时触发的槽函数 508 | */ 509 | void DisConnected(); 510 | 511 | /*! 512 | * @brief 当客户端连接失败时触发的槽函数 513 | */ 514 | void Error(); 515 | 516 | /*! 517 | * @brief 有数据读取时触发的槽函数 518 | */ 519 | void ReadData(); 520 | 521 | /*! 522 | * @brief 发送报文的槽函数 523 | */ 524 | void SendPacket(); 525 | 526 | protected: 527 | /*! @brief 描述AGV报文功能码的枚举 */ 528 | enum AgvFunc 529 | { 530 | Func_Heartbeat = 0x1F, /*!< 心跳 */ 531 | Func_Move = 0x2F, /*!< 移动控制 */ 532 | Func_Action = 0x3F, /*!< 动作控制 */ 533 | Func_Traffic = 0x4F, /*!< 交通管制控制 */ 534 | Func_Status = 0x5F, /*!< 状态控制 */ 535 | Func_Speed = 0x6F, /*!< 速度控制 */ 536 | }; 537 | 538 | /*! @brief 描述状态控制报文的状态码的枚举 */ 539 | enum CmdStatus 540 | { 541 | CmdSta_Wakeup, /*!< 唤醒 */ 542 | CmdSta_Reset, /*!< 复位 */ 543 | CmdSta_Restart, /*!< 重置 */ 544 | CmdSta_Scream, /*!< 急停 */ 545 | CmdSta_Sleep, /*!< 休眠 */ 546 | CmdSta_Pause, /*!< 暂停 */ 547 | CmdSta_Continue, /*!< 继续 */ 548 | CmdSta_RmtScream, /*!< 远程急停 */ 549 | CmdSta_Shutdown = 0xFF, /*!< 关机 */ 550 | }; 551 | public: 552 | /*! @brief 描述AGV状态的枚举 */ 553 | enum AgvStatus 554 | { 555 | Sta_Wait, /*!< 待机状态 */ 556 | Sta_Run, /*!< 运行状态 */ 557 | Sta_Stop, /*!< 停止状态 */ 558 | Sta_Scream, /*!< 急停状态:人为按下AGV上的急停按键时,AGV回复此状态 */ 559 | Sta_Find, /*!< 寻磁状态 */ 560 | Sta_ObsDonw, /*!< 非接触式避障减速 */ 561 | Sta_TrafficStop, /*!< 交通管制停止 */ 562 | Sta_Sleep, /*!< 休眠状态 */ 563 | Sta_Charging, /*!< 充电状态 */ 564 | Sta_RemoteScream, /*!< 远程急停:系统通过指令使AGV急停时,AGV回复此状态 */ 565 | Sta_AllScream, /*!< 全线急停:使用其他设备上的急停按键使AGV急停时,AGV回复此状态 */ 566 | Sta_SpeedUp, /*!< 加速状态 */ 567 | Sta_SpeedDown, /*!< 减速状态 */ 568 | Sta_Pause, /*!< 暂停状态 */ 569 | }; 570 | 571 | /*! @brief 描述AGV异常信息的枚举 */ 572 | enum AgvError 573 | { 574 | Err_Arm = -4, /*!< 机械臂异常 */ 575 | Err_Roller, /*!< 辊筒异常 */ 576 | Err_Lifter, /*!< 升降杆异常 */ 577 | Err_Net, /*!< 网络异常 */ 578 | Err_None, /*!< 无异常 */ 579 | Err_Miss, /*!< 脱磁异常 */ 580 | Err_Obs, /*!< 非接触式避障停止 */ 581 | Err_Mobs, /*!< 接触式避障停止 */ 582 | }; 583 | 584 | /*! @brief 描述AGV模式的枚举 */ 585 | enum AgvMode 586 | { 587 | Mode_Hand, /*!< 手动模式 */ 588 | Mode_Auto, /*!< 自动模式 */ 589 | }; 590 | 591 | /*! @brief 描述AGV动作状态的枚举 */ 592 | enum AgvActStatus 593 | { 594 | ActSta_None, /*!< 无动作/未执行动作/动作停止 */ 595 | ActSta_Exe, /*!< 正在执行动作 */ 596 | ActSta_Fin, /*!< 动作执行完成 */ 597 | }; 598 | 599 | /*! @brief 描述AGV指令返回值的枚举 */ 600 | enum CmdError 601 | { 602 | Cmd_Success, /*!< 指令发送成功 */ 603 | Cmd_StatusErr, /*!< 状态不符合 */ 604 | Cmd_NetErr, /*!< 网络错误 */ 605 | Cmd_ActionErr, /*!< 动作错误 */ 606 | Cmd_ParamErr, /*!< 参数错误 */ 607 | //Cmd_SpeedErr, /*!< 速度错误 */ 608 | }; 609 | }; 610 | 611 | #endif // AGVBASE_H 612 | -------------------------------------------------------------------------------- /AgvBase.cpp: -------------------------------------------------------------------------------- 1 | #include "AgvBase.h" 2 | 3 | AgvBase::AgvBase(const AgvType& _type, const AId_t& _id, 4 | const bool &_bClient, const QString &_peerAddr, const unsigned short &_peerPort, 5 | const QString &_localAddr, const unsigned short &_localPort, 6 | QObject *parent): QObject(parent) 7 | { 8 | Initialize(_type,_id,_bClient,_peerAddr,_peerPort,_localAddr,_localPort); 9 | } 10 | 11 | AgvBase::~AgvBase() 12 | { 13 | if(m_pSocket) 14 | { 15 | m_pSocket->close(); 16 | 17 | m_pSocket->waitForDisconnected(-1); 18 | } 19 | 20 | m_thread.quit(); 21 | m_thread.wait(); 22 | } 23 | 24 | void AgvBase::Initialize(const AgvType& _type, const AId_t &_id, 25 | const bool &_bClient, const QString &_peerAddr, const unsigned short &_peerPort, 26 | const QString &_localAddr, const unsigned short &_localPort) 27 | { 28 | if(_type) 29 | { 30 | throw("The AGV type cannot be empty"); 31 | } 32 | 33 | if(_peerAddr.isNull() || _peerAddr.isEmpty()) 34 | { 35 | throw("The AGV ip address cannot be empty"); 36 | } 37 | 38 | this->m_pType = &_type; 39 | this->m_id = _id; 40 | 41 | this->m_pSocket = nullptr; 42 | this->m_bClient = _bClient; 43 | this->m_peerAddr = _peerAddr; 44 | this->m_peerPort = _peerPort; 45 | this->m_localAddr = _localAddr; 46 | this->m_localPort = _localPort; 47 | 48 | InitAttribute(); 49 | 50 | if(m_bClient == false) 51 | { 52 | Connect(); 53 | } 54 | 55 | moveToThread(&m_thread); 56 | m_thread.start(); 57 | 58 | connect(&m_timer,SIGNAL(timeout()),this,SLOT(sendPacket)); 59 | m_timer.setInterval(100); 60 | } 61 | 62 | void AgvBase::InitAttribute() 63 | { 64 | this->m_mode = Mode_Hand; 65 | this->m_status = Sta_Wait; 66 | this->m_battery = 0; 67 | this->m_speed = 0; 68 | this->m_cargo = 0; 69 | this->m_error = Err_None; 70 | 71 | this->m_action = 0; 72 | this->m_actStatus = 0; 73 | this->m_actCount = std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 74 | 75 | this->m_curRfid = 0; 76 | this->m_endRfid = 0; 77 | this->m_oldRfid = m_curRfid; 78 | this->m_oldEndRfid = m_endRfid; 79 | } 80 | 81 | AgvType AgvBase::GetType() const 82 | { 83 | return *m_pType; 84 | } 85 | 86 | AgvBase::AId_t AgvBase::GetID() const 87 | { 88 | return m_id; 89 | } 90 | 91 | bool AgvBase::UpdateMode(const AMode_t &_mode) 92 | { 93 | if(m_mode != _mode) 94 | { 95 | m_mode = _mode; 96 | return true; 97 | } 98 | 99 | return false; 100 | } 101 | 102 | AgvBase::AMode_t AgvBase::GetMode() const 103 | { 104 | return m_mode; 105 | } 106 | 107 | bool AgvBase::UpdateStatus(const AStatus_t &_status) 108 | { 109 | if(m_status != _status) 110 | { 111 | m_status = _status; 112 | return true; 113 | } 114 | 115 | return false; 116 | } 117 | 118 | AgvBase::AStatus_t AgvBase::GetStatus() const 119 | { 120 | return m_status; 121 | } 122 | 123 | std::string AgvBase::GetStatusText() const 124 | { 125 | std::string _str = "unknown"; 126 | 127 | switch (m_status) 128 | { 129 | case Sta_Wait: 130 | _str = "待机"; 131 | break; 132 | case Sta_Run: 133 | _str = "运行"; 134 | break; 135 | case Sta_Stop: 136 | _str = "停止"; 137 | break; 138 | case Sta_Scream: 139 | _str = "急停"; 140 | break; 141 | case Sta_ObsDonw: 142 | _str = "检测到障碍物,减速行驶"; 143 | break; 144 | case Sta_Find: 145 | _str = "寻磁中"; 146 | break; 147 | case Sta_Pause: 148 | _str = "暂停"; 149 | break; 150 | case Sta_Sleep: 151 | _str = "休眠"; 152 | break; 153 | case Sta_SpeedUp: 154 | _str = "加速行驶"; 155 | break; 156 | case Sta_SpeedDown: 157 | _str = "减速行驶"; 158 | break; 159 | case Sta_Charging: 160 | _str = "充电中"; 161 | break; 162 | case Sta_AllScream: 163 | _str = "急停"; 164 | break; 165 | case Sta_TrafficStop: 166 | _str = "交通管制中"; 167 | break; 168 | case Sta_RemoteScream: 169 | _str = "急停"; 170 | break; 171 | default: 172 | _str = "unknown"; 173 | break; 174 | } 175 | 176 | return _str; 177 | } 178 | 179 | bool AgvBase::UpdateSpeed(const ASpeed_t &_speed) 180 | { 181 | if(m_speed != _speed) 182 | { 183 | m_speed = _speed; 184 | return true; 185 | } 186 | 187 | return false; 188 | } 189 | 190 | AgvBase::ASpeed_t AgvBase::GetSpeed() const 191 | { 192 | return m_speed; 193 | } 194 | 195 | float AgvBase::GetActualSpeed() const 196 | { 197 | if(m_pType == nullptr) 198 | { 199 | return 0.0f; 200 | } 201 | 202 | return m_speed * m_pType->m_maxSpeed; 203 | } 204 | 205 | bool AgvBase::UpdateBattery(const ABattery_t& _battery) 206 | { 207 | if(m_battery != _battery) 208 | { 209 | m_battery = _battery; 210 | return true; 211 | } 212 | 213 | return false; 214 | } 215 | 216 | AgvBase::ABattery_t AgvBase::GetBattery() const 217 | { 218 | return m_battery; 219 | } 220 | 221 | bool AgvBase::UpdateCargo(const ACargo_t &_cargo) 222 | { 223 | if(m_cargo != _cargo) 224 | { 225 | m_cargo = _cargo; 226 | return true; 227 | } 228 | 229 | return false; 230 | } 231 | 232 | AgvBase::ACargo_t AgvBase::GetCargo() const 233 | { 234 | return m_cargo; 235 | } 236 | 237 | bool AgvBase::UpdateError(const AgvBase::AError_t& _error) 238 | { 239 | if(m_error != _error) 240 | { 241 | m_error = _error; 242 | 243 | if(m_error != Err_None) 244 | { 245 | emit ThrowError(); 246 | } 247 | 248 | return true; 249 | } 250 | 251 | return false; 252 | } 253 | 254 | AgvBase::AError_t AgvBase::GetError() const 255 | { 256 | return m_error; 257 | } 258 | 259 | std::string AgvBase::GetErrorText(const AgvBase::AError_t &_error) 260 | { 261 | std::string _str = "unknown"; 262 | switch(_error) 263 | { 264 | case Err_Arm: 265 | _str = "机械臂超时未完成动作"; 266 | break; 267 | case Err_Net: 268 | _str = "与AGV的连接异常中断"; 269 | break; 270 | case Err_Obs: 271 | _str = "检测到移动路线上存在未知障碍物造成AGV停止移动"; 272 | break; 273 | case Err_Miss: 274 | _str = "寻磁超时造成AGV停止移动"; 275 | break; 276 | case Err_Mobs: 277 | _str = "碰撞到未知障碍物造成AGV停止移动"; 278 | break; 279 | case Err_None: 280 | _str = "无异常"; 281 | break; 282 | case Err_Lifter: 283 | _str = "升降杆超时未完成动作"; 284 | break; 285 | case Err_Roller: 286 | _str = "辊筒超时未完成动作"; 287 | break; 288 | default: 289 | _str = "unknown"; 290 | break; 291 | } 292 | 293 | return _str; 294 | } 295 | 296 | std::string AgvBase::GetErrorText() 297 | { 298 | return GetErrorText(m_error); 299 | } 300 | 301 | std::string AgvBase::GetSlefErrorText() 302 | { 303 | return GetErrorText(m_errSelf); 304 | } 305 | 306 | void AgvBase::UpdateErrorSelf(const AgvBase::AError_t &_error) 307 | { 308 | if(m_errSelf != _error) 309 | { 310 | m_errSelf = _error; 311 | 312 | if(m_errSelf != Err_None) 313 | { 314 | emit ThrowError(); 315 | } 316 | 317 | return; 318 | } 319 | 320 | return; 321 | } 322 | 323 | bool AgvBase::UpdateAction(const AAction_t &_action, const AActStatus_t &_actStatus) 324 | { 325 | bool _update = false; 326 | 327 | if(m_action != _action) 328 | { 329 | m_action = _action; 330 | 331 | _update = true; 332 | } 333 | 334 | if(m_actStatus != _actStatus) 335 | { 336 | m_actStatus = _actStatus; 337 | 338 | _update = true; 339 | } 340 | 341 | if(m_actStatus == ActSta_Exe) 342 | { 343 | m_actCount = std::chrono::steady_clock::now(); 344 | } 345 | else 346 | { 347 | m_actCount = std::chrono::steady_clock::time_point(std::chrono::steady_clock::duration::zero()); 348 | } 349 | 350 | return _update; 351 | } 352 | 353 | AgvBase::AAction_t AgvBase::GetAction() const 354 | { 355 | return m_action; 356 | } 357 | 358 | AgvBase::AActStatus_t AgvBase::GetActionStatus() const 359 | { 360 | return m_actStatus; 361 | } 362 | 363 | size_t AgvBase::GetActionExecutionTime() const 364 | { 365 | if(m_actStatus == ActSta_Exe) 366 | { 367 | auto _dis = std::chrono::duration_cast(std::chrono::steady_clock::now() - m_actCount); 368 | 369 | long long _dis_t = _dis.count(); 370 | 371 | if(_dis_t <= 0) 372 | { 373 | return 0; 374 | } 375 | 376 | return static_cast(_dis_t); 377 | } 378 | 379 | return 0; 380 | } 381 | 382 | void AgvBase::SetActionExecutionTime(const size_t& _time) 383 | { 384 | m_actCount = std::chrono::steady_clock::now() - std::chrono::milliseconds(_time); 385 | 386 | return; 387 | } 388 | 389 | size_t AgvBase::GetAction(AAction_t &_action, AActStatus_t &_actStatus) const 390 | { 391 | _action = m_action; 392 | _actStatus = m_actStatus; 393 | 394 | return GetActionExecutionTime(); 395 | } 396 | 397 | bool AgvBase::UpdateCurRfid(const RfidBase::Rfid_t &_rfid) 398 | { 399 | if(m_curRfid != _rfid) 400 | { 401 | m_oldRfid = m_curRfid; 402 | m_curRfid = _rfid; 403 | 404 | return true; 405 | } 406 | 407 | return false; 408 | } 409 | 410 | RfidBase::Rfid_t AgvBase::GetCurRfid() const 411 | { 412 | return m_curRfid; 413 | } 414 | 415 | RfidBase::Rfid_t AgvBase::GetOldRfid() const 416 | { 417 | return m_oldRfid; 418 | } 419 | 420 | bool AgvBase::UpdateEndRfid(const RfidBase::Rfid_t &_rfid) 421 | { 422 | if(m_endRfid != _rfid) 423 | { 424 | m_oldEndRfid = m_endRfid; 425 | m_endRfid = _rfid; 426 | 427 | return true; 428 | } 429 | 430 | return false; 431 | } 432 | 433 | RfidBase::Rfid_t AgvBase::GetEndRfid() const 434 | { 435 | return m_endRfid; 436 | } 437 | 438 | RfidBase::Rfid_t AgvBase::GetOldEndRfid() const 439 | { 440 | return m_oldEndRfid; 441 | } 442 | 443 | AgvBase::CmdErr AgvBase::WakeUp() 444 | { 445 | return SetStatus(CmdSta_Wakeup); 446 | } 447 | 448 | AgvBase::CmdErr AgvBase::Reset() 449 | { 450 | return SetStatus(CmdSta_Reset); 451 | } 452 | 453 | AgvBase::CmdErr AgvBase::Restart() 454 | { 455 | return SetStatus(CmdSta_Restart); 456 | } 457 | 458 | AgvBase::CmdErr AgvBase::Scream() 459 | { 460 | return SetStatus(CmdSta_Scream); 461 | } 462 | 463 | AgvBase::CmdErr AgvBase::Sleep() 464 | { 465 | return SetStatus(CmdSta_Sleep); 466 | } 467 | 468 | AgvBase::CmdErr AgvBase::Pause() 469 | { 470 | return SetStatus(CmdSta_Pause); 471 | } 472 | 473 | AgvBase::CmdErr AgvBase::Continue() 474 | { 475 | return SetStatus(CmdSta_Continue); 476 | } 477 | 478 | AgvBase::CmdErr AgvBase::RemoteScream() 479 | { 480 | return SetStatus(CmdSta_RmtScream); 481 | } 482 | 483 | AgvBase::CmdErr AgvBase::Shutdown() 484 | { 485 | return SetStatus(CmdSta_Shutdown); 486 | } 487 | 488 | AgvBase::CmdErr AgvBase::Move(const unsigned short &_rfid) 489 | { 490 | if(IsConnected() == false) 491 | { 492 | // 网络未连接 493 | return Cmd_NetErr; 494 | } 495 | 496 | if(m_mode != Mode_Auto) 497 | { 498 | // 未处于自动模式 499 | return Cmd_StatusErr; 500 | } 501 | 502 | if(m_status != Sta_Wait) 503 | { 504 | // 未处于待机状态 505 | return Cmd_StatusErr; 506 | } 507 | 508 | // 编号 + 功能 + 起始RFID + 终止RFID 509 | unsigned int _size = sizeof(m_id) + 1 + sizeof(m_curRfid) * 2; /*!< 数据包大小 */ 510 | 511 | char* _packet = new char[_size]; /*!< 数据包 */ 512 | 513 | // 初始化数据包 514 | memset(_packet,0,_size); 515 | 516 | unsigned int _index = 0; /*!< 下标 */ 517 | 518 | // 编号 519 | for(unsigned int i = sizeof(m_id); i > 0;--i) 520 | { 521 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 522 | } 523 | 524 | // 功能 525 | _packet[_index++] = Func_Move; 526 | 527 | // 当前RFID地标卡 528 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 529 | { 530 | _packet[_index++] = static_cast((m_curRfid >> 8 * (i-1)) & 0xFF); 531 | } 532 | 533 | // 终止RFID地标卡 534 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 535 | { 536 | _packet[_index++] = static_cast((_rfid >> 8 * (i-1)) & 0xFF); 537 | } 538 | 539 | // 合成报文包 540 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); 541 | 542 | // 释放内存 543 | delete[] _packet; 544 | 545 | return Cmd_Success; 546 | } 547 | 548 | AgvBase::CmdErr AgvBase::TrafficPass() 549 | { 550 | if(IsConnected() == false) 551 | { 552 | // 网络未连接 553 | return Cmd_NetErr; 554 | } 555 | 556 | if(m_mode != Mode_Auto) 557 | { 558 | // 未处于自动模式 559 | return Cmd_StatusErr; 560 | } 561 | 562 | if(m_status != Sta_TrafficStop) 563 | { 564 | // 未处于交通管制停止状态 565 | return Cmd_StatusErr; 566 | } 567 | 568 | // 编号 + 功能 + 当前RFID + 命令 569 | unsigned int _size = sizeof(m_id) + 1 + sizeof(m_curRfid) + 1; /*!< 数据包大小 */ 570 | 571 | char* _packet = new char[_size]; /*!< 数据包 */ 572 | 573 | // 初始化数据包 574 | memset(_packet,0,_size); 575 | 576 | unsigned int _index = 0; /*!< 下标 */ 577 | 578 | // 编号 579 | for(unsigned int i = sizeof(m_id); i > 0;--i) 580 | { 581 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 582 | } 583 | 584 | // 功能 585 | _packet[_index++] = Func_Traffic; 586 | 587 | // 当前RFID地标卡 588 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 589 | { 590 | _packet[_index++] = static_cast((m_curRfid >> 8 * (i-1)) & 0xFF); 591 | } 592 | 593 | // 命令 594 | _packet[_index++] = 1; 595 | 596 | // 合成报文包 597 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); 598 | 599 | // 释放内存 600 | delete[] _packet; 601 | 602 | return Cmd_Success; 603 | } 604 | 605 | AgvBase::CmdErr AgvBase::SetSpeed(const char &_speed) 606 | { 607 | if(IsConnected() == false) 608 | { 609 | // 网络未连接 610 | return Cmd_NetErr; 611 | } 612 | 613 | if(m_mode != Mode_Auto) 614 | { 615 | // 未处于自动模式 616 | return Cmd_StatusErr; 617 | } 618 | 619 | if(_speed > 100 || _speed < -100) 620 | { 621 | // 速度值过大 622 | return Cmd_ParamErr; 623 | } 624 | 625 | if((m_speed > 0 && _speed <= 0) || (m_speed < 0 && _speed >= 0)) 626 | { 627 | // 不能改变当前AGV移动的方向 628 | return Cmd_ParamErr; 629 | } 630 | 631 | // 编号 + 功能 + 当前RFID + 速度 632 | unsigned int _size = sizeof(m_id) + 1 + sizeof(m_curRfid) + sizeof(m_speed); /*!< 数据包大小 */ 633 | 634 | char* _packet = new char[_size]; /*!< 数据包 */ 635 | 636 | // 初始化数据包 637 | memset(_packet,0,_size); 638 | 639 | unsigned int _index = 0; /*!< 下标 */ 640 | 641 | // 编号 642 | for(unsigned int i = sizeof(m_id); i > 0;--i) 643 | { 644 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 645 | } 646 | 647 | // 功能 648 | _packet[_index++] = Func_Speed; 649 | 650 | // 当前RFID地标卡 651 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 652 | { 653 | _packet[_index++] = static_cast((m_curRfid >> 8 * (i-1)) & 0xFF); 654 | } 655 | 656 | // 速度 657 | for(unsigned int i = sizeof(m_speed); i > 0;--i) 658 | { 659 | _packet[_index++] = static_cast((_speed >> 8 * (i-1)) & 0xFF); 660 | } 661 | 662 | // 合成报文包 663 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); 664 | 665 | // 释放内存 666 | delete[] _packet; 667 | 668 | return Cmd_Success; 669 | } 670 | 671 | std::string AgvBase::GetCmdError(const AgvBase::CmdErr &_err) 672 | { 673 | std::string _str = "unknown"; 674 | switch(_err) 675 | { 676 | case Cmd_ParamErr: 677 | _str = "指令参数错误"; 678 | break; 679 | case Cmd_Success: 680 | _str = "指令创建成功"; 681 | break; 682 | case Cmd_NetErr: 683 | _str = "网络未连接"; 684 | break; 685 | case Cmd_ActionErr: 686 | _str = "动作状态不正确"; 687 | break; 688 | case Cmd_StatusErr: 689 | _str = "状态不正确"; 690 | break; 691 | default: 692 | _str = "unknown"; 693 | break; 694 | } 695 | 696 | return _str; 697 | } 698 | 699 | AgvBase::CmdErr AgvBase::StopAction() 700 | { 701 | if(m_action == 0 || m_actStatus == ActSta_Fin) 702 | { 703 | // 无动作或动作已完成 704 | return Cmd_ActionErr; 705 | } 706 | 707 | return Action(0); 708 | } 709 | 710 | void AgvBase::Heartbeat() 711 | { 712 | if(IsConnected() == false) 713 | { 714 | // 网络未连接 715 | return; 716 | } 717 | 718 | // 类型 + 编号 + 功能码 + 模式 + 状态 + 速度 + 电量 + 当前RFID + 终点RFID + 载货数量 + 异常 + 动作 + 动作状态 719 | unsigned int _size = sizeof(m_id) + 1 + sizeof(m_mode) + sizeof(m_status) + sizeof(m_speed) + sizeof(m_battery) 720 | + sizeof(m_curRfid) + sizeof(m_endRfid) + sizeof(m_cargo) + sizeof(m_error) + sizeof(m_action) + sizeof(m_actStatus); /*!< 数据体大小 */ 721 | 722 | char _error = m_error; /*!< 当前异常信息 */ 723 | 724 | if(_error < 0) 725 | { 726 | // 当前异常是由系统自检测出的时候,异常信息不上传至AGV 727 | _error = 0; 728 | } 729 | 730 | char* _packet = new char[_size]; /*!< 数据包 */ 731 | 732 | // 初始化数据包 733 | memset(_packet,0,_size); 734 | 735 | unsigned int _index = 0; /*!< 下标 */ 736 | 737 | // 编号 738 | for(unsigned int i = sizeof(m_id); i > 0;--i) 739 | { 740 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 741 | } 742 | 743 | // 功能 744 | _packet[_index++] = Func_Heartbeat; 745 | 746 | // 类型 747 | for(unsigned int i = sizeof(m_mode); i > 0;--i) 748 | { 749 | _packet[_index++] = static_cast((m_mode >> 8 * (i-1)) & 0xFF); 750 | } 751 | 752 | // 状态 753 | for(unsigned int i = sizeof(m_status); i > 0;--i) 754 | { 755 | _packet[_index++] = static_cast((m_status >> 8 * (i-1)) & 0xFF); 756 | } 757 | 758 | // 速度 759 | for(unsigned int i = sizeof(m_speed); i > 0;--i) 760 | { 761 | _packet[_index++] = static_cast((m_speed >> 8 * (i-1)) & 0xFF); 762 | } 763 | 764 | // 电量 765 | for(unsigned int i = sizeof(m_battery); i > 0;--i) 766 | { 767 | _packet[_index++] = static_cast((m_battery >> 8 * (i-1)) & 0xFF); 768 | } 769 | 770 | // 当前RFID 771 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 772 | { 773 | _packet[_index++] = static_cast((m_curRfid >> 8 * (i-1)) & 0xFF); 774 | } 775 | 776 | // 终点RFID 777 | for(unsigned int i = sizeof(m_endRfid); i > 0;--i) 778 | { 779 | _packet[_index++] = static_cast((m_endRfid >> 8 * (i-1)) & 0xFF); 780 | } 781 | 782 | // 载货数量 783 | for(unsigned int i = sizeof(m_cargo); i > 0;--i) 784 | { 785 | _packet[_index++] = static_cast((m_cargo >> 8 * (i-1)) & 0xFF); 786 | } 787 | 788 | // 异常信息 789 | for(unsigned int i = sizeof(m_error); i > 0;--i) 790 | { 791 | _packet[_index++] = static_cast((_error >> 8 * (i-1)) & 0xFF); 792 | } 793 | 794 | // 动作信息 795 | for(unsigned int i = sizeof(m_action); i > 0;--i) 796 | { 797 | _packet[_index++] = static_cast((m_action >> 8 * (i-1)) & 0xFF); 798 | } 799 | 800 | // 动作状态 801 | for(unsigned int i = sizeof(m_actStatus); i > 0;--i) 802 | { 803 | _packet[_index++] = static_cast((m_actStatus >> 8 * (i-1)) & 0xFF); 804 | } 805 | 806 | // 合成报文包 807 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); /*!< 报文包 */ 808 | 809 | // 释放内存 810 | delete[] _packet; 811 | 812 | return; 813 | } 814 | 815 | AgvBase::CmdErr AgvBase::SetStatus(const unsigned char& _cmd) 816 | { 817 | if(IsConnected() == false) 818 | { 819 | // 网络未连接 820 | return Cmd_NetErr; 821 | } 822 | 823 | if(m_mode != Mode_Auto) 824 | { 825 | // 未处于自动模式 826 | return Cmd_StatusErr; 827 | } 828 | 829 | switch(_cmd) 830 | { 831 | case CmdSta_Pause: 832 | // 暂停 833 | if(m_status == Sta_Pause) 834 | { 835 | // 已经暂停 836 | return Cmd_StatusErr; 837 | } 838 | break; 839 | case CmdSta_Reset: 840 | // 复位 841 | if(m_status != Sta_AllScream && m_status != Sta_RemoteScream) 842 | { 843 | // 不能够复位此状态 844 | return Cmd_StatusErr; 845 | } 846 | break; 847 | case CmdSta_Sleep: 848 | // 休眠 849 | if(m_status == Sta_Sleep) 850 | { 851 | // 已经休眠 852 | return Cmd_StatusErr; 853 | } 854 | break; 855 | case CmdSta_Scream: 856 | // 急停 857 | if(m_status == Sta_AllScream || m_status == Sta_RemoteScream) 858 | { 859 | // 已经急停 860 | return Cmd_StatusErr; 861 | } 862 | break; 863 | case CmdSta_Wakeup: 864 | // 唤醒 865 | if(m_status != Sta_Sleep) 866 | { 867 | // 不能唤醒此状态 868 | return Cmd_StatusErr; 869 | } 870 | break; 871 | case CmdSta_Restart: 872 | // 重置 873 | if(m_status != Sta_Wait || m_speed != 0 || m_battery != 0 874 | || m_curRfid != 0 || m_endRfid != 0 || m_cargo != 0 || m_error != Err_None || m_action != 0 || m_actStatus != 0) 875 | { 876 | // 已经重置 877 | return Cmd_StatusErr; 878 | } 879 | break; 880 | case CmdSta_Continue: 881 | // 继续 882 | if(m_status != Sta_Pause) 883 | { 884 | // 不能继续此状态 885 | return Cmd_StatusErr; 886 | } 887 | break; 888 | case CmdSta_Shutdown: 889 | // 关机 890 | break; 891 | case CmdSta_RmtScream: 892 | // 远程急停 893 | if(m_status == Sta_AllScream || m_status == Sta_RemoteScream) 894 | { 895 | // 已经急停 896 | return Cmd_StatusErr; 897 | } 898 | break; 899 | default: 900 | // 无效的命令 901 | return Cmd_ParamErr; 902 | } 903 | 904 | // 类型 + 功能 + 命令 905 | unsigned int _size = sizeof(m_id) + 1 +sizeof(_cmd); /*!< 数据包大小 */ 906 | 907 | char* _packet = new char[_size]; /*!< 数据包 */ 908 | 909 | // 初始化数据包 910 | memset(_packet,0,_size); 911 | 912 | unsigned int _index = 0; /*!< 下标 */ 913 | 914 | // 编号 915 | for(unsigned int i = sizeof(m_id); i > 0;--i) 916 | { 917 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 918 | } 919 | 920 | // 功能 921 | _packet[_index++] = Func_Status; 922 | 923 | // 命令 924 | for(unsigned int i = sizeof(_cmd); i > 0;--i) 925 | { 926 | _packet[_index++] = static_cast((_cmd >> 8 * (i-1)) & 0xFF); 927 | } 928 | 929 | // 合成报文包 930 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); 931 | 932 | // 释放内存 933 | delete[] _packet; 934 | 935 | return Cmd_Success; 936 | } 937 | 938 | AgvBase::CmdErr AgvBase::Action(const unsigned char &_act) 939 | { 940 | if(IsConnected() == false) 941 | { 942 | // 网络未连接 943 | return Cmd_NetErr; 944 | } 945 | 946 | if(_act == m_action && m_actStatus == ActSta_Fin) 947 | { 948 | // 已完成相同的动作 949 | return Cmd_ActionErr; 950 | } 951 | 952 | if(m_mode != Mode_Auto) 953 | { 954 | // 未处于自动模式 955 | return Cmd_StatusErr; 956 | } 957 | 958 | if(m_status != Sta_Wait) 959 | { 960 | // 未处于待机状态 961 | return Cmd_StatusErr; 962 | } 963 | 964 | // 编号 + 功能 + 当前RFID + 动作码 965 | unsigned int _size = sizeof(m_id) + 1 + sizeof(m_curRfid) + sizeof(m_action); /*!< 数据包大小 */ 966 | 967 | char* _packet = new char[_size]; /*!< 数据包 */ 968 | 969 | // 初始化数据包 970 | memset(_packet,0,_size); 971 | 972 | unsigned int _index = 0; /*!< 下标 */ 973 | 974 | // 编号 975 | for(unsigned int i = sizeof(m_id); i > 0;--i) 976 | { 977 | _packet[_index++] = static_cast((m_id >> 8 * (i-1)) & 0xFF); 978 | } 979 | 980 | // 功能 981 | _packet[_index++] = Func_Action; 982 | 983 | // 当前RFID地标卡 984 | for(unsigned int i = sizeof(m_curRfid); i > 0;--i) 985 | { 986 | _packet[_index++] = static_cast((m_curRfid >> 8 * (i-1)) & 0xFF); 987 | } 988 | 989 | // 动作码 990 | for(unsigned int i = sizeof(m_action); i > 0;--i) 991 | { 992 | _packet[_index++] = static_cast((_act >> 8 * (i-1)) & 0xFF); 993 | } 994 | 995 | // 合成报文包 996 | m_listSend.push_back(m_pType->m_pProtocol->CreatePacket(QByteArray(_packet,static_cast(_index)))); 997 | 998 | // 释放内存 999 | delete[] _packet; 1000 | 1001 | return Cmd_Success; 1002 | } 1003 | 1004 | void AgvBase::ProcessPacket(const QByteArray &_packet) 1005 | { 1006 | unsigned int _sizeLen = 0; 1007 | 1008 | switch (m_pType->m_pProtocol->GetType()) 1009 | { 1010 | case Protocol_STM32: 1011 | _sizeLen = sizeof(ProtocolStm32::DATA_LEN); 1012 | break; 1013 | case Protocol_PLC: 1014 | _sizeLen = sizeof(ProtocolPlc::DATA_LEN); 1015 | break; 1016 | } 1017 | 1018 | const char* _begin = _packet.data(); 1019 | const char* _data = _begin + _sizeLen; 1020 | 1021 | AId_t _id = 0; /*!< 报文上传的编号 */ 1022 | for(unsigned int i = 0; i < sizeof(AId_t);++i) 1023 | { 1024 | _id |= *(_data+(sizeof(AId_t) - i)) << (8 * i); 1025 | } 1026 | 1027 | if(_id != m_id) 1028 | { 1029 | // 编号不符合 1030 | return; 1031 | } 1032 | 1033 | _data += sizeof(AId_t); 1034 | 1035 | unsigned char _func = static_cast(*_data); /*!< 功能码 */ 1036 | 1037 | _data += 1; 1038 | 1039 | switch(_func) 1040 | { 1041 | case Func_Heartbeat: 1042 | { 1043 | // 心跳报文回复 1044 | 1045 | // 模式 1046 | AMode_t _mode = 0; 1047 | 1048 | for(unsigned int i = 0; i < sizeof(AMode_t);++i) 1049 | { 1050 | _mode |= static_cast(*(_data + i) << (8 * i)); 1051 | } 1052 | 1053 | _data = _data +sizeof(AMode_t); 1054 | 1055 | // 运行状态 1056 | AStatus_t _status = 0; 1057 | 1058 | for(unsigned int i = 0; i < sizeof(AStatus_t);++i) 1059 | { 1060 | _status |= static_cast(*(_data + i) << (8 * i)); 1061 | } 1062 | 1063 | _data = _data + sizeof(AStatus_t); 1064 | 1065 | // 速度 1066 | ASpeed_t _speed = 0; 1067 | 1068 | for(unsigned int i = 0; i < sizeof(ASpeed_t);++i) 1069 | { 1070 | _speed |= static_cast(*(_data + i) << (8 * i)); 1071 | } 1072 | 1073 | _data = _data + sizeof(ASpeed_t); 1074 | 1075 | // 电量 1076 | ABattery_t _battery = 0; 1077 | 1078 | for(unsigned int i = 0; i < sizeof(ABattery_t);++i) 1079 | { 1080 | _battery |= static_cast(*(_data + i) << (8 * i)); 1081 | } 1082 | 1083 | _data = _data + sizeof(ABattery_t); 1084 | 1085 | // 当前位置信息 1086 | RfidBase::Rfid_t _curRfid = 0; 1087 | 1088 | for(unsigned int i = 0; i < sizeof(RfidBase::Rfid_t);++i) 1089 | { 1090 | _curRfid |= static_cast(*(_data + i) << (8 * i)); 1091 | } 1092 | 1093 | _data = _data + sizeof(RfidBase::Rfid_t); 1094 | 1095 | // 移动终点位置信息 1096 | RfidBase::Rfid_t _endRfid = 0; 1097 | 1098 | for(unsigned int i = 0; i < sizeof(RfidBase::Rfid_t);++i) 1099 | { 1100 | _endRfid |= static_cast(*(_data + i) << (8 * i)); 1101 | } 1102 | 1103 | _data = _data + sizeof(RfidBase::Rfid_t); 1104 | 1105 | // 载货数量信息 1106 | ACargo_t _cargo = 0; 1107 | 1108 | for(unsigned int i = 0; i < sizeof(ACargo_t);++i) 1109 | { 1110 | _cargo |= static_cast(*(_data + i) << (8 * i)); 1111 | } 1112 | 1113 | _data = _data + sizeof(ACargo_t); 1114 | 1115 | // 异常信息 1116 | AError_t _error = 0; 1117 | 1118 | for(unsigned int i = 0; i < sizeof(AError_t);++i) 1119 | { 1120 | _error |= static_cast(*(_data + i) << (8 * i)); 1121 | } 1122 | 1123 | _data = _data + sizeof(AError_t); 1124 | 1125 | // 动作信息 1126 | AAction_t _action = 0; 1127 | 1128 | for(unsigned int i = 0; i < sizeof(AAction_t);++i) 1129 | { 1130 | _action |= static_cast(*(_data + i) << (8 * i)); 1131 | } 1132 | 1133 | _data = _data + sizeof(AAction_t); 1134 | 1135 | // 动作状态信息 1136 | AActStatus_t _actStatus = 0; 1137 | 1138 | for(unsigned int i = 0; i < sizeof(AActStatus_t);++i) 1139 | { 1140 | _actStatus |= static_cast(*(_data + i) << (8 * i)); 1141 | } 1142 | 1143 | // _data = _data + sizeof(AAction_t); 1144 | 1145 | // 更新 1146 | bool bUpdate = false; /*!< 更新标识 */ 1147 | 1148 | if(UpdateMode(_mode)) 1149 | { 1150 | bUpdate = true; 1151 | } 1152 | 1153 | if(UpdateStatus(_status)) 1154 | { 1155 | bUpdate = true; 1156 | } 1157 | 1158 | if(UpdateSpeed(_speed)) 1159 | { 1160 | bUpdate = true; 1161 | } 1162 | 1163 | if(UpdateBattery(_battery)) 1164 | { 1165 | bUpdate = true; 1166 | } 1167 | 1168 | if(UpdateCurRfid(_curRfid)) 1169 | { 1170 | bUpdate = true; 1171 | } 1172 | 1173 | if(UpdateEndRfid(_endRfid)) 1174 | { 1175 | bUpdate = true; 1176 | } 1177 | 1178 | if(UpdateCargo(_cargo)) 1179 | { 1180 | bUpdate = true; 1181 | } 1182 | 1183 | if(UpdateError(_error)) 1184 | { 1185 | bUpdate = true; 1186 | } 1187 | 1188 | if(UpdateAction(_action,_actStatus)) 1189 | { 1190 | bUpdate = true; 1191 | } 1192 | 1193 | if(bUpdate) 1194 | { 1195 | emit Update(); 1196 | } 1197 | 1198 | break; 1199 | } 1200 | case Func_Move: 1201 | { 1202 | // 移动控制报文回复 1203 | // 本版本中,移动控制报文不回复 1204 | break; 1205 | } 1206 | case Func_Speed: 1207 | { 1208 | // 速度控制报文回复 1209 | // 本版本中,速度控制报文不回复 1210 | break; 1211 | } 1212 | case Func_Action: 1213 | { 1214 | // 动作控制报文回复 1215 | // 本版本中,动作控制报文不回复 1216 | break; 1217 | } 1218 | case Func_Status: 1219 | { 1220 | // 状态控制报文回复 1221 | // 本版本中,状态控制报文不回复 1222 | break; 1223 | } 1224 | case Func_Traffic: 1225 | { 1226 | // 交通管制控制报文回复 1227 | // 本版本中,交通管制控制报文不回复 1228 | break; 1229 | } 1230 | default: 1231 | break; 1232 | } 1233 | 1234 | return; 1235 | } 1236 | 1237 | void AgvBase::Connect() 1238 | { 1239 | if(m_bClient) 1240 | { 1241 | // AGV为客户端模式,不支持连接至服务端 1242 | return; 1243 | } 1244 | 1245 | if(m_peerAddr.isNull() || m_peerAddr.isEmpty()) 1246 | { 1247 | // AGV IP为空 1248 | throw("The IP address cannot be empty"); 1249 | } 1250 | 1251 | m_pSocket = new QTcpSocket(); 1252 | 1253 | // 网络关闭时触发槽函数 1254 | connect(m_pSocket,SIGNAL(QTcpSocket::disconnected),this,SLOT(AgvBase::DisConnected)); 1255 | // 网络连接失败时触发槽函数 1256 | connect(m_pSocket,SIGNAL(QTcpSocket::error),this,SLOT(AgvBase::Error)); 1257 | // 网络连接成功时触发槽函数 1258 | connect(m_pSocket,SIGNAL(QTcpSocket::connected),this,SLOT(AgvBase::Connected)); 1259 | // 有数据读取时触发槽函数 1260 | connect(m_pSocket,SIGNAL(QTcpSocket::readyRead),this,SLOT(AgvBase::ReadData)); 1261 | 1262 | if((m_localAddr.isNull() == false && m_localAddr.isEmpty() == false) || m_localPort !=0) 1263 | { 1264 | // 绑定指定的IP与端口 1265 | QHostAddress _addr = QHostAddress::Any; 1266 | 1267 | if(m_localAddr.isNull() == false && m_localAddr.isEmpty() == false) 1268 | { 1269 | _addr.setAddress(m_localAddr); 1270 | } 1271 | 1272 | if(m_pSocket->bind(_addr,m_localPort) == false) 1273 | { 1274 | return; 1275 | } 1276 | } 1277 | 1278 | // 连接服务端 1279 | m_pSocket->connectToHost(m_peerAddr,m_peerPort); 1280 | 1281 | return; 1282 | } 1283 | 1284 | bool AgvBase::Connect(QTcpSocket &_socket) 1285 | { 1286 | if(m_bClient == false) 1287 | { 1288 | // AGV为服务端模式,不支持客户端连接 1289 | return false; 1290 | } 1291 | 1292 | if(m_pSocket == &_socket) 1293 | { 1294 | // 已连接 1295 | return true; 1296 | } 1297 | 1298 | if(m_peerAddr.isNull() || m_peerAddr.isEmpty()) 1299 | { 1300 | // AGVIP地址为空 1301 | return false; 1302 | } 1303 | 1304 | if(m_peerAddr != _socket.peerName()) 1305 | { 1306 | // IP地址不符 1307 | return false; 1308 | } 1309 | 1310 | if(m_peerPort != 0 && m_peerPort != _socket.peerPort()) 1311 | { 1312 | // 端口不符 1313 | return false; 1314 | } 1315 | 1316 | if(m_pSocket) 1317 | { 1318 | // 关闭已建立的连接 1319 | m_pSocket->close(); 1320 | m_pSocket->waitForDisconnected(-1); 1321 | } 1322 | 1323 | m_pSocket = &_socket; 1324 | 1325 | // 连接关闭时触发的槽函数 1326 | connect(m_pSocket,SIGNAL(QTcpSocket::disconnected),this,SLOT(AgvBase::DisConnected)); 1327 | // 有数据读取时触发的槽函数 1328 | connect(m_pSocket,SIGNAL(QTcpSocket::readyRead),this,SLOT(AgvBase::ReadData)); 1329 | 1330 | // 连接成功触发的槽函数 1331 | Connected(); 1332 | 1333 | return true; 1334 | } 1335 | 1336 | bool AgvBase::IsConnected() const 1337 | { 1338 | if(m_pSocket == nullptr) 1339 | { 1340 | return false; 1341 | } 1342 | 1343 | return m_pSocket->isOpen(); 1344 | } 1345 | 1346 | void AgvBase::Connected() 1347 | { 1348 | m_timer.start(); 1349 | 1350 | if(m_errSelf == Err_Net) 1351 | { 1352 | m_errSelf = Err_None; 1353 | } 1354 | 1355 | return; 1356 | } 1357 | 1358 | void AgvBase::DisConnected() 1359 | { 1360 | if(m_pSocket) 1361 | { 1362 | m_pSocket->deleteLater(); 1363 | } 1364 | 1365 | m_pSocket = nullptr; 1366 | 1367 | m_timer.stop(); 1368 | 1369 | m_listSend.clear(); 1370 | 1371 | emit LinkBreak(); 1372 | 1373 | return; 1374 | } 1375 | 1376 | void AgvBase::Error() 1377 | { 1378 | // 重新连接客户端 1379 | m_pSocket->connectToHost(m_peerAddr,m_peerPort); 1380 | 1381 | return; 1382 | } 1383 | 1384 | void AgvBase::ReadData() 1385 | { 1386 | if(m_pSocket->isReadable()) 1387 | { 1388 | m_buf += m_pSocket->readAll(); 1389 | 1390 | // 处理数据 1391 | QByteArrayList _list = m_pType->m_pProtocol->ProcessData(m_buf); 1392 | 1393 | for(QByteArrayList::iterator it = _list.begin(); it != _list.end();++it) 1394 | { 1395 | ProcessPacket(*it); 1396 | } 1397 | } 1398 | 1399 | return; 1400 | } 1401 | 1402 | void AgvBase::SendPacket() 1403 | { 1404 | if(IsConnected()) 1405 | { 1406 | return; 1407 | } 1408 | 1409 | Heartbeat(); 1410 | 1411 | for(QByteArrayList::iterator it = m_listSend.begin();it != m_listSend.end();++it) 1412 | { 1413 | if(m_pSocket->write(it->data(),it->size()) == -1) 1414 | { 1415 | UpdateErrorSelf(Err_Net); 1416 | 1417 | DisConnected(); 1418 | 1419 | return; 1420 | } 1421 | 1422 | m_thread.wait(100); 1423 | } 1424 | 1425 | return; 1426 | } 1427 | 1428 | AgvType::AgvType(const std::string &_name,ProtocolBase& _protocol, const unsigned char &_type, const float &_speed, const float &_weright, const std::string &_brand, const std::string &_version) 1429 | { 1430 | this->m_name = _name; 1431 | this->m_type = _type; 1432 | this->m_brand = _brand; 1433 | this->m_version = _version; 1434 | this->m_maxSpeed = _speed; 1435 | this->m_maxWeight = _weright; 1436 | this->m_pProtocol = &_protocol; 1437 | } 1438 | 1439 | AgvType::AgvType(const AgvType &_type) 1440 | { 1441 | this->m_name = _type.m_name; 1442 | this->m_type = _type.m_type; 1443 | this->m_brand = _type.m_brand; 1444 | this->m_version = _type.m_version; 1445 | this->m_maxSpeed = _type.m_maxSpeed; 1446 | this->m_maxWeight = _type.m_maxWeight; 1447 | this->m_pProtocol = _type.m_pProtocol; 1448 | } 1449 | 1450 | AgvType::~AgvType() 1451 | { 1452 | } 1453 | 1454 | bool AgvType::operator==(const bool &_bool) const 1455 | { 1456 | bool _b = true; 1457 | 1458 | if(m_name.empty() || m_type == 0 || m_maxSpeed == 0.0f || m_pProtocol == nullptr) 1459 | { 1460 | _b = false; 1461 | } 1462 | 1463 | return _b == _bool; 1464 | } 1465 | 1466 | void AgvType::operator=(const AgvType &_type) 1467 | { 1468 | m_name = _type.m_name; 1469 | m_type = _type.m_type; 1470 | m_brand = _type.m_brand; 1471 | m_version = _type.m_version; 1472 | m_maxSpeed = _type.m_maxSpeed; 1473 | m_maxWeight = _type.m_maxWeight; 1474 | m_pProtocol = _type.m_pProtocol; 1475 | } 1476 | 1477 | bool AgvType::IsNull() const 1478 | { 1479 | if(m_name.empty() || m_type == 0 || m_maxSpeed == 0.0f || m_pProtocol == nullptr) 1480 | { 1481 | return false; 1482 | } 1483 | 1484 | return true; 1485 | } 1486 | 1487 | AgvType::operator bool() const 1488 | { 1489 | if(m_name.empty() || m_type == 0 || m_maxSpeed == 0.0f || m_pProtocol == nullptr) 1490 | { 1491 | return false; 1492 | } 1493 | 1494 | return true; 1495 | } 1496 | -------------------------------------------------------------------------------- /Document/IntelligentAGVSchedulingSystem.mdj: -------------------------------------------------------------------------------- 1 | { 2 | "_type": "Project", 3 | "_id": "AAAAAAFF+h6SjaM2Hec=", 4 | "name": "IntelligentAGVSchedulingSystem", 5 | "ownedElements": [ 6 | { 7 | "_type": "UMLModel", 8 | "_id": "AAAAAAFF+qBWK6M3Z8Y=", 9 | "_parent": { 10 | "$ref": "AAAAAAFF+h6SjaM2Hec=" 11 | }, 12 | "name": "Model", 13 | "ownedElements": [ 14 | { 15 | "_type": "UMLClassDiagram", 16 | "_id": "AAAAAAFF+qBtyKM79qY=", 17 | "_parent": { 18 | "$ref": "AAAAAAFF+qBWK6M3Z8Y=" 19 | }, 20 | "name": "Main", 21 | "defaultDiagram": true, 22 | "ownedViews": [ 23 | { 24 | "_type": "UMLClassView", 25 | "_id": "AAAAAAFtyRnlJX+5bLo=", 26 | "_parent": { 27 | "$ref": "AAAAAAFF+qBtyKM79qY=" 28 | }, 29 | "model": { 30 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 31 | }, 32 | "subViews": [ 33 | { 34 | "_type": "UMLNameCompartmentView", 35 | "_id": "AAAAAAFtyRnlJX+63hM=", 36 | "_parent": { 37 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 38 | }, 39 | "model": { 40 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 41 | }, 42 | "subViews": [ 43 | { 44 | "_type": "LabelView", 45 | "_id": "AAAAAAFtyRnlJX+73jE=", 46 | "_parent": { 47 | "$ref": "AAAAAAFtyRnlJX+63hM=" 48 | }, 49 | "visible": false, 50 | "font": "Arial;13;0", 51 | "left": -288, 52 | "top": -448, 53 | "height": 13 54 | }, 55 | { 56 | "_type": "LabelView", 57 | "_id": "AAAAAAFtyRnlJX+8COs=", 58 | "_parent": { 59 | "$ref": "AAAAAAFtyRnlJX+63hM=" 60 | }, 61 | "font": "Arial;13;1", 62 | "left": 205, 63 | "top": 71, 64 | "width": 294.4423828125, 65 | "height": 13, 66 | "text": "AGV" 67 | }, 68 | { 69 | "_type": "LabelView", 70 | "_id": "AAAAAAFtyRnlJn+9GSg=", 71 | "_parent": { 72 | "$ref": "AAAAAAFtyRnlJX+63hM=" 73 | }, 74 | "visible": false, 75 | "font": "Arial;13;0", 76 | "left": -288, 77 | "top": -448, 78 | "width": 73.67724609375, 79 | "height": 13, 80 | "text": "(from Model)" 81 | }, 82 | { 83 | "_type": "LabelView", 84 | "_id": "AAAAAAFtyRnlJn++kEQ=", 85 | "_parent": { 86 | "$ref": "AAAAAAFtyRnlJX+63hM=" 87 | }, 88 | "visible": false, 89 | "font": "Arial;13;0", 90 | "left": -288, 91 | "top": -448, 92 | "height": 13, 93 | "horizontalAlignment": 1 94 | } 95 | ], 96 | "font": "Arial;13;0", 97 | "left": 200, 98 | "top": 64, 99 | "width": 304.4423828125, 100 | "height": 25, 101 | "stereotypeLabel": { 102 | "$ref": "AAAAAAFtyRnlJX+73jE=" 103 | }, 104 | "nameLabel": { 105 | "$ref": "AAAAAAFtyRnlJX+8COs=" 106 | }, 107 | "namespaceLabel": { 108 | "$ref": "AAAAAAFtyRnlJn+9GSg=" 109 | }, 110 | "propertyLabel": { 111 | "$ref": "AAAAAAFtyRnlJn++kEQ=" 112 | } 113 | }, 114 | { 115 | "_type": "UMLAttributeCompartmentView", 116 | "_id": "AAAAAAFtyRnlJn+/sOo=", 117 | "_parent": { 118 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 119 | }, 120 | "model": { 121 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 122 | }, 123 | "subViews": [ 124 | { 125 | "_type": "UMLAttributeView", 126 | "_id": "AAAAAAFtyRodp3/kXEI=", 127 | "_parent": { 128 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 129 | }, 130 | "model": { 131 | "$ref": "AAAAAAFtyRode3/hHwo=" 132 | }, 133 | "font": "Arial;13;0", 134 | "left": 205, 135 | "top": 94, 136 | "width": 294.4423828125, 137 | "height": 13, 138 | "text": "#m_usID: unsigned short", 139 | "horizontalAlignment": 0 140 | }, 141 | { 142 | "_type": "UMLAttributeView", 143 | "_id": "AAAAAAFtyUr3vYFsG+Q=", 144 | "_parent": { 145 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 146 | }, 147 | "model": { 148 | "$ref": "AAAAAAFtyUr3g4Fpra4=" 149 | }, 150 | "font": "Arial;13;0", 151 | "left": 205, 152 | "top": 109, 153 | "width": 294.4423828125, 154 | "height": 13, 155 | "text": "#m_usCurRFID: unsigned short", 156 | "horizontalAlignment": 0 157 | }, 158 | { 159 | "_type": "UMLAttributeView", 160 | "_id": "AAAAAAFtysSg1JXzjT0=", 161 | "_parent": { 162 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 163 | }, 164 | "model": { 165 | "$ref": "AAAAAAFtysSgqZXwxLk=" 166 | }, 167 | "font": "Arial;13;0", 168 | "left": 205, 169 | "top": 124, 170 | "width": 294.4423828125, 171 | "height": 13, 172 | "text": "#m_usOldRFID: unsigned short", 173 | "horizontalAlignment": 0 174 | }, 175 | { 176 | "_type": "UMLAttributeView", 177 | "_id": "AAAAAAFtyU3SXIGDQFs=", 178 | "_parent": { 179 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 180 | }, 181 | "model": { 182 | "$ref": "AAAAAAFtyU3SK4GAuXs=" 183 | }, 184 | "font": "Arial;13;0", 185 | "left": 205, 186 | "top": 139, 187 | "width": 294.4423828125, 188 | "height": 13, 189 | "text": "#m_usEndRFID: unsigned short", 190 | "horizontalAlignment": 0 191 | }, 192 | { 193 | "_type": "UMLAttributeView", 194 | "_id": "AAAAAAFtyU5sVoGLEPk=", 195 | "_parent": { 196 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 197 | }, 198 | "model": { 199 | "$ref": "AAAAAAFtyU5sKoGIYtw=" 200 | }, 201 | "font": "Arial;13;0", 202 | "left": 205, 203 | "top": 154, 204 | "width": 294.4423828125, 205 | "height": 13, 206 | "text": "#m_byStatus: unsigned char", 207 | "horizontalAlignment": 0 208 | }, 209 | { 210 | "_type": "UMLAttributeView", 211 | "_id": "AAAAAAFtyV+jDYNkZoY=", 212 | "_parent": { 213 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 214 | }, 215 | "model": { 216 | "$ref": "AAAAAAFtyV+i3INh0KM=" 217 | }, 218 | "font": "Arial;13;0", 219 | "left": 205, 220 | "top": 169, 221 | "width": 294.4423828125, 222 | "height": 13, 223 | "text": "#m_byBattery: unsigned char", 224 | "horizontalAlignment": 0 225 | }, 226 | { 227 | "_type": "UMLAttributeView", 228 | "_id": "AAAAAAFtyWAKC4NsnHM=", 229 | "_parent": { 230 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 231 | }, 232 | "model": { 233 | "$ref": "AAAAAAFtyWAJ3INpmDw=" 234 | }, 235 | "font": "Arial;13;0", 236 | "left": 205, 237 | "top": 184, 238 | "width": 294.4423828125, 239 | "height": 13, 240 | "text": "#m_chSpeed: char", 241 | "horizontalAlignment": 0 242 | }, 243 | { 244 | "_type": "UMLAttributeView", 245 | "_id": "AAAAAAFtyWA2UYNzwpo=", 246 | "_parent": { 247 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 248 | }, 249 | "model": { 250 | "$ref": "AAAAAAFtyWA2HoNwNDs=" 251 | }, 252 | "font": "Arial;13;0", 253 | "left": 205, 254 | "top": 199, 255 | "width": 294.4423828125, 256 | "height": 13, 257 | "text": "#m_chError: char", 258 | "horizontalAlignment": 0 259 | } 260 | ], 261 | "font": "Arial;13;0", 262 | "left": 200, 263 | "top": 89, 264 | "width": 304.4423828125, 265 | "height": 128 266 | }, 267 | { 268 | "_type": "UMLOperationCompartmentView", 269 | "_id": "AAAAAAFtyRnlJn/AT14=", 270 | "_parent": { 271 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 272 | }, 273 | "model": { 274 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 275 | }, 276 | "subViews": [ 277 | { 278 | "_type": "UMLOperationView", 279 | "_id": "AAAAAAFtyR+i6X/2Zn0=", 280 | "_parent": { 281 | "$ref": "AAAAAAFtyRnlJn/AT14=" 282 | }, 283 | "model": { 284 | "$ref": "AAAAAAFtyR+iv3/z/fw=" 285 | }, 286 | "font": "Arial;13;0", 287 | "left": 205, 288 | "top": 222, 289 | "width": 294.4423828125, 290 | "height": 13, 291 | "text": "+WeakUp(): CMDERR", 292 | "horizontalAlignment": 0 293 | }, 294 | { 295 | "_type": "UMLOperationView", 296 | "_id": "AAAAAAFtySA5Kn//aIM=", 297 | "_parent": { 298 | "$ref": "AAAAAAFtyRnlJn/AT14=" 299 | }, 300 | "model": { 301 | "$ref": "AAAAAAFtySA5AX/85aE=" 302 | }, 303 | "font": "Arial;13;0", 304 | "left": 205, 305 | "top": 237, 306 | "width": 294.4423828125, 307 | "height": 13, 308 | "text": "+Restart(): CMDERR", 309 | "horizontalAlignment": 0 310 | }, 311 | { 312 | "_type": "UMLOperationView", 313 | "_id": "AAAAAAFtySCyeoAJ52U=", 314 | "_parent": { 315 | "$ref": "AAAAAAFtyRnlJn/AT14=" 316 | }, 317 | "model": { 318 | "$ref": "AAAAAAFtySCyTYAGpWg=" 319 | }, 320 | "font": "Arial;13;0", 321 | "left": 205, 322 | "top": 252, 323 | "width": 294.4423828125, 324 | "height": 13, 325 | "text": "+Reset(): CMDERR", 326 | "horizontalAlignment": 0 327 | }, 328 | { 329 | "_type": "UMLOperationView", 330 | "_id": "AAAAAAFtys+wj5asDz0=", 331 | "_parent": { 332 | "$ref": "AAAAAAFtyRnlJn/AT14=" 333 | }, 334 | "model": { 335 | "$ref": "AAAAAAFtys+wZJap83g=" 336 | }, 337 | "font": "Arial;13;0", 338 | "left": 205, 339 | "top": 267, 340 | "width": 294.4423828125, 341 | "height": 13, 342 | "text": "+Scream(): CMDERR", 343 | "horizontalAlignment": 0 344 | }, 345 | { 346 | "_type": "UMLOperationView", 347 | "_id": "AAAAAAFtySDUe4ASliM=", 348 | "_parent": { 349 | "$ref": "AAAAAAFtyRnlJn/AT14=" 350 | }, 351 | "model": { 352 | "$ref": "AAAAAAFtySDUUoAPf4k=" 353 | }, 354 | "font": "Arial;13;0", 355 | "left": 205, 356 | "top": 282, 357 | "width": 294.4423828125, 358 | "height": 13, 359 | "text": "+RemoteStream(): CMDERR", 360 | "horizontalAlignment": 0 361 | }, 362 | { 363 | "_type": "UMLOperationView", 364 | "_id": "AAAAAAFtySJATYAdxLE=", 365 | "_parent": { 366 | "$ref": "AAAAAAFtyRnlJn/AT14=" 367 | }, 368 | "model": { 369 | "$ref": "AAAAAAFtySJAIoAaK+g=" 370 | }, 371 | "font": "Arial;13;0", 372 | "left": 205, 373 | "top": 297, 374 | "width": 294.4423828125, 375 | "height": 13, 376 | "text": "+Sleep(): CMDERR", 377 | "horizontalAlignment": 0 378 | }, 379 | { 380 | "_type": "UMLOperationView", 381 | "_id": "AAAAAAFtySJoe4Am3Cw=", 382 | "_parent": { 383 | "$ref": "AAAAAAFtyRnlJn/AT14=" 384 | }, 385 | "model": { 386 | "$ref": "AAAAAAFtySJoS4Ajvng=" 387 | }, 388 | "font": "Arial;13;0", 389 | "left": 205, 390 | "top": 312, 391 | "width": 294.4423828125, 392 | "height": 13, 393 | "text": "+Pause(): CMDERR", 394 | "horizontalAlignment": 0 395 | }, 396 | { 397 | "_type": "UMLOperationView", 398 | "_id": "AAAAAAFtySM4S4AwUJ8=", 399 | "_parent": { 400 | "$ref": "AAAAAAFtyRnlJn/AT14=" 401 | }, 402 | "model": { 403 | "$ref": "AAAAAAFtySM4IIAtQJA=" 404 | }, 405 | "font": "Arial;13;0", 406 | "left": 205, 407 | "top": 327, 408 | "width": 294.4423828125, 409 | "height": 13, 410 | "text": "+Continue(): CMDERR", 411 | "horizontalAlignment": 0 412 | }, 413 | { 414 | "_type": "UMLOperationView", 415 | "_id": "AAAAAAFtySNbeIA5c3E=", 416 | "_parent": { 417 | "$ref": "AAAAAAFtyRnlJn/AT14=" 418 | }, 419 | "model": { 420 | "$ref": "AAAAAAFtySNbTYA2SLM=" 421 | }, 422 | "font": "Arial;13;0", 423 | "left": 205, 424 | "top": 342, 425 | "width": 294.4423828125, 426 | "height": 13, 427 | "text": "+Shutdown(): CMDERR", 428 | "horizontalAlignment": 0 429 | }, 430 | { 431 | "_type": "UMLOperationView", 432 | "_id": "AAAAAAFtySm9a4BC/l8=", 433 | "_parent": { 434 | "$ref": "AAAAAAFtyRnlJn/AT14=" 435 | }, 436 | "model": { 437 | "$ref": "AAAAAAFtySm9PIA/Xh4=" 438 | }, 439 | "font": "Arial;13;0", 440 | "left": 205, 441 | "top": 357, 442 | "width": 294.4423828125, 443 | "height": 13, 444 | "text": "+Move(unsigned short): CMDERR", 445 | "horizontalAlignment": 0 446 | }, 447 | { 448 | "_type": "UMLOperationView", 449 | "_id": "AAAAAAFtySrjV4BNf5M=", 450 | "_parent": { 451 | "$ref": "AAAAAAFtyRnlJn/AT14=" 452 | }, 453 | "model": { 454 | "$ref": "AAAAAAFtySrjLYBKuy8=" 455 | }, 456 | "font": "Arial;13;0", 457 | "left": 205, 458 | "top": 372, 459 | "width": 294.4423828125, 460 | "height": 13, 461 | "text": "+TrafficPass(): CMDERR", 462 | "horizontalAlignment": 0 463 | }, 464 | { 465 | "_type": "UMLOperationView", 466 | "_id": "AAAAAAFtyWEnQIN7KqY=", 467 | "_parent": { 468 | "$ref": "AAAAAAFtyRnlJn/AT14=" 469 | }, 470 | "model": { 471 | "$ref": "AAAAAAFtyWEnFIN4DU4=" 472 | }, 473 | "font": "Arial;13;0", 474 | "left": 205, 475 | "top": 387, 476 | "width": 294.4423828125, 477 | "height": 13, 478 | "text": "#Action(unsigned short, unsigned short): CMDERR", 479 | "horizontalAlignment": 0 480 | }, 481 | { 482 | "_type": "UMLOperationView", 483 | "_id": "AAAAAAFtys4FWJaR+6s=", 484 | "_parent": { 485 | "$ref": "AAAAAAFtyRnlJn/AT14=" 486 | }, 487 | "model": { 488 | "$ref": "AAAAAAFtys4FLpaOUa8=" 489 | }, 490 | "font": "Arial;13;0", 491 | "left": 205, 492 | "top": 402, 493 | "width": 294.4423828125, 494 | "height": 13, 495 | "text": "+SetSpeed(char): CMDERR", 496 | "horizontalAlignment": 0 497 | }, 498 | { 499 | "_type": "UMLOperationView", 500 | "_id": "AAAAAAFtysMzGpXYcao=", 501 | "_parent": { 502 | "$ref": "AAAAAAFtyRnlJn/AT14=" 503 | }, 504 | "model": { 505 | "$ref": "AAAAAAFtysMy3JXVzK8=" 506 | }, 507 | "font": "Arial;13;0", 508 | "left": 205, 509 | "top": 417, 510 | "width": 294.4423828125, 511 | "height": 13, 512 | "text": "+GetID(): unsigned short", 513 | "horizontalAlignment": 0 514 | }, 515 | { 516 | "_type": "UMLOperationView", 517 | "_id": "AAAAAAFtysPA5pXh0qI=", 518 | "_parent": { 519 | "$ref": "AAAAAAFtyRnlJn/AT14=" 520 | }, 521 | "model": { 522 | "$ref": "AAAAAAFtysPAtZXeOIk=" 523 | }, 524 | "font": "Arial;13;0", 525 | "left": 205, 526 | "top": 432, 527 | "width": 294.4423828125, 528 | "height": 13, 529 | "text": "+GetCurRFID(): unsigned short", 530 | "horizontalAlignment": 0 531 | }, 532 | { 533 | "_type": "UMLOperationView", 534 | "_id": "AAAAAAFtysRa5ZXqLH0=", 535 | "_parent": { 536 | "$ref": "AAAAAAFtyRnlJn/AT14=" 537 | }, 538 | "model": { 539 | "$ref": "AAAAAAFtysRat5Xn3Lw=" 540 | }, 541 | "font": "Arial;13;0", 542 | "left": 205, 543 | "top": 447, 544 | "width": 294.4423828125, 545 | "height": 13, 546 | "text": "+GetEndRFID(): unsigned short", 547 | "horizontalAlignment": 0 548 | }, 549 | { 550 | "_type": "UMLOperationView", 551 | "_id": "AAAAAAFtysU4BZX/YBs=", 552 | "_parent": { 553 | "$ref": "AAAAAAFtyRnlJn/AT14=" 554 | }, 555 | "model": { 556 | "$ref": "AAAAAAFtysU305X8dww=" 557 | }, 558 | "font": "Arial;13;0", 559 | "left": 205, 560 | "top": 462, 561 | "width": 294.4423828125, 562 | "height": 13, 563 | "text": "+GetOldRFID(): unsigned short", 564 | "horizontalAlignment": 0 565 | }, 566 | { 567 | "_type": "UMLOperationView", 568 | "_id": "AAAAAAFtysVy3JYI6hE=", 569 | "_parent": { 570 | "$ref": "AAAAAAFtyRnlJn/AT14=" 571 | }, 572 | "model": { 573 | "$ref": "AAAAAAFtysVys5YF2vY=" 574 | }, 575 | "font": "Arial;13;0", 576 | "left": 205, 577 | "top": 477, 578 | "width": 294.4423828125, 579 | "height": 13, 580 | "text": "+GetStatus(): unsigned char", 581 | "horizontalAlignment": 0 582 | }, 583 | { 584 | "_type": "UMLOperationView", 585 | "_id": "AAAAAAFtysW6vpYR3no=", 586 | "_parent": { 587 | "$ref": "AAAAAAFtyRnlJn/AT14=" 588 | }, 589 | "model": { 590 | "$ref": "AAAAAAFtysW6kZYOrhg=" 591 | }, 592 | "font": "Arial;13;0", 593 | "left": 205, 594 | "top": 492, 595 | "width": 294.4423828125, 596 | "height": 13, 597 | "text": "+GetBattery(): unsigned char", 598 | "horizontalAlignment": 0 599 | }, 600 | { 601 | "_type": "UMLOperationView", 602 | "_id": "AAAAAAFtysXoKZYaCQU=", 603 | "_parent": { 604 | "$ref": "AAAAAAFtyRnlJn/AT14=" 605 | }, 606 | "model": { 607 | "$ref": "AAAAAAFtysXn/5YX4PU=" 608 | }, 609 | "font": "Arial;13;0", 610 | "left": 205, 611 | "top": 507, 612 | "width": 294.4423828125, 613 | "height": 13, 614 | "text": "+GetSpeed(): char", 615 | "horizontalAlignment": 0 616 | }, 617 | { 618 | "_type": "UMLOperationView", 619 | "_id": "AAAAAAFtysYdnZYj3zQ=", 620 | "_parent": { 621 | "$ref": "AAAAAAFtyRnlJn/AT14=" 622 | }, 623 | "model": { 624 | "$ref": "AAAAAAFtysYdcZYgzxM=" 625 | }, 626 | "font": "Arial;13;0", 627 | "left": 205, 628 | "top": 522, 629 | "width": 294.4423828125, 630 | "height": 13, 631 | "text": "+GetError(): char", 632 | "horizontalAlignment": 0 633 | }, 634 | { 635 | "_type": "UMLOperationView", 636 | "_id": "AAAAAAFtysZJn5YsPBg=", 637 | "_parent": { 638 | "$ref": "AAAAAAFtyRnlJn/AT14=" 639 | }, 640 | "model": { 641 | "$ref": "AAAAAAFtysZJcZYpAYk=" 642 | }, 643 | "font": "Arial;13;0", 644 | "left": 205, 645 | "top": 537, 646 | "width": 294.4423828125, 647 | "height": 13, 648 | "text": "+GetErrorText(): string", 649 | "horizontalAlignment": 0 650 | }, 651 | { 652 | "_type": "UMLOperationView", 653 | "_id": "AAAAAAFtyscEg5Y1Xbc=", 654 | "_parent": { 655 | "$ref": "AAAAAAFtyRnlJn/AT14=" 656 | }, 657 | "model": { 658 | "$ref": "AAAAAAFtyscEVpYyf8E=" 659 | }, 660 | "font": "Arial;13;0", 661 | "left": 205, 662 | "top": 552, 663 | "width": 294.4423828125, 664 | "height": 13, 665 | "text": "+GetErrorText(CMDERR): string", 666 | "horizontalAlignment": 0 667 | }, 668 | { 669 | "_type": "UMLOperationView", 670 | "_id": "AAAAAAFtystfGpZNGXA=", 671 | "_parent": { 672 | "$ref": "AAAAAAFtyRnlJn/AT14=" 673 | }, 674 | "model": { 675 | "$ref": "AAAAAAFtyste55ZKpDM=" 676 | }, 677 | "font": "Arial;13;0", 678 | "left": 205, 679 | "top": 567, 680 | "width": 294.4423828125, 681 | "height": 13, 682 | "text": "+UpdateCurRFID(unsigned short): bool", 683 | "horizontalAlignment": 0 684 | }, 685 | { 686 | "_type": "UMLOperationView", 687 | "_id": "AAAAAAFtysw/mJZYFdQ=", 688 | "_parent": { 689 | "$ref": "AAAAAAFtyRnlJn/AT14=" 690 | }, 691 | "model": { 692 | "$ref": "AAAAAAFtysw/bJZVo/w=" 693 | }, 694 | "font": "Arial;13;0", 695 | "left": 205, 696 | "top": 582, 697 | "width": 294.4423828125, 698 | "height": 13, 699 | "text": "+UpdateEndRFID(unsigned short): bool", 700 | "horizontalAlignment": 0 701 | }, 702 | { 703 | "_type": "UMLOperationView", 704 | "_id": "AAAAAAFtysyHI5ZjtuU=", 705 | "_parent": { 706 | "$ref": "AAAAAAFtyRnlJn/AT14=" 707 | }, 708 | "model": { 709 | "$ref": "AAAAAAFtysyG9pZg+Zk=" 710 | }, 711 | "font": "Arial;13;0", 712 | "left": 205, 713 | "top": 597, 714 | "width": 294.4423828125, 715 | "height": 13, 716 | "text": "+UpdateStatus(unsigned char): bool", 717 | "horizontalAlignment": 0 718 | }, 719 | { 720 | "_type": "UMLOperationView", 721 | "_id": "AAAAAAFtysz4tZZuPrk=", 722 | "_parent": { 723 | "$ref": "AAAAAAFtyRnlJn/AT14=" 724 | }, 725 | "model": { 726 | "$ref": "AAAAAAFtysz4jJZr5EQ=" 727 | }, 728 | "font": "Arial;13;0", 729 | "left": 205, 730 | "top": 612, 731 | "width": 294.4423828125, 732 | "height": 13, 733 | "text": "+UpdateBattery(unsigned char): bool", 734 | "horizontalAlignment": 0 735 | }, 736 | { 737 | "_type": "UMLOperationView", 738 | "_id": "AAAAAAFtys1skpZ6lxw=", 739 | "_parent": { 740 | "$ref": "AAAAAAFtyRnlJn/AT14=" 741 | }, 742 | "model": { 743 | "$ref": "AAAAAAFtys1sZZZ3gGo=" 744 | }, 745 | "font": "Arial;13;0", 746 | "left": 205, 747 | "top": 627, 748 | "width": 294.4423828125, 749 | "height": 13, 750 | "text": "+UpdateSpeed(char): bool", 751 | "horizontalAlignment": 0 752 | }, 753 | { 754 | "_type": "UMLOperationView", 755 | "_id": "AAAAAAFtys2h5paFBx0=", 756 | "_parent": { 757 | "$ref": "AAAAAAFtyRnlJn/AT14=" 758 | }, 759 | "model": { 760 | "$ref": "AAAAAAFtys2hupaCJG4=" 761 | }, 762 | "font": "Arial;13;0", 763 | "left": 205, 764 | "top": 642, 765 | "width": 294.4423828125, 766 | "height": 13, 767 | "text": "+UpdateError(char): bool", 768 | "horizontalAlignment": 0 769 | } 770 | ], 771 | "font": "Arial;13;0", 772 | "left": 200, 773 | "top": 217, 774 | "width": 304.4423828125, 775 | "height": 443 776 | }, 777 | { 778 | "_type": "UMLReceptionCompartmentView", 779 | "_id": "AAAAAAFtyRnlJn/B9Lo=", 780 | "_parent": { 781 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 782 | }, 783 | "model": { 784 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 785 | }, 786 | "visible": false, 787 | "font": "Arial;13;0", 788 | "left": -144, 789 | "top": -224, 790 | "width": 10, 791 | "height": 10 792 | }, 793 | { 794 | "_type": "UMLTemplateParameterCompartmentView", 795 | "_id": "AAAAAAFtyRnlJn/CeFQ=", 796 | "_parent": { 797 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 798 | }, 799 | "model": { 800 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 801 | }, 802 | "visible": false, 803 | "font": "Arial;13;0", 804 | "left": -144, 805 | "top": -224, 806 | "width": 10, 807 | "height": 10 808 | } 809 | ], 810 | "font": "Arial;13;0", 811 | "containerChangeable": true, 812 | "left": 200, 813 | "top": 64, 814 | "width": 304.4423828125, 815 | "height": 611, 816 | "nameCompartment": { 817 | "$ref": "AAAAAAFtyRnlJX+63hM=" 818 | }, 819 | "attributeCompartment": { 820 | "$ref": "AAAAAAFtyRnlJn+/sOo=" 821 | }, 822 | "operationCompartment": { 823 | "$ref": "AAAAAAFtyRnlJn/AT14=" 824 | }, 825 | "receptionCompartment": { 826 | "$ref": "AAAAAAFtyRnlJn/B9Lo=" 827 | }, 828 | "templateParameterCompartment": { 829 | "$ref": "AAAAAAFtyRnlJn/CeFQ=" 830 | } 831 | }, 832 | { 833 | "_type": "UMLEnumerationView", 834 | "_id": "AAAAAAFtyTFMiYBlmNc=", 835 | "_parent": { 836 | "$ref": "AAAAAAFF+qBtyKM79qY=" 837 | }, 838 | "model": { 839 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 840 | }, 841 | "subViews": [ 842 | { 843 | "_type": "UMLNameCompartmentView", 844 | "_id": "AAAAAAFtyTFMiYBmiKQ=", 845 | "_parent": { 846 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 847 | }, 848 | "model": { 849 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 850 | }, 851 | "subViews": [ 852 | { 853 | "_type": "LabelView", 854 | "_id": "AAAAAAFtyTFMiYBnyWc=", 855 | "_parent": { 856 | "$ref": "AAAAAAFtyTFMiYBmiKQ=" 857 | }, 858 | "font": "Arial;13;0", 859 | "left": 557, 860 | "top": 285, 861 | "width": 99.68359375, 862 | "height": 13, 863 | "text": "«enumeration»" 864 | }, 865 | { 866 | "_type": "LabelView", 867 | "_id": "AAAAAAFtyTFMiYBop1E=", 868 | "_parent": { 869 | "$ref": "AAAAAAFtyTFMiYBmiKQ=" 870 | }, 871 | "font": "Arial;13;1", 872 | "left": 557, 873 | "top": 300, 874 | "width": 99.68359375, 875 | "height": 13, 876 | "text": "CmdError" 877 | }, 878 | { 879 | "_type": "LabelView", 880 | "_id": "AAAAAAFtyTFMiYBpkvs=", 881 | "_parent": { 882 | "$ref": "AAAAAAFtyTFMiYBmiKQ=" 883 | }, 884 | "visible": false, 885 | "font": "Arial;13;0", 886 | "left": -256, 887 | "top": -96, 888 | "width": 73.67724609375, 889 | "height": 13, 890 | "text": "(from Model)" 891 | }, 892 | { 893 | "_type": "LabelView", 894 | "_id": "AAAAAAFtyTFMiYBqPtA=", 895 | "_parent": { 896 | "$ref": "AAAAAAFtyTFMiYBmiKQ=" 897 | }, 898 | "visible": false, 899 | "font": "Arial;13;0", 900 | "left": -256, 901 | "top": -96, 902 | "height": 13, 903 | "horizontalAlignment": 1 904 | } 905 | ], 906 | "font": "Arial;13;0", 907 | "left": 552, 908 | "top": 280, 909 | "width": 109.68359375, 910 | "height": 38, 911 | "stereotypeLabel": { 912 | "$ref": "AAAAAAFtyTFMiYBnyWc=" 913 | }, 914 | "nameLabel": { 915 | "$ref": "AAAAAAFtyTFMiYBop1E=" 916 | }, 917 | "namespaceLabel": { 918 | "$ref": "AAAAAAFtyTFMiYBpkvs=" 919 | }, 920 | "propertyLabel": { 921 | "$ref": "AAAAAAFtyTFMiYBqPtA=" 922 | } 923 | }, 924 | { 925 | "_type": "UMLAttributeCompartmentView", 926 | "_id": "AAAAAAFtyTFMiYBrjNs=", 927 | "_parent": { 928 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 929 | }, 930 | "model": { 931 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 932 | }, 933 | "visible": false, 934 | "font": "Arial;13;0", 935 | "left": -128, 936 | "top": -48, 937 | "width": 10, 938 | "height": 10 939 | }, 940 | { 941 | "_type": "UMLOperationCompartmentView", 942 | "_id": "AAAAAAFtyTFMiYBsDFk=", 943 | "_parent": { 944 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 945 | }, 946 | "model": { 947 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 948 | }, 949 | "visible": false, 950 | "font": "Arial;13;0", 951 | "left": -128, 952 | "top": -48, 953 | "width": 10, 954 | "height": 10 955 | }, 956 | { 957 | "_type": "UMLReceptionCompartmentView", 958 | "_id": "AAAAAAFtyTFMiYBtKqM=", 959 | "_parent": { 960 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 961 | }, 962 | "model": { 963 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 964 | }, 965 | "visible": false, 966 | "font": "Arial;13;0", 967 | "left": -128, 968 | "top": -48, 969 | "width": 10, 970 | "height": 10 971 | }, 972 | { 973 | "_type": "UMLTemplateParameterCompartmentView", 974 | "_id": "AAAAAAFtyTFMiYBuYYs=", 975 | "_parent": { 976 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 977 | }, 978 | "model": { 979 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 980 | }, 981 | "visible": false, 982 | "font": "Arial;13;0", 983 | "left": -128, 984 | "top": -48, 985 | "width": 10, 986 | "height": 10 987 | }, 988 | { 989 | "_type": "UMLEnumerationLiteralCompartmentView", 990 | "_id": "AAAAAAFtyTFMioBvjP0=", 991 | "_parent": { 992 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 993 | }, 994 | "model": { 995 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 996 | }, 997 | "subViews": [ 998 | { 999 | "_type": "UMLEnumerationLiteralView", 1000 | "_id": "AAAAAAFtyTGjnICVBIQ=", 1001 | "_parent": { 1002 | "$ref": "AAAAAAFtyTFMioBvjP0=" 1003 | }, 1004 | "model": { 1005 | "$ref": "AAAAAAFtyTGjboCS7UQ=" 1006 | }, 1007 | "font": "Arial;13;0", 1008 | "left": 557, 1009 | "top": 323, 1010 | "width": 99.68359375, 1011 | "height": 13, 1012 | "text": "CMD_SUCCESS", 1013 | "horizontalAlignment": 0 1014 | } 1015 | ], 1016 | "font": "Arial;13;0", 1017 | "left": 552, 1018 | "top": 318, 1019 | "width": 109.68359375, 1020 | "height": 23 1021 | } 1022 | ], 1023 | "font": "Arial;13;0", 1024 | "containerChangeable": true, 1025 | "left": 552, 1026 | "top": 280, 1027 | "width": 109.68359375, 1028 | "height": 76, 1029 | "nameCompartment": { 1030 | "$ref": "AAAAAAFtyTFMiYBmiKQ=" 1031 | }, 1032 | "suppressAttributes": true, 1033 | "suppressOperations": true, 1034 | "attributeCompartment": { 1035 | "$ref": "AAAAAAFtyTFMiYBrjNs=" 1036 | }, 1037 | "operationCompartment": { 1038 | "$ref": "AAAAAAFtyTFMiYBsDFk=" 1039 | }, 1040 | "receptionCompartment": { 1041 | "$ref": "AAAAAAFtyTFMiYBtKqM=" 1042 | }, 1043 | "templateParameterCompartment": { 1044 | "$ref": "AAAAAAFtyTFMiYBuYYs=" 1045 | }, 1046 | "enumerationLiteralCompartment": { 1047 | "$ref": "AAAAAAFtyTFMioBvjP0=" 1048 | } 1049 | }, 1050 | { 1051 | "_type": "UMLEnumerationView", 1052 | "_id": "AAAAAAFtyU9KH4GSulQ=", 1053 | "_parent": { 1054 | "$ref": "AAAAAAFF+qBtyKM79qY=" 1055 | }, 1056 | "model": { 1057 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1058 | }, 1059 | "subViews": [ 1060 | { 1061 | "_type": "UMLNameCompartmentView", 1062 | "_id": "AAAAAAFtyU9KH4GTdh0=", 1063 | "_parent": { 1064 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1065 | }, 1066 | "model": { 1067 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1068 | }, 1069 | "subViews": [ 1070 | { 1071 | "_type": "LabelView", 1072 | "_id": "AAAAAAFtyU9KH4GUQ2Q=", 1073 | "_parent": { 1074 | "$ref": "AAAAAAFtyU9KH4GTdh0=" 1075 | }, 1076 | "font": "Arial;13;0", 1077 | "left": 21, 1078 | "top": 69, 1079 | "width": 116.77783203125, 1080 | "height": 13, 1081 | "text": "«enumeration»" 1082 | }, 1083 | { 1084 | "_type": "LabelView", 1085 | "_id": "AAAAAAFtyU9KH4GVoAc=", 1086 | "_parent": { 1087 | "$ref": "AAAAAAFtyU9KH4GTdh0=" 1088 | }, 1089 | "font": "Arial;13;1", 1090 | "left": 21, 1091 | "top": 84, 1092 | "width": 116.77783203125, 1093 | "height": 13, 1094 | "text": "AgvStatus" 1095 | }, 1096 | { 1097 | "_type": "LabelView", 1098 | "_id": "AAAAAAFtyU9KH4GW1/w=", 1099 | "_parent": { 1100 | "$ref": "AAAAAAFtyU9KH4GTdh0=" 1101 | }, 1102 | "visible": false, 1103 | "font": "Arial;13;0", 1104 | "left": -1392, 1105 | "top": -720, 1106 | "width": 73.67724609375, 1107 | "height": 13, 1108 | "text": "(from Model)" 1109 | }, 1110 | { 1111 | "_type": "LabelView", 1112 | "_id": "AAAAAAFtyU9KH4GXwdE=", 1113 | "_parent": { 1114 | "$ref": "AAAAAAFtyU9KH4GTdh0=" 1115 | }, 1116 | "visible": false, 1117 | "font": "Arial;13;0", 1118 | "left": -1392, 1119 | "top": -720, 1120 | "height": 13, 1121 | "horizontalAlignment": 1 1122 | } 1123 | ], 1124 | "font": "Arial;13;0", 1125 | "left": 16, 1126 | "top": 64, 1127 | "width": 126.77783203125, 1128 | "height": 38, 1129 | "stereotypeLabel": { 1130 | "$ref": "AAAAAAFtyU9KH4GUQ2Q=" 1131 | }, 1132 | "nameLabel": { 1133 | "$ref": "AAAAAAFtyU9KH4GVoAc=" 1134 | }, 1135 | "namespaceLabel": { 1136 | "$ref": "AAAAAAFtyU9KH4GW1/w=" 1137 | }, 1138 | "propertyLabel": { 1139 | "$ref": "AAAAAAFtyU9KH4GXwdE=" 1140 | } 1141 | }, 1142 | { 1143 | "_type": "UMLAttributeCompartmentView", 1144 | "_id": "AAAAAAFtyU9KH4GYcjs=", 1145 | "_parent": { 1146 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1147 | }, 1148 | "model": { 1149 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1150 | }, 1151 | "visible": false, 1152 | "font": "Arial;13;0", 1153 | "left": -696, 1154 | "top": -360, 1155 | "width": 10, 1156 | "height": 10 1157 | }, 1158 | { 1159 | "_type": "UMLOperationCompartmentView", 1160 | "_id": "AAAAAAFtyU9KH4GZAzw=", 1161 | "_parent": { 1162 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1163 | }, 1164 | "model": { 1165 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1166 | }, 1167 | "visible": false, 1168 | "font": "Arial;13;0", 1169 | "left": -696, 1170 | "top": -360, 1171 | "width": 10, 1172 | "height": 10 1173 | }, 1174 | { 1175 | "_type": "UMLReceptionCompartmentView", 1176 | "_id": "AAAAAAFtyU9KH4GapiI=", 1177 | "_parent": { 1178 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1179 | }, 1180 | "model": { 1181 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1182 | }, 1183 | "visible": false, 1184 | "font": "Arial;13;0", 1185 | "left": -696, 1186 | "top": -360, 1187 | "width": 10, 1188 | "height": 10 1189 | }, 1190 | { 1191 | "_type": "UMLTemplateParameterCompartmentView", 1192 | "_id": "AAAAAAFtyU9KH4GbigQ=", 1193 | "_parent": { 1194 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1195 | }, 1196 | "model": { 1197 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1198 | }, 1199 | "visible": false, 1200 | "font": "Arial;13;0", 1201 | "left": -696, 1202 | "top": -360, 1203 | "width": 10, 1204 | "height": 10 1205 | }, 1206 | { 1207 | "_type": "UMLEnumerationLiteralCompartmentView", 1208 | "_id": "AAAAAAFtyU9KIIGcePI=", 1209 | "_parent": { 1210 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1211 | }, 1212 | "model": { 1213 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 1214 | }, 1215 | "subViews": [ 1216 | { 1217 | "_type": "UMLEnumerationLiteralView", 1218 | "_id": "AAAAAAFtyU+L1IHBmHU=", 1219 | "_parent": { 1220 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1221 | }, 1222 | "model": { 1223 | "$ref": "AAAAAAFtyU+LnYG+24g=" 1224 | }, 1225 | "font": "Arial;13;0", 1226 | "left": 21, 1227 | "top": 107, 1228 | "width": 116.77783203125, 1229 | "height": 13, 1230 | "text": "STA_WAIT", 1231 | "horizontalAlignment": 0 1232 | }, 1233 | { 1234 | "_type": "UMLEnumerationLiteralView", 1235 | "_id": "AAAAAAFtyVBnCoHJRtg=", 1236 | "_parent": { 1237 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1238 | }, 1239 | "model": { 1240 | "$ref": "AAAAAAFtyVBm3YHGxGQ=" 1241 | }, 1242 | "font": "Arial;13;0", 1243 | "left": 21, 1244 | "top": 122, 1245 | "width": 116.77783203125, 1246 | "height": 13, 1247 | "text": "STA_RUN", 1248 | "horizontalAlignment": 0 1249 | }, 1250 | { 1251 | "_type": "UMLEnumerationLiteralView", 1252 | "_id": "AAAAAAFtyVHPbYHSSiI=", 1253 | "_parent": { 1254 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1255 | }, 1256 | "model": { 1257 | "$ref": "AAAAAAFtyVHPO4HPnyE=" 1258 | }, 1259 | "font": "Arial;13;0", 1260 | "left": 21, 1261 | "top": 137, 1262 | "width": 116.77783203125, 1263 | "height": 13, 1264 | "text": "STA_STOP", 1265 | "horizontalAlignment": 0 1266 | }, 1267 | { 1268 | "_type": "UMLEnumerationLiteralView", 1269 | "_id": "AAAAAAFtyVN06IJuS5w=", 1270 | "_parent": { 1271 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1272 | }, 1273 | "model": { 1274 | "$ref": "AAAAAAFtyVN0sYJrWvI=" 1275 | }, 1276 | "font": "Arial;13;0", 1277 | "left": 21, 1278 | "top": 152, 1279 | "width": 116.77783203125, 1280 | "height": 13, 1281 | "text": "STA_SCREAM", 1282 | "horizontalAlignment": 0 1283 | }, 1284 | { 1285 | "_type": "UMLEnumerationLiteralView", 1286 | "_id": "AAAAAAFtyVU17YKh60k=", 1287 | "_parent": { 1288 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1289 | }, 1290 | "model": { 1291 | "$ref": "AAAAAAFtyVU1wYKeVuQ=" 1292 | }, 1293 | "font": "Arial;13;0", 1294 | "left": 21, 1295 | "top": 167, 1296 | "width": 116.77783203125, 1297 | "height": 13, 1298 | "text": "STA_FIND", 1299 | "horizontalAlignment": 0 1300 | }, 1301 | { 1302 | "_type": "UMLEnumerationLiteralView", 1303 | "_id": "AAAAAAFtyVVXSIKoGZM=", 1304 | "_parent": { 1305 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1306 | }, 1307 | "model": { 1308 | "$ref": "AAAAAAFtyVVXEoKlTUM=" 1309 | }, 1310 | "font": "Arial;13;0", 1311 | "left": 21, 1312 | "top": 182, 1313 | "width": 116.77783203125, 1314 | "height": 13, 1315 | "text": "STA_OBSDOWN", 1316 | "horizontalAlignment": 0 1317 | }, 1318 | { 1319 | "_type": "UMLEnumerationLiteralView", 1320 | "_id": "AAAAAAFtyVV5IoKvgJo=", 1321 | "_parent": { 1322 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1323 | }, 1324 | "model": { 1325 | "$ref": "AAAAAAFtyVV474KsyaI=" 1326 | }, 1327 | "font": "Arial;13;0", 1328 | "left": 21, 1329 | "top": 197, 1330 | "width": 116.77783203125, 1331 | "height": 13, 1332 | "text": "STA_TRASTOP", 1333 | "horizontalAlignment": 0 1334 | }, 1335 | { 1336 | "_type": "UMLEnumerationLiteralView", 1337 | "_id": "AAAAAAFtyVYA9YK2jaU=", 1338 | "_parent": { 1339 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1340 | }, 1341 | "model": { 1342 | "$ref": "AAAAAAFtyVYAv4KzQYE=" 1343 | }, 1344 | "font": "Arial;13;0", 1345 | "left": 21, 1346 | "top": 212, 1347 | "width": 116.77783203125, 1348 | "height": 13, 1349 | "text": "STA_SLEEP", 1350 | "horizontalAlignment": 0 1351 | }, 1352 | { 1353 | "_type": "UMLEnumerationLiteralView", 1354 | "_id": "AAAAAAFtyVYwOIK9H0k=", 1355 | "_parent": { 1356 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1357 | }, 1358 | "model": { 1359 | "$ref": "AAAAAAFtyVYwBoK6smg=" 1360 | }, 1361 | "font": "Arial;13;0", 1362 | "left": 21, 1363 | "top": 227, 1364 | "width": 116.77783203125, 1365 | "height": 13, 1366 | "text": "STA_CHARGE", 1367 | "horizontalAlignment": 0 1368 | }, 1369 | { 1370 | "_type": "UMLEnumerationLiteralView", 1371 | "_id": "AAAAAAFtyVeN4ILESU0=", 1372 | "_parent": { 1373 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1374 | }, 1375 | "model": { 1376 | "$ref": "AAAAAAFtyVeNtILB+ys=" 1377 | }, 1378 | "font": "Arial;13;0", 1379 | "left": 21, 1380 | "top": 242, 1381 | "width": 116.77783203125, 1382 | "height": 13, 1383 | "text": "STA_RMTSCREAM", 1384 | "horizontalAlignment": 0 1385 | }, 1386 | { 1387 | "_type": "UMLEnumerationLiteralView", 1388 | "_id": "AAAAAAFtyVfDRoLL6OE=", 1389 | "_parent": { 1390 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1391 | }, 1392 | "model": { 1393 | "$ref": "AAAAAAFtyVfDGILIoh4=" 1394 | }, 1395 | "font": "Arial;13;0", 1396 | "left": 21, 1397 | "top": 257, 1398 | "width": 116.77783203125, 1399 | "height": 13, 1400 | "text": "STA_ALLSCREAM", 1401 | "horizontalAlignment": 0 1402 | }, 1403 | { 1404 | "_type": "UMLEnumerationLiteralView", 1405 | "_id": "AAAAAAFtyVvoRYLT7Z4=", 1406 | "_parent": { 1407 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1408 | }, 1409 | "model": { 1410 | "$ref": "AAAAAAFtyVvoF4LQFaI=" 1411 | }, 1412 | "font": "Arial;13;0", 1413 | "left": 21, 1414 | "top": 272, 1415 | "width": 116.77783203125, 1416 | "height": 13, 1417 | "text": "STA_SPEEDUP", 1418 | "horizontalAlignment": 0 1419 | }, 1420 | { 1421 | "_type": "UMLEnumerationLiteralView", 1422 | "_id": "AAAAAAFtyVwWtoLaE6g=", 1423 | "_parent": { 1424 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1425 | }, 1426 | "model": { 1427 | "$ref": "AAAAAAFtyVwWioLXzuM=" 1428 | }, 1429 | "font": "Arial;13;0", 1430 | "left": 21, 1431 | "top": 287, 1432 | "width": 116.77783203125, 1433 | "height": 13, 1434 | "text": "STA_SPEEDDOWN", 1435 | "horizontalAlignment": 0 1436 | }, 1437 | { 1438 | "_type": "UMLEnumerationLiteralView", 1439 | "_id": "AAAAAAFtyVw6JILhVM8=", 1440 | "_parent": { 1441 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1442 | }, 1443 | "model": { 1444 | "$ref": "AAAAAAFtyVw5+YLeOeY=" 1445 | }, 1446 | "font": "Arial;13;0", 1447 | "left": 21, 1448 | "top": 302, 1449 | "width": 116.77783203125, 1450 | "height": 13, 1451 | "text": "STA_PAUSE", 1452 | "horizontalAlignment": 0 1453 | } 1454 | ], 1455 | "font": "Arial;13;0", 1456 | "left": 16, 1457 | "top": 102, 1458 | "width": 126.77783203125, 1459 | "height": 218 1460 | } 1461 | ], 1462 | "font": "Arial;13;0", 1463 | "containerChangeable": true, 1464 | "left": 16, 1465 | "top": 64, 1466 | "width": 126.77783203125, 1467 | "height": 256, 1468 | "nameCompartment": { 1469 | "$ref": "AAAAAAFtyU9KH4GTdh0=" 1470 | }, 1471 | "suppressAttributes": true, 1472 | "suppressOperations": true, 1473 | "attributeCompartment": { 1474 | "$ref": "AAAAAAFtyU9KH4GYcjs=" 1475 | }, 1476 | "operationCompartment": { 1477 | "$ref": "AAAAAAFtyU9KH4GZAzw=" 1478 | }, 1479 | "receptionCompartment": { 1480 | "$ref": "AAAAAAFtyU9KH4GapiI=" 1481 | }, 1482 | "templateParameterCompartment": { 1483 | "$ref": "AAAAAAFtyU9KH4GbigQ=" 1484 | }, 1485 | "enumerationLiteralCompartment": { 1486 | "$ref": "AAAAAAFtyU9KIIGcePI=" 1487 | } 1488 | }, 1489 | { 1490 | "_type": "UMLDependencyView", 1491 | "_id": "AAAAAAFtyVJOy4JV7tQ=", 1492 | "_parent": { 1493 | "$ref": "AAAAAAFF+qBtyKM79qY=" 1494 | }, 1495 | "model": { 1496 | "$ref": "AAAAAAFtyVJOy4JT8d8=" 1497 | }, 1498 | "subViews": [ 1499 | { 1500 | "_type": "EdgeLabelView", 1501 | "_id": "AAAAAAFtyVJOy4JWEQE=", 1502 | "_parent": { 1503 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1504 | }, 1505 | "model": { 1506 | "$ref": "AAAAAAFtyVJOy4JT8d8=" 1507 | }, 1508 | "visible": false, 1509 | "font": "Arial;13;0", 1510 | "left": 162, 1511 | "top": 257, 1512 | "height": 13, 1513 | "alpha": 1.5707963267948966, 1514 | "distance": 15, 1515 | "hostEdge": { 1516 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1517 | }, 1518 | "edgePosition": 1 1519 | }, 1520 | { 1521 | "_type": "EdgeLabelView", 1522 | "_id": "AAAAAAFtyVJOy4JXBc4=", 1523 | "_parent": { 1524 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1525 | }, 1526 | "model": { 1527 | "$ref": "AAAAAAFtyVJOy4JT8d8=" 1528 | }, 1529 | "visible": null, 1530 | "font": "Arial;13;0", 1531 | "left": 154, 1532 | "top": 270, 1533 | "height": 13, 1534 | "alpha": 1.5707963267948966, 1535 | "distance": 30, 1536 | "hostEdge": { 1537 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1538 | }, 1539 | "edgePosition": 1 1540 | }, 1541 | { 1542 | "_type": "EdgeLabelView", 1543 | "_id": "AAAAAAFtyVJOy4JYp8E=", 1544 | "_parent": { 1545 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1546 | }, 1547 | "model": { 1548 | "$ref": "AAAAAAFtyVJOy4JT8d8=" 1549 | }, 1550 | "visible": false, 1551 | "font": "Arial;13;0", 1552 | "left": 179, 1553 | "top": 232, 1554 | "height": 13, 1555 | "alpha": -1.5707963267948966, 1556 | "distance": 15, 1557 | "hostEdge": { 1558 | "$ref": "AAAAAAFtyVJOy4JV7tQ=" 1559 | }, 1560 | "edgePosition": 1 1561 | } 1562 | ], 1563 | "font": "Arial;13;0", 1564 | "head": { 1565 | "$ref": "AAAAAAFtyU9KH4GSulQ=" 1566 | }, 1567 | "tail": { 1568 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 1569 | }, 1570 | "lineStyle": 1, 1571 | "points": "199:270;143:233", 1572 | "showVisibility": true, 1573 | "nameLabel": { 1574 | "$ref": "AAAAAAFtyVJOy4JWEQE=" 1575 | }, 1576 | "stereotypeLabel": { 1577 | "$ref": "AAAAAAFtyVJOy4JXBc4=" 1578 | }, 1579 | "propertyLabel": { 1580 | "$ref": "AAAAAAFtyVJOy4JYp8E=" 1581 | } 1582 | }, 1583 | { 1584 | "_type": "UMLDependencyView", 1585 | "_id": "AAAAAAFtyVRjz4KBCn0=", 1586 | "_parent": { 1587 | "$ref": "AAAAAAFF+qBtyKM79qY=" 1588 | }, 1589 | "model": { 1590 | "$ref": "AAAAAAFtyVRjz4J/Sd0=" 1591 | }, 1592 | "subViews": [ 1593 | { 1594 | "_type": "EdgeLabelView", 1595 | "_id": "AAAAAAFtyVRj0IKCI50=", 1596 | "_parent": { 1597 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1598 | }, 1599 | "model": { 1600 | "$ref": "AAAAAAFtyVRjz4J/Sd0=" 1601 | }, 1602 | "visible": false, 1603 | "font": "Arial;13;0", 1604 | "left": 523, 1605 | "top": 312, 1606 | "height": 13, 1607 | "alpha": 1.5707963267948966, 1608 | "distance": 15, 1609 | "hostEdge": { 1610 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1611 | }, 1612 | "edgePosition": 1 1613 | }, 1614 | { 1615 | "_type": "EdgeLabelView", 1616 | "_id": "AAAAAAFtyVRj0IKDTN4=", 1617 | "_parent": { 1618 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1619 | }, 1620 | "model": { 1621 | "$ref": "AAAAAAFtyVRjz4J/Sd0=" 1622 | }, 1623 | "visible": null, 1624 | "font": "Arial;13;0", 1625 | "left": 520, 1626 | "top": 297, 1627 | "height": 13, 1628 | "alpha": 1.5707963267948966, 1629 | "distance": 30, 1630 | "hostEdge": { 1631 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1632 | }, 1633 | "edgePosition": 1 1634 | }, 1635 | { 1636 | "_type": "EdgeLabelView", 1637 | "_id": "AAAAAAFtyVRj0IKElxo=", 1638 | "_parent": { 1639 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1640 | }, 1641 | "model": { 1642 | "$ref": "AAAAAAFtyVRjz4J/Sd0=" 1643 | }, 1644 | "visible": false, 1645 | "font": "Arial;13;0", 1646 | "left": 530, 1647 | "top": 341, 1648 | "height": 13, 1649 | "alpha": -1.5707963267948966, 1650 | "distance": 15, 1651 | "hostEdge": { 1652 | "$ref": "AAAAAAFtyVRjz4KBCn0=" 1653 | }, 1654 | "edgePosition": 1 1655 | } 1656 | ], 1657 | "font": "Arial;13;0", 1658 | "head": { 1659 | "$ref": "AAAAAAFtyTFMiYBlmNc=" 1660 | }, 1661 | "tail": { 1662 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 1663 | }, 1664 | "lineStyle": 1, 1665 | "points": "504:338;551:328", 1666 | "showVisibility": true, 1667 | "nameLabel": { 1668 | "$ref": "AAAAAAFtyVRj0IKCI50=" 1669 | }, 1670 | "stereotypeLabel": { 1671 | "$ref": "AAAAAAFtyVRj0IKDTN4=" 1672 | }, 1673 | "propertyLabel": { 1674 | "$ref": "AAAAAAFtyVRj0IKElxo=" 1675 | } 1676 | }, 1677 | { 1678 | "_type": "UMLEnumerationView", 1679 | "_id": "AAAAAAFtyVy+qoLnGoc=", 1680 | "_parent": { 1681 | "$ref": "AAAAAAFF+qBtyKM79qY=" 1682 | }, 1683 | "model": { 1684 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1685 | }, 1686 | "subViews": [ 1687 | { 1688 | "_type": "UMLNameCompartmentView", 1689 | "_id": "AAAAAAFtyVy+qoLomII=", 1690 | "_parent": { 1691 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1692 | }, 1693 | "model": { 1694 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1695 | }, 1696 | "subViews": [ 1697 | { 1698 | "_type": "LabelView", 1699 | "_id": "AAAAAAFtyVy+qoLpu+4=", 1700 | "_parent": { 1701 | "$ref": "AAAAAAFtyVy+qoLomII=" 1702 | }, 1703 | "font": "Arial;13;0", 1704 | "left": 565, 1705 | "top": 77, 1706 | "width": 86.72802734375, 1707 | "height": 13, 1708 | "text": "«enumeration»" 1709 | }, 1710 | { 1711 | "_type": "LabelView", 1712 | "_id": "AAAAAAFtyVy+qoLqC7I=", 1713 | "_parent": { 1714 | "$ref": "AAAAAAFtyVy+qoLomII=" 1715 | }, 1716 | "font": "Arial;13;1", 1717 | "left": 565, 1718 | "top": 92, 1719 | "width": 86.72802734375, 1720 | "height": 13, 1721 | "text": "AgvError" 1722 | }, 1723 | { 1724 | "_type": "LabelView", 1725 | "_id": "AAAAAAFtyVy+qoLrsa8=", 1726 | "_parent": { 1727 | "$ref": "AAAAAAFtyVy+qoLomII=" 1728 | }, 1729 | "visible": false, 1730 | "font": "Arial;13;0", 1731 | "left": 672, 1732 | "top": -160, 1733 | "width": 73.67724609375, 1734 | "height": 13, 1735 | "text": "(from Model)" 1736 | }, 1737 | { 1738 | "_type": "LabelView", 1739 | "_id": "AAAAAAFtyVy+qoLsHQU=", 1740 | "_parent": { 1741 | "$ref": "AAAAAAFtyVy+qoLomII=" 1742 | }, 1743 | "visible": false, 1744 | "font": "Arial;13;0", 1745 | "left": 672, 1746 | "top": -160, 1747 | "height": 13, 1748 | "horizontalAlignment": 1 1749 | } 1750 | ], 1751 | "font": "Arial;13;0", 1752 | "left": 560, 1753 | "top": 72, 1754 | "width": 96.72802734375, 1755 | "height": 38, 1756 | "stereotypeLabel": { 1757 | "$ref": "AAAAAAFtyVy+qoLpu+4=" 1758 | }, 1759 | "nameLabel": { 1760 | "$ref": "AAAAAAFtyVy+qoLqC7I=" 1761 | }, 1762 | "namespaceLabel": { 1763 | "$ref": "AAAAAAFtyVy+qoLrsa8=" 1764 | }, 1765 | "propertyLabel": { 1766 | "$ref": "AAAAAAFtyVy+qoLsHQU=" 1767 | } 1768 | }, 1769 | { 1770 | "_type": "UMLAttributeCompartmentView", 1771 | "_id": "AAAAAAFtyVy+qoLt+t8=", 1772 | "_parent": { 1773 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1774 | }, 1775 | "model": { 1776 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1777 | }, 1778 | "visible": false, 1779 | "font": "Arial;13;0", 1780 | "left": 336, 1781 | "top": -80, 1782 | "width": 10, 1783 | "height": 10 1784 | }, 1785 | { 1786 | "_type": "UMLOperationCompartmentView", 1787 | "_id": "AAAAAAFtyVy+qoLuCEM=", 1788 | "_parent": { 1789 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1790 | }, 1791 | "model": { 1792 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1793 | }, 1794 | "visible": false, 1795 | "font": "Arial;13;0", 1796 | "left": 336, 1797 | "top": -80, 1798 | "width": 10, 1799 | "height": 10 1800 | }, 1801 | { 1802 | "_type": "UMLReceptionCompartmentView", 1803 | "_id": "AAAAAAFtyVy+qoLvKRI=", 1804 | "_parent": { 1805 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1806 | }, 1807 | "model": { 1808 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1809 | }, 1810 | "visible": false, 1811 | "font": "Arial;13;0", 1812 | "left": 336, 1813 | "top": -80, 1814 | "width": 10, 1815 | "height": 10 1816 | }, 1817 | { 1818 | "_type": "UMLTemplateParameterCompartmentView", 1819 | "_id": "AAAAAAFtyVy+qoLwPuc=", 1820 | "_parent": { 1821 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1822 | }, 1823 | "model": { 1824 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1825 | }, 1826 | "visible": false, 1827 | "font": "Arial;13;0", 1828 | "left": 336, 1829 | "top": -80, 1830 | "width": 10, 1831 | "height": 10 1832 | }, 1833 | { 1834 | "_type": "UMLEnumerationLiteralCompartmentView", 1835 | "_id": "AAAAAAFtyVy+qoLxdlU=", 1836 | "_parent": { 1837 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 1838 | }, 1839 | "model": { 1840 | "$ref": "AAAAAAFtyVy+qoLlim8=" 1841 | }, 1842 | "subViews": [ 1843 | { 1844 | "_type": "UMLEnumerationLiteralView", 1845 | "_id": "AAAAAAFtyVzzEYMX1do=", 1846 | "_parent": { 1847 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1848 | }, 1849 | "model": { 1850 | "$ref": "AAAAAAFtyVzy4IMUi+s=" 1851 | }, 1852 | "font": "Arial;13;0", 1853 | "left": 565, 1854 | "top": 115, 1855 | "width": 86.72802734375, 1856 | "height": 13, 1857 | "text": "ERR_NONE", 1858 | "horizontalAlignment": 0 1859 | }, 1860 | { 1861 | "_type": "UMLEnumerationLiteralView", 1862 | "_id": "AAAAAAFtyV0er4Mev44=", 1863 | "_parent": { 1864 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1865 | }, 1866 | "model": { 1867 | "$ref": "AAAAAAFtyV0efoMbO7Q=" 1868 | }, 1869 | "font": "Arial;13;0", 1870 | "left": 565, 1871 | "top": 130, 1872 | "width": 86.72802734375, 1873 | "height": 13, 1874 | "text": "ERR_MISS", 1875 | "horizontalAlignment": 0 1876 | }, 1877 | { 1878 | "_type": "UMLEnumerationLiteralView", 1879 | "_id": "AAAAAAFtyV1NooMlYeI=", 1880 | "_parent": { 1881 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1882 | }, 1883 | "model": { 1884 | "$ref": "AAAAAAFtyV1NbYMiU0g=" 1885 | }, 1886 | "font": "Arial;13;0", 1887 | "left": 565, 1888 | "top": 145, 1889 | "width": 86.72802734375, 1890 | "height": 13, 1891 | "text": "ERR_MOBS", 1892 | "horizontalAlignment": 0 1893 | }, 1894 | { 1895 | "_type": "UMLEnumerationLiteralView", 1896 | "_id": "AAAAAAFtyV2sfYMtwkU=", 1897 | "_parent": { 1898 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1899 | }, 1900 | "model": { 1901 | "$ref": "AAAAAAFtyV2sUYMqc0s=" 1902 | }, 1903 | "font": "Arial;13;0", 1904 | "left": 565, 1905 | "top": 160, 1906 | "width": 86.72802734375, 1907 | "height": 13, 1908 | "text": "ERR_OBS", 1909 | "horizontalAlignment": 0 1910 | }, 1911 | { 1912 | "_type": "UMLEnumerationLiteralView", 1913 | "_id": "AAAAAAFtyV3GAoM0gd8=", 1914 | "_parent": { 1915 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1916 | }, 1917 | "model": { 1918 | "$ref": "AAAAAAFtyV3F0YMxpBM=" 1919 | }, 1920 | "font": "Arial;13;0", 1921 | "left": 565, 1922 | "top": 175, 1923 | "width": 86.72802734375, 1924 | "height": 13, 1925 | "text": "ERR_LINK", 1926 | "horizontalAlignment": 0 1927 | }, 1928 | { 1929 | "_type": "UMLEnumerationLiteralView", 1930 | "_id": "AAAAAAFtyV56lYNOP5M=", 1931 | "_parent": { 1932 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1933 | }, 1934 | "model": { 1935 | "$ref": "AAAAAAFtyV56aoNLSiY=" 1936 | }, 1937 | "font": "Arial;13;0", 1938 | "left": 565, 1939 | "top": 190, 1940 | "width": 86.72802734375, 1941 | "height": 13, 1942 | "text": "ERR_LIFTER", 1943 | "horizontalAlignment": 0 1944 | }, 1945 | { 1946 | "_type": "UMLEnumerationLiteralView", 1947 | "_id": "AAAAAAFtyV6Z5YNVS/M=", 1948 | "_parent": { 1949 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1950 | }, 1951 | "model": { 1952 | "$ref": "AAAAAAFtyV6ZsINSX04=" 1953 | }, 1954 | "font": "Arial;13;0", 1955 | "left": 565, 1956 | "top": 205, 1957 | "width": 86.72802734375, 1958 | "height": 13, 1959 | "text": "ERR_ROLLER", 1960 | "horizontalAlignment": 0 1961 | }, 1962 | { 1963 | "_type": "UMLEnumerationLiteralView", 1964 | "_id": "AAAAAAFtyV7m3INdwCY=", 1965 | "_parent": { 1966 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 1967 | }, 1968 | "model": { 1969 | "$ref": "AAAAAAFtyV7msYNaxg4=" 1970 | }, 1971 | "font": "Arial;13;0", 1972 | "left": 565, 1973 | "top": 220, 1974 | "width": 86.72802734375, 1975 | "height": 13, 1976 | "text": "ERR_ARM", 1977 | "horizontalAlignment": 0 1978 | } 1979 | ], 1980 | "font": "Arial;13;0", 1981 | "left": 560, 1982 | "top": 110, 1983 | "width": 96.72802734375, 1984 | "height": 128 1985 | } 1986 | ], 1987 | "font": "Arial;13;0", 1988 | "containerChangeable": true, 1989 | "left": 560, 1990 | "top": 72, 1991 | "width": 96.72802734375, 1992 | "height": 166, 1993 | "nameCompartment": { 1994 | "$ref": "AAAAAAFtyVy+qoLomII=" 1995 | }, 1996 | "suppressAttributes": true, 1997 | "suppressOperations": true, 1998 | "attributeCompartment": { 1999 | "$ref": "AAAAAAFtyVy+qoLt+t8=" 2000 | }, 2001 | "operationCompartment": { 2002 | "$ref": "AAAAAAFtyVy+qoLuCEM=" 2003 | }, 2004 | "receptionCompartment": { 2005 | "$ref": "AAAAAAFtyVy+qoLvKRI=" 2006 | }, 2007 | "templateParameterCompartment": { 2008 | "$ref": "AAAAAAFtyVy+qoLwPuc=" 2009 | }, 2010 | "enumerationLiteralCompartment": { 2011 | "$ref": "AAAAAAFtyVy+qoLxdlU=" 2012 | } 2013 | }, 2014 | { 2015 | "_type": "UMLDependencyView", 2016 | "_id": "AAAAAAFtyV5Kh4M8iHA=", 2017 | "_parent": { 2018 | "$ref": "AAAAAAFF+qBtyKM79qY=" 2019 | }, 2020 | "model": { 2021 | "$ref": "AAAAAAFtyV5KhoM6DiE=" 2022 | }, 2023 | "subViews": [ 2024 | { 2025 | "_type": "EdgeLabelView", 2026 | "_id": "AAAAAAFtyV5Kh4M9P8Q=", 2027 | "_parent": { 2028 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2029 | }, 2030 | "model": { 2031 | "$ref": "AAAAAAFtyV5KhoM6DiE=" 2032 | }, 2033 | "visible": false, 2034 | "font": "Arial;13;0", 2035 | "left": 521, 2036 | "top": 199, 2037 | "height": 13, 2038 | "alpha": 1.5707963267948966, 2039 | "distance": 15, 2040 | "hostEdge": { 2041 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2042 | }, 2043 | "edgePosition": 1 2044 | }, 2045 | { 2046 | "_type": "EdgeLabelView", 2047 | "_id": "AAAAAAFtyV5Kh4M+H6o=", 2048 | "_parent": { 2049 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2050 | }, 2051 | "model": { 2052 | "$ref": "AAAAAAFtyV5KhoM6DiE=" 2053 | }, 2054 | "visible": null, 2055 | "font": "Arial;13;0", 2056 | "left": 511, 2057 | "top": 187, 2058 | "height": 13, 2059 | "alpha": 1.5707963267948966, 2060 | "distance": 30, 2061 | "hostEdge": { 2062 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2063 | }, 2064 | "edgePosition": 1 2065 | }, 2066 | { 2067 | "_type": "EdgeLabelView", 2068 | "_id": "AAAAAAFtyV5Kh4M/cDE=", 2069 | "_parent": { 2070 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2071 | }, 2072 | "model": { 2073 | "$ref": "AAAAAAFtyV5KhoM6DiE=" 2074 | }, 2075 | "visible": false, 2076 | "font": "Arial;13;0", 2077 | "left": 540, 2078 | "top": 222, 2079 | "height": 13, 2080 | "alpha": -1.5707963267948966, 2081 | "distance": 15, 2082 | "hostEdge": { 2083 | "$ref": "AAAAAAFtyV5Kh4M8iHA=" 2084 | }, 2085 | "edgePosition": 1 2086 | } 2087 | ], 2088 | "font": "Arial;13;0", 2089 | "head": { 2090 | "$ref": "AAAAAAFtyVy+qoLnGoc=" 2091 | }, 2092 | "tail": { 2093 | "$ref": "AAAAAAFtyRnlJX+5bLo=" 2094 | }, 2095 | "lineStyle": 1, 2096 | "points": "504:240;559:194", 2097 | "showVisibility": true, 2098 | "nameLabel": { 2099 | "$ref": "AAAAAAFtyV5Kh4M9P8Q=" 2100 | }, 2101 | "stereotypeLabel": { 2102 | "$ref": "AAAAAAFtyV5Kh4M+H6o=" 2103 | }, 2104 | "propertyLabel": { 2105 | "$ref": "AAAAAAFtyV5Kh4M/cDE=" 2106 | } 2107 | } 2108 | ] 2109 | }, 2110 | { 2111 | "_type": "UMLClass", 2112 | "_id": "AAAAAAFtyRnlI3+3zF4=", 2113 | "_parent": { 2114 | "$ref": "AAAAAAFF+qBWK6M3Z8Y=" 2115 | }, 2116 | "name": "AGV", 2117 | "ownedElements": [ 2118 | { 2119 | "_type": "UMLDependency", 2120 | "_id": "AAAAAAFtyVJOy4JT8d8=", 2121 | "_parent": { 2122 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2123 | }, 2124 | "source": { 2125 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2126 | }, 2127 | "target": { 2128 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2129 | } 2130 | }, 2131 | { 2132 | "_type": "UMLDependency", 2133 | "_id": "AAAAAAFtyVRjz4J/Sd0=", 2134 | "_parent": { 2135 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2136 | }, 2137 | "source": { 2138 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2139 | }, 2140 | "target": { 2141 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 2142 | } 2143 | }, 2144 | { 2145 | "_type": "UMLDependency", 2146 | "_id": "AAAAAAFtyV5KhoM6DiE=", 2147 | "_parent": { 2148 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2149 | }, 2150 | "source": { 2151 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2152 | }, 2153 | "target": { 2154 | "$ref": "AAAAAAFtyVy+qoLlim8=" 2155 | } 2156 | } 2157 | ], 2158 | "attributes": [ 2159 | { 2160 | "_type": "UMLAttribute", 2161 | "_id": "AAAAAAFtyRode3/hHwo=", 2162 | "_parent": { 2163 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2164 | }, 2165 | "name": "m_usID", 2166 | "documentation": "* @brief AGV的编号/身份ID信息", 2167 | "visibility": "protected", 2168 | "type": "unsigned short" 2169 | }, 2170 | { 2171 | "_type": "UMLAttribute", 2172 | "_id": "AAAAAAFtyUr3g4Fpra4=", 2173 | "_parent": { 2174 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2175 | }, 2176 | "name": "m_usCurRFID", 2177 | "documentation": "* @brief AGV当前所在RFID地标卡信息", 2178 | "visibility": "protected", 2179 | "type": "unsigned short" 2180 | }, 2181 | { 2182 | "_type": "UMLAttribute", 2183 | "_id": "AAAAAAFtysSgqZXwxLk=", 2184 | "_parent": { 2185 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2186 | }, 2187 | "name": "m_usOldRFID", 2188 | "visibility": "protected", 2189 | "type": "unsigned short" 2190 | }, 2191 | { 2192 | "_type": "UMLAttribute", 2193 | "_id": "AAAAAAFtyU3SK4GAuXs=", 2194 | "_parent": { 2195 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2196 | }, 2197 | "name": "m_usEndRFID", 2198 | "documentation": "* @brief AGV移动终点的RIFD地标卡信息", 2199 | "visibility": "protected", 2200 | "type": "unsigned short" 2201 | }, 2202 | { 2203 | "_type": "UMLAttribute", 2204 | "_id": "AAAAAAFtyU5sKoGIYtw=", 2205 | "_parent": { 2206 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2207 | }, 2208 | "name": "m_byStatus", 2209 | "documentation": "* @brief AGV当前的运行状态", 2210 | "visibility": "protected", 2211 | "type": "unsigned char" 2212 | }, 2213 | { 2214 | "_type": "UMLAttribute", 2215 | "_id": "AAAAAAFtyV+i3INh0KM=", 2216 | "_parent": { 2217 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2218 | }, 2219 | "name": "m_byBattery", 2220 | "visibility": "protected", 2221 | "type": "unsigned char" 2222 | }, 2223 | { 2224 | "_type": "UMLAttribute", 2225 | "_id": "AAAAAAFtyWAJ3INpmDw=", 2226 | "_parent": { 2227 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2228 | }, 2229 | "name": "m_chSpeed", 2230 | "visibility": "protected", 2231 | "type": "char" 2232 | }, 2233 | { 2234 | "_type": "UMLAttribute", 2235 | "_id": "AAAAAAFtyWA2HoNwNDs=", 2236 | "_parent": { 2237 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2238 | }, 2239 | "name": "m_chError", 2240 | "visibility": "protected", 2241 | "type": "char" 2242 | } 2243 | ], 2244 | "operations": [ 2245 | { 2246 | "_type": "UMLOperation", 2247 | "_id": "AAAAAAFtyR+iv3/z/fw=", 2248 | "_parent": { 2249 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2250 | }, 2251 | "name": "WeakUp", 2252 | "documentation": "* @brief 唤醒函数\n* \n* 用于唤醒进入休眠状态下的AGV,使AGV恢复正常的运行状态。\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2253 | "parameters": [ 2254 | { 2255 | "_type": "UMLParameter", 2256 | "_id": "AAAAAAFtySAtWn/6Dj0=", 2257 | "_parent": { 2258 | "$ref": "AAAAAAFtyR+iv3/z/fw=" 2259 | }, 2260 | "type": "CMDERR", 2261 | "direction": "return" 2262 | } 2263 | ] 2264 | }, 2265 | { 2266 | "_type": "UMLOperation", 2267 | "_id": "AAAAAAFtySA5AX/85aE=", 2268 | "_parent": { 2269 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2270 | }, 2271 | "name": "Restart", 2272 | "documentation": "* @brief 复位函数\n*\n* 用于恢复处于急停状态下的AGV,使AGV恢复正常的运行状态。\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2273 | "parameters": [ 2274 | { 2275 | "_type": "UMLParameter", 2276 | "_id": "AAAAAAFtySCib4AEKkw=", 2277 | "_parent": { 2278 | "$ref": "AAAAAAFtySA5AX/85aE=" 2279 | }, 2280 | "type": "CMDERR", 2281 | "direction": "return" 2282 | } 2283 | ] 2284 | }, 2285 | { 2286 | "_type": "UMLOperation", 2287 | "_id": "AAAAAAFtySCyTYAGpWg=", 2288 | "_parent": { 2289 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2290 | }, 2291 | "name": "Reset", 2292 | "documentation": "* @brief 重置函数/恢复出厂设置函数\n*\n* 用以回复AGV的初始状态\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2293 | "parameters": [ 2294 | { 2295 | "_type": "UMLParameter", 2296 | "_id": "AAAAAAFtySDLmYANbbg=", 2297 | "_parent": { 2298 | "$ref": "AAAAAAFtySCyTYAGpWg=" 2299 | }, 2300 | "type": "CMDERR", 2301 | "direction": "return" 2302 | } 2303 | ] 2304 | }, 2305 | { 2306 | "_type": "UMLOperation", 2307 | "_id": "AAAAAAFtys+wZJap83g=", 2308 | "_parent": { 2309 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2310 | }, 2311 | "name": "Scream", 2312 | "parameters": [ 2313 | { 2314 | "_type": "UMLParameter", 2315 | "_id": "AAAAAAFtytAaN5bJB60=", 2316 | "_parent": { 2317 | "$ref": "AAAAAAFtys+wZJap83g=" 2318 | }, 2319 | "type": "CMDERR", 2320 | "direction": "return" 2321 | } 2322 | ] 2323 | }, 2324 | { 2325 | "_type": "UMLOperation", 2326 | "_id": "AAAAAAFtySDUUoAPf4k=", 2327 | "_parent": { 2328 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2329 | }, 2330 | "name": "RemoteStream", 2331 | "documentation": "* @brief 远程急停函数\n*\n* 通知AGV紧急停止运行,此函数通常由系统外部的设备控制,用以配合生产线上的紧急全线停产\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2332 | "parameters": [ 2333 | { 2334 | "_type": "UMLParameter", 2335 | "_id": "AAAAAAFtySH4H4AYer4=", 2336 | "_parent": { 2337 | "$ref": "AAAAAAFtySDUUoAPf4k=" 2338 | }, 2339 | "type": "CMDERR", 2340 | "direction": "return" 2341 | } 2342 | ] 2343 | }, 2344 | { 2345 | "_type": "UMLOperation", 2346 | "_id": "AAAAAAFtySJAIoAaK+g=", 2347 | "_parent": { 2348 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2349 | }, 2350 | "name": "Sleep", 2351 | "documentation": "* @brief 休眠函数\n*\n* 通知AGV进入休眠模式,关闭绝大部分的电源,仅保留通信模块的正常运行。\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2352 | "parameters": [ 2353 | { 2354 | "_type": "UMLParameter", 2355 | "_id": "AAAAAAFtySJn84AhXWc=", 2356 | "_parent": { 2357 | "$ref": "AAAAAAFtySJAIoAaK+g=" 2358 | }, 2359 | "type": "CMDERR", 2360 | "direction": "return" 2361 | } 2362 | ] 2363 | }, 2364 | { 2365 | "_type": "UMLOperation", 2366 | "_id": "AAAAAAFtySJoS4Ajvng=", 2367 | "_parent": { 2368 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2369 | }, 2370 | "name": "Pause", 2371 | "documentation": "* @brief 暂停函数\n*\n* 通知AGV暂停当前的命令\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2372 | "parameters": [ 2373 | { 2374 | "_type": "UMLParameter", 2375 | "_id": "AAAAAAFtySMYH4ArUCw=", 2376 | "_parent": { 2377 | "$ref": "AAAAAAFtySJoS4Ajvng=" 2378 | }, 2379 | "type": "CMDERR", 2380 | "direction": "return" 2381 | } 2382 | ] 2383 | }, 2384 | { 2385 | "_type": "UMLOperation", 2386 | "_id": "AAAAAAFtySM4IIAtQJA=", 2387 | "_parent": { 2388 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2389 | }, 2390 | "name": "Continue", 2391 | "documentation": "* @brief 继续函数\n*\n* 通知AGV继续之前未完成的命令\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2392 | "parameters": [ 2393 | { 2394 | "_type": "UMLParameter", 2395 | "_id": "AAAAAAFtySNRrYA0v1I=", 2396 | "_parent": { 2397 | "$ref": "AAAAAAFtySM4IIAtQJA=" 2398 | }, 2399 | "type": "CMDERR", 2400 | "direction": "return" 2401 | } 2402 | ] 2403 | }, 2404 | { 2405 | "_type": "UMLOperation", 2406 | "_id": "AAAAAAFtySNbTYA2SLM=", 2407 | "_parent": { 2408 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2409 | }, 2410 | "name": "Shutdown", 2411 | "documentation": "* @brief 关机函数\n*\n* 通知AGV关闭电源\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2412 | "parameters": [ 2413 | { 2414 | "_type": "UMLParameter", 2415 | "_id": "AAAAAAFtySN1LoA9EPU=", 2416 | "_parent": { 2417 | "$ref": "AAAAAAFtySNbTYA2SLM=" 2418 | }, 2419 | "type": "CMDERR", 2420 | "direction": "return" 2421 | } 2422 | ] 2423 | }, 2424 | { 2425 | "_type": "UMLOperation", 2426 | "_id": "AAAAAAFtySm9PIA/Xh4=", 2427 | "_parent": { 2428 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2429 | }, 2430 | "name": "Move", 2431 | "documentation": "* @brief 移动函数\n*\n* 通知AGV移动至指定的RFID地标卡上\n* @param unsigned short 指定的RFID地标卡编号\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2432 | "parameters": [ 2433 | { 2434 | "_type": "UMLParameter", 2435 | "_id": "AAAAAAFtySoXkoBGKOE=", 2436 | "_parent": { 2437 | "$ref": "AAAAAAFtySm9PIA/Xh4=" 2438 | }, 2439 | "name": "unsigned short", 2440 | "type": "" 2441 | }, 2442 | { 2443 | "_type": "UMLParameter", 2444 | "_id": "AAAAAAFtySoXkoBHGd8=", 2445 | "_parent": { 2446 | "$ref": "AAAAAAFtySm9PIA/Xh4=" 2447 | }, 2448 | "type": "CMDERR", 2449 | "direction": "return" 2450 | } 2451 | ] 2452 | }, 2453 | { 2454 | "_type": "UMLOperation", 2455 | "_id": "AAAAAAFtySrjLYBKuy8=", 2456 | "_parent": { 2457 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2458 | }, 2459 | "name": "TrafficPass", 2460 | "documentation": "* @brief 交通管制放行函数\n*\n* 当AGV在交通管制点时,可使用此函数通知AGV通过此交通管制点。\n*\n* @return 可以发送指令返回CMD_SUCCESS,否则返回其他异常信息", 2461 | "parameters": [ 2462 | { 2463 | "_type": "UMLParameter", 2464 | "_id": "AAAAAAFtySsq64BRylE=", 2465 | "_parent": { 2466 | "$ref": "AAAAAAFtySrjLYBKuy8=" 2467 | }, 2468 | "type": "CMDERR", 2469 | "direction": "return" 2470 | } 2471 | ] 2472 | }, 2473 | { 2474 | "_type": "UMLOperation", 2475 | "_id": "AAAAAAFtyWEnFIN4DU4=", 2476 | "_parent": { 2477 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2478 | }, 2479 | "name": "Action", 2480 | "visibility": "protected", 2481 | "parameters": [ 2482 | { 2483 | "_type": "UMLParameter", 2484 | "_id": "AAAAAAFtyWGQcYN/vcs=", 2485 | "_parent": { 2486 | "$ref": "AAAAAAFtyWEnFIN4DU4=" 2487 | }, 2488 | "name": "unsigned short", 2489 | "type": "" 2490 | }, 2491 | { 2492 | "_type": "UMLParameter", 2493 | "_id": "AAAAAAFtyWGQcYOAQuc=", 2494 | "_parent": { 2495 | "$ref": "AAAAAAFtyWEnFIN4DU4=" 2496 | }, 2497 | "name": "unsigned short", 2498 | "type": "" 2499 | }, 2500 | { 2501 | "_type": "UMLParameter", 2502 | "_id": "AAAAAAFtyWGQcYOBp7A=", 2503 | "_parent": { 2504 | "$ref": "AAAAAAFtyWEnFIN4DU4=" 2505 | }, 2506 | "type": "CMDERR", 2507 | "direction": "return" 2508 | } 2509 | ] 2510 | }, 2511 | { 2512 | "_type": "UMLOperation", 2513 | "_id": "AAAAAAFtys4FLpaOUa8=", 2514 | "_parent": { 2515 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2516 | }, 2517 | "name": "SetSpeed", 2518 | "parameters": [ 2519 | { 2520 | "_type": "UMLParameter", 2521 | "_id": "AAAAAAFtys7QBJalq70=", 2522 | "_parent": { 2523 | "$ref": "AAAAAAFtys4FLpaOUa8=" 2524 | }, 2525 | "name": "char", 2526 | "type": "" 2527 | }, 2528 | { 2529 | "_type": "UMLParameter", 2530 | "_id": "AAAAAAFtys7QBJamKqo=", 2531 | "_parent": { 2532 | "$ref": "AAAAAAFtys4FLpaOUa8=" 2533 | }, 2534 | "type": "CMDERR", 2535 | "direction": "return" 2536 | } 2537 | ] 2538 | }, 2539 | { 2540 | "_type": "UMLOperation", 2541 | "_id": "AAAAAAFtysMy3JXVzK8=", 2542 | "_parent": { 2543 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2544 | }, 2545 | "name": "GetID", 2546 | "parameters": [ 2547 | { 2548 | "_type": "UMLParameter", 2549 | "_id": "AAAAAAFtysPAOJXcFo8=", 2550 | "_parent": { 2551 | "$ref": "AAAAAAFtysMy3JXVzK8=" 2552 | }, 2553 | "type": "unsigned short", 2554 | "direction": "return" 2555 | } 2556 | ] 2557 | }, 2558 | { 2559 | "_type": "UMLOperation", 2560 | "_id": "AAAAAAFtysPAtZXeOIk=", 2561 | "_parent": { 2562 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2563 | }, 2564 | "name": "GetCurRFID", 2565 | "parameters": [ 2566 | { 2567 | "_type": "UMLParameter", 2568 | "_id": "AAAAAAFtysRMGZXlGjs=", 2569 | "_parent": { 2570 | "$ref": "AAAAAAFtysPAtZXeOIk=" 2571 | }, 2572 | "type": "unsigned short", 2573 | "direction": "return" 2574 | } 2575 | ] 2576 | }, 2577 | { 2578 | "_type": "UMLOperation", 2579 | "_id": "AAAAAAFtysRat5Xn3Lw=", 2580 | "_parent": { 2581 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2582 | }, 2583 | "name": "GetEndRFID", 2584 | "parameters": [ 2585 | { 2586 | "_type": "UMLParameter", 2587 | "_id": "AAAAAAFtysSJsJXuWw0=", 2588 | "_parent": { 2589 | "$ref": "AAAAAAFtysRat5Xn3Lw=" 2590 | }, 2591 | "type": "unsigned short", 2592 | "direction": "return" 2593 | } 2594 | ] 2595 | }, 2596 | { 2597 | "_type": "UMLOperation", 2598 | "_id": "AAAAAAFtysU305X8dww=", 2599 | "_parent": { 2600 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2601 | }, 2602 | "name": "GetOldRFID", 2603 | "parameters": [ 2604 | { 2605 | "_type": "UMLParameter", 2606 | "_id": "AAAAAAFtysVjhpYDNHw=", 2607 | "_parent": { 2608 | "$ref": "AAAAAAFtysU305X8dww=" 2609 | }, 2610 | "type": "unsigned short", 2611 | "direction": "return" 2612 | } 2613 | ] 2614 | }, 2615 | { 2616 | "_type": "UMLOperation", 2617 | "_id": "AAAAAAFtysVys5YF2vY=", 2618 | "_parent": { 2619 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2620 | }, 2621 | "name": "GetStatus", 2622 | "parameters": [ 2623 | { 2624 | "_type": "UMLParameter", 2625 | "_id": "AAAAAAFtysWtvZYM4a8=", 2626 | "_parent": { 2627 | "$ref": "AAAAAAFtysVys5YF2vY=" 2628 | }, 2629 | "type": "unsigned char", 2630 | "direction": "return" 2631 | } 2632 | ] 2633 | }, 2634 | { 2635 | "_type": "UMLOperation", 2636 | "_id": "AAAAAAFtysW6kZYOrhg=", 2637 | "_parent": { 2638 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2639 | }, 2640 | "name": "GetBattery", 2641 | "parameters": [ 2642 | { 2643 | "_type": "UMLParameter", 2644 | "_id": "AAAAAAFtysXej5YVzQY=", 2645 | "_parent": { 2646 | "$ref": "AAAAAAFtysW6kZYOrhg=" 2647 | }, 2648 | "type": "unsigned char", 2649 | "direction": "return" 2650 | } 2651 | ] 2652 | }, 2653 | { 2654 | "_type": "UMLOperation", 2655 | "_id": "AAAAAAFtysXn/5YX4PU=", 2656 | "_parent": { 2657 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2658 | }, 2659 | "name": "GetSpeed", 2660 | "parameters": [ 2661 | { 2662 | "_type": "UMLParameter", 2663 | "_id": "AAAAAAFtysYRqJYerPc=", 2664 | "_parent": { 2665 | "$ref": "AAAAAAFtysXn/5YX4PU=" 2666 | }, 2667 | "type": "char", 2668 | "direction": "return" 2669 | } 2670 | ] 2671 | }, 2672 | { 2673 | "_type": "UMLOperation", 2674 | "_id": "AAAAAAFtysYdcZYgzxM=", 2675 | "_parent": { 2676 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2677 | }, 2678 | "name": "GetError", 2679 | "parameters": [ 2680 | { 2681 | "_type": "UMLParameter", 2682 | "_id": "AAAAAAFtysZAvZYnzXY=", 2683 | "_parent": { 2684 | "$ref": "AAAAAAFtysYdcZYgzxM=" 2685 | }, 2686 | "type": "char", 2687 | "direction": "return" 2688 | } 2689 | ] 2690 | }, 2691 | { 2692 | "_type": "UMLOperation", 2693 | "_id": "AAAAAAFtysZJcZYpAYk=", 2694 | "_parent": { 2695 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2696 | }, 2697 | "name": "GetErrorText", 2698 | "parameters": [ 2699 | { 2700 | "_type": "UMLParameter", 2701 | "_id": "AAAAAAFtysazIpYw2V4=", 2702 | "_parent": { 2703 | "$ref": "AAAAAAFtysZJcZYpAYk=" 2704 | }, 2705 | "type": "string", 2706 | "direction": "return" 2707 | } 2708 | ] 2709 | }, 2710 | { 2711 | "_type": "UMLOperation", 2712 | "_id": "AAAAAAFtyscEVpYyf8E=", 2713 | "_parent": { 2714 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2715 | }, 2716 | "name": "GetErrorText", 2717 | "parameters": [ 2718 | { 2719 | "_type": "UMLParameter", 2720 | "_id": "AAAAAAFtyseD+ZY5vXs=", 2721 | "_parent": { 2722 | "$ref": "AAAAAAFtyscEVpYyf8E=" 2723 | }, 2724 | "name": "CMDERR", 2725 | "type": "" 2726 | }, 2727 | { 2728 | "_type": "UMLParameter", 2729 | "_id": "AAAAAAFtyseD+ZY6ER4=", 2730 | "_parent": { 2731 | "$ref": "AAAAAAFtyscEVpYyf8E=" 2732 | }, 2733 | "type": "string", 2734 | "direction": "return" 2735 | } 2736 | ] 2737 | }, 2738 | { 2739 | "_type": "UMLOperation", 2740 | "_id": "AAAAAAFtyste55ZKpDM=", 2741 | "_parent": { 2742 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2743 | }, 2744 | "name": "UpdateCurRFID", 2745 | "parameters": [ 2746 | { 2747 | "_type": "UMLParameter", 2748 | "_id": "AAAAAAFtyswQL5ZRopk=", 2749 | "_parent": { 2750 | "$ref": "AAAAAAFtyste55ZKpDM=" 2751 | }, 2752 | "name": "unsigned short", 2753 | "type": "" 2754 | }, 2755 | { 2756 | "_type": "UMLParameter", 2757 | "_id": "AAAAAAFtyswQL5ZSd54=", 2758 | "_parent": { 2759 | "$ref": "AAAAAAFtyste55ZKpDM=" 2760 | }, 2761 | "type": "bool", 2762 | "direction": "return" 2763 | } 2764 | ] 2765 | }, 2766 | { 2767 | "_type": "UMLOperation", 2768 | "_id": "AAAAAAFtysw/bJZVo/w=", 2769 | "_parent": { 2770 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2771 | }, 2772 | "name": "UpdateEndRFID", 2773 | "parameters": [ 2774 | { 2775 | "_type": "UMLParameter", 2776 | "_id": "AAAAAAFtysx5tpZcsSA=", 2777 | "_parent": { 2778 | "$ref": "AAAAAAFtysw/bJZVo/w=" 2779 | }, 2780 | "name": "unsigned short", 2781 | "type": "" 2782 | }, 2783 | { 2784 | "_type": "UMLParameter", 2785 | "_id": "AAAAAAFtysx5tpZdxLQ=", 2786 | "_parent": { 2787 | "$ref": "AAAAAAFtysw/bJZVo/w=" 2788 | }, 2789 | "type": "bool", 2790 | "direction": "return" 2791 | } 2792 | ] 2793 | }, 2794 | { 2795 | "_type": "UMLOperation", 2796 | "_id": "AAAAAAFtysyG9pZg+Zk=", 2797 | "_parent": { 2798 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2799 | }, 2800 | "name": "UpdateStatus", 2801 | "parameters": [ 2802 | { 2803 | "_type": "UMLParameter", 2804 | "_id": "AAAAAAFtyszohpZnl+Y=", 2805 | "_parent": { 2806 | "$ref": "AAAAAAFtysyG9pZg+Zk=" 2807 | }, 2808 | "name": "unsigned char", 2809 | "type": "" 2810 | }, 2811 | { 2812 | "_type": "UMLParameter", 2813 | "_id": "AAAAAAFtyszohpZodaE=", 2814 | "_parent": { 2815 | "$ref": "AAAAAAFtysyG9pZg+Zk=" 2816 | }, 2817 | "type": "bool", 2818 | "direction": "return" 2819 | } 2820 | ] 2821 | }, 2822 | { 2823 | "_type": "UMLOperation", 2824 | "_id": "AAAAAAFtysz4jJZr5EQ=", 2825 | "_parent": { 2826 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2827 | }, 2828 | "name": "UpdateBattery", 2829 | "parameters": [ 2830 | { 2831 | "_type": "UMLParameter", 2832 | "_id": "AAAAAAFtys0yKZZyUdU=", 2833 | "_parent": { 2834 | "$ref": "AAAAAAFtysz4jJZr5EQ=" 2835 | }, 2836 | "name": "unsigned char" 2837 | }, 2838 | { 2839 | "_type": "UMLParameter", 2840 | "_id": "AAAAAAFtys1QbpZ1+ug=", 2841 | "_parent": { 2842 | "$ref": "AAAAAAFtysz4jJZr5EQ=" 2843 | }, 2844 | "type": "bool", 2845 | "direction": "return" 2846 | } 2847 | ] 2848 | }, 2849 | { 2850 | "_type": "UMLOperation", 2851 | "_id": "AAAAAAFtys1sZZZ3gGo=", 2852 | "_parent": { 2853 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2854 | }, 2855 | "name": "UpdateSpeed", 2856 | "parameters": [ 2857 | { 2858 | "_type": "UMLParameter", 2859 | "_id": "AAAAAAFtys2YZpZ+lUY=", 2860 | "_parent": { 2861 | "$ref": "AAAAAAFtys1sZZZ3gGo=" 2862 | }, 2863 | "name": "char", 2864 | "type": "" 2865 | }, 2866 | { 2867 | "_type": "UMLParameter", 2868 | "_id": "AAAAAAFtys2YZpZ/snQ=", 2869 | "_parent": { 2870 | "$ref": "AAAAAAFtys1sZZZ3gGo=" 2871 | }, 2872 | "type": "bool", 2873 | "direction": "return" 2874 | } 2875 | ] 2876 | }, 2877 | { 2878 | "_type": "UMLOperation", 2879 | "_id": "AAAAAAFtys2hupaCJG4=", 2880 | "_parent": { 2881 | "$ref": "AAAAAAFtyRnlI3+3zF4=" 2882 | }, 2883 | "name": "UpdateError", 2884 | "parameters": [ 2885 | { 2886 | "_type": "UMLParameter", 2887 | "_id": "AAAAAAFtys2+Z5aJCCc=", 2888 | "_parent": { 2889 | "$ref": "AAAAAAFtys2hupaCJG4=" 2890 | }, 2891 | "name": "char" 2892 | }, 2893 | { 2894 | "_type": "UMLParameter", 2895 | "_id": "AAAAAAFtys3ed5aMna0=", 2896 | "_parent": { 2897 | "$ref": "AAAAAAFtys2hupaCJG4=" 2898 | }, 2899 | "type": "bool", 2900 | "direction": "return" 2901 | } 2902 | ] 2903 | } 2904 | ] 2905 | }, 2906 | { 2907 | "_type": "UMLEnumeration", 2908 | "_id": "AAAAAAFtyTFMiIBjHaw=", 2909 | "_parent": { 2910 | "$ref": "AAAAAAFF+qBWK6M3Z8Y=" 2911 | }, 2912 | "name": "CmdError", 2913 | "literals": [ 2914 | { 2915 | "_type": "UMLEnumerationLiteral", 2916 | "_id": "AAAAAAFtyTGjboCS7UQ=", 2917 | "_parent": { 2918 | "$ref": "AAAAAAFtyTFMiIBjHaw=" 2919 | }, 2920 | "name": "CMD_SUCCESS", 2921 | "documentation": "命令执行成功" 2922 | } 2923 | ] 2924 | }, 2925 | { 2926 | "_type": "UMLEnumeration", 2927 | "_id": "AAAAAAFtyU9KH4GQ+S0=", 2928 | "_parent": { 2929 | "$ref": "AAAAAAFF+qBWK6M3Z8Y=" 2930 | }, 2931 | "name": "AgvStatus", 2932 | "literals": [ 2933 | { 2934 | "_type": "UMLEnumerationLiteral", 2935 | "_id": "AAAAAAFtyU+LnYG+24g=", 2936 | "_parent": { 2937 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2938 | }, 2939 | "name": "STA_WAIT", 2940 | "documentation": "* @brief 待机状态\n* \n* AGV未移动,未动作,状态正常,并等待上位机指令时上报此状态。" 2941 | }, 2942 | { 2943 | "_type": "UMLEnumerationLiteral", 2944 | "_id": "AAAAAAFtyVBm3YHGxGQ=", 2945 | "_parent": { 2946 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2947 | }, 2948 | "name": "STA_RUN", 2949 | "documentation": "* @brief 运行状态\n* \n* AGV执行动作时,如移动、升降杆升降,辊筒转动等,上报此状态" 2950 | }, 2951 | { 2952 | "_type": "UMLEnumerationLiteral", 2953 | "_id": "AAAAAAFtyVHPO4HPnyE=", 2954 | "_parent": { 2955 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2956 | }, 2957 | "name": "STA_STOP", 2958 | "documentation": "* @brief 停止状态\n* \n* 用户使用停止按钮终止AGV动作时上报此状态,此时需要用户使用按钮手动恢复为待机或运行状态。" 2959 | }, 2960 | { 2961 | "_type": "UMLEnumerationLiteral", 2962 | "_id": "AAAAAAFtyVN0sYJrWvI=", 2963 | "_parent": { 2964 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2965 | }, 2966 | "name": "STA_SCREAM", 2967 | "documentation": "* @brief 急停状态\n* \n* 用户使用急停按钮终止AGV动作时上报此状态,此时需要用户再次使用急停按钮恢复为待机状态。" 2968 | }, 2969 | { 2970 | "_type": "UMLEnumerationLiteral", 2971 | "_id": "AAAAAAFtyVU1wYKeVuQ=", 2972 | "_parent": { 2973 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2974 | }, 2975 | "name": "STA_FIND", 2976 | "documentation": "* @brief 寻磁状态\n* \n* AGV脱离磁轨,重新寻找磁轨时上报此状态。当一定时间后仍无法找到磁轨,上报脱磁异常并将状态更改为停止状态。" 2977 | }, 2978 | { 2979 | "_type": "UMLEnumerationLiteral", 2980 | "_id": "AAAAAAFtyVVXEoKlTUM=", 2981 | "_parent": { 2982 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2983 | }, 2984 | "name": "STA_OBSDOWN", 2985 | "documentation": "* @brief 非接触式避障减速\n* \n* AGV通过光电避障器或激光雷达避障器检测到移动路线前方存在障碍,使得AGV减速移动时上报此状态。" 2986 | }, 2987 | { 2988 | "_type": "UMLEnumerationLiteral", 2989 | "_id": "AAAAAAFtyVV474KsyaI=", 2990 | "_parent": { 2991 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 2992 | }, 2993 | "name": "STA_TRASTOP", 2994 | "documentation": "* @brief 交通管制停止\n* \n* AGV到达交通管制RFID地标卡,停止移动并等待上位机通知交通管制放行时上报此状态。" 2995 | }, 2996 | { 2997 | "_type": "UMLEnumerationLiteral", 2998 | "_id": "AAAAAAFtyVYAv4KzQYE=", 2999 | "_parent": { 3000 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3001 | }, 3002 | "name": "STA_SLEEP", 3003 | "documentation": "* @brief 休眠状态\n* \n* 用户通过AGV上的按钮或上位机程序界面上的按钮,使得AGV进入休眠状态时上报此状态。\n* 此时需要用户通过AGV上的按钮或上位机界面上的按钮唤醒AGV进入待机状态。" 3004 | }, 3005 | { 3006 | "_type": "UMLEnumerationLiteral", 3007 | "_id": "AAAAAAFtyVYwBoK6smg=", 3008 | "_parent": { 3009 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3010 | }, 3011 | "name": "STA_CHARGE", 3012 | "documentation": "* @brief 充电状态\n* \n* AGV接入充电桩并通过与充电桩通电进行充电时上报此状态。" 3013 | }, 3014 | { 3015 | "_type": "UMLEnumerationLiteral", 3016 | "_id": "AAAAAAFtyVeNtILB+ys=", 3017 | "_parent": { 3018 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3019 | }, 3020 | "name": "STA_RMTSCREAM", 3021 | "documentation": "* @brief 远程急停状态\n* \n* 用户通过上位机程序界面上的按钮,发送急停报文,终止AGV动作时上报此状态。此时需要用户通过上位机程序界面上的复位按钮恢复AGV状态为待机状态。" 3022 | }, 3023 | { 3024 | "_type": "UMLEnumerationLiteral", 3025 | "_id": "AAAAAAFtyVfDGILIoh4=", 3026 | "_parent": { 3027 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3028 | }, 3029 | "name": "STA_ALLSCREAM", 3030 | "documentation": "* @brief 全线急停状态\n* \n* 用户通过接入上位机系统的外接设备,如呼叫器等。使用设备上的急停按钮紧急停止全部与上位机系统连接的AGV动作时上报此状态。" 3031 | }, 3032 | { 3033 | "_type": "UMLEnumerationLiteral", 3034 | "_id": "AAAAAAFtyVvoF4LQFaI=", 3035 | "_parent": { 3036 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3037 | }, 3038 | "name": "STA_SPEEDUP", 3039 | "documentation": "* @brief 加速状态\n* \n* AGV提升速度时上报此状态,主要用于当AGV接收到速度控制指令时上报此状态。" 3040 | }, 3041 | { 3042 | "_type": "UMLEnumerationLiteral", 3043 | "_id": "AAAAAAFtyVwWioLXzuM=", 3044 | "_parent": { 3045 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3046 | }, 3047 | "name": "STA_SPEEDDOWN", 3048 | "documentation": "* @brief 减速状态\n* \n* AGV降低速度时上报此状态,主要用于当AGV接收到速度控制指令时上报此状态。" 3049 | }, 3050 | { 3051 | "_type": "UMLEnumerationLiteral", 3052 | "_id": "AAAAAAFtyVw5+YLeOeY=", 3053 | "_parent": { 3054 | "$ref": "AAAAAAFtyU9KH4GQ+S0=" 3055 | }, 3056 | "name": "STA_PAUSE", 3057 | "documentation": "* @brief 暂停状态\n* \n* AGV接收到状态控制指令暂停AGV动作时上报此状态。" 3058 | } 3059 | ] 3060 | }, 3061 | { 3062 | "_type": "UMLEnumeration", 3063 | "_id": "AAAAAAFtyVy+qoLlim8=", 3064 | "_parent": { 3065 | "$ref": "AAAAAAFF+qBWK6M3Z8Y=" 3066 | }, 3067 | "name": "AgvError", 3068 | "literals": [ 3069 | { 3070 | "_type": "UMLEnumerationLiteral", 3071 | "_id": "AAAAAAFtyVzy4IMUi+s=", 3072 | "_parent": { 3073 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3074 | }, 3075 | "name": "ERR_NONE", 3076 | "documentation": "* @brief 无异常" 3077 | }, 3078 | { 3079 | "_type": "UMLEnumerationLiteral", 3080 | "_id": "AAAAAAFtyV0efoMbO7Q=", 3081 | "_parent": { 3082 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3083 | }, 3084 | "name": "ERR_MISS", 3085 | "documentation": "* @brief 脱磁异常\n* \n* 在寻磁一定时间后依然无法找到磁轨时,AGV上报此错误。" 3086 | }, 3087 | { 3088 | "_type": "UMLEnumerationLiteral", 3089 | "_id": "AAAAAAFtyV1NbYMiU0g=", 3090 | "_parent": { 3091 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3092 | }, 3093 | "name": "ERR_MOBS", 3094 | "documentation": "* @brief 接触式避障停车异常\n* \n* AGV通过挡板、挡条等设备检测到碰撞物体无法移动时上报此错误。" 3095 | }, 3096 | { 3097 | "_type": "UMLEnumerationLiteral", 3098 | "_id": "AAAAAAFtyV2sUYMqc0s=", 3099 | "_parent": { 3100 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3101 | }, 3102 | "name": "ERR_OBS", 3103 | "documentation": "* @brief 接触式避障停车\n* \n* AGV通过光电避障器或激光雷达避障器等设备检测到运行路线上有障碍无法继续移动时上报此错误。" 3104 | }, 3105 | { 3106 | "_type": "UMLEnumerationLiteral", 3107 | "_id": "AAAAAAFtyV3F0YMxpBM=", 3108 | "_parent": { 3109 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3110 | }, 3111 | "name": "ERR_LINK" 3112 | }, 3113 | { 3114 | "_type": "UMLEnumerationLiteral", 3115 | "_id": "AAAAAAFtyV56aoNLSiY=", 3116 | "_parent": { 3117 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3118 | }, 3119 | "name": "ERR_LIFTER" 3120 | }, 3121 | { 3122 | "_type": "UMLEnumerationLiteral", 3123 | "_id": "AAAAAAFtyV6ZsINSX04=", 3124 | "_parent": { 3125 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3126 | }, 3127 | "name": "ERR_ROLLER" 3128 | }, 3129 | { 3130 | "_type": "UMLEnumerationLiteral", 3131 | "_id": "AAAAAAFtyV7msYNaxg4=", 3132 | "_parent": { 3133 | "$ref": "AAAAAAFtyVy+qoLlim8=" 3134 | }, 3135 | "name": "ERR_ARM" 3136 | } 3137 | ] 3138 | } 3139 | ] 3140 | } 3141 | ], 3142 | "author": "FanKaiyu", 3143 | "company": "HarbinBrain", 3144 | "version": "3.0" 3145 | } --------------------------------------------------------------------------------