From e42e8364112e97d89eeaecd13f043dff42179949 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 27 五月 2025 17:19:02 +0800
Subject: [PATCH] 1.enum修改为enum class, 理顺CLoadPort各成员变量在调度中的判定作用;
---
SourceCode/Bond/Servo/ServoCommo.h | 87 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoCommo.h b/SourceCode/Bond/Servo/ServoCommo.h
index 959a8a1..5cfc30d 100644
--- a/SourceCode/Bond/Servo/ServoCommo.h
+++ b/SourceCode/Bond/Servo/ServoCommo.h
@@ -2,7 +2,12 @@
namespace SERVO {
- enum PortType {
+#define BLOCK_BUFFER_MAX 1024
+#define ALIVE_TIMEOUT 15
+#define VCR_MAX 1
+#define ARM_ALL 99
+
+ enum class PortType {
Loading = 1,
Unloading,
Both,
@@ -12,7 +17,7 @@
UnloadingPartial
};
- enum PortMode {
+ enum class PortMode {
OutOfService = 0,
TransferBlocked,
ReadyToLoad,
@@ -21,17 +26,91 @@
TransferReady
};
- enum MaterialsType {
+ enum class MaterialsType {
G1 = 0,
G2 = 1,
G1G2 = 2
};
typedef MaterialsType CassetteType;
- enum TransferMode {
+ enum class TransferMode {
MGVMode = 1,
AGVMode,
StockerInlineMode
};
+
+ // Memory Block 结构体定义
+ typedef struct _MemoryBlock {
+ unsigned int type;
+ unsigned int start;
+ unsigned int end;
+ unsigned int size;
+ char buffer[BLOCK_BUFFER_MAX];
+ } MemoryBlock;
+
+ // ALIVE
+ typedef struct _ALIVE {
+ BOOL flag;
+ int count;
+ BOOL alive;
+ } ALIVE;
+
+ enum class DISPATCHING_MODE {
+ EAS = 1,
+ Local = 2
+ };
+
+ enum class IDNEXER_OPERATION_MODE {
+ Normal = 1,
+ Clear_Out = 2,
+ Cold_Run = 2,
+ Start = 10,
+ Stop = 11,
+ Pause = 12,
+ Resume = 13,
+ Abort = 14,
+ Cancel = 15,
+ };
+
+ enum class VCR_Reply_Code {
+ OK = 1,
+ NG,
+ Job_Data_Request,
+ VCR_Mismatch
+ };
+
+ // Robot cmd param
+#define ROBOT_CMD_PARAM_SIZE 16 /* 防止以后修改ROBOT_CMD_PARAM为不是4的整数倍 */
+ typedef struct _ROBOT_CMD_PARAM {
+ short sequenceNo;
+ short rcmd;
+ short armNo;
+ short getPosition;
+ short putPosition;
+ short getSlotNo;
+ short putSlotNo;
+ short subCmd;
+ } ROBOT_CMD_PARAM;
+
+ enum class RCMD {
+ Robot_home = 1,
+ Transfer,
+ Move,
+ Get,
+ Put,
+ One_Action_Exchange,
+ Two_Action_Exchange,
+ Command_Clear,
+ Batch_get,
+ Batch_put
+ };
+
+ enum class ROBOT_TASK_STATE {
+ Ready = 0,
+ Running,
+ Error,
+ Abort,
+ Completed
+ };
}
--
Gitblit v1.9.3