thesolarnomad / lora-serialization

LoraWAN serialization/deserialization library for The Things Network
MIT License
164 stars 26 forks source link

[wip] add things4u lora format #23

Open aparcar opened 5 years ago

aparcar commented 5 years ago

This is more like a POC or an idea on how it could be implemented. I think this approach is far easier than using protobuf, at least for the scenarios I'm looking into.

Please be aware I never touched any cpp before, highly likely it's the worst possible style :roll_eyes:

Signed-off-by: Paul Spooren mail@aparcar.org

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-1.03%) to 98.252% when pulling 5e702aff5b87f9ce43581a4cc3d59e20c366fd13 on aparcar:master into 79371336a38ae14a024f9205cc5f608f77221525 on thesolarnomad:master.

joscha commented 5 years ago

I am not sure about this. Before this change, the library is just very opinionated about how things are encoded and decoded. The format is static all the way, which makes it very simple and also very small. Proto is on the other side, where it allows for very dynamic changes at the expense of a few bytes that define the notion of "fields" and allows for depreciation, etc. The change in this pull request is a mixture of both, but not backwards compatible and only forward compatible with extending the library each time (because new opcodes will need to be introduced). Extending the library won't scale, because some people need X, some Y and some Z, which means at the end, the library has opcode X, opcode Y and opcode Z. WDYT?