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

◆ bt_mesh_loc_srv_local_pub()

int bt_mesh_loc_srv_local_pub ( struct bt_mesh_loc_srv * srv,
struct bt_mesh_msg_ctx * ctx,
const struct bt_mesh_loc_local * local )

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

Publish the Local Location state.

Asynchronously publishes a Local Location status message with the configured publish parameters.

Note
This API is only used for publishing unprompted status messages. Response messages for get and set messages are handled internally.
The server will only publish one state at the time. Calling this function will terminate any publishing of the Global Location state.
Parameters
[in]srvServer instance to publish on.
[in]ctxMessage context to send with, or NULL to send with the default publish parameters.
[in]localCurrent local location.
Return values
0Successfully published a Local Location status message.
-EADDRNOTAVAILA message context was not provided and publishing is not configured.
-EAGAINThe device has not been provisioned.