mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-18 13:45:17 +00:00
fix test resource schema
This commit is contained in:
@@ -89,6 +89,14 @@ class Registry:
|
|||||||
)
|
)
|
||||||
test_latency_schema["description"] = "用于测试延迟的动作,返回延迟时间和时间差。"
|
test_latency_schema["description"] = "用于测试延迟的动作,返回延迟时间和时间差。"
|
||||||
|
|
||||||
|
test_resource_method_info = host_node_enhanced_info.get("action_methods", {}).get("test_resource", {})
|
||||||
|
test_resource_schema = self._generate_unilab_json_command_schema(
|
||||||
|
test_resource_method_info.get("args", []),
|
||||||
|
"auto-test_resource",
|
||||||
|
test_resource_method_info.get("return_annotation"),
|
||||||
|
)
|
||||||
|
test_resource_schema["description"] = "用于测试物料、设备和样本。"
|
||||||
|
|
||||||
self.device_type_registry.update(
|
self.device_type_registry.update(
|
||||||
{
|
{
|
||||||
"host_node": {
|
"host_node": {
|
||||||
@@ -190,32 +198,7 @@ class Registry:
|
|||||||
"goal": {},
|
"goal": {},
|
||||||
"feedback": {},
|
"feedback": {},
|
||||||
"result": {},
|
"result": {},
|
||||||
"schema": {
|
"schema": test_resource_schema,
|
||||||
"description": "",
|
|
||||||
"properties": {
|
|
||||||
"feedback": {},
|
|
||||||
"goal": {
|
|
||||||
"properties": {
|
|
||||||
"resource": ros_message_to_json_schema(Resource, "resource"),
|
|
||||||
"resources": {
|
|
||||||
"items": {
|
|
||||||
"properties": ros_message_to_json_schema(
|
|
||||||
Resource, "resources"
|
|
||||||
),
|
|
||||||
"type": "object",
|
|
||||||
},
|
|
||||||
"type": "array",
|
|
||||||
},
|
|
||||||
"device": {"type": "string"},
|
|
||||||
"devices": {"items": {"type": "string"}, "type": "array"},
|
|
||||||
},
|
|
||||||
"type": "object",
|
|
||||||
},
|
|
||||||
"result": {},
|
|
||||||
},
|
|
||||||
"title": "test_resource",
|
|
||||||
"type": "object",
|
|
||||||
},
|
|
||||||
"placeholder_keys": {
|
"placeholder_keys": {
|
||||||
"device": "unilabos_devices",
|
"device": "unilabos_devices",
|
||||||
"devices": "unilabos_devices",
|
"devices": "unilabos_devices",
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class DeviceActionStatus:
|
|||||||
|
|
||||||
class TestResourceReturn(TypedDict):
|
class TestResourceReturn(TypedDict):
|
||||||
resources: List[List[ResourceDict]]
|
resources: List[List[ResourceDict]]
|
||||||
devices: List[DeviceSlot]
|
devices: List[Dict[str, Any]]
|
||||||
|
|
||||||
|
|
||||||
class TestLatencyReturn(TypedDict):
|
class TestLatencyReturn(TypedDict):
|
||||||
|
|||||||
Reference in New Issue
Block a user