67 char str[LENGTH_AWS_SHADOW_BUFFER];
79 char keyStr[LENGTH_AWS_SHADOW_KEY];
96 char keyStr[LENGTH_AWS_SHADOW_KEY];
106 char hostNameStr[LENGTH_HTTP_URL];
void AWS_suspend()
Suspend AWS library.
bool AWS_subscribe(char *pTopicStr, uint8_t qos_e)
Subscribe to a given Topic on AWS IoT.
void AWS_printSubscribedTopics()
Print all of the subscribed topics.
uint16_t AWS_subMsgAvailable()
Check if messages received for subscribed topics are available in the subscription message buffer.
bool AWS_shadowDocumentUpdate(awsThingShadow_st as_thingShadow[], uint8_t maxKeys_u8, shadowUpdateType_et updateType_e)
Update device shadow.
awsIotStates_et AWS_getState()
Get the current state of AWS library.
uint16_t AWS_pubMsgAvailable()
Check if message is available to publish in the Publish queue.
shadowValueType_et
Definition: lib_aws.h:39
@ SHADOW_VALUE_TYPE_MAX
Definition: lib_aws.h:43
@ SHADOW_VALUE_TYPE_STRING
Definition: lib_aws.h:42
@ SHADOW_VALUE_TYPE_INT
Definition: lib_aws.h:40
@ SHADOW_VALUE_TYPE_UINT
Definition: lib_aws.h:41
bool AWS_isConnected()
Check if the device is connected state.
bool AWS_publishInProgress()
Check if library is still publishing messages.
void AWS_resume()
Resume AWS library from suspended state.
bool AWS_publish(mqttMsg_st *ps_msg)
Publish given message to AWS IoT. The message is queued in a Publish buffer, then gets published.
void(* awsShadowUpdateCallBack_t)(char *pKeyStr, void *pValue)
Shadow update callback function type. The application should define the callback function and intiali...
Definition: lib_aws.h:75
void AWS_printCertificates()
Print the configured certificates. Prints ROOT CA, Client Cert. & Private key.
const char * AWS_getStateString()
Get current state of AWS library as string.
bool AWS_shadowUpdate(char *pKeyStr, void *pValue, shadowUpdateType_et updateType_e)
Update the shadow element.
shadowUpdateType_et
Definition: lib_aws.h:51
@ SHADOW_UPDATE_TYPE_REPORTED
Definition: lib_aws.h:53
@ SHADOW_UPDATE_TYPE_MAX
Definition: lib_aws.h:56
@ SHADOW_UPDATE_TYPE_DESIRED
Definition: lib_aws.h:52
@ SHADOW_UPDATE_TYPE_ALL
Definition: lib_aws.h:54
void AWS_close()
Disconnect and close the AWS IoT connection.
void AWS_printStatus()
Print the status of AWS IoT.
void AWS_restart()
Disconnect from AWS IoT and Reconnect back.
awsIotStates_et
Definition: lib_aws.h:21
@ STATE_AWS_CONNECTED
Definition: lib_aws.h:26
@ STATE_AWS_PROVISION_FAILED
Definition: lib_aws.h:30
@ STATE_AWS_DISCONNECTED
Definition: lib_aws.h:27
@ STATE_AWS_SUSPENDED
Definition: lib_aws.h:28
@ STATE_AWS_START
Definition: lib_aws.h:24
@ STATE_AWS_PROVISIONING
Definition: lib_aws.h:25
@ STATE_AWS_MAX
Definition: lib_aws.h:31
@ STATE_AWS_IDLE
Definition: lib_aws.h:22
@ STATE_AWS_INIT
Definition: lib_aws.h:23
@ STATE_AWS_RESUME
Definition: lib_aws.h:29
bool AWS_shadowDeltaRegister(awsShadow_st *ps_shadow)
Register a shadow element to receive callbacks whenever the shadow element is updated with a new valu...
bool AWS_subMsgRead(mqttMsg_st *ps_msg)
Read the available message from the subscription message buffer.
const char * AWS_getThingName()
Get thing name.
Configuration header file.
MQTT message header file.
AWS configuration structure used by the library.
Definition: lib_aws.h:105
uint16_t port_u16
Definition: lib_aws.h:107
char * pRootCaStr
Definition: lib_aws.h:108
char * pClaimCertStr
Definition: lib_aws.h:111
char * pThingCertStr
Definition: lib_aws.h:109
const char * pThingNameStr
Definition: lib_aws.h:114
char * pThingPrivateKeyStr
Definition: lib_aws.h:110
char * pClaimPrivateKeyStr
Definition: lib_aws.h:112
char * pClaimTemplateStr
Definition: lib_aws.h:113
AWS Shadow structure used by the library to handle shadow updates. You should initialize the callback...
Definition: lib_aws.h:93
value_ut value_e
Definition: lib_aws.h:97
shadowValueType_et valType_e
Definition: lib_aws.h:94
awsShadowUpdateCallBack_t callBackHandler
Definition: lib_aws.h:95
uint8_t isUpdated_b8
Definition: lib_aws.h:98
Structure to represent MQTT message.
Definition: lib_msg.h:48
uint32_t val_u32
Definition: lib_aws.h:65
int32_t val_i32
Definition: lib_aws.h:66