Astarte Device SDK ESP32
ESP32 device SDK for the Astarte platform
Loading...
Searching...
No Matches
astarte.h File Reference

Astarte types and defines. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASTARTE_DEVICE_SDK_MAJOR   1
 
#define ASTARTE_DEVICE_SDK_MINOR   3
 
#define ASTARTE_DEVICE_SDK_PATCH   3
 

Typedefs

typedef enum astarte_err_t astarte_err_t
 

Enumerations

enum  astarte_err_t
 Astarte return codes. More...
 

Functions

enum astarte_err_t __attribute__ ((deprecated("Please use the typedef astarte_err_t")))
 
const char * astarte_err_to_name (astarte_err_t code)
 Returns string for astarte_err_t error codes.
 

Variables

 ASTARTE_OK = 0
 
 ASTARTE_ERR = 1
 
 ASTARTE_ERR_NOT_FOUND = 2
 
 ASTARTE_ERR_NO_JWT = 3
 
 ASTARTE_ERR_OUT_OF_MEMORY = 4
 
 ASTARTE_ERR_ESP_SDK = 5
 
 ASTARTE_ERR_AUTH = 6
 
 ASTARTE_ERR_ALREADY_EXISTS = 7
 
 ASTARTE_ERR_API = 8
 
 ASTARTE_ERR_HTTP = 9
 
 ASTARTE_ERR_NVS = 10
 
 ASTARTE_ERR_NVS_NOT_INITIALIZED = 11
 
 ASTARTE_ERR_PARTITION_SCHEME = 12
 
 ASTARTE_ERR_MBED_TLS = 13
 
 ASTARTE_ERR_IO = 14
 
 ASTARTE_ERR_INVALID_INTERFACE_PATH = 15
 
 ASTARTE_ERR_INVALID_QOS = 16
 
 ASTARTE_ERR_DEVICE_NOT_READY = 17
 
 ASTARTE_ERR_PUBLISH = 18
 
 ASTARTE_ERR_INVALID_INTROSPECTION = 19
 
 ASTARTE_ERR_INVALID_INTERFACE_VERSION = 20
 
 ASTARTE_ERR_CONFLICTING_INTERFACE = 21
 
 ASTARTE_ERR_INVALID_SIZE = 22
 

Detailed Description

Astarte types and defines.

Enumeration Type Documentation

◆ astarte_err_t

Astarte return codes.

@detail Astarte Device SDK return codes. ASTARTE_OK is always returned when no errors occurred.

Function Documentation

◆ astarte_err_to_name()

const char * astarte_err_to_name ( astarte_err_t  code)

Returns string for astarte_err_t error codes.

This function finds the error code in a pre-generated lookup-table and returns its string representation.

Parameters
codeastarte_err_t error code
Returns
string error message

Variable Documentation

◆ ASTARTE_ERR

ASTARTE_ERR = 1

A generic error occurred. This is usually an internal error in the SDK

◆ ASTARTE_ERR_ALREADY_EXISTS

ASTARTE_ERR_ALREADY_EXISTS = 7

Attempted to perform an operation on an already existing resource

◆ ASTARTE_ERR_API

ASTARTE_ERR_API = 8

A generic error occurred while calling an Astarte API

◆ ASTARTE_ERR_AUTH

ASTARTE_ERR_AUTH = 6

An API call returned an authentication or authorization error

◆ ASTARTE_ERR_CONFLICTING_INTERFACE

ASTARTE_ERR_CONFLICTING_INTERFACE = 21

The interface conflicts with an interface present in introspection

◆ ASTARTE_ERR_DEVICE_NOT_READY

ASTARTE_ERR_DEVICE_NOT_READY = 17

Tried to perform an operation on a Device in a non-ready or initialized state

◆ ASTARTE_ERR_ESP_SDK

ASTARTE_ERR_ESP_SDK = 5

An error caused by the ESP SDK has occurred

◆ ASTARTE_ERR_HTTP

ASTARTE_ERR_HTTP = 9

An HTTP request could not be processed

◆ ASTARTE_ERR_INVALID_INTERFACE_PATH

ASTARTE_ERR_INVALID_INTERFACE_PATH = 15

The Interface Path is not valid

◆ ASTARTE_ERR_INVALID_INTERFACE_VERSION

ASTARTE_ERR_INVALID_INTERFACE_VERSION = 20

The interface is not valid

◆ ASTARTE_ERR_INVALID_INTROSPECTION

ASTARTE_ERR_INVALID_INTROSPECTION = 19

The introspection is not valid or empty

◆ ASTARTE_ERR_INVALID_QOS

ASTARTE_ERR_INVALID_QOS = 16

The QoS is not valid

◆ ASTARTE_ERR_INVALID_SIZE

ASTARTE_ERR_INVALID_SIZE = 22

An input parameter has been passed with invalid size

◆ ASTARTE_ERR_IO

ASTARTE_ERR_IO = 14

An error occurred during a file I/O operation

◆ ASTARTE_ERR_MBED_TLS

ASTARTE_ERR_MBED_TLS = 13

An error occurred during an MBED TLS operation

◆ ASTARTE_ERR_NO_JWT

ASTARTE_ERR_NO_JWT = 3

ASTARTE_PAIRING_JWT is not configured, device can't be registered

◆ ASTARTE_ERR_NOT_FOUND

ASTARTE_ERR_NOT_FOUND = 2

The resource was not found.

◆ ASTARTE_ERR_NVS

ASTARTE_ERR_NVS = 10

A generic error occurred when dealing with NVS

◆ ASTARTE_ERR_NVS_NOT_INITIALIZED

ASTARTE_ERR_NVS_NOT_INITIALIZED = 11

An error occurred due to an initialization issue with NVS

◆ ASTARTE_ERR_OUT_OF_MEMORY

ASTARTE_ERR_OUT_OF_MEMORY = 4

The operation caused an Out of Memory error

◆ ASTARTE_ERR_PARTITION_SCHEME

ASTARTE_ERR_PARTITION_SCHEME = 12

An error occurred due to a partitioning scheme incompatible with the SDK

◆ ASTARTE_ERR_PUBLISH

ASTARTE_ERR_PUBLISH = 18

An error occurred while publishing data on MQTT

◆ ASTARTE_OK

ASTARTE_OK = 0

No errors.