ESP SDK C API
Functions
Project Options
Project

Functions

ESPAPICALL EspProjectOptionsesp_project_options_create (EspError *error)
ESPAPICALL int32_t esp_project_options_set_access_mode (EspProjectOptions *project_options, ESP_ACCESS_MODE_T mode, EspError *error)
ESPAPICALL int32_t esp_project_options_set_dispatcher (EspProjectOptions *project_options, EspDispatcher *dispatcher, EspError *error)
ESPAPICALL int32_t esp_project_options_set_updater (EspProjectOptions *project_options, EspUpdater *updater, EspError *error)
ESPAPICALL int32_t esp_project_options_set_retrycount (EspProjectOptions *project_options, int32_t count, EspError *error)
ESPAPICALL int32_t esp_project_options_free (EspProjectOptions *project_options, EspError *error)

Function Documentation

ESPAPICALL EspProjectOptions* esp_project_options_create ( EspError *  error)

Creates a project options object with default values. This must be freed using esp_project_options_free().

ESPAPICALL int32_t esp_project_options_free ( EspProjectOptions project_options,
EspError *  error 
)

Must be called to free the resources used by EspProjectOptions that was created using esp_project_options_create().

Parameters:
project_optionsEspProjectOptions to free
ESPAPICALL int32_t esp_project_options_set_access_mode ( EspProjectOptions project_options,
ESP_ACCESS_MODE_T  mode,
EspError *  error 
)

Sets the mode project will be accessed with - DIRECT, CALLBACK or SELECT.

See also:
AccessModes
Parameters:
project_optionsEspProjectOptions to modify
modeaccess mode to use
ESPAPICALL int32_t esp_project_options_set_dispatcher ( EspProjectOptions project_options,
EspDispatcher dispatcher,
EspError *  error 
)

Not in R5. Sets a custom EspDispatcher to handle events for this EspProject.

Parameters:
project_optionsEspProjectOptions to modify
dispatcherEspDispatcher to use
ESPAPICALL int32_t esp_project_options_set_retrycount ( EspProjectOptions project_options,
int32_t  count,
EspError *  error 
)

If set to set to a positive value, SDK will try to reconnect the specified number of times if it detects that the project has stopped in the cluster. If retries are enabled, the SDK will generate an ESP_PROJECT_EVENT_STALE when it detects the connected project is stopped and an ESP_PROJECT_EVENT_UPTODATE once it reconnects. If SDK cannot reconnect after the specified number of tries it generates an ESP_PROJECT_EVENT_DISCONNECTED. details in case of error

Parameters:
project_optionsEspProjectOptions to change
countnumber of retries to make
ESPAPICALL int32_t esp_project_options_set_updater ( EspProjectOptions project_options,
EspUpdater updater,
EspError *  error 
)

Not in R5. Sets a custom EspUpdater to handle events for this EspProject.

Parameters:
project_optionsEspProjectOptions to modify
updaterEspUpdater to use
 All Classes Variables