|
ESP SDK C API
|
| Project Options | |
| Project Deployment Information | |
| Project Events | |
Entities/Objects | |
| typedef struct EspDeployment | EspDeployment |
| typedef struct EspProjectEvent | EspProjectEvent |
| typedef struct EspProjectOptions | EspProjectOptions |
| typedef struct EspProject | EspProject |
| typedef void(* | PROJECT_CALLBACK_T )(const EspProjectEvent *event, void *user_data) |
Functions | |
| ESPAPICALL EspProject * | esp_project_get (const EspUri *uri, const EspCredentials *creds, const EspProjectOptions *project_options, EspError *error) |
| ESPAPICALL EspProject * | esp_project_get_standalone (const char *host, const int32_t port, const EspCredentials *creds, const EspProjectOptions *project_options, EspError *error) |
| ESPAPICALL int32_t | esp_project_connect (EspProject *project, EspError *error) |
| ESPAPICALL int32_t | esp_project_disconnect (EspProject *project, EspError *error) |
| ESPAPICALL int32_t | esp_project_close (EspProject *project, EspError *error) |
| ESPAPICALL EspServer * | esp_project_get_server (EspProject *project, EspError *error) |
| ESPAPICALL EspSubscriber * | esp_project_create_subscriber (EspProject *project, const EspSubscriberOptions *options, EspError *error) |
| ESPAPICALL EspPublisher * | esp_project_create_publisher (EspProject *project, const EspPublisherOptions *options, EspError *error) |
| ESPAPICALL int32_t | esp_project_get_stream_names (EspProject *project, ESP_STRING_ARRAY *names, EspError *error) |
| ESPAPICALL int32_t | esp_project_get_model_stream_names (EspProject *project, EspList *stream_list, EspError *error) |
| ESPAPICALL int32_t | esp_project_get_intermediate_stream_names (EspProject *project, EspList *stream_list, EspError *error) |
| ESPAPICALL int32_t | esp_project_get_system_stream_names (EspProject *project, EspList *stream_list, EspError *error) |
| ESPAPICALL int32_t | esp_project_get_error_stream_names (EspProject *project, EspList *stream_list, EspError *error) |
| ESPAPICALL const EspStream * | esp_project_get_stream (EspProject *project, const char *stream, EspError *error) |
| ESPAPICALL int32_t | esp_project_is_connected (EspProject *project, int32_t *connected, EspError *error) |
| ESPAPICALL int32_t | esp_project_is_quiesced (EspProject *project, int32_t *quiesced, EspError *error) |
| ESPAPICALL int32_t | esp_project_set_callback (EspProject *project, uint32_t events, PROJECT_CALLBACK_T callback, void *data, EspError *error) |
| ESPAPICALL int32_t | esp_project_select_with (EspProject *project, EspSelector *selector, uint32_t events, EspError *error) |
| ESPAPICALL int32_t esp_project_close | ( | EspProject * | project, |
| EspError * | error | ||
| ) |
Once closed this project object is no longer available for interaction In DIRECT access mode, call returns when EspProject closes. In CALLBACK/SELECT it returns immediately. Completion is indicated by an ESP_PROJECT_EVENT_CLOSED event.
| ESPAPICALL int32_t esp_project_connect | ( | EspProject * | project, |
| EspError * | error | ||
| ) |
Establishes a connection to the project specified in the URI when creating the object. In DIRECT access mode, call returns when the connection is established. In CALLBACK/SELECT it returns immediately. Completion is indicated by an ESP_PROJECT_EVENT_CONNECTED event.
| ESPAPICALL EspPublisher* esp_project_create_publisher | ( | EspProject * | project, |
| const EspPublisherOptions * | options, | ||
| EspError * | error | ||
| ) |
Creates a publisher for this project. The returned EspPublisher should not be freed explicitly. The lifetime is managed by the SDK.
| project | EspProject to create a publisher on |
| options | EspPublisher options or NULL for defaults |
| ESPAPICALL EspSubscriber* esp_project_create_subscriber | ( | EspProject * | project, |
| const EspSubscriberOptions * | options, | ||
| EspError * | error | ||
| ) |
Creates an EspSubscriber for this project. The returned EspSubscriber should not be freed explicitly. The lifetime is managed by the SDK.
| project | EspProject to create a subscriber on |
| options | EspSubscriberOptions or NULL for defaults |
| ESPAPICALL int32_t esp_project_disconnect | ( | EspProject * | project, |
| EspError * | error | ||
| ) |
Disconnects from a connected project. In DIRECT access mode, call returns when EspProject disconnects. In CALLBACK/SELECT returns immediately. Completion is indicated by an ESP_PROJECT_EVENT_DISCONNECTED event.
| ESPAPICALL EspProject* esp_project_get | ( | const EspUri * | uri, |
| const EspCredentials * | creds, | ||
| const EspProjectOptions * | project_options, | ||
| EspError * | error | ||
| ) |
Retrieves a project object corresponding to the URI.
| uri | uri for the project to retrieve |
| creds | valid EspCredentials for authorisation, NULL for no authorisation |
| project_options | valid EspProjectOption or NULL for defaults |
| ESPAPICALL int32_t esp_project_get_error_stream_names | ( | EspProject * | project, |
| EspList * | stream_list, | ||
| EspError * | error | ||
| ) |
Retrieve the list of errror streams names.
| project | EspProject to query |
| stream_list | Pointer to an EspList that will contain the streams on return |
| ESPAPICALL int32_t esp_project_get_intermediate_stream_names | ( | EspProject * | project, |
| EspList * | stream_list, | ||
| EspError * | error | ||
| ) |
Retrieve the list of streams that have been generated by the compiler.
| project | EspProject to query |
| stream_list | Pointer to an EspList that will contain the streams on return |
| ESPAPICALL int32_t esp_project_get_model_stream_names | ( | EspProject * | project, |
| EspList * | stream_list, | ||
| EspError * | error | ||
| ) |
Retrieve the list of streams that are explicitly modeled in the current project.
| project | EspProject to query |
| stream_list | Pointer to an EspList that will contain the streams on return |
| ESPAPICALL EspServer* esp_project_get_server | ( | EspProject * | project, |
| EspError * | error | ||
| ) |
Retrieve the parent EspServer for this project.
| ESPAPICALL EspProject* esp_project_get_standalone | ( | const char * | host, |
| const int32_t | port, | ||
| const EspCredentials * | creds, | ||
| const EspProjectOptions * | project_options, | ||
| EspError * | error | ||
| ) |
Retrieves a project object to connect to a standalone project started outside the server framework.
| host | Host name where the standalone project is running |
| port | Command and control port for the standalone project |
| creds | valid EspCredentials for authorization, NULL for no authorization |
| project_options | valid EspProjectOption or NULL for defaults |
| ESPAPICALL const EspStream* esp_project_get_stream | ( | EspProject * | project, |
| const char * | stream, | ||
| EspError * | error | ||
| ) |
Retrieve an EspStream object for the corresponding stream name.
| project | EspProject to query |
| stream | Stream name to retrieve |
| ESPAPICALL int32_t esp_project_get_stream_names | ( | EspProject * | project, |
| ESP_STRING_ARRAY * | names, | ||
| EspError * | error | ||
| ) |
Retrieves a list of streams that are publicly accessible in the project. ESP_ARRAY_FREE should be called to free the memory used by the ESP_STRING_ARRAY structure.
NOTE: This call has been deprecated. Use esp_project_get_model_stream_names()
| ESPAPICALL int32_t esp_project_get_system_stream_names | ( | EspProject * | project, |
| EspList * | stream_list, | ||
| EspError * | error | ||
| ) |
Retrieve the list of system streams names.
| project | EspProject to query |
| stream_list | Pointer to an EspList that will contain the streams on return |
| ESPAPICALL int32_t esp_project_is_connected | ( | EspProject * | project, |
| int32_t * | connected, | ||
| EspError * | error | ||
| ) |
Check if this EspProject is connected to the backend.
| project | EspProject to query |
| connected | Pointer to store the state, non-zero if still connected |
| ESPAPICALL int32_t esp_project_is_quiesced | ( | EspProject * | project, |
| int32_t * | quiesced, | ||
| EspError * | error | ||
| ) |
Check if the backed project is quiesced.
| project | EspProject to query |
| quiesced | Pointer to store quiesced state, non-zero if quiesced |
| ESPAPICALL int32_t esp_project_select_with | ( | EspProject * | project, |
| EspSelector * | selector, | ||
| uint32_t | events, | ||
| EspError * | error | ||
| ) |
Registers this EspProject with the specified EspSelector. Waiting on the selector will return when the events registered for are triggered. Details in case of error
| project | The EspProject object to monitor for events |
| selector | The EspSelector to use for monitoring |
| events | The events to monitor for |
| ESPAPICALL int32_t esp_project_set_callback | ( | EspProject * | project, |
| uint32_t | events, | ||
| PROJECT_CALLBACK_T | callback, | ||
| void * | data, | ||
| EspError * | error | ||
| ) |
Registers a callback handler for the project in CALLBACK access mode.
| project | Pointer to a valid EspProject object |
| events | Bitwise OR'd value of ESP_PROJECT_EVENT_XXX types of interest |
| callback | Pointer to the callback handler function |
| data | Pointer to arbitrary data which will be passed back to callback handler |
1.7.5