Skip to content

Commit 08332a1

Browse files
committed
start on high level design
1 parent cb4f0d1 commit 08332a1

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

JACDAC_UI.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Jacdac UI experiment
2+
3+
We will add an experiment to MakeCode for the microbit to prototype a simplified integration of Jacdac (JD)
4+
into MakeCode.
5+
6+
## High level design
7+
8+
We will separate simulators and device twins into separate views, both using
9+
the pane that hosts the simulators. A switch at the top of the pane will become available
10+
when Jacdac packets are detected over WebUSB. The switch will allow the user to toggle
11+
between the simulator and device twin views.
12+
13+
The simulators (virtual mbit and JD modules) will operate on their own JD virtual bus,
14+
separated from the JD bus over WebUSB used to communicate with a
15+
physical mbit and JD modules. This obviates the need for a `proxy mode`
16+
as it is not possible to have both virtual and physical mbit on the same JD bus.
17+
18+
### Jacdac Clients and Simulators
19+
20+
Simulators will be created automatically based on what JD clients the user's program creates.
21+
There will be no `Add Simulator` or `Add Blocks` button provided. We assume that a Jacdac extension
22+
has been loaded with the needed JD clients (later, may be built into MakeCode target). Also, as
23+
simulators are currently created based on dynamic instantiation of Jacdac clients, we want all
24+
Jacdac clients to be created upon program startup (rather than being created conditionally).
25+
26+
27+
### Jacdac roles
28+
29+
A JD client will specify a role name and a JD service (think of this as the type given to the role
30+
name). Role names must be globally unique. Mechanisms for enforcing this are discussed later.
31+
After running the user program in the simulator, the set of (role-name, JD-service) pairs is
32+
defined by the set of allocated JD clients.

0 commit comments

Comments
 (0)