Edgehog Device SDK ESP32 v0.8.1
ESP32 device SDK for the Edgehog platform
Loading...
Searching...
No Matches
edgehog.h File Reference

Edgehog 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_UUID_LEN   39
 
#define EDGEHOG_VALIDATE_INCOMING_DATA(TAG, EVENT_REQUEST, PATH, BSON_TYPE)
 

Enumerations

enum  edgehog_err_t {
  EDGEHOG_OK = 0 , EDGEHOG_ERR = 1 , EDGEHOG_ERR_NETWORK = 2 , EDGEHOG_ERR_NVS = 3 ,
  EDGEHOG_ERR_OTA_INVALID_REQUEST = 4 , EDGEHOG_ERR_OTA_ALREADY_IN_PROGRESS = 5 , EDGEHOG_ERR_OTA_INVALID_IMAGE = 6 , EDGEHOG_ERR_OTA_SYSTEM_ROLLBACK = 7 ,
  EDGEHOG_ERR_OTA_CANCELED = 8 , EDGEHOG_ERR_OTA_INTERNAL = 9 , EDGEHOG_ERR_TASK_CREATE = 10 , EDGEHOG_ERR_DEVICE_NOT_READY = 11
}
 Edgehog return codes. More...
 

Detailed Description

Edgehog types and defines.

Macro Definition Documentation

◆ EDGEHOG_VALIDATE_INCOMING_DATA

#define EDGEHOG_VALIDATE_INCOMING_DATA ( TAG,
EVENT_REQUEST,
PATH,
BSON_TYPE )
Value:
if ((EVENT_REQUEST)->bson_element.type != (BSON_TYPE) \
|| strcmp((EVENT_REQUEST)->path, (PATH)) != 0) { \
ESP_LOGE(TAG, "Unable to handle request on %s having type code %i", (EVENT_REQUEST)->path, \
(EVENT_REQUEST)->bson_element.type); \
return EDGEHOG_ERR; \
}
@ EDGEHOG_ERR
Definition edgehog.h:41

Enumeration Type Documentation

◆ edgehog_err_t

Edgehog return codes.

@detail Edgehog Device SDK return codes. EDGEHOG_OK is always returned when no errors occurred.

Enumerator
EDGEHOG_OK 

No errors.

EDGEHOG_ERR 

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

EDGEHOG_ERR_NETWORK 

A generic network error occurred.

EDGEHOG_ERR_NVS 

A generic error occurred when dealing with NVS

EDGEHOG_ERR_OTA_INVALID_REQUEST 

Invalid OTA update request received

EDGEHOG_ERR_OTA_ALREADY_IN_PROGRESS 

Attempted to perform OTA operation while there is another one already active

EDGEHOG_ERR_OTA_INVALID_IMAGE 

Invalid OTA image received

EDGEHOG_ERR_OTA_SYSTEM_ROLLBACK 

The OTA procedure boot on the wrong partition

EDGEHOG_ERR_OTA_CANCELED 

OTA update aborted by Edgehog half way during the procedure

EDGEHOG_ERR_OTA_INTERNAL 

An error occurred during OTA procedure

EDGEHOG_ERR_TASK_CREATE 

xTaskCreate was unable to spawn a new task

EDGEHOG_ERR_DEVICE_NOT_READY 

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