How to implement scheduler function with scheduler server model and Timer server model?

Hi

   I want to implement function of scheduler server model with Timer server model, I checked the nRF Connect SDK, but I still did not understand, 

   Could you give some advices or give me a guide to how to understand? 

   I mean that how scheduler server model and timer server model work together and how to implement scheduler function?

   Is there some examples to refer to?

   where is <ztest.h> in nRF connect SDK?

Parents
  • Hi,

    I mean that how scheduler server model and timer server model work together and how to implement scheduler function?

    Add the scheduler server model as you would add any other model.

    According to the Scheduler Server documentation, you need to call bt_mesh_scheduler_srv_time_update() to set UTC time and time zone, at any time when UTC time changes (e.g. on startup and when time for some reason is wrong) and when the time zone changes (e.g. the device is moved to a different time zone or there is a change to or from daylight savings time.)

    Unfortunately we do not have any examples showing this.

    where is <ztest.h> in nRF connect SDK?

    There is a file of that name at zephyr/subsys/testsuite/ztest/include/ztest.h

    Regards,
    Terje

  • Hi ,

    Thanks for your reply.

    But I found there is nothing in zephyr folder of nRF connec SDK.

    Could you send me zephyr folder, please?

    By the way , I also can not find the function definition of k_work_reschedule() / k_uptime_get() / u32_count_trailing_zeros() and so on ,   also can not find the struct definition of struct bt_mesh_model, could you send me the corresponding files , please?

    or what does k_work_reschedule(&srv->delayed_work, K_MSEC(MAX(scheduled_uptime - current_uptime, 0)))  mean?

  • Hi,

    Tomlee said:
    But I found there is nothing in zephyr folder of nRF connec SDK.

    It is directly under v1.9.0/zephyr/, not under v1.9.0/nrf/zephyr/. The contents of v1.9.0/nrf/zephyr/ looks normal in your screenshot.

    The kernel functions that you do not find, should also be in files under the same zephyr folder or its subdirectories. For instance, k_work_reschedule() is in zephyr/kernel/work.c.

    The bt_mesh_model struct is defined in v1.9.0/zephyr/include/zephyr/bluetooth/mesh/access.h.

    You should also be able to find documentation for most of the structs and functions in the online documentation, through the search functionality at the top of the page. (There is a search field with a magnifier icon and the text "Search all docs...")

    Regards,
    Terje

  • Hi,  there is also no v1.9.0/zephyr folder, Could you show me where I can download it, please?

Reply Children
  • Hi,

    For installing the full nRF Connect SDK, use the Toolchain Manager as described in the documentaiton section Installing automatically. This is the recommended way to install the SDK. For new projects you should use the latest version, which today is version 2.0.2.

    There is also a section on how to install manually, for situations where an automatic install does not work of if you have special needs. This is usually not needed.

    Regardless of installation method, if you have done it correctly there should be a number of folders in the vX.Y.Z folder, where X.Y.Z is the version number of the SDK. E.g. v2.0.2 for the currently latest version. Those folders include "nrf", "nrfxlib" and "zephyr". If you do not have those folders, Do a reinstall and follow the installation instructions closely.

    Regards,
    Terje

Related