wish.backends¶
Which live backends exist, and how to find one that is there.
Discovery used to be one hard-coded TCP probe of 127.0.0.1:6502, which is
VICE and nothing else. A Backend is that knowledge made into data: how to
tell whether one is present, how to attach, what to say when it is not, and how
often it is reasonable to poll it – the last because a network device on the
end of a cable cannot be asked sixty times a second the way a loopback socket
can.
A backend that cannot be probed is not offered. probe() is called on a
timer with no emulator running, most of the time, so it must be cheap and it
must never raise: a broken or absent backend disappears from the list rather
than taking the window down with it.
Functions
The ones answering right now. |
|
|
Every backend, in the order they are tried. |
|
The backend to attach to, or None if nothing answers. |
What to tell someone with nothing running. |
Classes
One way to read a running machine. |
- class wish.backends.Backend[source]¶
Bases:
objectOne way to read a running machine.
- __init__(name, probe, connect, setup_hint, default_interval_ms=200, disturbs=True, verified=True)¶
- connect: Callable[[], automap.target.Target]¶
- wish.backends.available()[source]¶
The ones answering right now. Empty is the ordinary case.
- Return type:
- wish.backends.find(preferred=None)[source]¶
The backend to attach to, or None if nothing answers.
preferredsettles a tie for somebody who has both a running emulator and a device on the desk; it is a name, matched case-insensitively, and it is ignored if that backend is not answering.- Parameters:
preferred (str | None)
- Return type:
wish.backends.Backend | None