| | |
| | | } |
| | | |
| | | PlcAddress struct { |
| | | DeviceID string `json:"deviceID"` // 设备id |
| | | Channel int `json:"channel"` // 生产通道on,一个机器可能有多个机位,需要分别配置plc地址 |
| | | StartAddress int `json:"startAddress"` // 数据起始地址 |
| | | Length int `json:"length"` // 数据长度 |
| | | Type string `json:"type"` // 数据类型 |
| | | FieldName constvar.PlcStartAddressType `json:"fieldName"` // 对应系统字段,完成量或总量 |
| | | DeviceID string `json:"deviceID"` // 设备id |
| | | Channel int `json:"channel"` // 生产通道on,一个机器可能有多个机位,需要分别配置plc地址 |
| | | StartAddress int `json:"startAddress"` // 数据起始地址 |
| | | Length int `json:"length"` // 数据长度 |
| | | Type string `json:"type"` // 数据类型 |
| | | FieldName constvar.PlcStartAddressType `json:"fieldName"` // 对应系统字段,完成量或总量 |
| | | Endian constvar.EndianType `json:"endian" gorm:"type:varchar(255)"` // 字节存储顺序,big(ABCD)/little(CDBA)/mix(CDAB) |
| | | } |
| | | ) |
| | | |
| | |
| | | |
| | | // MsgTaskStatusUpdate 任务状态改变 |
| | | type MsgTaskStatusUpdate struct { |
| | | WorkOrderId string `json:"workOrderId"` //工单编号 |
| | | ProcedureID string `json:"procedureId"` // 工序 |
| | | DeviceId string `json:"deviceId"` //用于过滤获取nsq消息 |
| | | IsProcessing bool //是否处理中 |
| | | IsFinish bool //是否完成 |
| | | FinishAmount int `json:"finishAmount"` //isFinish = true时取工序最终加工数传上去 |
| | | WorkOrderId string `json:"workOrderId"` //工单编号 |
| | | ProcedureID string `json:"procedureId"` // 工序 |
| | | DeviceId string `json:"deviceId"` //用于过滤获取nsq消息 |
| | | IsProcessing bool //是否处理中 |
| | | IsFinish bool //是否完成 |
| | | FinishAmount int `json:"finishAmount"` //isFinish = true时取工序最终加工数传上去 |
| | | ProductProcedureID string `json:"productProcedureID"` //产品工序id |
| | | StartTs int64 `json:"start_ts"` //开始时间 |
| | | FinishTs int64 `json:"finish_ts"` //结束时间 |
| | | } |
| | | |
| | | // DeviceMsg 下发到终端的设备信息 |