This page contains a draft for a uniform/universal URI layout and "vocabulary" that all applications/clients can use.
HTTaP defines two "domains" :
- The static domain contains files that do not change. They usually contain all the HTML/JS interface and all the support files. They are cacheable.
- The dynamic domain is introduced with a « URI with query component(s) », starting with "/?", to prevent them from being stored in cache.
The dynamic domain is split further:
- lowercase names are usually reserved for standard HTTaP features (such as listings or loopback)
- uppercase names describe application-specific resources, signals, like memory, registers, sensors...
Signals use the object notation (with a dot) to represent hierarchy. As a rule of thumb, if it uses a copy of the circuit or an instance of the code, it will be dot-represented. They will be treated similarly by the handler of the server, for example memory spaces...
|/path/filename||Static file to serve.||*
|/?||Root of HTTaP, serve a JSON-formatted
list of available of valid dynamic resources names
|/?loopback||Loopback for JS save/restore (optional)||*
|/?list||Return the list of the signals and their hierarchy
|/?changes||same as /?list but only include signals that have changed
|/?REG||read the value of all the registers
|/?REG/R1||read the value of register R1
|/?REG/R1,R2||read the values of registers R1 and R2 (optional?)
|/?MEM||Dump the contents of the memory||*|
|/?MEM/123-456||Dump the contents of the memory from locations 123 to 456||*|
|/?IO.SPI.1/||Read the full status of the first SPI port
I'm not sure about the representation of ranges but they are pretty useful to reduce the bandwidth and CPU load.
Memory ranges should use the #HYX file format to save bandwidth, compared to plain JSON syntax.