Git Product home page Git Product logo

Comments (5)

trond-snekvik avatar trond-snekvik commented on August 16, 2024

That's a good point. We've discussed this a bit, and believe that the entire event handling system needs a redesign, and that this is a sign of a bigger issue. The event handling is sort of backwards the way it is today, as the user application calls the event handler, and all sd-events are consumed in the framework. We'll probably turn this around, by having the framework take direct control of the SD ISR, and create some event distribution system where we filter out the events that are relevant to the mesh framework, and send the rest to the application.

For a more immediate solution your suggestion is a good fit. I believe the default case should still be APP_ERROR_CHECK(NRF_ERROR_INVALID_STATE);, as the APP_ERROR_CHECK() is to be treated as an assert for nRF51 SDK status codes, rather than checking the validity of SD events.

from nrf51-ble-bcast-mesh.

mrquincle avatar mrquincle commented on August 16, 2024

I agree with the check. You're right. Although for now the user might find out other corner cases faster if the actual error code isn't shielded.

Looking forwards to the new implementation! I think this would be indeed nice from the viewpoint of the application.

from nrf51-ble-bcast-mesh.

trond-snekvik avatar trond-snekvik commented on August 16, 2024

The new release includes a document that steps through the necessary steps required for integrating the mesh with existing Softdevice-based applications. Unfortunately, the event handler restructure didn't make it for this release, but we hope that the solution for future problems with this is properly explained in the guide. I'll leave the issue as pending.

from nrf51-ble-bcast-mesh.

trond-snekvik avatar trond-snekvik commented on August 16, 2024

Hi again,
With the SD8-support, the project now utilizes the SDK-module softdevice_handler, which addresses this issue. The softdevice_handler provides an interface to set different interrupt handlers for the different event classes, which should give the application the needed freedom to propagate events the right way. There are no additional changes to this under the hood in the rbc-mesh, but I think the handler should provide a sufficient interface to handle this case :)

from nrf51-ble-bcast-mesh.

mrquincle avatar mrquincle commented on August 16, 2024

Nice! I will check it out the coming weeks!

from nrf51-ble-bcast-mesh.

Related Issues (20)

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.