what is the function setEvents

Home Forums mDot/xDot what is the function setEvents

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17620
    simeoni lorenzo
    Participant

    Hello again, i’m really sorry to ask another question, but I don’t really see what the function void setEvents(mDotEvent* events); do, they use it in exemple but they juste do dot->setEvents(&events); with the commentary // attach the custom events handler , and i don’t really understand… Somoene knows pls?:)

    #17625
    Mike Fiore
    Blocked

    Events fire when different things happen in the MAC layer – TX done, TX error, RX done, RX error, join accept, etc, etc. The event handler is a way for the application to be notified of important things like those and others without constantly polling the library.

    Cheers,
    Mike

    #17642
    simeoni lorenzo
    Participant

    I don’t really understand, is it essential for the program?

    #17646
    Mike Fiore
    Blocked

    You don’t need to inject a custom events handler. A default one is always there. It’s just available in case you want to override it and do custom things when different events fire.

    Cheers,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.