RUI3 (RAK Unified Interface 3) - RAK4631
bg77::qmtpubex

Public Member Functions

String set (int, int, int, int, String, String)
 

Member Function Documentation

◆ set()

String set ( int  ,
int  ,
int  ,
int  ,
String  ,
String   
)
Description
This api is used to pulish messages by a client to a server for distribution to interested subscribers
Syntax
bg77.qmtpubex.set(tcpconnectID,msgID,qos,retain,topic,msg)
Parameters
tcpconnectIDint MQTT socket identifier. The range is 0-5.
msgIDint Message identifier of packet. The range is 0-65535. It will be 0 only when <qos>=0.
qosint The QoS level at which the client wants to publish the messages.
  • 0 At most once
  • 1 At least once
  • 2 Exactly once
retainint Whether or not the server will retain the message after it has been delivered to the current subscribers.
  • 0 The server will not retain the message after it has been delivered to the current subscribers
  • 1 The server will retain the message after it has been delivered to the current subscribers
topicString Topic that needs to be published.
msgString Message to be published.
Returns
String response