BT Mesh Configuration Task is abstraction of configuration procedures
The specific configuration tasks are instances of this structure with different task identifiers and function pointers (e.g. conf_request, on_event etc.) furthermore different members of the btmesh_conf_task_ext_t union is used based on the task type.

Public Attributes#

Task identifier which determines the specific task type.

sl_status_t

Task result. Initialized to BTMESH_CONF_TASK_RESULT_UNKNOWN and it set to the final value at the end of task.
If the configuration task was successful then it is set to SL_STATUS_OK.
If conf_request or on_event fails then it set to an error code returned by the BT Mesh Stack.

sl_status_t(*

Abstract configuration request which sends the task specific configuration request to the configuration server on a node.

sl_status_t(*

Abstract configuration event handler which processes the BT Mesh Stack event.
Only those BT Mesh Configuration Client events shall be forwarded to this task event handler which matches the configuration handle of the last conf_request in order to make task implementation simpler.

int32_t(*

Abstract function which provides the string representation of the configuration task.
The function always writes null terminated string into the buffer.

void(*

Deallocation of BT Mesh Configuration Task instance.

Next task if this task is successful (result is SL_STATUS_OK)

Next task if this task fails (result is not SL_STATUS_OK)

Task specific data (parameters, runtime data, results)
Union of task specific data structures.

Public Attribute Documentation#

task_id#

btmesh_conf_task_id_t btmesh_conf_task_t::task_id

Task identifier which determines the specific task type.


result#

sl_status_t btmesh_conf_task_t::result

Task result. Initialized to BTMESH_CONF_TASK_RESULT_UNKNOWN and it set to the final value at the end of task.
If the configuration task was successful then it is set to SL_STATUS_OK.
If conf_request or on_event fails then it set to an error code returned by the BT Mesh Stack.


conf_request#

sl_status_t(* btmesh_conf_task_t::conf_request) (btmesh_conf_task_t *const self, uint16_t enc_netkey_index, uint16_t server_address, uint32_t *handle)

Abstract configuration request which sends the task specific configuration request to the configuration server on a node.

Returns

  • Task request status


on_event#

sl_status_t(* btmesh_conf_task_t::on_event) (btmesh_conf_task_t *const self, uint16_t enc_netkey_index, uint16_t server_address, const sl_btmesh_msg_t *evt)

Abstract configuration event handler which processes the BT Mesh Stack event.
Only those BT Mesh Configuration Client events shall be forwarded to this task event handler which matches the configuration handle of the last conf_request in order to make task implementation simpler.

Returns

  • Current status of the task.


to_string#

int32_t(* btmesh_conf_task_t::to_string) (btmesh_conf_task_t *const self, char *buffer, uint32_t size)

Abstract function which provides the string representation of the configuration task.
The function always writes null terminated string into the buffer.

Returns

  • Return value of functions shall be interpreted as snprintf.


destroy#

void(* btmesh_conf_task_t::destroy) (btmesh_conf_task_t *const self)

Deallocation of BT Mesh Configuration Task instance.


next_on_success#

btmesh_conf_task_t* btmesh_conf_task_t::next_on_success

Next task if this task is successful (result is SL_STATUS_OK)


next_on_failure#

btmesh_conf_task_t* btmesh_conf_task_t::next_on_failure

Next task if this task fails (result is not SL_STATUS_OK)


ext#

btmesh_conf_task_ext_t btmesh_conf_task_t::ext

Task specific data (parameters, runtime data, results)
Union of task specific data structures.