![]() |
nRF Connect SDK API 3.3.99
|
| 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.
| [in] | cli | Power OnOff client to send the message on. |
| [in] | ctx | Context of the message, or NULL to send with the configured publish parameters. |
| [in] | on_power_up | New OnPowerUp state of the server. |
| [out] | rsp | Response buffer to put the received response in, or NULL to keep from blocking. |
| 0 | Successfully sent a set message. If a response buffer is provided, it has been populated. |
| -EALREADY | A blocking request is already in progress. |
| -EADDRNOTAVAIL | A message context was not provided and publishing is not configured. |
| -EAGAIN | The device has not been provisioned. |
| -ETIMEDOUT | The request timed out without a response. |