Qualcomm CSRmesh v2.1 Application 移植指南简介(二)

The mesh initialization function initializes the mesh models and the core stack in the following
sequence:
1. Configure the scheduler parameters and then initialise the mesh scheduler.
2. Initialise the model data for models supported by the application. This needs to be called
before calling the
readPersistentStore() function.
3. Read the persistent data from NVM and store onto the application and models data structure.
4. Initialise the CSRmesh stack and the core mesh handler which handles the event from the
core mesh stack.
5. Initialise the supported model handlers and then start the CSRmesh.
6. On successful start of the CSRmesh stack the application can start the association procedure
or move onto a state where it’s already been associated.

The code snippet for the above initialization sequence is shown in Table 2-3.

网格初始化函数在下面初始化网格模型和核心堆栈
序列:
1.配置调度程序参数,然后初始化网格调度程序。
2.初始化应用程序支持的模型的模型数据。 这需要被调用在调用readPersistentStore()函数之前。
3.从NVM中读取持久数据并存储到应用程序和模型数据结构中。
4.初始化CSRmesh堆栈和处理该事件的核心网格处理程序核心网格堆栈。
5.初始化支持的模型处理程序,然后启动CSRmesh。
6.成功启动CSRmesh堆栈后,应用程序可以启动关联过程或转移到已经关联的状态。

表2-3显示了上述初始化序列的代码片段。

Qualcomm CSRmesh v2.1 Application 移植指南简介(二)

Qualcomm CSRmesh v2.1 Application 移植指南简介(二)

Qualcomm CSRmesh v2.1 Application 移植指南简介(二)

2.2 Connection Manager integration 连接管理器集成

The CSRmesh v2.1 applications have been integrated to work with the Connection Manager. The Connection Manager is a common platform for all the µEnergy application development which would ensure the use of common reusable code as well as handle the multiple connections and various roles of the Bluetooth low energy technology system in an efficient and simple way. The Connection Manager by default supports a number of components as mentioned below which could be enabled based on the below mentioned flags as defined in the csr_mesh_light_csr102x_uenergyprops.xml file. If these flags are enabled, then the corresponding features of the Connection Manager are enabled to build by default.

CSRmesh v2.1应用程序已经集成到连接管理器中。 连接管理器是所有μEnergy应用程序开发的通用平台,可确保使用通用的可重用代码,并以高效和简单的方式处理蓝牙低功耗技术系统的多个连接和各种角色。 默认情况下,连接管理器支持许多如下所述的组件,这些组件可以根据csr_mesh_light_csr102x_uenergyprops.xml文件中定义的下述标志启用。 如果启用这些标志,则会默认启用Connection Manager的相应功能。

Qualcomm CSRmesh v2.1 Application 移植指南简介(二)