优化无线/有线CAN,以及控制指令解析
This commit is contained in:
@@ -3,6 +3,38 @@
|
||||
"$id": "https://cognitive-agent.local/schemas/command-plan.schema.json",
|
||||
"title": "CommandPlan",
|
||||
"type": "object",
|
||||
"$defs": {
|
||||
"generatedProtocolContract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["source_version", "rule_id", "frame_key", "frame_id", "format", "brs", "dlc", "repeat", "feedback_ids", "feedback_policy"],
|
||||
"properties": {
|
||||
"source_version": {"type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$"},
|
||||
"rule_id": {"type": "string", "pattern": "^can[01]\\.[a-z0-9_.]+$"},
|
||||
"frame_key": {"type": "string", "minLength": 1},
|
||||
"frame_id": {"type": "string", "pattern": "^0x[0-7][0-9A-Fa-f]{0,2}$"},
|
||||
"format": {"type": "string", "enum": ["classic_can", "can_fd"]},
|
||||
"brs": {"type": "boolean"},
|
||||
"dlc": {"type": "integer", "minimum": 1, "maximum": 64},
|
||||
"repeat": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": ["kind", "count", "period_ms"],
|
||||
"properties": {
|
||||
"kind": {"type": "string", "enum": ["fixed", "special", "duration_ceiling", "sequence"]},
|
||||
"count": {"type": "integer", "minimum": 0, "maximum": 10000},
|
||||
"period_ms": {"type": "integer", "minimum": 0, "maximum": 60000}
|
||||
}
|
||||
},
|
||||
"feedback_ids": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {"type": "string", "pattern": "^0x[0-7][0-9A-Fa-f]{0,2}$"}
|
||||
},
|
||||
"feedback_policy": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["apiVersion", "kind", "metadata", "spec"],
|
||||
"properties": {
|
||||
@@ -41,6 +73,7 @@
|
||||
"operation_ref": {"type": "string", "minLength": 2},
|
||||
"bus": {"type": "string", "pattern": "^[a-z][a-z0-9_-]*$"},
|
||||
"message": {"type": "string", "minLength": 1},
|
||||
"protocol": {"$ref": "#/$defs/generatedProtocolContract"},
|
||||
"signals": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
@@ -85,6 +118,7 @@
|
||||
"operation_ref": {"type": "string", "minLength": 2},
|
||||
"bus": {"type": "string", "pattern": "^[a-z][a-z0-9_-]*$"},
|
||||
"message": {"type": "string", "minLength": 1},
|
||||
"protocol": {"$ref": "#/$defs/generatedProtocolContract"},
|
||||
"signals": {
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
@@ -120,4 +154,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
"properties": {
|
||||
"mode": {"type": "string", "enum": ["dry_run", "hil", "vehicle"]},
|
||||
"status": {"type": "string", "enum": ["succeeded", "partially_succeeded", "failed", "cancelled"]},
|
||||
"verification_status": {
|
||||
"type": "string",
|
||||
"enum": ["verified_success", "submitted_unverified", "failed_or_blocked"],
|
||||
"description": "Highest task evidence level: feedback verified, transport submitted only, or submission blocked/failed."
|
||||
},
|
||||
"started_at": {"type": "string", "format": "date-time"},
|
||||
"finished_at": {"type": "string", "format": "date-time"},
|
||||
"physical_state": {
|
||||
@@ -42,4 +47,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user