mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 14:05:12 +00:00
642 lines
18 KiB
YAML
642 lines
18 KiB
YAML
# 虚拟设备清单及连接特性
|
||
|
||
# 1. virtual_pump - 虚拟泵
|
||
# 描述:具有多通道阀门特性的泵,根据valve_position可连接多个容器
|
||
# 连接特性:1个输入口 + 1个输出口(当前配置,实际应该有多个输出口)
|
||
# 数据类型:fluid(流体连接)
|
||
|
||
# 2. virtual_stirrer - 虚拟搅拌器
|
||
# 描述:机械连接设备,提供搅拌功能
|
||
# 连接特性:1个双向连接点(bidirectional)
|
||
# 数据类型:mechanical(机械连接)
|
||
|
||
# 3a. virtual_valve - 虚拟八通阀门
|
||
# 描述:8通阀门(实际配置为7通),可切换流向
|
||
# 连接特性:1个口连接注射泵 + 7个输出口
|
||
# 数据类型:fluid(流体连接)
|
||
|
||
# 3b. virtual_solenoid_valve (电磁阀门)
|
||
# 描述:简单的开关型电磁阀,只有开启和关闭两个状态
|
||
# 连接特性:1个输入口 + 1个输出口,控制通断
|
||
# 数据类型:fluid(流体连接)
|
||
|
||
# 4. virtual_centrifuge - 虚拟离心机
|
||
# 描述:单个样品处理设备,原地处理样品
|
||
# 连接特性:1个输入口 + 1个输出口
|
||
# 数据类型:resource(资源/样品连接)
|
||
|
||
# 5. virtual_filter - 虚拟过滤器
|
||
# 描述:分离设备,将样品分离为滤液和滤渣
|
||
# 连接特性:1个输入口 + 2个输出口(滤液和滤渣)
|
||
# 数据类型:resource(资源/样品连接)
|
||
|
||
# 6. virtual_heatchill - 虚拟加热/冷却器
|
||
# 描述:温控设备,容器直接放置在设备上进行温度控制
|
||
# 连接特性:1个双向连接点(bidirectional)
|
||
# 数据类型:mechanical(机械/物理接触连接)
|
||
|
||
# 7. virtual_transfer_pump - 虚拟转移泵(注射器式)
|
||
# 描述:注射器式转移泵,通过同一个口吸入和排出液体
|
||
# 连接特性:1个双向连接点(bidirectional)
|
||
# 数据类型:fluid(流体连接)
|
||
|
||
# 8. virtual_column - 虚拟色谱柱
|
||
# 描述:分离纯化设备,用于样品纯化
|
||
# 连接特性:1个输入口 + 1个输出口
|
||
# 数据类型:resource(资源/样品连接)
|
||
virtual_pump:
|
||
description: Virtual Pump for PumpTransferProtocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_pump:VirtualPump
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
position: Float64
|
||
valve_position: Int32 # 修复:使用 Int32 而不是 String
|
||
max_volume: Float64
|
||
current_volume: Float64
|
||
action_value_mappings:
|
||
transfer:
|
||
type: PumpTransfer
|
||
goal:
|
||
from_vessel: from_vessel
|
||
to_vessel: to_vessel
|
||
volume: volume
|
||
amount: amount
|
||
time: time
|
||
viscous: viscous
|
||
rinsing_solvent: rinsing_solvent
|
||
rinsing_volume: rinsing_volume
|
||
rinsing_repeats: rinsing_repeats
|
||
solid: solid
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
set_valve_position:
|
||
type: FloatSingleInput
|
||
goal:
|
||
Int32: Int32
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
# 虚拟泵节点配置 - 具有多通道阀门特性,根据valve_position可连接多个容器
|
||
handles:
|
||
input:
|
||
- handler_key: pump-inlet
|
||
label: Pump Inlet
|
||
data_type: fluid
|
||
io_type: target
|
||
data_source: handle
|
||
data_key: fluid_in
|
||
description: "泵的进液口,连接源容器"
|
||
output:
|
||
- handler_key: pump-outlet-1
|
||
label: Outlet Port 1
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_out_1
|
||
description: "阀门位置1的出液口"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_volume:
|
||
type: number
|
||
default: 25.0
|
||
additionalProperties: false
|
||
|
||
virtual_stirrer:
|
||
description: Virtual Stirrer for StirProtocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_stirrer:VirtualStirrer
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
action_value_mappings:
|
||
stir:
|
||
type: Stir
|
||
goal:
|
||
stir_time: stir_time
|
||
stir_speed: stir_speed
|
||
settling_time: settling_time
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
start_stir:
|
||
type: ProtocolStartStir
|
||
goal:
|
||
vessel: vessel
|
||
stir_speed: stir_speed
|
||
purpose: purpose
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
stop_stir:
|
||
type: ProtocolStopStir
|
||
goal:
|
||
vessel: vessel
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
# 虚拟搅拌器节点配置 - 机械连接设备,单一双向连接点
|
||
handles:
|
||
bidirectional:
|
||
- handler_key: stirrer-vessel
|
||
label: Vessel Connection
|
||
data_type: mechanical
|
||
io_type: bidirectional
|
||
data_source: handle
|
||
data_key: vessel
|
||
description: "搅拌器的机械连接口,直接与反应容器连接提供搅拌功能"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_temp:
|
||
type: number
|
||
default: 100.0
|
||
max_speed:
|
||
type: number
|
||
default: 1000.0
|
||
additionalProperties: false
|
||
|
||
virtual_multiway_valve:
|
||
description: Virtual 8-Way Valve for flow direction control
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_multiway_valve:VirtualMultiwayValve
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
valve_state: String
|
||
current_position: Int32
|
||
target_position: Int32
|
||
max_positions: Int32
|
||
action_value_mappings:
|
||
set_position:
|
||
type: SendCmd
|
||
goal:
|
||
command: position
|
||
feedback: {}
|
||
result:
|
||
success: success
|
||
# 八通阀门节点配置 - 1个输入口,8个输出口,可切换流向
|
||
handles:
|
||
input:
|
||
- handler_key: multiway-valve-inlet
|
||
label: Valve Inlet
|
||
data_type: fluid
|
||
io_type: target
|
||
data_source: handle
|
||
data_key: fluid_in
|
||
description: "八通阀门进液口,接收来源流体"
|
||
output:
|
||
- handler_key: multiway-valve-port-1
|
||
label: Port 1
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_1
|
||
description: "八通阀门端口1,position=1时流体从此口流出"
|
||
- handler_key: multiway-valve-port-2
|
||
label: Port 2
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_2
|
||
description: "八通阀门端口2,position=2时流体从此口流出"
|
||
- handler_key: multiway-valve-port-3
|
||
label: Port 3
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_3
|
||
description: "八通阀门端口3,position=3时流体从此口流出"
|
||
- handler_key: multiway-valve-port-4
|
||
label: Port 4
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_4
|
||
description: "八通阀门端口4,position=4时流体从此口流出"
|
||
- handler_key: multiway-valve-port-5
|
||
label: Port 5
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_5
|
||
description: "八通阀门端口5,position=5时流体从此口流出"
|
||
- handler_key: multiway-valve-port-6
|
||
label: Port 6
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_6
|
||
description: "八通阀门端口6,position=6时流体从此口流出"
|
||
- handler_key: multiway-valve-port-7
|
||
label: Port 7
|
||
data_type: fluid
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: fluid_port_7
|
||
description: "八通阀门端口7,position=7时流体从此口流出"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
positions:
|
||
type: integer
|
||
default: 8
|
||
additionalProperties: false
|
||
virtual_solenoid_valve:
|
||
description: Virtual Solenoid Valve for simple on/off flow control
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_solenoid_valve:VirtualSolenoidValve
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
valve_state: String # "open" or "closed"
|
||
is_open: Bool
|
||
action_value_mappings:
|
||
open:
|
||
type: EmptyIn
|
||
goal: {}
|
||
feedback: {}
|
||
result:
|
||
success: success
|
||
close:
|
||
type: EmptyIn
|
||
goal: {}
|
||
feedback: {}
|
||
result:
|
||
success: success
|
||
set_state:
|
||
type: SendCmd
|
||
goal:
|
||
command: command
|
||
feedback: {}
|
||
result:
|
||
success: success
|
||
# 电磁阀门节点配置 - 双向流通的开关型阀门,流动方向由泵决定
|
||
handles:
|
||
bidirectional:
|
||
- handler_key: solenoid-valve-port
|
||
label: Valve Port
|
||
data_type: fluid
|
||
io_type: bidirectional
|
||
data_source: handle
|
||
data_key: fluid_port
|
||
description: "电磁阀的双向流体口,开启时允许流体双向通过,关闭时完全阻断"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
voltage:
|
||
type: number
|
||
default: 12.0
|
||
response_time:
|
||
type: number
|
||
default: 0.1
|
||
additionalProperties: false
|
||
virtual_centrifuge:
|
||
description: Virtual Centrifuge for CentrifugeProtocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_centrifuge:VirtualCentrifuge
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
current_speed: Float64
|
||
target_speed: Float64
|
||
current_temp: Float64
|
||
target_temp: Float64
|
||
max_speed: Float64
|
||
max_temp: Float64
|
||
min_temp: Float64
|
||
centrifuge_state: String
|
||
time_remaining: Float64
|
||
action_value_mappings:
|
||
centrifuge:
|
||
type: ProtocolCentrifuge
|
||
goal:
|
||
vessel: vessel
|
||
speed: speed
|
||
time: time
|
||
temp: temp
|
||
feedback:
|
||
progress: progress
|
||
current_speed: current_speed
|
||
current_temp: current_temp
|
||
current_status: status
|
||
result:
|
||
success: success
|
||
message: message
|
||
# 虚拟离心机节点配置 - 单个样品处理设备,输入输出都是同一个样品容器
|
||
handles:
|
||
input:
|
||
- handler_key: centrifuge-sample
|
||
label: Sample Input
|
||
data_type: resource
|
||
io_type: target
|
||
data_source: handle
|
||
data_key: vessel
|
||
description: "需要离心的样品容器"
|
||
output:
|
||
- handler_key: centrifuge-sample-out
|
||
label: Centrifuged Sample
|
||
data_type: resource
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: vessel
|
||
description: "经过离心处理的样品容器"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_speed:
|
||
type: number
|
||
default: 15000.0
|
||
max_temp:
|
||
type: number
|
||
default: 40.0
|
||
min_temp:
|
||
type: number
|
||
default: 4.0
|
||
additionalProperties: false
|
||
|
||
virtual_filter:
|
||
description: Virtual Filter for FilterProtocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_filter:VirtualFilter
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
filter_state: String
|
||
current_temp: Float64
|
||
target_temp: Float64
|
||
max_temp: Float64
|
||
stir_speed: Float64
|
||
max_stir_speed: Float64
|
||
filtered_volume: Float64
|
||
progress: Float64
|
||
message: String
|
||
action_value_mappings:
|
||
filter_sample:
|
||
type: ProtocolFilter
|
||
goal:
|
||
vessel: vessel
|
||
filtrate_vessel: filtrate_vessel
|
||
stir: stir
|
||
stir_speed: stir_speed
|
||
temp: temp
|
||
continue_heatchill: continue_heatchill
|
||
volume: volume
|
||
feedback:
|
||
progress: progress
|
||
current_temp: current_temp
|
||
filtered_volume: filtered_volume
|
||
current_status: status
|
||
result:
|
||
success: success
|
||
message: message
|
||
# 虚拟过滤器节点配置 - 分离设备,1个输入(原始样品),2个输出(滤液和滤渣)
|
||
handles:
|
||
input:
|
||
- handler_key: filter-sample-in
|
||
label: Sample Input
|
||
data_type: resource
|
||
io_type: target
|
||
data_source: handle
|
||
data_key: vessel
|
||
description: "需要过滤的原始样品容器"
|
||
output:
|
||
- handler_key: filter-filtrate-out
|
||
label: Filtrate Output
|
||
data_type: resource
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: filtrate_vessel
|
||
description: "过滤后的滤液容器"
|
||
- handler_key: filter-residue-out
|
||
label: Filter Residue
|
||
data_type: resource
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: residue_vessel
|
||
description: "过滤后的滤渣(固体残留物)"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_temp:
|
||
type: number
|
||
default: 100.0
|
||
max_stir_speed:
|
||
type: number
|
||
default: 1000.0
|
||
additionalProperties: false
|
||
|
||
virtual_heatchill:
|
||
description: Virtual HeatChill for HeatChillProtocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_heatchill:VirtualHeatChill
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
action_value_mappings:
|
||
heat_chill:
|
||
type: HeatChill
|
||
goal:
|
||
vessel: vessel
|
||
temp: temp
|
||
time: time
|
||
stir: stir
|
||
stir_speed: stir_speed
|
||
purpose: purpose
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
heat_chill_start:
|
||
type: HeatChillStart
|
||
goal:
|
||
vessel: vessel
|
||
temp: temp
|
||
purpose: purpose
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
heat_chill_stop:
|
||
type: HeatChillStop
|
||
goal:
|
||
vessel: vessel
|
||
feedback:
|
||
status: status
|
||
result:
|
||
success: success
|
||
# 虚拟加热/冷却器节点配置 - 温控设备,单一双向连接点用于放置容器
|
||
handles:
|
||
bidirectional:
|
||
- handler_key: heatchill-vessel
|
||
label: Vessel Connection
|
||
data_type: mechanical
|
||
io_type: bidirectional
|
||
data_source: handle
|
||
data_key: vessel
|
||
description: "加热/冷却器的物理连接口,容器直接放置在设备上进行温度控制"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_temp:
|
||
type: number
|
||
default: 200.0
|
||
min_temp:
|
||
type: number
|
||
default: -80.0
|
||
max_stir_speed:
|
||
type: number
|
||
default: 1000.0
|
||
additionalProperties: false
|
||
|
||
virtual_transfer_pump:
|
||
description: Virtual Transfer Pump for TransferProtocol Testing (Syringe-style)
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_transferpump:VirtualTransferPump
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
current_volume: Float64
|
||
max_volume: Float64
|
||
transfer_rate: Float64
|
||
from_vessel: String
|
||
to_vessel: String
|
||
progress: Float64
|
||
transferred_volume: Float64
|
||
current_status: String
|
||
action_value_mappings:
|
||
transfer:
|
||
type: ProtocolTransfer
|
||
goal:
|
||
from_vessel: from_vessel
|
||
to_vessel: to_vessel
|
||
volume: volume
|
||
amount: amount
|
||
time: time
|
||
viscous: viscous
|
||
rinsing_solvent: rinsing_solvent
|
||
rinsing_volume: rinsing_volume
|
||
rinsing_repeats: rinsing_repeats
|
||
solid: solid
|
||
feedback:
|
||
progress: progress
|
||
transferred_volume: transferred_volume
|
||
current_status: current_status
|
||
result:
|
||
success: success
|
||
message: message
|
||
# 注射器式转移泵节点配置 - 只有一个双向连接口,可吸入和排出液体
|
||
handles:
|
||
bidirectional:
|
||
- handler_key: syringe-port
|
||
label: Syringe Port
|
||
data_type: fluid
|
||
io_type: bidirectional
|
||
data_source: handle
|
||
data_key: fluid_port
|
||
description: "注射器式转移泵的唯一连接口,通过阀门切换实现吸入和排出"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_volume:
|
||
type: number
|
||
default: 50.0
|
||
transfer_rate:
|
||
type: number
|
||
default: 5.0
|
||
additionalProperties: false
|
||
|
||
virtual_column:
|
||
description: Virtual Column for RunColumn Protocol Testing
|
||
class:
|
||
module: unilabos.devices.virtual.virtual_column:VirtualColumn
|
||
type: python
|
||
status_types:
|
||
status: String
|
||
column_state: String
|
||
current_flow_rate: Float64
|
||
max_flow_rate: Float64
|
||
column_length: Float64
|
||
column_diameter: Float64
|
||
processed_volume: Float64
|
||
progress: Float64
|
||
current_status: String
|
||
action_value_mappings:
|
||
run_column:
|
||
type: ProtocolRunColumn
|
||
goal:
|
||
from_vessel: from_vessel
|
||
to_vessel: to_vessel
|
||
column: column
|
||
feedback:
|
||
status: current_status
|
||
progress: progress
|
||
result:
|
||
success: success
|
||
message: message
|
||
# 虚拟色谱柱节点配置 - 分离纯化设备,1个样品输入口,1个纯化产物输出口
|
||
handles:
|
||
input:
|
||
- handler_key: column-sample-inlet
|
||
label: Sample Input
|
||
data_type: resource
|
||
io_type: target
|
||
data_source: handle
|
||
data_key: from_vessel
|
||
description: "需要纯化的样品输入口"
|
||
output:
|
||
- handler_key: column-product-outlet
|
||
label: Purified Product
|
||
data_type: resource
|
||
io_type: source
|
||
data_source: executor
|
||
data_key: to_vessel
|
||
description: "经过色谱柱纯化的产物输出口"
|
||
schema:
|
||
type: object
|
||
properties:
|
||
port:
|
||
type: string
|
||
default: "VIRTUAL"
|
||
max_flow_rate:
|
||
type: number
|
||
default: 10.0
|
||
column_length:
|
||
type: number
|
||
default: 25.0
|
||
column_diameter:
|
||
type: number
|
||
default: 2.0
|
||
additionalProperties: false |