nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ bt_mesh_plvl_srv_pub()

int bt_mesh_plvl_srv_pub ( struct bt_mesh_plvl_srv * srv,
struct bt_mesh_msg_ctx * ctx,
const struct bt_mesh_plvl_status * status )

#include <include/bluetooth/mesh/gen_plvl_srv.h>

Publish the current Power state.

Publishes a Generic Power Level status message with the configured publish parameters, or using the given message context.

Note
This API is only used for publishing unprompted status messages. Response messages for get and set messages are handled internally.
Parameters
[in]srvServer instance to publish with.
[in]ctxMessage context, or NULL to publish with the configured parameters.
[in]statusStatus to publish.
Returns
0 Successfully published the current Power state.
Return values
-EADDRNOTAVAILA message context was not provided and publishing is not configured.
-EAGAINThe device has not been provisioned.