Device: Settings
Port | Name | Description | Read | Write |
---|---|---|---|---|
0x00 | Open namespace | ✓ | ✓ | |
0x00 | Read namespace | ✓ | ✓ | |
0x00 | Select namespace | ✓ | ✓ | |
0x00 | continued | ✓ | ✓ | |
0x00 | Open key | ✓ | ✓ | |
0x00 | Read key | ✓ | ✓ | |
0x00 | Select key | ✓ | ✓ | |
0x00 | continued | ✓ | ✓ | |
----------- | ------------------ | ------------- | ---- | ----- |
0x00 | Type | ✓ | ✗ | |
0x00 | Length | ✓ | ✗ | |
0x00 | Pointer | ✓ | ✓ | |
0x00 | unused | ✓ | ✓ | |
0x00 | Read/write | ✓ | ✓ | |
0x00 | continued | ✓ | ✓ | |
0x00 | Commit | ✗ | ✓ | |
0x00 | Delete | ✗ | ✓ |
A namespace/key can be at most 63 characters long, and can contain lowercase letters,
numbers, and hyphens.
A value can be at most 255 bytes long. Text value length does not include a null terminator.
Open namespace/key is write to a buffer, with null commiting the open.
Reading returns ff if name if valid/opened, or 00 if not.
Read namespace/key reads from a text buffer, with writing resetting the pointer.
Select namespace/key returns the number of namespaces/keys registered. Writing
a number opens that namespace/key, in an implementation-defined order, preferably
alphabetic.
Read/write returns each byte of the current value, or overwrites each byte of the current value.
Length returns the length of the current value, or zero if no value.
Type returns ff if value is text, or 00 if value is binary.
Pointer returns or sets the next byte to read or write from the value.
Writing to commit saves the new value. Writing a zero saves it as a binary value.
Writing a non-zero saves it as text, possibly truncating the value if it contains a null byte.
Writing to delete will delete the value of the current key, keeping the key open.
I need one more function. I have a single port remaining in the value section.
We can read and write to a value. We can set the read/write position. We can
commit a write, and delete a value. We can read the length of a value.
We can’t easily discard an edit.
Leave this design for now.