38 #ifndef GENERIC_ONOFF_MC_H__ 39 #define GENERIC_ONOFF_MC_H__ 43 #include "generic_onoff_common.h" 44 #include "mesh_config.h" 46 #include "nrf_mesh_assert.h" 47 #include "model_config_file.h" 49 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) 50 #include "scene_common.h" 66 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) 67 #define GENERIC_ONOFF_SERVER_STORED_WITH_SCENE_STATES (GENERIC_ONOFF_SERVER_INSTANCES_MAX + \ 68 (SCENE_REGISTER_ARRAY_SIZE * GENERIC_ONOFF_SERVER_INSTANCES_MAX)) 70 #define GENERIC_ONOFF_SERVER_STORED_WITH_SCENE_STATES \ 71 (GENERIC_ONOFF_SERVER_INSTANCES_MAX) 74 #define GENERIC_ONOFF_EID_START (MESH_APP_MODEL_GENERIC_ONOFF_ID_START) 75 #define GENERIC_ONOFF_EID_END (GENERIC_ONOFF_EID_START + GENERIC_ONOFF_SERVER_STORED_WITH_SCENE_STATES - 1) 80 #define GENERIC_ONOFF_EID MESH_CONFIG_ENTRY_ID(MESH_OPT_MODEL_FILE_ID, GENERIC_ONOFF_EID_START) 105 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) void generic_onoff_mc_clear(void)
Clear all stored data and reset state contexts to default values.
uint32_t generic_onoff_mc_open(uint8_t *p_handle)
Create an instance of the Generic OnOff Server model states and return the corresponding handle...
uint32_t generic_onoff_mc_scene_onoff_store(uint8_t index, uint8_t scene_index, bool value)
Stores the given OnOff value for the specific scene index.
uint32_t generic_onoff_mc_scene_onoff_recall(uint8_t index, uint8_t scene_index, bool *p_value)
Restores the given OnOff value for the specific scene index.
uint32_t generic_onoff_mc_onoff_state_set(uint8_t index, bool value)
Set internal OnOff state variable.
void generic_onoff_mc_init(void)
Initialize the Generic OnOff Server persistent memory.
uint32_t generic_onoff_mc_onoff_state_get(uint8_t index, bool *p_value)
Get internal OnOff state variable.
#define NRF_MESH_STATIC_ASSERT(...)
Compile-time assertion.
#define MESH_APP_MODEL_GENERIC_ONOFF_ID_END
End of Generic OnOff Server record entry IDs.