Zigbee: difference between ZB_SCHEDULE_CALLBACK and ZB_SCHEDULE_APP_CALLBACK

What is the difference between ZB_SCHEDULE_CALLBACK (zb_scheduler.h) and ZB_SCHEDULE_APP_CALLBACK (zboss_api_core.h)?

I understand that ZB_SCHEDULE_CALLBACK can't be called from ISR context, will ASSERT.

But in the context of a zigbee callback or signal, looks like both are working fine.

Is there one prefered/recommnded over the other?

Is there one faster than the other?

I have performance issue and I try to optimize stuff.

Thanks.

Parents
  • Hi,

    They mostly do the same thing, but the difference is that ZB_SCHEDULE_APP_CALLBACK() can be called from the application, while ZB_SCHEDULE_CALLBACK() should only be used in the ZBOSS libraries (under nrfxlib/zboss). The ZBOSS scheduler (zb_scheduler.h) is internal, and functions there should not be called directly in the application.

    If you make a custom cluster under the ZCL library files, you can use ZB_SCHEDULE_CALLBACK(), but in your application you should always use ZB_SCHEDULE_APP_CALLBACK().

    Best regards,
    Marte

Reply
  • Hi,

    They mostly do the same thing, but the difference is that ZB_SCHEDULE_APP_CALLBACK() can be called from the application, while ZB_SCHEDULE_CALLBACK() should only be used in the ZBOSS libraries (under nrfxlib/zboss). The ZBOSS scheduler (zb_scheduler.h) is internal, and functions there should not be called directly in the application.

    If you make a custom cluster under the ZCL library files, you can use ZB_SCHEDULE_CALLBACK(), but in your application you should always use ZB_SCHEDULE_APP_CALLBACK().

    Best regards,
    Marte

Children
Related