Astarte device API for Zephyr 0.7.2
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches

Astarte result types. More...

Enumerations

enum  astarte_result_t {
  ASTARTE_RESULT_OK = 0 , ASTARTE_RESULT_INTERNAL_ERROR = 1 , ASTARTE_RESULT_OUT_OF_MEMORY = 2 , ASTARTE_RESULT_INVALID_CONFIGURATION = 3 ,
  ASTARTE_RESULT_INVALID_PARAM = 4 , ASTARTE_RESULT_SOCKET_ERROR = 5 , ASTARTE_RESULT_HTTP_REQUEST_ERROR = 6 , ASTARTE_RESULT_JSON_ERROR = 7 ,
  ASTARTE_RESULT_MBEDTLS_ERROR = 8 , ASTARTE_RESULT_NOT_FOUND = 9 , ASTARTE_RESULT_INTERFACE_ALREADY_PRESENT = 10 , ASTARTE_RESULT_INTERFACE_NOT_FOUND = 11 ,
  ASTARTE_RESULT_INTERFACE_INVALID_VERSION = 12 , ASTARTE_RESULT_INTERFACE_CONFLICTING = 13 , ASTARTE_RESULT_TLS_ERROR = 14 , ASTARTE_RESULT_MQTT_ERROR = 15 ,
  ASTARTE_RESULT_TIMEOUT = 16 , ASTARTE_RESULT_BSON_SERIALIZER_ERROR = 17 , ASTARTE_RESULT_BSON_DESERIALIZER_ERROR = 18 , ASTARTE_RESULT_BSON_DESERIALIZER_TYPES_ERROR = 19 ,
  ASTARTE_RESULT_BSON_EMPTY_ARRAY_ERROR = 20 , ASTARTE_RESULT_BSON_EMPTY_DOCUMENT_ERROR = 21 , ASTARTE_RESULT_CLIENT_CERT_INVALID = 22 , ASTARTE_RESULT_MAPPING_PATH_MISMATCH = 23 ,
  ASTARTE_RESULT_MAPPING_INDIVIDUAL_INCOMPATIBLE = 24 , ASTARTE_RESULT_MAPPING_NOT_IN_INTERFACE = 25 , ASTARTE_RESULT_MAPPING_UNSET_NOT_ALLOWED = 26 , ASTARTE_RESULT_MAPPING_EXPLICIT_TIMESTAMP_REQUIRED = 27 ,
  ASTARTE_RESULT_MAPPING_EXPLICIT_TIMESTAMP_NOT_SUPPORTED = 28 , ASTARTE_RESULT_MQTT_CLIENT_NOT_READY = 29 , ASTARTE_RESULT_MQTT_CLIENT_ALREADY_CONNECTED = 30 , ASTARTE_RESULT_MQTT_CLIENT_ALREADY_CONNECTING = 31 ,
  ASTARTE_RESULT_DEVICE_NOT_READY = 32 , ASTARTE_RESULT_INCOMPLETE_AGGREGATION_OBJECT = 33 , ASTARTE_RESULT_NVS_ERROR = 34 , ASTARTE_RESULT_KV_STORAGE_FULL = 35 ,
  ASTARTE_RESULT_DEVICE_CACHING_OUTDATED_INTROSPECTION = 36
}
 Astarte Device SDK return codes. More...
 

Functions

const char * astarte_result_to_name (astarte_result_t code)
 Returns string for result codes.
 

Detailed Description

Astarte result types.

Enumeration Type Documentation

◆ astarte_result_t

Astarte Device SDK return codes.

Astarte Device SDK return codes. ASTARTE_RESULT_OK is always returned when no errors occurred.

Enumerator
ASTARTE_RESULT_OK 

No errors.

ASTARTE_RESULT_INTERNAL_ERROR 

A generic error occurred.

This is usually an internal error in the SDK.

ASTARTE_RESULT_OUT_OF_MEMORY 

The operation caused an out of memory error.

ASTARTE_RESULT_INVALID_CONFIGURATION 

Invalid configuration for the required operation.

ASTARTE_RESULT_INVALID_PARAM 

A function has been called with incorrect parameters.

ASTARTE_RESULT_SOCKET_ERROR 

Error during TCP socket creation.

ASTARTE_RESULT_HTTP_REQUEST_ERROR 

An HTTP request could not be processed.

ASTARTE_RESULT_JSON_ERROR 

Attempting to parse/encode a malformed JSON document.

ASTARTE_RESULT_MBEDTLS_ERROR 

Internal error from the MBEDTLS library.

ASTARTE_RESULT_NOT_FOUND 

The resource was not found.

ASTARTE_RESULT_INTERFACE_ALREADY_PRESENT 

Interface is already present in the introspection.

ASTARTE_RESULT_INTERFACE_NOT_FOUND 

Interface not found in the introspection.

ASTARTE_RESULT_INTERFACE_INVALID_VERSION 

Trying to add an interface with both major an minor set to 0.

ASTARTE_RESULT_INTERFACE_CONFLICTING 

Trying to add an interface that conflicts with the previous one.

ASTARTE_RESULT_TLS_ERROR 

Error from the TLS credential zephyr module.

ASTARTE_RESULT_MQTT_ERROR 

Internal error from the MQTT library.

ASTARTE_RESULT_TIMEOUT 

Operation timed out.

ASTARTE_RESULT_BSON_SERIALIZER_ERROR 

BSON serialization error.

ASTARTE_RESULT_BSON_DESERIALIZER_ERROR 

BSON deserialization error.

ASTARTE_RESULT_BSON_DESERIALIZER_TYPES_ERROR 

A BSON document with elements of incompatible type has been received.

ASTARTE_RESULT_BSON_EMPTY_ARRAY_ERROR 

A BSON array with elements of different type has been received.

ASTARTE_RESULT_BSON_EMPTY_DOCUMENT_ERROR 

An empty BSON document has been received.

ASTARTE_RESULT_CLIENT_CERT_INVALID 

Astarte marked the device client certificate as invalid.

ASTARTE_RESULT_MAPPING_PATH_MISMATCH 

The provided path does not match the mapping endpoint.

ASTARTE_RESULT_MAPPING_INDIVIDUAL_INCOMPATIBLE 

The provided Astarte individual is not compatible with a mapping.

ASTARTE_RESULT_MAPPING_NOT_IN_INTERFACE 

Could not find the mapping corresponding to a path in an interface.

ASTARTE_RESULT_MAPPING_UNSET_NOT_ALLOWED 

The specified mapping does not support properties unsetting.

ASTARTE_RESULT_MAPPING_EXPLICIT_TIMESTAMP_REQUIRED 

The specified mapping requires an explicit timestamp.

ASTARTE_RESULT_MAPPING_EXPLICIT_TIMESTAMP_NOT_SUPPORTED 

The specified mapping does not support an explicit timestamp.

ASTARTE_RESULT_MQTT_CLIENT_NOT_READY 

Calling an MQTT API while the client is not ready.

ASTARTE_RESULT_MQTT_CLIENT_ALREADY_CONNECTED 

Attempting to connect an MQTT client already connected.

ASTARTE_RESULT_MQTT_CLIENT_ALREADY_CONNECTING 

Attempting to connect an MQTT client already connecting.

ASTARTE_RESULT_DEVICE_NOT_READY 

Calling a device API while the device is not ready.

ASTARTE_RESULT_INCOMPLETE_AGGREGATION_OBJECT 

A partial aggregated object has been found.

ASTARTE_RESULT_NVS_ERROR 

Error while reading/writing an NVS entry.

ASTARTE_RESULT_KV_STORAGE_FULL 

Astarte key-value storage is full.

ASTARTE_RESULT_DEVICE_CACHING_OUTDATED_INTROSPECTION 

An outdated introspection has been found in cache.

Function Documentation

◆ astarte_result_to_name()

const char * astarte_result_to_name ( astarte_result_t code)

Returns string for result codes.

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

Parameters
[in]codeResult code
Returns
String result message