Callback for updating the publication buffer. When set to NULL, the model is assumed not to support periodic publishing. When set to non-NULL the callback will be called periodically and is expected to update
bt_mesh_model_pub
.msg with a valid publication message. If the callback returns non-zero, the publication is skipped and will resume on the next periodic publishing interval.