MQTTSNClient Struct ReferenceMQTT-SN Client

Table of contents Table of contents

Detailed Description

Structure describing the MQTT-SN Client.

Data Fields

char clientId [MQTTSN_MAX_CLIENT_ID_LENGTH+1]
 Variable length string that contains a 1-23 character long string that uniquely identifies the client to the server. Must be unique!
 
MQTTSNClientState state
 State of the MQTT-SN client.
 
EMBENET_IPV6 gatewayAddress
 IPv6 address of the MQTT-SN gateway.
 
uint16_t gatewayPort
 Port number at the MQTT-SN gateway.
 
char willTopicName [MQTTSN_MAX_TOPIC_NAME_LENGTH]
 Will topic name.
 
char willMsg [MQTTSN_MAX_MESSAGE_DATA]
 Will message data.
 
EMBENET_TaskId pingTaskId
 Id of the keep alive task, by which the task is referecned.
 
EMBENET_TaskId timeoutTaskId
 Id of the timeout task, by which the task is referenced.
 
EMBENET_TaskId timeoutPingTaskId
 Id of the timeout task, by which the task is referenced.
 
uint8_t expectedMessageType
 Message type that is currently expected to be received from the gateway.
 
uint16_t keepAliveTime
 Time (in seconds) after which the gateway assumes the client is disconnected, if no message from client in that time is received.
 
uint16_t pingPeriod
 
uint8_t pingRespLost
 Number of consecutive PINGRESP messages that were lost.
 
uint64_t lastPacketReceptionTime
 Last time the client received packet from server.
 
uint64_t lastPacketSendTime
 Last time at which the client sent packet to server.
 
uint16_t packetId
 Sequential packet counter (note that 0 is forbidden)
 
uint8_t maxQosRetransmissions
 Max number of Qos retransmissions.
 
MQTTSNQosMsg publishQosMsg
 QoS(1-2) published message context for PUBLISH messages.
 
MQTTSNQosMsg subscribeQosMsg
 QoS(1-2) context for SUBSCRIBE messages.
 
MQTTSNTopicDescriptor subscribeTopics [MQTTSN_CLIENT_MAX_TOPICS_TO_SUBSCRIBE]
 Array of topics that the client subscribed to.
 
MQTTSNTopicDescriptor publishTopics [MQTTSN_CLIENT_MAX_TOPICS_TO_PUBLISH]
 Array of topics that the client registered to publish to.
 
MQTTSNSessionFlags flags
 MQTT-SN client session flags (options)
 
EMBENET_UDP_SocketDescriptor udpSocket
 UDP socket descriptor.
 
MQTTSNClientEventHandlers eventHandlers
 Definition of callback handlers on client events.
 

Field Documentation

◆ clientId

char MQTTSNClient::clientId[MQTTSN_MAX_CLIENT_ID_LENGTH+1]

Variable length string that contains a 1-23 character long string that uniquely identifies the client to the server. Must be unique!

◆ state

MQTTSNClientState MQTTSNClient::state

State of the MQTT-SN client.

◆ gatewayAddress

EMBENET_IPV6 MQTTSNClient::gatewayAddress

IPv6 address of the MQTT-SN gateway.

◆ gatewayPort

uint16_t MQTTSNClient::gatewayPort

Port number at the MQTT-SN gateway.

◆ willTopicName

char MQTTSNClient::willTopicName[MQTTSN_MAX_TOPIC_NAME_LENGTH]

Will topic name.

◆ willMsg

char MQTTSNClient::willMsg[MQTTSN_MAX_MESSAGE_DATA]

Will message data.

◆ pingTaskId

EMBENET_TaskId MQTTSNClient::pingTaskId

Id of the keep alive task, by which the task is referecned.

◆ timeoutTaskId

EMBENET_TaskId MQTTSNClient::timeoutTaskId

Id of the timeout task, by which the task is referenced.

◆ timeoutPingTaskId

EMBENET_TaskId MQTTSNClient::timeoutPingTaskId

Id of the timeout task, by which the task is referenced.

◆ expectedMessageType

uint8_t MQTTSNClient::expectedMessageType

Message type that is currently expected to be received from the gateway.

◆ keepAliveTime

uint16_t MQTTSNClient::keepAliveTime

Time (in seconds) after which the gateway assumes the client is disconnected, if no message from client in that time is received.

◆ pingPeriod

uint16_t MQTTSNClient::pingPeriod

Minimum time between messages sent from the client. When no user messages are sent, PING should be sent instead. This value should be less than keepAliveTime

◆ pingRespLost

uint8_t MQTTSNClient::pingRespLost

Number of consecutive PINGRESP messages that were lost.

◆ lastPacketReceptionTime

uint64_t MQTTSNClient::lastPacketReceptionTime

Last time the client received packet from server.

◆ lastPacketSendTime

uint64_t MQTTSNClient::lastPacketSendTime

Last time at which the client sent packet to server.

◆ packetId

uint16_t MQTTSNClient::packetId

Sequential packet counter (note that 0 is forbidden)

◆ maxQosRetransmissions

uint8_t MQTTSNClient::maxQosRetransmissions

Max number of Qos retransmissions.

◆ publishQosMsg

MQTTSNQosMsg MQTTSNClient::publishQosMsg

QoS(1-2) published message context for PUBLISH messages.

◆ subscribeQosMsg

MQTTSNQosMsg MQTTSNClient::subscribeQosMsg

QoS(1-2) context for SUBSCRIBE messages.

◆ subscribeTopics

Array of topics that the client subscribed to.

◆ publishTopics

Array of topics that the client registered to publish to.

◆ flags

MQTTSNSessionFlags MQTTSNClient::flags

MQTT-SN client session flags (options)

◆ udpSocket

EMBENET_UDP_SocketDescriptor MQTTSNClient::udpSocket

UDP socket descriptor.

◆ eventHandlers

MQTTSNClientEventHandlers MQTTSNClient::eventHandlers

Definition of callback handlers on client events.


The documentation for this struct was generated from the following file:

Contact us

Any question or remarks? Just write us a message!

Contact Information

Feel free to get in touch