Edited Mock device json

This commit is contained in:
KCFeng425
2025-06-09 23:46:37 +08:00
parent eac2c27e99
commit 6d56466897
9 changed files with 347 additions and 220 deletions

View File

@@ -1,59 +1,155 @@
{ {
"nodes": [ "nodes": [
{ {
"id": "MockStirrer1", "id": "MockChiller1",
"name": "模拟搅拌器", "name": "模拟冷却器",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_stirrer", "class": "mock_chiller",
"position": { "position": {
"x": 100, "x": 620.6111111111111,
"y": 100, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "current_temperature": 25.0,
"power_state": "Off", "target_temperature": 25.0,
"stir_speed": 0.0, "status": "Idle",
"target_stir_speed": 0.0, "is_cooling": false,
"stir_state": "Stopped", "is_heating": false,
"temperature": 25.0, "vessel": "",
"target_temperature": 25.0, "purpose": ""
"heating_state": "Off", }
"heating_power": 0.0,
"max_stir_speed": 2000.0,
"max_temperature": 300.0
}
}, },
{ {
"id": "MockVacuum1", "id": "MockFilter1",
"name": "模拟真空泵", "name": "模拟过滤器",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_vacuum", "class": "mock_filter",
"position": { "position": {
"x": 300, "x": 620.6111111111111,
"y": 100, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "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", "status": "Idle",
"power_state": "Off", "current_device": "MockPump1",
"pump_state": "Stopped", "pump_state": "Stopped",
"vacuum_level": 1013.25, "flow_rate": 0.0,
"target_vacuum": 50.0, "target_flow_rate": 0.0,
"pump_speed": 0.0, "pressure": 0.0,
"pump_efficiency": 95.0, "total_volume": 0.0,
"max_pump_speed": 100.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", "id": "MockSeparator1",
@@ -63,8 +159,8 @@
"type": "device", "type": "device",
"class": "mock_separator", "class": "mock_separator",
"position": { "position": {
"x": 500, "x": 620.6111111111111,
"y": 100, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
@@ -72,163 +168,128 @@
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off",
"settling_time": 0.0, "settling_time": 0.0,
"valve_state": "Closed", "valve_state": "Closed",
"shake_time": 0.0, "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", "id": "MockSolenoidValve1",
"name": "模拟电磁阀", "name": "模拟电磁阀",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_solenoid_valve", "class": "mock_solenoid_valve",
"position": { "position": {
"x": 700, "x": 620.6111111111111,
"y": 100, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"valve_status": "Closed" "valve_status": "Closed"
} }
}, },
{ {
"id": "MockRotavap1", "id": "MockStirrer1NEW",
"name": "模拟旋转蒸发器", "name": "模拟搅拌器(new)",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_rotavap", "class": "mock_stirrer_new",
"position": { "position": {
"x": 100, "x": 620.6111111111111,
"y": 300, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off", "vessel": "",
"rotate_state": "Stopped", "purpose": "",
"rotate_time": 0.0, "stir_speed": 0.0,
"rotate_speed": 0.0, "target_stir_speed": 0.0,
"pump_state": "Stopped", "stir_state": "Stopped",
"pump_time": 0.0, "stir_time": 0.0,
"vacuum_level": 1013.25, "settling_time": 0.0,
"temperature": 25.0, "progress": 0.0,
"target_temperature": 25.0, "max_stir_speed": 2000.0
"success": "True" }
}
}, },
{ {
"id": "MockHeater1", "id": "MockStirrer1",
"name": "模拟加热器", "name": "模拟搅拌器",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_heater", "class": "mock_stirrer",
"position": { "position": {
"x": 300, "x": 620.6111111111111,
"y": 300, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"current_temperature": 25.0, "status": "Idle",
"target_temperature": 25.0, "stir_speed": 0.0,
"status": "Idle", "target_stir_speed": 0.0,
"power_on": false, "stir_state": "Stopped",
"is_heating": false, "temperature": 25.0,
"heating_power": 0.0, "target_temperature": 25.0,
"max_temperature": 300.0 "heating_state": "Off",
} "heating_power": 0.0,
"max_stir_speed": 2000.0,
"max_temperature": 300.0
}
}, },
{ {
"id": "MockPump1", "id": "MockVacuum1",
"name": "模拟泵设备", "name": "模拟真空泵",
"children": [], "children": [],
"parent": null, "parent": null,
"type": "device", "type": "device",
"class": "mock_pump", "class": "mock_vacuum",
"position": { "position": {
"x": 500, "x": 620.6111111111111,
"y": 300, "y": 171,
"z": 0 "z": 0
}, },
"config": { "config": {
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off", "power_state": "Off",
"pump_state": "Stopped", "pump_state": "Stopped",
"flow_rate": 0.0, "vacuum_level": 1013.25,
"target_flow_rate": 0.0, "target_vacuum": 50.0,
"pressure": 0.0, "pump_speed": 0.0,
"total_volume": 0.0, "pump_efficiency": 95.0,
"direction": "Forward", "max_pump_speed": 100.0
"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
}
} }
], ],
"links": [] "links": []

View File

@@ -19,9 +19,10 @@
"current_temperature": 25.0, "current_temperature": 25.0,
"target_temperature": 25.0, "target_temperature": 25.0,
"status": "Idle", "status": "Idle",
"power_on": false,
"is_cooling": false, "is_cooling": false,
"is_heating": false "is_heating": false,
"vessel": "",
"purpose": ""
} }
} }
], ],

View File

@@ -18,11 +18,17 @@
"data": { "data": {
"status": "Idle", "status": "Idle",
"is_filtering": false, "is_filtering": false,
"filter_efficiency": 95.0, "flow_rate": 0.0,
"flow_rate": 0.0, "filter_life": 100.0,
"pressure_drop": 0.0, "vessel": "",
"filter_life": 100.0, "filtrate_vessel": "",
"power_on": false "filtered_volume": 0.0,
"target_volume": 0.0,
"progress": 0.0,
"stir": false,
"stir_speed": 0.0,
"temperature": 25.0,
"continue_heatchill": false
} }
} }
], ],

View File

@@ -19,10 +19,13 @@
"current_temperature": 25.0, "current_temperature": 25.0,
"target_temperature": 25.0, "target_temperature": 25.0,
"status": "Idle", "status": "Idle",
"power_on": false,
"is_heating": false, "is_heating": false,
"heating_power": 0.0, "heating_power": 0.0,
"max_temperature": 300.0 "max_temperature": 300.0,
"vessel": "Unknown",
"purpose": "Unknown",
"stir": false,
"stir_speed": 0.0
} }
} }
], ],

View File

@@ -16,16 +16,27 @@
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off", "current_device": "MockPump1",
"pump_state": "Stopped", "pump_state": "Stopped",
"flow_rate": 0.0, "flow_rate": 0.0,
"target_flow_rate": 0.0, "target_flow_rate": 0.0,
"pressure": 0.0, "pressure": 0.0,
"total_volume": 0.0, "total_volume": 0.0,
"direction": "Forward",
"max_flow_rate": 100.0, "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
} }
} }
], ],

View File

@@ -17,7 +17,6 @@
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off",
"rotate_state": "Stopped", "rotate_state": "Stopped",
"rotate_time": 0.0, "rotate_time": 0.0,
"rotate_speed": 0.0, "rotate_speed": 0.0,

View File

@@ -17,11 +17,25 @@
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off",
"settling_time": 0.0, "settling_time": 0.0,
"valve_state": "Closed", "valve_state": "Closed",
"shake_time": 0.0, "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
} }
} }
], ],

View File

@@ -16,8 +16,7 @@
"port": "MOCK" "port": "MOCK"
}, },
"data": { "data": {
"status": "Idle", "status": "Idle",
"power_state": "Off",
"stir_speed": 0.0, "stir_speed": 0.0,
"target_stir_speed": 0.0, "target_stir_speed": 0.0,
"stir_state": "Stopped", "stir_state": "Stopped",

View File

@@ -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": []
}