fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// Package action 定义硬件动作请求和执行器接口。
|
||||
// 独立于 eventloop 和 processor 包,避免循环依赖。
|
||||
package action
|
||||
|
||||
import "context"
|
||||
|
||||
// RobotAction 机器人动作请求。
|
||||
// 取料 → 操作 → 放料 三段式结构:
|
||||
// Src* 字段描述从哪里取工件,Dst* 字段描述放到哪里。
|
||||
// SrcMachine/DstMachine 为 0 表示暂存台(此时 SrcSlot/DstSlot 为暂存台槽位号)。
|
||||
type RobotAction struct {
|
||||
Kind string // 八个新版 kind
|
||||
JobID int
|
||||
|
||||
// 取料位置
|
||||
SrcSlot int // 暂存台槽位 / 设备槽位
|
||||
SrcMachine int // 设备 ID,0 表示暂存台
|
||||
SrcDock int // 接驳台号(补料从接驳台)
|
||||
|
||||
// 放料位置
|
||||
DstSlot int // 暂存台槽位 / 设备槽位 / 接驳台槽位
|
||||
DstMachine int // 设备 ID,0 表示暂存台
|
||||
DstDock int // 接驳台号(下料到接驳台)
|
||||
|
||||
// 工件属性
|
||||
WorkpieceType int
|
||||
|
||||
// 额外参数(loadJobID、doneJobID、doneSlots、text、round 等)
|
||||
Extra map[string]any
|
||||
}
|
||||
|
||||
// HardwareWorker 硬件执行器接口
|
||||
type HardwareWorker interface {
|
||||
Execute(ctx context.Context, actions []RobotAction) error
|
||||
}
|
||||
Reference in New Issue
Block a user