hpds_jkw_web/mq/instruction.go

51 lines
1.0 KiB
Go
Raw Permalink Normal View History

2023-03-23 18:03:09 +08:00
package mq
const (
TaskAdd = iota + 1
ModelIssue
2023-06-17 09:38:26 +08:00
TaskExecute
TaskResponse
ModelIssueRepeater
ModelIssueResponse
TaskExecuteLog
TaskLog
TrainTaskAdd
2023-03-23 18:03:09 +08:00
)
type InstructionReq struct {
Command int `json:"command"`
Payload interface{} `json:"payload"`
}
type ModelResult struct {
Code int `json:"code"`
}
type LightweightResult struct {
Code int `json:"code"`
Crack bool `json:"crack"`
ImgDiscern string `json:"img_discern"`
ImgSrc string `json:"img_src"`
Pothole bool `json:"pothole"`
}
type InsigmaResult struct {
Code int `json:"code"`
NumOfDiseases int `json:"num_of_diseases"`
Diseases []DiseasesInfo `json:"diseases"`
Image string `json:"image"`
}
type DiseasesInfo struct {
Id int `json:"id"`
Type string `json:"type"`
Level string `json:"level"`
Param DiseasesParam `json:"param"`
}
type DiseasesParam struct {
Length float64 `json:"length"`
Area float64 `json:"area"`
MaxWidth string `json:"max_width"`
}