Files
iOSAI/Entity/DeviceModel.py

30 lines
842 B
Python
Raw Permalink Normal View History

2025-08-01 13:43:51 +08:00
# 设备模型
class DeviceModel(object):
2025-08-13 20:20:13 +08:00
def __init__(self, deviceId, screenPort, width, height, scale, type):
2025-08-01 13:43:51 +08:00
super(DeviceModel, self).__init__()
2025-08-13 20:20:13 +08:00
# 设备id
2025-08-01 13:43:51 +08:00
self.deviceId = deviceId
2025-08-13 20:20:13 +08:00
# 投屏端口
2025-08-01 13:43:51 +08:00
self.screenPort = screenPort
2025-08-13 20:20:13 +08:00
# 屏幕宽度
self.width = width
# 屏幕高度
self.height = height
# 物理分辨率和实际分辨率的倍数
self.scale = scale
2025-08-01 13:43:51 +08:00
# 1 添加 2删除
self.type = type
2025-09-12 21:36:29 +08:00
self.ready = False
2025-09-16 20:03:17 +08:00
self.deleting = False
2025-08-01 13:43:51 +08:00
# 转字典
def toDict(self):
return {
'deviceId': self.deviceId,
'screenPort': self.screenPort,
2025-08-13 20:20:13 +08:00
"width": self.width,
"height": self.height,
"scale": self.scale,
2025-08-01 13:43:51 +08:00
'type': self.type
}