ES Client

File: es_client.h

Description: ES Client API

Example Usage

Initialize & use the ES Client module over CSP
1es_client_init();
2es_client_csp_tl_init(10);

Interface Functions

int8_t es_client_init(void)
[source]

Initializes es client lib.

Returns:

On success 0, -1 in case of failiure

void es_client_deinit(void)
[source]

Deinit es_client object.

Transport initialization

int8_t es_client_csp_tl_init(uint16_t dest_addr)
[source]

Initialize CSP as a transport layer for es_client

Parameters:
  • dest_addr: – Destination address of the module.

Returns:

0 if successful, -1 if initialization failed.

File Transfer

int8_t es_client_file_upload(const char *src_file, const char *dest_file)
[source]

Upload a file.

Parameters:
  • src_file: – Name of the file to be uploaded.

  • dest_file: – Remote location (path) on the file system where to store the file.

Returns:

0 if successful, -1 if failed.

int8_t es_client_file_download(const char *src_file, const char *dest_file)
[source]

Download a file.

Parameters:
  • dest_file – Location on the host file system where to store the file.

  • src_file: – Path of the file to be downloaded.

Returns:

0 if successful, -1 if failed.