CommsChampion Ecosystem MQTT-SN Client
MQTT-SN client library.
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations
"Global Data Types and Functions"

Classes

struct  CC_MqttsnMessageInfo
 Incoming message information. More...
 

Macros

#define CC_MQTTSN_CLIENT_MAJOR_VERSION   2U
 Major verion of the library.
 
#define CC_MQTTSN_CLIENT_MINOR_VERSION   0U
 Minor verion of the library.
 
#define CC_MQTTSN_CLIENT_PATCH_VERSION   5U
 Patch level of the library.
 

Typedefs

typedef unsigned short CC_MqttsnTopicId
 Type used to hold Topic ID value.
 

Enumerations

enum  CC_MqttsnAsyncOpStatus {
  CC_MqttsnAsyncOpStatus_Complete = 0 , CC_MqttsnAsyncOpStatus_InternalError = 1 , CC_MqttsnAsyncOpStatus_Timeout = 2 , CC_MqttsnAsyncOpStatus_Aborted = 3 ,
  CC_MqttsnAsyncOpStatus_OutOfMemory = 4 , CC_MqttsnAsyncOpStatus_BadParam = 5 , CC_MqttsnAsyncOpStatus_GatewayDisconnected = 6 , CC_MqttsnAsyncOpStatus_ValuesLimit
}
 Status of the asynchronous operation. More...
 
enum  CC_MqttsnConnectionStatus { CC_MqttsnConnectionStatus_Disconnected = 0 , CC_MqttsnConnectionStatus_Connected = 1 , CC_MqttsnConnectionStatus_Asleep = 2 , CC_MqttsnConnectionStatus_ValuesLimit }
 Connection state. More...
 
enum  CC_MqttsnDataOrigin { CC_MqttsnDataOrigin_Any = 0 , CC_MqttsnDataOrigin_ConnectedGw = 1 , CC_MqttsnDataOrigin_ValuesLimit }
 Data origin. More...
 
enum  CC_MqttsnErrorCode {
  CC_MqttsnErrorCode_Success = 0 , CC_MqttsnErrorCode_InternalError = 1 , CC_MqttsnErrorCode_NotIntitialized = 2 , CC_MqttsnErrorCode_Busy = 3 ,
  CC_MqttsnErrorCode_NotConnected = 4 , CC_MqttsnErrorCode_BadParam = 5 , CC_MqttsnErrorCode_InsufficientConfig = 6 , CC_MqttsnErrorCode_OutOfMemory = 7 ,
  CC_MqttsnErrorCode_BufferOverflow = 8 , CC_MqttsnErrorCode_NotSupported = 9 , CC_MqttsnErrorCode_RetryLater = 10 , CC_MqttsnErrorCode_Disconnecting = 11 ,
  CC_MqttsnErrorCode_NotSleeping = 12 , CC_MqttsnErrorCode_PreparationLocked = 13 , CC_MqttsnErrorCode_ValuesLimit
}
 Error code returned by various API functions. More...
 
enum  CC_MqttsnGatewayDisconnectReason { CC_MqttsnGatewayDisconnectReason_DisconnectMsg = 0 , CC_MqttsnGatewayDisconnectReason_NoGatewayResponse = 1 , CC_MqttsnGatewayDisconnectReason_ValuesLimit }
 Reason for reporting unsolicited gateway disconnection. More...
 
enum  CC_MqttsnGwStatus {
  CC_MqttsnGwStatus_AddedByGateway = 0 , CC_MqttsnGwStatus_AddedByClient = 1 , CC_MqttsnGwStatus_UpdatedByClient = 2 , CC_MqttsnGwStatus_Alive = 3 ,
  CC_MqttsnGwStatus_Tentative = 4 , CC_MqttsnGwStatus_Removed = 5 , CC_MqttsnGwStatus_ValuesLimit
}
 Status of the gateway. More...
 
enum  CC_MqttsnQoS { CC_MqttsnQoS_AtMostOnceDelivery = 0 , CC_MqttsnQoS_AtLeastOnceDelivery = 1 , CC_MqttsnQoS_ExactlyOnceDelivery = 2 , CC_MqttsnQoS_ValuesLimit }
 Quality of Service. More...
 
enum  CC_MqttsnReturnCode {
  CC_MqttsnReturnCode_Accepted = 0 , CC_MqttsnReturnCode_Conjestion = 1 , CC_MqttsnReturnCode_InvalidTopicId = 2 , CC_MqttsnReturnCode_NotSupported = 3 ,
  CC_MqttsnReturnCode_ValuesLimit
}
 Return code as per MQTT-SN specification. More...
 

Detailed Description

Enumeration Type Documentation

◆ CC_MqttsnAsyncOpStatus

Status of the asynchronous operation.

Enumerator
CC_MqttsnAsyncOpStatus_Complete 

The requested operation has been completed, refer to reported extra details for information.

CC_MqttsnAsyncOpStatus_InternalError 

Internal library error, please submit bug report

CC_MqttsnAsyncOpStatus_Timeout 

The required response from broker hasn't been received in time.

CC_MqttsnAsyncOpStatus_Aborted 

The operation has been aborted before completion due to client's side operation.

CC_MqttsnAsyncOpStatus_OutOfMemory 

The client library wasn't able to allocate necessary memory.

CC_MqttsnAsyncOpStatus_BadParam 

Bad value has been returned from the relevant callback.

CC_MqttsnAsyncOpStatus_GatewayDisconnected 

Gateway disconnection detected during the operation execution.

CC_MqttsnAsyncOpStatus_ValuesLimit 

Limit for the values.

◆ CC_MqttsnConnectionStatus

Connection state.

Enumerator
CC_MqttsnConnectionStatus_Disconnected 

Client disconnection from the gateway.

CC_MqttsnConnectionStatus_Connected 

Client connected to the gateway.

CC_MqttsnConnectionStatus_Asleep 

Client in the sleep mode.

CC_MqttsnConnectionStatus_ValuesLimit 

Limit for the values.

◆ CC_MqttsnDataOrigin

Data origin.

Enumerator
CC_MqttsnDataOrigin_Any 

Data comes from any node on the network.

CC_MqttsnDataOrigin_ConnectedGw 

Data comes from the connected gateway.

CC_MqttsnDataOrigin_ValuesLimit 

Limit for the values.

◆ CC_MqttsnErrorCode

Error code returned by various API functions.

Enumerator
CC_MqttsnErrorCode_Success 

The requested operation was successfully started.

CC_MqttsnErrorCode_InternalError 

Internal library error, please submit bug report

CC_MqttsnErrorCode_NotIntitialized 

The allocated client hasn't been initialized.

CC_MqttsnErrorCode_Busy 

The client library is in the middle of previous operation(s), cannot start a new one.

CC_MqttsnErrorCode_NotConnected 

The client library is not connected to the gateway. Returned by operations that require connection to the gateway.

CC_MqttsnErrorCode_BadParam 

Bad parameter is passed to the function.

CC_MqttsnErrorCode_InsufficientConfig 

The required configuration hasn't been performed.

CC_MqttsnErrorCode_OutOfMemory 

Memory allocation failed.

CC_MqttsnErrorCode_BufferOverflow 

Output buffer is too short.

CC_MqttsnErrorCode_NotSupported 

Feature is not supported.

CC_MqttsnErrorCode_RetryLater 

Retry in next event loop iteration.

CC_MqttsnErrorCode_Disconnecting 

The client is in "disconnecting" state, (re)connect is required in the next iteration loop.

CC_MqttsnErrorCode_NotSleeping 

The client is not in ASLEEP mode.

CC_MqttsnErrorCode_PreparationLocked 

Another operation is being prepared, cannot create a new one without performing "send" or "cancel".

CC_MqttsnErrorCode_ValuesLimit 

Upper limit of the values.

◆ CC_MqttsnGatewayDisconnectReason

Reason for reporting unsolicited gateway disconnection.

Enumerator
CC_MqttsnGatewayDisconnectReason_DisconnectMsg 

Gateway sent DISCONNECT message.

CC_MqttsnGatewayDisconnectReason_NoGatewayResponse 

No messages from the gateway and no response to PINGREQ.

CC_MqttsnGatewayDisconnectReason_ValuesLimit 

Limit for the values.

◆ CC_MqttsnGwStatus

Status of the gateway.

Enumerator
CC_MqttsnGwStatus_AddedByGateway 

Added by the ADVERTISE or GWINFO sent by the gateway messages.

CC_MqttsnGwStatus_AddedByClient 

Added by the GWINFO message sent by another client.

CC_MqttsnGwStatus_UpdatedByClient 

The gateway's address was updated by another client.

CC_MqttsnGwStatus_Alive 

The ADVERTISE or GWINFO message have been received from the gateway indicating it's alive.

CC_MqttsnGwStatus_Tentative 

The gateway hasn't advertised its presence in time, assumed packet loss.

CC_MqttsnGwStatus_Removed 

The gateway hasn't advertised its presence in time, assumed no longer available.

CC_MqttsnGwStatus_ValuesLimit 

Limit for the values.

◆ CC_MqttsnQoS

Quality of Service.

Enumerator
CC_MqttsnQoS_AtMostOnceDelivery 

QoS=0. At most once delivery.

CC_MqttsnQoS_AtLeastOnceDelivery 

QoS=1. At least once delivery.

CC_MqttsnQoS_ExactlyOnceDelivery 

QoS=2. Exactly once delivery.

CC_MqttsnQoS_ValuesLimit 

Limit for the values.

◆ CC_MqttsnReturnCode

Return code as per MQTT-SN specification.

Enumerator
CC_MqttsnReturnCode_Accepted 

Accepted.

CC_MqttsnReturnCode_Conjestion 

Rejected due to conjesion.

CC_MqttsnReturnCode_InvalidTopicId 

Rejected due to invalid topic ID.

CC_MqttsnReturnCode_NotSupported 

Rejected as not supported.

CC_MqttsnReturnCode_ValuesLimit 

Limit for the values.