
# 设备模型
class DeviceModel(object):
    def __init__(self, deviceId, screenPort, width, height, scale, type):
        super(DeviceModel, self).__init__()
        # 设备id
        self.deviceId = deviceId
        # 投屏端口
        self.screenPort = screenPort
        # 屏幕宽度
        self.width = width
        # 屏幕高度
        self.height = height
        # 物理分辨率和实际分辨率的倍数
        self.scale = scale
        # 1 添加 2删除
        self.type = type


    # 转字典
    def toDict(self):
        return {
            'deviceId': self.deviceId,
            'screenPort': self.screenPort,
            "width": self.width,
            "height": self.height,
            "scale": self.scale,
            'type': self.type
        }