MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_err.h File Reference

MeshX Error Codes. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define MESHX_UNUSED(x)
#define MESHX_DO_NOTHING   do {} while(0)
#define MESHX_WEEK   __attribute__((weak))
#define MESHX_MALLOC   malloc
#define MESHX_CALOC   calloc
#define MESHX_FREE   free

Enumerations

enum  meshx_err_t {
  MESHX_SUCCESS = 0 ,
  MESHX_FAIL ,
  MESHX_INVALID_ARG ,
  MESHX_ERR_PLAT ,
  MESHX_NO_MEM ,
  MESHX_INVALID_STATE ,
  MESHX_NOT_FOUND ,
  MESHX_NOT_SUPPORTED ,
  MESHX_TIMEOUT ,
  MESHX_ERR_NOT_INIT ,
  MESHX_ERR_RO_CFG_BASE = 0x4000 ,
  MESHX_ERR_RO_CFG_FORMAT ,
  MESHX_ERR_RO_CFG_VERSION ,
  MESHX_ERR_RO_CFG_CRC ,
  MESHX_ERR_GPIO_BASE = 0x5000 ,
  MESHX_ERR_GPIO_INVALID_PIN ,
  MESHX_ERR_GPIO_INVALID_MODE ,
  MESHX_ERR_GPIO_INVALID_LEVEL ,
  MESHX_ERR_GPIO_INTR_NOT_SUPPORTED ,
  MESHX_ERR_GPIO_INTR_ALREADY_REGISTERED ,
  MESHX_ERR_GPIO_PWM_NOT_SUPPORTED ,
  MESHX_ERR_GPIO_PWM_INVALID_PARAM ,
  MESHX_ERR_GPIO_NOT_INITIALIZED ,
  MESHX_ERR_GPIO_CONFIG_INVALID ,
  MESHX_ERR_GPIO_HOSTED_MODE ,
  MESHX_ERR_GPIO_KV_STORAGE ,
  MESHX_ERR_GPIO_SERIALIZATION ,
  MESHX_ERR_MAX
}
 MeshX Error Codes. More...

Detailed Description

MeshX Error Codes.

This file contains the MeshX Error Codes.

Author
Pranjal Chanda

Macro Definition Documentation

◆ MESHX_CALOC

#define MESHX_CALOC   calloc

◆ MESHX_DO_NOTHING

#define MESHX_DO_NOTHING   do {} while(0)

◆ MESHX_FREE

#define MESHX_FREE   free

◆ MESHX_MALLOC

#define MESHX_MALLOC   malloc

◆ MESHX_UNUSED

#define MESHX_UNUSED ( x)
Value:
((void)(x))

◆ MESHX_WEEK

#define MESHX_WEEK   __attribute__((weak))

Enumeration Type Documentation

◆ meshx_err_t

MeshX Error Codes.

Enumerator
MESHX_SUCCESS 

Success

MESHX_FAIL  

Failure

MESHX_INVALID_ARG  

Invalid Argument

MESHX_ERR_PLAT  

Platform Error

MESHX_NO_MEM  

No Memory

MESHX_INVALID_STATE  

Invalid State

MESHX_NOT_FOUND  

Not Found

MESHX_NOT_SUPPORTED  

Not Supported

MESHX_TIMEOUT  

Timeout

MESHX_ERR_NOT_INIT  

Not Initialized

MESHX_ERR_RO_CFG_BASE 0x4000 

RO Config error base

MESHX_ERR_RO_CFG_FORMAT  

Invalid Format

MESHX_ERR_RO_CFG_VERSION  

Invalid Version

MESHX_ERR_RO_CFG_CRC  

CRC Error

MESHX_ERR_GPIO_BASE 0x5000 

GPIO error base

MESHX_ERR_GPIO_INVALID_PIN  

Invalid GPIO pin number

MESHX_ERR_GPIO_INVALID_MODE  

Invalid GPIO mode for operation

MESHX_ERR_GPIO_INVALID_LEVEL  

Invalid GPIO level value

MESHX_ERR_GPIO_INTR_NOT_SUPPORTED  

Interrupt not supported on pin

MESHX_ERR_GPIO_INTR_ALREADY_REGISTERED  

Interrupt already registered

MESHX_ERR_GPIO_PWM_NOT_SUPPORTED  

PWM not supported on pin

MESHX_ERR_GPIO_PWM_INVALID_PARAM  

Invalid PWM parameter

MESHX_ERR_GPIO_NOT_INITIALIZED  

GPIO subsystem not initialized

MESHX_ERR_GPIO_CONFIG_INVALID  

Invalid GPIO configuration

MESHX_ERR_GPIO_HOSTED_MODE  

Operation not allowed in hosted mode

MESHX_ERR_GPIO_KV_STORAGE  

KV Engine storage error

MESHX_ERR_GPIO_SERIALIZATION  

Configuration serialization error

MESHX_ERR_MAX  

Maximum Error

43{
44 MESHX_SUCCESS = 0, /**< Success */
45 MESHX_FAIL, /**< Failure */
46 MESHX_INVALID_ARG, /**< Invalid Argument */
47 MESHX_ERR_PLAT, /**< Platform Error */
48 MESHX_NO_MEM, /**< No Memory */
49 MESHX_INVALID_STATE, /**< Invalid State */
50 MESHX_NOT_FOUND, /**< Not Found */
51 MESHX_NOT_SUPPORTED, /**< Not Supported */
52 MESHX_TIMEOUT, /**< Timeout */
53 MESHX_ERR_NOT_INIT, /**< Not Initialized */
54
55 /* RO Config Error Codes (Base: 0x4000) */
56 MESHX_ERR_RO_CFG_BASE = 0x4000, /**< RO Config error base */
57 MESHX_ERR_RO_CFG_FORMAT, /**< Invalid Format */
58 MESHX_ERR_RO_CFG_VERSION, /**< Invalid Version */
59 MESHX_ERR_RO_CFG_CRC, /**< CRC Error */
60
61 /* GPIO Error Codes (Base: 0x5000) */
62 MESHX_ERR_GPIO_BASE = 0x5000, /**< GPIO error base */
63 MESHX_ERR_GPIO_INVALID_PIN, /**< Invalid GPIO pin number */
64 MESHX_ERR_GPIO_INVALID_MODE, /**< Invalid GPIO mode for operation */
65 MESHX_ERR_GPIO_INVALID_LEVEL, /**< Invalid GPIO level value */
66 MESHX_ERR_GPIO_INTR_NOT_SUPPORTED, /**< Interrupt not supported on pin */
67 MESHX_ERR_GPIO_INTR_ALREADY_REGISTERED,/**< Interrupt already registered */
68 MESHX_ERR_GPIO_PWM_NOT_SUPPORTED, /**< PWM not supported on pin */
69 MESHX_ERR_GPIO_PWM_INVALID_PARAM, /**< Invalid PWM parameter */
70 MESHX_ERR_GPIO_NOT_INITIALIZED, /**< GPIO subsystem not initialized */
71 MESHX_ERR_GPIO_CONFIG_INVALID, /**< Invalid GPIO configuration */
72 MESHX_ERR_GPIO_HOSTED_MODE, /**< Operation not allowed in hosted mode */
73 MESHX_ERR_GPIO_KV_STORAGE, /**< KV Engine storage error */
74 MESHX_ERR_GPIO_SERIALIZATION, /**< Configuration serialization error */
75
76 MESHX_ERR_MAX /**< Maximum Error */
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
@ MESHX_ERR_RO_CFG_VERSION
Definition meshx_err.h:58
@ MESHX_INVALID_ARG
Definition meshx_err.h:46
@ MESHX_NOT_SUPPORTED
Definition meshx_err.h:51
@ MESHX_ERR_GPIO_BASE
Definition meshx_err.h:62
@ MESHX_ERR_RO_CFG_BASE
Definition meshx_err.h:56
@ MESHX_FAIL
Definition meshx_err.h:45
@ MESHX_ERR_GPIO_INVALID_PIN
Definition meshx_err.h:63
@ MESHX_ERR_GPIO_KV_STORAGE
Definition meshx_err.h:73
@ MESHX_ERR_GPIO_CONFIG_INVALID
Definition meshx_err.h:71
@ MESHX_ERR_PLAT
Definition meshx_err.h:47
@ MESHX_ERR_GPIO_INVALID_LEVEL
Definition meshx_err.h:65
@ MESHX_ERR_GPIO_PWM_NOT_SUPPORTED
Definition meshx_err.h:68
@ MESHX_ERR_MAX
Definition meshx_err.h:76
@ MESHX_ERR_GPIO_INTR_NOT_SUPPORTED
Definition meshx_err.h:66
@ MESHX_ERR_GPIO_INVALID_MODE
Definition meshx_err.h:64
@ MESHX_ERR_NOT_INIT
Definition meshx_err.h:53
@ MESHX_ERR_GPIO_NOT_INITIALIZED
Definition meshx_err.h:70
@ MESHX_INVALID_STATE
Definition meshx_err.h:49
@ MESHX_ERR_GPIO_HOSTED_MODE
Definition meshx_err.h:72
@ MESHX_ERR_GPIO_PWM_INVALID_PARAM
Definition meshx_err.h:69
@ MESHX_NOT_FOUND
Definition meshx_err.h:50
@ MESHX_NO_MEM
Definition meshx_err.h:48
@ MESHX_ERR_RO_CFG_FORMAT
Definition meshx_err.h:57
@ MESHX_TIMEOUT
Definition meshx_err.h:52
@ MESHX_ERR_GPIO_SERIALIZATION
Definition meshx_err.h:74
@ MESHX_ERR_RO_CFG_CRC
Definition meshx_err.h:59
@ MESHX_ERR_GPIO_INTR_ALREADY_REGISTERED
Definition meshx_err.h:67
**This function is called by the parent element when a state change request *is received It validates the request and returns a result to the element not the model layer **return * MESHX_SUCCESS
Definition meshx_model_level.cpp:385