bpod_core.ipc.discover
- bpod_core.ipc.discover(service_type, properties=None, timeout=10.0, poll_interval=1.0, *, local=True, remote=True) tuple[str, dict[str, str | None]]
Discover a device/service on the local network matching given properties.
- Parameters:
service_type (
str) – The service type to discover, e.g., ‘bpod’properties (
dict, optional) – Dictionary of expected service properties to match.timeout (
float, default:10.0) – How many seconds to wait for a matching service before timing out.poll_interval (
float, default:1.0) – How often to poll for local service changes, in seconds.local (
bool, default:True) – Whether to search for a matching service on the local machine.remote (
bool, default:True) – Whether to search for a matching service on the network.
- Return type:
- Returns:
str– The service address, e.g., ‘tcp://192.168.1.10:1234’.dict– A dictionary of service properties.
- Raises:
TimeoutError – If no matching device/service is found within the timeout period.