Structures and Enumerations¶
-
group
mqtt_struct
mqtt library data structures and type definitions
Typedefs
-
typedef cy_mqtt_publish_info_t
cy_mqtt_received_msg_info_t
¶ MQTT received message information structure.
note
This type is defined for improving readability and for library backward compatibility.
-
typedef cy_mqtt_subscribe_info_t
cy_mqtt_unsubscribe_info_t
¶ MQTT unsubscribe information structure.
Enums
-
enum
cy_mqtt_qos_t
¶ cy_mqtt_qos_t: MQTT QoS levels.
Values:
-
enumerator
CY_MQTT_QOS0
¶ Delivery at most once.
-
enumerator
CY_MQTT_QOS1
¶ Delivery at least once.
-
enumerator
CY_MQTT_QOS2
¶ Delivery exactly once.
-
enumerator
CY_MQTT_QOS_INVALID
¶ Invalid QoS.
-
enumerator
-
struct
cy_mqtt_subscribe_info_t
¶ - #include <>
MQTT subscribe information structure.
Public Members
-
cy_mqtt_qos_t
qos
¶ Requested quality of Service for the subscription.
-
const char *
topic
¶ Topic filter to subscribe to.
-
uint16_t
topic_len
¶ Length of subscription topic filter.
-
cy_mqtt_qos_t
allocated_qos
¶ QoS allocated by the broker for the subscription.
CY_MQTT_QOS_INVALID indicates subscription failure.
-
cy_mqtt_qos_t
-
struct
cy_mqtt_publish_info_t
¶ - #include <>
MQTT publish information structure.
MQTT messages received on the subscribed topic is also represented using this structure.
Public Members
-
cy_mqtt_qos_t
qos
¶ Quality of Service for message.
-
bool
retain
¶ Whether this is a retained message.
-
bool
dup
¶ Whether this is a duplicate publish message.
-
const char *
topic
¶ Topic name on which the message is published.
-
uint16_t
topic_len
¶ Length of topic name.
-
const char *
payload
¶ Message payload.
-
size_t
payload_len
¶ Message payload length.
-
cy_mqtt_qos_t
-
struct
cy_mqtt_broker_info_t
¶ - #include <>
MQTT broker information structure.
-
struct
cy_mqtt_connect_info_t
¶ - #include <>
MQTT connect information structure.
Public Members
-
const char *
client_id
¶ MQTT client identifier.
Must be unique per client. This memory needs to be maintained until MQTT object is deleted.
-
uint16_t
client_id_len
¶ Length of the client identifier.
-
const char *
username
¶ MQTT user name.
Set to NULL if not used. This memory needs to be maintained until MQTT object is deleted.
-
uint16_t
username_len
¶ Length of MQTT user name.
Set to 0 if not used.
-
const char *
password
¶ MQTT password.
Set to NULL if not used. This memory needs to be maintained until MQTT object is deleted.
-
uint16_t
password_len
¶ Length of MQTT password.
Set to 0 if not used.
-
bool
clean_session
¶ Whether to establish a new, clean session or resume a previous session.
-
uint16_t
keep_alive_sec
¶ MQTT keep alive period.
-
cy_mqtt_publish_info_t *
will_info
¶ MQTT will message.
This will info can be NULL.
-
const char *
-
struct
cy_mqtt_message_t
¶ - #include <>
Received MQTT publish message information structure.
Public Members
-
uint16_t
packet_id
¶ Packet ID of the MQTT message.
-
cy_mqtt_received_msg_info_t
received_message
¶ Received MQTT message from the subscribed topic.
-
uint16_t
-
struct
cy_mqtt_event_t
¶ - #include <>
MQTT event information structure.
Public Members
-
cy_mqtt_event_type_t
type
¶ Event type.
-
cy_mqtt_disconn_type_t
reason
¶ Disconnection reason for event type CY_MQTT_EVENT_TYPE_DISCONNECT.
-
cy_mqtt_message_t
pub_msg
¶ Received MQTT message for event type CY_MQTT_EVENT_TYPE_SUBSCRIPTION_MESSAGE_RECEIVE.
-
union cy_mqtt_event_t::[anonymous]
data
¶ Event data.
-
cy_mqtt_event_type_t
-
typedef cy_mqtt_publish_info_t