bpod_core.ipc.discover
- bpod_core.ipc.discover(service_type, properties=None, timeout=10, poll_interval=1, *, 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, optional) – How many seconds to wait for a matching service before timing out. Default is 10.poll_interval (
float, optional) – How often to poll for local service changes, in seconds. Default is 1.local (
bool, optional) – Whether to search for a matching service on the local machine, by default True.remote (
bool, optional) – Whether to search for a matching service on the network, by default True.
- 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.