Code Monkey home page Code Monkey logo

Comments (2)

JiapengLi avatar JiapengLi commented on June 19, 2024

Hi @tothero
Thank you for your feedback. Agree with you parse downlink message through lw_mtype_msg_up is messy, the idea is to reuse APIs, because down/up messages are very similar. I'll see if there is clean way to do it, maybe rename the api to a general one like lw_mtype_msg and call it in lw_mtype_msg_up and lw_mtype_msg_down functions.

I didn't do test again. The code is intended to designed like that. Design it in that way the parser can compatible with counter roll back (16 bits only, 32bits counter roll back not supported).

fcntmsb = (uint16_t)(cur->ufcnt>>16);
if(fcnt16<fcntlsb){
    fcntmsb++;
}

This piece of code is for counter overflow check. So it should support 32bits counter.

from lorawan-parser.

tothero avatar tothero commented on June 19, 2024

Thanks for your response. I will see if a can make a PR for you after doing some testing at this point. For LoRaWAN 1.1 there will be only 32 Bit Framecounter no 16 Bit are allowed anymore.

Btw i made very simple lib just for parsing based on parts of your code. check it out here:
https://github.com/Lobaro/util-lorawan-packets

Maybe or not it could make sense to integrate this into your tool to add a layer of separation between parsing and other stuff your tool does.

Greetings
Theo

from lorawan-parser.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.