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

◆ bt_mesh_ponoff_cli_on_power_up_set()

int bt_mesh_ponoff_cli_on_power_up_set ( struct bt_mesh_ponoff_cli cli,
struct bt_mesh_msg_ctx *  ctx,
enum bt_mesh_on_power_up  on_power_up,
enum bt_mesh_on_power_up rsp 
)

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

Set the OnPowerUp state of a server.

This call is blocking if the rsp buffer is non-NULL. Otherwise, this function will return, and the response will be passed to the bt_mesh_ponoff_cli::status_handler callback.

Parameters
[in]cliPower OnOff client to send the message on.
[in]ctxContext of the message, or NULL to send with the configured publish parameters.
[in]on_power_upNew OnPowerUp state of the server.
[out]rspResponse buffer to put the received response in, or NULL to keep from blocking.
Return values
0Successfully sent a set message. If a response buffer is provided, it has been populated.
-EALREADYA blocking request is already in progress.
-EADDRNOTAVAILA message context was not provided and publishing is not configured.
-EAGAINThe device has not been provisioned.
-ETIMEDOUTThe request timed out without a response.