client.implements.nemu_ipc.nemu_ipc¶
nemu_ipc ¶
类:
| 名称 | 描述 |
|---|---|
NemuIpcIncompatible |
MuMu12 版本过低或 dll 不兼容 |
NemuIpcError |
调用 IPC 过程中发生错误 |
NemuIpcImplConfig |
nemu_ipc 能力的配置模型。 |
NemuIpcImpl |
利用 MuMu12 提供的 external_renderer_ipc.dll 进行截图与触摸控制。 |
NemuIpcError ¶
Bases: KotonebotError
调用 IPC 过程中发生错误
NemuIpcImplConfig
dataclass
¶
Bases: ImplConfig
nemu_ipc 能力的配置模型。
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
nemu_folder |
str
|
MuMu12 根目录(如 F:\Apps\Netease\MuMuPlayer-12.0)。 |
instance_id |
int
|
模拟器实例 ID。 |
display_id |
int | None
|
目标显示器 ID,默认为 0(主显示器)。若为 None 且设置了 target_package_name,则自动获取对应的 display_id。 |
target_package_name |
str | None
|
目标应用包名,用于自动获取 display_id。 |
app_index |
int
|
多开应用索引,传给 get_display_id 方法。 |
NemuIpcImpl ¶
Bases: MultiTouchable, Screenshotable, Lifecycle, SimpleInputDriver, TouchDriver
利用 MuMu12 提供的 external_renderer_ipc.dll 进行截图与触摸控制。
方法:
| 名称 | 描述 |
|---|---|
connect |
连接模拟器。 |
disconnect |
断开连接。 |
get_display_orientation |
获取指定显示屏的方向。 |
query_resolution |
查询指定显示屏的分辨率。 |
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
width |
int
|
屏幕宽度。 |
height |
int
|
屏幕高度。 |
connected |
bool
|
是否已连接。 |
screen_size |
tuple[int, int]
|
获取屏幕分辨率。 |
get_display_orientation ¶
get_display_orientation(display_id: int = 0) -> Literal['portrait', 'landscape'] | None
获取指定显示屏的方向。