kopia lustrzana https://github.com/peterhinch/micropython-samples
SERIALISATION.md: Add note re CBOR.
rodzic
8790817f4b
commit
bcfccf62f7
|
@ -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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
a `StreamWriter`. In the case of ASCII protocols a delimiter - usually `b"\n"`
|
||||
is appended.
|
||||
|
|
Ładowanie…
Reference in New Issue