~~NOTOC~~
[[device_api]] > [[BS2_RunAction]]
----
===== BS2_RunAction =====
[+ 2.8.1] Commands the device to take certain actions. \\
Using this API, you can control LED, buzzer, sound, relay and more.
==== Declaration====
#include "BS_API.h"
int BS2_RunAction(void* context, uint32_t deviceId, const BS2Action* action);
[[configuration_api#BS2Action|BS2Action Structure]]
==== Parameters ====
* [In] ''//context//'' : Context
* [In] ''//deviceId//'' : Device Identifier
* [In] ''//action//'' : Structure address where certain actions are defined
==== Return Values ====
Return ''BS_SDK_SUCCESS'' when successful, and return an appropriate error code when an error occurs.