Skip to content

Commit

Permalink
Add ping support
Browse files Browse the repository at this point in the history
  • Loading branch information
dknowles2 committed Dec 30, 2024
1 parent 87de7db commit ed40997
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pytboss/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,10 @@ async def set_virtual_data(self, data):
async def get_virtual_data(self):
""":meta private:"""
return await self._conn.send_command("PB.GetVirtualData", {})

async def ping(self, timeout: float | None = None) -> dict:
"""Pings the device.
:param timeout: Time (in seconds) after which to abandon the RPC.
"""
return await self._conn.send_command("RPC.Ping", {}, timeout=timeout)

0 comments on commit ed40997

Please sign in to comment.