MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / info

Method info

source/binding/Python/maa/controller.py:419–432  ·  view source on GitHub ↗

获取控制器信息 / Get controller information Returns: Dict[str, Any]: 控制器信息,包含类型、构造参数等 Controller information including type, constructor parameters, etc. Raises: RuntimeError: 如果获取失败

(self)

Source from the content-addressed store, hash-verified

417
418 @property
419 def info(self) -> dict[str, Any]:
420 """获取控制器信息 / Get controller information
421
422 Returns:
423 Dict[str, Any]: 控制器信息,包含类型、构造参数等
424 Controller information including type, constructor parameters, etc.
425
426 Raises:
427 RuntimeError: 如果获取失败
428 """
429 buffer = StringBuffer()
430 if not Library.framework().MaaControllerGetInfo(self._handle, buffer._handle):
431 raise RuntimeError("Failed to get controller info.")
432 return json.loads(buffer.get())
433
434 @property
435 def resolution(self) -> tuple[int, int]:

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
frameworkMethod · 0.80
StringBufferClass · 0.70

Tested by

no test coverage detected