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

◆ check_state()

static bool check_state ( const struct module_state_event event,
const void *  module_id,
enum module_state  state 
)
inlinestatic

#include <include/caf/events/module_state_event.h>

Check if the selected module reported the selected state.

The function can be used in event handler to verify if received module state event informs that selected module reported selected state. The MODULE_ID can be used to get module ID of module with selected name.

Parameters
[in]eventPointer to handled module state event.
[in]module_idID of the selected module.
[in]stateSelected module state.
Return values
trueThe module state event informs that selected module reported selected state. Otherwise, false is returned.