mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
fix bioyond station and registry
This commit is contained in:
@@ -8,7 +8,7 @@ from datetime import datetime, timezone
|
||||
from unilabos.device_comms.rpc import BaseRequest
|
||||
from typing import Optional, List, Dict, Any
|
||||
import json
|
||||
from config import WORKFLOW_TO_SECTION_MAP, WORKFLOW_STEP_IDS, LOCATION_MAPPING
|
||||
from unilabos.devices.workstation.bioyond_studio.config import WORKFLOW_TO_SECTION_MAP, WORKFLOW_STEP_IDS, LOCATION_MAPPING
|
||||
|
||||
|
||||
class SimpleLogger:
|
||||
|
||||
@@ -12,7 +12,7 @@ from unilabos.devices.workstation.bioyond_studio.bioyond_rpc import BioyondV1RPC
|
||||
from unilabos.utils.log import logger
|
||||
from unilabos.resources.graphio import resource_bioyond_to_plr
|
||||
|
||||
from .config import API_CONFIG, WORKFLOW_MAPPINGS
|
||||
from unilabos.devices.workstation.bioyond_studio.config import API_CONFIG, WORKFLOW_MAPPINGS
|
||||
|
||||
|
||||
class BioyondResourceSynchronizer(ResourceSynchronizer):
|
||||
@@ -101,7 +101,7 @@ class BioyondWorkstation(WorkstationBase):
|
||||
def __init__(
|
||||
self,
|
||||
bioyond_config: Optional[Dict[str, Any]] = None,
|
||||
deck: Optional[str, Any] = None,
|
||||
deck: Optional[Any] = None,
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
@@ -240,28 +240,6 @@ class BioyondWorkstation(WorkstationBase):
|
||||
"message": str(e)
|
||||
}
|
||||
|
||||
def get_bioyond_status(self) -> Dict[str, Any]:
|
||||
"""获取Bioyond系统状态"""
|
||||
try:
|
||||
material_manager = self.material_management
|
||||
|
||||
return {
|
||||
"bioyond_connected": material_manager.bioyond_api_client is not None,
|
||||
"sync_interval": material_manager.sync_interval,
|
||||
"total_resources": len(material_manager.plr_resources),
|
||||
"deck_size": {
|
||||
"x": material_manager.plr_deck.size_x,
|
||||
"y": material_manager.plr_deck.size_y,
|
||||
"z": material_manager.plr_deck.size_z
|
||||
},
|
||||
"bioyond_config": self.bioyond_config
|
||||
}
|
||||
except Exception as e:
|
||||
logger.error(f"获取Bioyond状态失败: {e}")
|
||||
return {
|
||||
"error": str(e)
|
||||
}
|
||||
|
||||
def load_bioyond_data_from_file(self, file_path: str) -> bool:
|
||||
"""从文件加载Bioyond数据(用于测试)"""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user