Google Cloud IoT device SDK for embedded C  1.0.2
iotc_error.h File Reference

Go to the source code of this file.

Enumerations

enum  iotc_state_t {
  IOTC_STATE_OK = 0, IOTC_STATE_TIMEOUT, IOTC_BACKOFF_TERMINAL, IOTC_OUT_OF_MEMORY,
  IOTC_SOCKET_NO_ACTIVE_CONNECTION_ERROR, IOTC_MQTT_SERVER_UNAVAILIBLE, IOTC_MQTT_BAD_USERNAME_OR_PASSWORD, IOTC_MQTT_SUBSCRIPTION_FAILED,
  IOTC_INTERNAL_ERROR, IOTC_NOT_INITIALIZED, IOTC_INVALID_PARAMETER, IOTC_NOT_IMPLEMENTED,
  IOTC_NOT_SUPPORTED, IOTC_EVENT_PROCESS_STOPPED, IOTC_ALG_NOT_SUPPORTED_ERROR, IOTC_BUFFER_TOO_SMALL_ERROR,
  IOTC_NULL_KEY_DATA_ERROR
}
 

Functions

const char * iotc_get_state_string (iotc_state_t e)
 

Detailed Description

Defines state messages and their numeric codes.

Definition in file iotc_error.h.

Enumeration Type Documentation

◆ iotc_state_t

The state of the client application.

Enumerator
IOTC_STATE_OK 

The SDK function succeeded.

IOTC_STATE_TIMEOUT 

A timeout occurred.

IOTC_BACKOFF_TERMINAL 

The backoff was applied.

IOTC_OUT_OF_MEMORY 

The device doesn't have enough memory to fulfull the request.

IOTC_SOCKET_NO_ACTIVE_CONNECTION_ERROR 

The device isn't connected to an MQTT broker.

IOTC_MQTT_SERVER_UNAVAILIBLE 

The MQTT server is not available.

IOTC_MQTT_BAD_USERNAME_OR_PASSWORD 

The MQTT username or password is not correct.

IOTC_MQTT_SUBSCRIPTION_FAILED 

Can't subscribe to the MQTT topic.

IOTC_INTERNAL_ERROR 

Something went wrong.

IOTC_NOT_INITIALIZED 

The SDK is not initialized.

Run iotc_initialize() and try again.

IOTC_INVALID_PARAMETER 

A parameter is missing or invalid.

IOTC_NOT_IMPLEMENTED 

Can't create a JWT because the cryptography library in the Board Support Package isn't ported to your platform.

To port the cryptography library, customize the hardware-specific drivers and routines for your device and then link the library to the client application.

IOTC_NOT_SUPPORTED 

The memory limiter module isn't installed.

To enable the memory limiter, set the memory_limiter flag in a CONFIG argument.

IOTC_EVENT_PROCESS_STOPPED 

The event processor stopped because the client application shut down the event engine.

IOTC_ALG_NOT_SUPPORTED_ERROR 

The algorithm of the private key for the JWT signature is not supported.

IOTC_BUFFER_TOO_SMALL_ERROR 

The buffer is too small for the data.

IOTC_NULL_KEY_DATA_ERROR 

The buffer for storing formatted and signed JWTs is null.

Definition at line 32 of file iotc_error.h.

Function Documentation

◆ iotc_get_state_string()

const char* iotc_get_state_string ( iotc_state_t  e)

Gets the state message associated with a numeric code.

Parameters
[in]eThe numeric code of the state message.