Create your authentication credentials, and use them to create a project.
Context
All calls to SDK are available as external C calls.
Procedure
- Create a credentials object for authentication:
#include <sdk/esp_sdk.h>
#include <sdk/esp_credentials.h>
EspError* error = esp_error_create();
esp_sdk_start(error);
EspCredentials * m_creds = esp_credentials_create(ESP_CREDENTIALS_USER_PASSWORD, error);
esp_credentials_set_user(espuser.c_str(),error);
esp_credentials_set_password(m_creds, esppass.c_str(),error);
- Create a project:
EspUri* m_espUri = NULL; EspProject* m_project = NULL;
if ( isCluster){
m_espUri = esp_uri_create_string(project_uri.c_str(), error);
m_project = esp_project_get(m_espUri, m_creds ,NULL,error);
esp_project_connect (m_project,error);