mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 22:15:04 +00:00
* Add Device MockChiller Add device MockChiller * Add Device MockFilter * Add Device MockPump * Add Device MockRotavap * Add Device MockSeparator * Add Device MockStirrer * Add Device MockHeater * Add Device MockVacuum * Add Device MockSolenoidValve * Add Device Mock \_init_.py * 规范模拟设备代码与注册表信息 * 更改Mock大写文件夹名 * 删除大写目录 * Edited Mock device json * Match mock device with action * Edit mock device yaml * Add new action * Add Virtual Device, Action, YAML, Protocol for Organic Syn * 单独分类测试的protocol文件夹 * 更名Action --------- Co-authored-by: Xuwznln <18435084+Xuwznln@users.noreply.github.com>
30 lines
546 B
Python
30 lines
546 B
Python
import time
|
|
|
|
|
|
class VacuumPumpMock:
|
|
def __init__(self, port: str = "COM6"):
|
|
self._status = "OPEN"
|
|
|
|
@property
|
|
def status(self) -> str:
|
|
return self._status
|
|
|
|
def get_status(self) -> str:
|
|
return self._status
|
|
|
|
def set_status(self, string):
|
|
self._status = string
|
|
time.sleep(5)
|
|
|
|
def open(self):
|
|
self._status = "OPEN"
|
|
|
|
def close(self):
|
|
self._status = "CLOSED"
|
|
|
|
def is_open(self):
|
|
return self._status
|
|
|
|
def is_closed(self):
|
|
return not self._status
|