fix: edit specs

This commit is contained in:
alban 2024-01-27 22:33:04 +01:00
parent 732b59445c
commit c8986d35a9
1 changed files with 25 additions and 20 deletions

View File

@ -143,42 +143,47 @@ pub fn draw() -> Result<Vec<Point>, Box<dyn std::error::Error>> {
## OSC CONFIG ## OSC CONFIG
S Server = (LJ) OSC Server and client ### Actors and notations
```
- [S] Server / (LJ) OSC Server and client
eventual config eventual config
channel 1 : IP channel 1 : IP
channel X : IP channel X : IP
R Rust = (LJ Particle) OSC Server and Client - [R] Rust = (LJ Particle) OSC Server and Client
U User Interface = (Tablet) HTML Interface - [U] User Interface = (Tablet) HTML Interface
c Program Channel = configurable, uint ex: 1 - [c] Program Channel = configurable, uint ex: 1
n Programe name = configurable, string ex: particle_foo_square - [n] Programe name = configurable, string ex: particle_foo_square
Sequence Diagram ```
### Sequence Diagram
``` ```
# Prerequisite : S is running and available and U is connected to S # Prerequisite : [S] is running and available and U is connected to [S]
# R starts # [R] starts
# R: Do you have my config already ? # [R]: Do you have my config already ?
R -> S "/program/$c/$n/configure" [R] -> [S] "/program/${c}/${n}/configure"
# C needs to stock which program is currently used for $n channel and its parameters # [S] needs to stock which program is currently used for ${n} channel and its parameters
# If no, C manifests the need to init the configuration # If no, [S] manifests the need to init the configuration
C -> R "/program/$c/$n/no-config" [S] -> [R] "/program/${c}/${n}/no-config"
# If no-config, R sends its default config for C to store # If no-config, [R] sends its default config for [S] to store
R -> C "/program/$c/$n/var1 default_value1" # etc. [R] -> [S] "/program/${c}/${n}/var1 default_value1" # etc.
# In any case, C sends to R the current config # In any case, [S] sends to [R] the current config
C -> R "/program/$c/$n/var1 value1" # etc. [S] -> [R] "/program/${c}/${n}/var1 value1" # etc.
# C creates an event for the User to change # [S] creates an event for the User to change
C -> U "/program/$c/$n" [S] -> U "/program/${c}/${n}"
# U can change the program configuration # U can change the program configuration
U -> C "/program/$c/$n" U -> [S] "/program/${c}/${n}"
``` ```