- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all:
I am very confused that why the CTL Server model includes the Level server and lightness server, As I know, the level server model have realized the same functions with lightness server, I don't know what are the differences between Level server model and lightness server model, who can tell me?
#define WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_DEFTT_SRV, wiced_bt_mesh_model_default_transition_time_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCENE_SRV, wiced_bt_mesh_model_scene_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCENE_SETUP_SRV, wiced_bt_mesh_model_scene_setup_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCHEDULER_SRV, wiced_bt_mesh_model_scheduler_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCHEDULER_SETUP_SRV, wiced_bt_mesh_model_scheduler_setup_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_TIME_SRV, wiced_bt_mesh_model_time_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_TIME_SETUP_SRV, wiced_bt_mesh_model_time_setup_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_ONOFF_SRV, wiced_bt_mesh_model_onoff_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_POWER_ONOFF_SRV, wiced_bt_mesh_model_power_onoff_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_POWER_ONOFF_SETUP_SRV, wiced_bt_mesh_model_power_onoff_setup_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_LEVEL_SRV, wiced_bt_mesh_model_level_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SRV, wiced_bt_mesh_model_light_lightness_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV, wiced_bt_mesh_model_light_lightness_setup_server_message_handler, NULL, NULL }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_CTL_SRV, wiced_bt_mesh_model_light_ctl_server_message_handler, wiced_bt_mesh_model_light_ctl_server_scene_store_handler, wiced_bt_mesh_model_light_ctl_server_scene_recall_handler }, \
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_CTL_SETUP_SRV, wiced_bt_mesh_model_light_ctl_setup_server_message_handler, NULL, NULL }
Solved! Go to Solution.
- Tags:
- cyw20735
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Macros such as WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER can be used to instantiate mesh models on a given element. Based on the device definition the mesh core creates a device composition data that can be read by the the provisioner. Here, each model consists of the model definition itself (company ID and model ID) and callback function which is executed by the Mesh Core library on receiving a mesh message.
Eg:
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_LEVEL_SRV, wiced_bt_mesh_model_level_server_message_handler, NULL, NULL },
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SRV, wiced_bt_mesh_model_light_lightness_server_message_handler, NULL, NULL }
Here, wiced_bt_mesh_model_level_server_message_handler will be called when core receives a valid message for Level Model,and wiced_bt_mesh_model_light_lightness_server_message_handler will be called when core receives a valid message for Light Lightness Server model. These call back functions are defined in the mesh libraries.
Below structure defines configuration data of a model. Please see wiced_bt_mesh_cfg.h.
typedef PACKED struct
{
uint16_t company_id; /**< Company ID of the model. It is 0 for SIG models */
uint16_t model_id; /**< Model ID */
void *p_message_handler; /**< message handler for this model */
void *p_scene_store_handler; /**< function to call to store the scene contents */
void *p_scene_recall_handler; /**< function to call to recall the scene contents */
} wiced_bt_mesh_core_config_model_t;
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Macros such as WICED_BT_MESH_MODEL_LIGHT_CTL_SERVER can be used to instantiate mesh models on a given element. Based on the device definition the mesh core creates a device composition data that can be read by the the provisioner. Here, each model consists of the model definition itself (company ID and model ID) and callback function which is executed by the Mesh Core library on receiving a mesh message.
Eg:
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_GENERIC_LEVEL_SRV, wiced_bt_mesh_model_level_server_message_handler, NULL, NULL },
{ MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_LIGHT_LIGHTNESS_SRV, wiced_bt_mesh_model_light_lightness_server_message_handler, NULL, NULL }
Here, wiced_bt_mesh_model_level_server_message_handler will be called when core receives a valid message for Level Model,and wiced_bt_mesh_model_light_lightness_server_message_handler will be called when core receives a valid message for Light Lightness Server model. These call back functions are defined in the mesh libraries.
Below structure defines configuration data of a model. Please see wiced_bt_mesh_cfg.h.
typedef PACKED struct
{
uint16_t company_id; /**< Company ID of the model. It is 0 for SIG models */
uint16_t model_id; /**< Model ID */
void *p_message_handler; /**< message handler for this model */
void *p_scene_store_handler; /**< function to call to store the scene contents */
void *p_scene_recall_handler; /**< function to call to recall the scene contents */
} wiced_bt_mesh_core_config_model_t;
Thanks,
-Dheeraj