quentinlampin / microschc Goto Github PK
View Code? Open in Web Editor NEWImplementation of SCHC in microPython
License: MIT License
Implementation of SCHC in microPython
License: MIT License
In RFC 8724, it is explained that field values types returned by the parser are not constrained and the choice is left to the implementer. In page 13, it is indeed stated:
Target Value (TV) is the value used to match against the packet header field. The Target Value can be a scalar value of any type (integer, strings, etc.) or a more complex structure (array, list, etc.). The types and representations are out of scope for this document.
Moreover, the Matching Operators MSB(x), described in section 7.3, implicitly mandates the support of a raw representation of the field values. In (micro)Python, the closest representation type is bytes
, making it a default, de facto, type for parsers.
Supporting types other than bytes, e.g. integer, strings, arrays, is challenging because of encoding/decoding issues. Here is a list of issues that comes to mind:
In general, unless the Compression/Decompression Actions (CDAs) keep track of the specific encoding of source (uncompressed) packets, the received (decompressed) packets may end up different from the source, leading to systematic transmission errors.
Assuming network ordering of bytes, the implementation can however get away without storing the encoding of integer fields, hence the "easy" support of integers.
In light of the encoding issues, should the implementation support other field types ? What would be the pros and cons ?
The issue is there to keep track of the thought process about this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.