SERIALISATION.md: Add note re CBOR.

master
Peter Hinch 2024-02-22 12:26:48 +00:00
rodzic 8790817f4b
commit bcfccf62f7
1 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -61,6 +61,11 @@ The `protobuf` standard requires transmitter and receiver to share a schema
which defines the message structure. Message length may change at runtime, but which defines the message structure. Message length may change at runtime, but
structure may not. structure may not.
There has been some discussion of supporting [CBOR](https://cbor.io/). There is a
MicroPython library [here](https://github.com/onetonfoot/micropython-cbor). This
is a binary format with a focus on minimising message length. I have not yet had
time to study this.
## 1.1 Transmission over unreliable links ## 1.1 Transmission over unreliable links
Consider a system where a transmitter periodically sends messages to a receiver Consider a system where a transmitter periodically sends messages to a receiver
@ -77,7 +82,7 @@ signals the transmitter to request retransmission.
## 1.2 Concurrency ## 1.2 Concurrency
In `uasyncio` systems the transmitter presents no problem. A message is created In `asyncio` systems the transmitter presents no problem. A message is created
using synchronous code, then transmitted using asynchronous code typically with using synchronous code, then transmitted using asynchronous code typically with
a `StreamWriter`. In the case of ASCII protocols a delimiter - usually `b"\n"` a `StreamWriter`. In the case of ASCII protocols a delimiter - usually `b"\n"`
is appended. is appended.