From 6d5646689759bf47bb1bf88a61da76fff1b485db Mon Sep 17 00:00:00 2001 From: KCFeng425 <2100011801@stu.pku.edu.cn> Date: Mon, 9 Jun 2025 23:46:37 +0800 Subject: [PATCH] Edited Mock device json --- test/experiments/mock_devices/mock_all.json | 465 ++++++++++-------- .../mock_devices/mock_chiller.json | 5 +- .../experiments/mock_devices/mock_filter.json | 16 +- .../experiments/mock_devices/mock_heater.json | 7 +- test/experiments/mock_devices/mock_pump.json | 19 +- .../mock_devices/mock_rotavap.json | 1 - .../mock_devices/mock_separator.json | 18 +- .../mock_devices/mock_stirrer.json | 3 +- .../mock_devices/mock_stirrer_new.json | 33 ++ 9 files changed, 347 insertions(+), 220 deletions(-) create mode 100644 test/experiments/mock_devices/mock_stirrer_new.json diff --git a/test/experiments/mock_devices/mock_all.json b/test/experiments/mock_devices/mock_all.json index 242e87d..f263b47 100644 --- a/test/experiments/mock_devices/mock_all.json +++ b/test/experiments/mock_devices/mock_all.json @@ -1,59 +1,155 @@ { "nodes": [ - { - "id": "MockStirrer1", - "name": "模拟搅拌器", - "children": [], - "parent": null, - "type": "device", - "class": "mock_stirrer", - "position": { - "x": 100, - "y": 100, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "status": "Idle", - "power_state": "Off", - "stir_speed": 0.0, - "target_stir_speed": 0.0, - "stir_state": "Stopped", - "temperature": 25.0, - "target_temperature": 25.0, - "heating_state": "Off", - "heating_power": 0.0, - "max_stir_speed": 2000.0, - "max_temperature": 300.0 - } + { + "id": "MockChiller1", + "name": "模拟冷却器", + "children": [], + "parent": null, + "type": "device", + "class": "mock_chiller", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "current_temperature": 25.0, + "target_temperature": 25.0, + "status": "Idle", + "is_cooling": false, + "is_heating": false, + "vessel": "", + "purpose": "" + } }, - { - "id": "MockVacuum1", - "name": "模拟真空泵", - "children": [], - "parent": null, - "type": "device", - "class": "mock_vacuum", - "position": { - "x": 300, - "y": 100, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { + { + "id": "MockFilter1", + "name": "模拟过滤器", + "children": [], + "parent": null, + "type": "device", + "class": "mock_filter", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "is_filtering": false, + "flow_rate": 0.0, + "filter_life": 100.0, + "vessel": "", + "filtrate_vessel": "", + "filtered_volume": 0.0, + "target_volume": 0.0, + "progress": 0.0, + "stir": false, + "stir_speed": 0.0, + "temperature": 25.0, + "continue_heatchill": false + } + }, + { + "id": "MockHeater1", + "name": "模拟加热器", + "children": [], + "parent": null, + "type": "device", + "class": "mock_heater", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "current_temperature": 25.0, + "target_temperature": 25.0, + "status": "Idle", + "is_heating": false, + "heating_power": 0.0, + "max_temperature": 300.0, + "vessel": "Unknown", + "purpose": "Unknown", + "stir": false, + "stir_speed": 0.0 + } + }, + { + "id": "MockPump1", + "name": "模拟泵设备", + "children": [], + "parent": null, + "type": "device", + "class": "mock_pump", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { "status": "Idle", - "power_state": "Off", - "pump_state": "Stopped", - "vacuum_level": 1013.25, - "target_vacuum": 50.0, - "pump_speed": 0.0, - "pump_efficiency": 95.0, - "max_pump_speed": 100.0 - } + "current_device": "MockPump1", + "pump_state": "Stopped", + "flow_rate": 0.0, + "target_flow_rate": 0.0, + "pressure": 0.0, + "total_volume": 0.0, + "max_flow_rate": 100.0, + "max_pressure": 10.0, + "from_vessel": "", + "to_vessel": "", + "transfer_volume": 0.0, + "amount": "", + "transfer_time": 0.0, + "is_viscous": false, + "rinsing_solvent": "", + "rinsing_volume": 0.0, + "rinsing_repeats": 0, + "is_solid": false, + "time_spent": 0.0, + "time_remaining": 0.0 + } + }, + { + "id": "MockRotavap1", + "name": "模拟旋转蒸发器", + "children": [], + "parent": null, + "type": "device", + "class": "mock_rotavap", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "rotate_state": "Stopped", + "rotate_time": 0.0, + "rotate_speed": 0.0, + "pump_state": "Stopped", + "pump_time": 0.0, + "vacuum_level": 1013.25, + "temperature": 25.0, + "target_temperature": 25.0, + "success": "True" + } }, { "id": "MockSeparator1", @@ -63,8 +159,8 @@ "type": "device", "class": "mock_separator", "position": { - "x": 500, - "y": 100, + "x": 620.6111111111111, + "y": 171, "z": 0 }, "config": { @@ -72,163 +168,128 @@ }, "data": { "status": "Idle", - "power_state": "Off", "settling_time": 0.0, "valve_state": "Closed", "shake_time": 0.0, - "shake_status": "Not Shaking" + "shake_status": "Not Shaking", + "current_device": "MockSeparator1", + "purpose": "", + "product_phase": "", + "from_vessel": "", + "separation_vessel": "", + "to_vessel": "", + "waste_phase_to_vessel": "", + "solvent": "", + "solvent_volume": 0.0, + "through": "", + "repeats": 1, + "stir_time": 0.0, + "stir_speed": 0.0, + "time_spent": 0.0, + "time_remaining": 0.0 } }, - { - "id": "MockSolenoidValve1", - "name": "模拟电磁阀", - "children": [], - "parent": null, - "type": "device", - "class": "mock_solenoid_valve", - "position": { - "x": 700, - "y": 100, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "status": "Idle", - "valve_status": "Closed" - } + { + "id": "MockSolenoidValve1", + "name": "模拟电磁阀", + "children": [], + "parent": null, + "type": "device", + "class": "mock_solenoid_valve", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "valve_status": "Closed" + } }, - { - "id": "MockRotavap1", - "name": "模拟旋转蒸发器", - "children": [], - "parent": null, - "type": "device", - "class": "mock_rotavap", - "position": { - "x": 100, - "y": 300, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { + { + "id": "MockStirrer1NEW", + "name": "模拟搅拌器(new)", + "children": [], + "parent": null, + "type": "device", + "class": "mock_stirrer_new", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { "status": "Idle", - "power_state": "Off", - "rotate_state": "Stopped", - "rotate_time": 0.0, - "rotate_speed": 0.0, - "pump_state": "Stopped", - "pump_time": 0.0, - "vacuum_level": 1013.25, - "temperature": 25.0, - "target_temperature": 25.0, - "success": "True" - } + "vessel": "", + "purpose": "", + "stir_speed": 0.0, + "target_stir_speed": 0.0, + "stir_state": "Stopped", + "stir_time": 0.0, + "settling_time": 0.0, + "progress": 0.0, + "max_stir_speed": 2000.0 + } }, - { - "id": "MockHeater1", - "name": "模拟加热器", - "children": [], - "parent": null, - "type": "device", - "class": "mock_heater", - "position": { - "x": 300, - "y": 300, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "current_temperature": 25.0, - "target_temperature": 25.0, - "status": "Idle", - "power_on": false, - "is_heating": false, - "heating_power": 0.0, - "max_temperature": 300.0 - } + { + "id": "MockStirrer1", + "name": "模拟搅拌器", + "children": [], + "parent": null, + "type": "device", + "class": "mock_stirrer", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "stir_speed": 0.0, + "target_stir_speed": 0.0, + "stir_state": "Stopped", + "temperature": 25.0, + "target_temperature": 25.0, + "heating_state": "Off", + "heating_power": 0.0, + "max_stir_speed": 2000.0, + "max_temperature": 300.0 + } }, - { - "id": "MockPump1", - "name": "模拟泵设备", - "children": [], - "parent": null, - "type": "device", - "class": "mock_pump", - "position": { - "x": 500, - "y": 300, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "status": "Idle", - "power_state": "Off", - "pump_state": "Stopped", - "flow_rate": 0.0, - "target_flow_rate": 0.0, - "pressure": 0.0, - "total_volume": 0.0, - "direction": "Forward", - "max_flow_rate": 100.0, - "max_pressure": 10.0 - } - }, - { - "id": "MockChiller1", - "name": "模拟冷却器", - "children": [], - "parent": null, - "type": "device", - "class": "mock_chiller", - "position": { - "x": 700, - "y": 300, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "current_temperature": 25.0, - "target_temperature": 25.0, - "status": "Idle", - "power_on": false, - "is_cooling": false, - "is_heating": false - } - }, - { - "id": "MockFilter1", - "name": "模拟过滤器", - "children": [], - "parent": null, - "type": "device", - "class": "mock_filter", - "position": { - "x": 400, - "y": 500, - "z": 0 - }, - "config": { - "port": "MOCK" - }, - "data": { - "status": "Idle", - "is_filtering": false, - "filter_efficiency": 95.0, - "flow_rate": 0.0, - "pressure_drop": 0.0, - "filter_life": 100.0, - "power_on": false - } + { + "id": "MockVacuum1", + "name": "模拟真空泵", + "children": [], + "parent": null, + "type": "device", + "class": "mock_vacuum", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "power_state": "Off", + "pump_state": "Stopped", + "vacuum_level": 1013.25, + "target_vacuum": 50.0, + "pump_speed": 0.0, + "pump_efficiency": 95.0, + "max_pump_speed": 100.0 + } } ], "links": [] diff --git a/test/experiments/mock_devices/mock_chiller.json b/test/experiments/mock_devices/mock_chiller.json index ae765c0..fc0e2f4 100644 --- a/test/experiments/mock_devices/mock_chiller.json +++ b/test/experiments/mock_devices/mock_chiller.json @@ -19,9 +19,10 @@ "current_temperature": 25.0, "target_temperature": 25.0, "status": "Idle", - "power_on": false, "is_cooling": false, - "is_heating": false + "is_heating": false, + "vessel": "", + "purpose": "" } } ], diff --git a/test/experiments/mock_devices/mock_filter.json b/test/experiments/mock_devices/mock_filter.json index 9cf56f3..d8d8029 100644 --- a/test/experiments/mock_devices/mock_filter.json +++ b/test/experiments/mock_devices/mock_filter.json @@ -18,11 +18,17 @@ "data": { "status": "Idle", "is_filtering": false, - "filter_efficiency": 95.0, - "flow_rate": 0.0, - "pressure_drop": 0.0, - "filter_life": 100.0, - "power_on": false + "flow_rate": 0.0, + "filter_life": 100.0, + "vessel": "", + "filtrate_vessel": "", + "filtered_volume": 0.0, + "target_volume": 0.0, + "progress": 0.0, + "stir": false, + "stir_speed": 0.0, + "temperature": 25.0, + "continue_heatchill": false } } ], diff --git a/test/experiments/mock_devices/mock_heater.json b/test/experiments/mock_devices/mock_heater.json index 13bfd47..1aca968 100644 --- a/test/experiments/mock_devices/mock_heater.json +++ b/test/experiments/mock_devices/mock_heater.json @@ -19,10 +19,13 @@ "current_temperature": 25.0, "target_temperature": 25.0, "status": "Idle", - "power_on": false, "is_heating": false, "heating_power": 0.0, - "max_temperature": 300.0 + "max_temperature": 300.0, + "vessel": "Unknown", + "purpose": "Unknown", + "stir": false, + "stir_speed": 0.0 } } ], diff --git a/test/experiments/mock_devices/mock_pump.json b/test/experiments/mock_devices/mock_pump.json index 7f40761..d1c1394 100644 --- a/test/experiments/mock_devices/mock_pump.json +++ b/test/experiments/mock_devices/mock_pump.json @@ -16,16 +16,27 @@ "port": "MOCK" }, "data": { - "status": "Idle", - "power_state": "Off", + "status": "Idle", + "current_device": "MockPump1", "pump_state": "Stopped", "flow_rate": 0.0, "target_flow_rate": 0.0, "pressure": 0.0, "total_volume": 0.0, - "direction": "Forward", "max_flow_rate": 100.0, - "max_pressure": 10.0 + "max_pressure": 10.0, + "from_vessel": "", + "to_vessel": "", + "transfer_volume": 0.0, + "amount": "", + "transfer_time": 0.0, + "is_viscous": false, + "rinsing_solvent": "", + "rinsing_volume": 0.0, + "rinsing_repeats": 0, + "is_solid": false, + "time_spent": 0.0, + "time_remaining": 0.0 } } ], diff --git a/test/experiments/mock_devices/mock_rotavap.json b/test/experiments/mock_devices/mock_rotavap.json index 74a8f92..b28cfe2 100644 --- a/test/experiments/mock_devices/mock_rotavap.json +++ b/test/experiments/mock_devices/mock_rotavap.json @@ -17,7 +17,6 @@ }, "data": { "status": "Idle", - "power_state": "Off", "rotate_state": "Stopped", "rotate_time": 0.0, "rotate_speed": 0.0, diff --git a/test/experiments/mock_devices/mock_separator.json b/test/experiments/mock_devices/mock_separator.json index 79d854e..20f2671 100644 --- a/test/experiments/mock_devices/mock_separator.json +++ b/test/experiments/mock_devices/mock_separator.json @@ -17,11 +17,25 @@ }, "data": { "status": "Idle", - "power_state": "Off", "settling_time": 0.0, "valve_state": "Closed", "shake_time": 0.0, - "shake_status": "Not Shaking" + "shake_status": "Not Shaking", + "current_device": "MockSeparator1", + "purpose": "", + "product_phase": "", + "from_vessel": "", + "separation_vessel": "", + "to_vessel": "", + "waste_phase_to_vessel": "", + "solvent": "", + "solvent_volume": 0.0, + "through": "", + "repeats": 1, + "stir_time": 0.0, + "stir_speed": 0.0, + "time_spent": 0.0, + "time_remaining": 0.0 } } ], diff --git a/test/experiments/mock_devices/mock_stirrer.json b/test/experiments/mock_devices/mock_stirrer.json index 201a77f..9dfc59c 100644 --- a/test/experiments/mock_devices/mock_stirrer.json +++ b/test/experiments/mock_devices/mock_stirrer.json @@ -16,8 +16,7 @@ "port": "MOCK" }, "data": { - "status": "Idle", - "power_state": "Off", + "status": "Idle", "stir_speed": 0.0, "target_stir_speed": 0.0, "stir_state": "Stopped", diff --git a/test/experiments/mock_devices/mock_stirrer_new.json b/test/experiments/mock_devices/mock_stirrer_new.json new file mode 100644 index 0000000..837b2fe --- /dev/null +++ b/test/experiments/mock_devices/mock_stirrer_new.json @@ -0,0 +1,33 @@ +{ + "nodes": [ + { + "id": "MockStirrer1COPY", + "name": "模拟搅拌器(Copy)", + "children": [], + "parent": null, + "type": "device", + "class": "mock_stirrer_new", + "position": { + "x": 620.6111111111111, + "y": 171, + "z": 0 + }, + "config": { + "port": "MOCK" + }, + "data": { + "status": "Idle", + "vessel": "", + "purpose": "", + "stir_speed": 0.0, + "target_stir_speed": 0.0, + "stir_state": "Stopped", + "stir_time": 0.0, + "settling_time": 0.0, + "progress": 0.0, + "max_stir_speed": 2000.0 + } + } + ], + "links": [] +} \ No newline at end of file