-
public class MqttControlBuilder
-
-
Method Summary
Modifier and Type Method Description ObjectgetData()Get the data to publish to device. MqttControlBuildersetData(Object data)Set the data to publish to device. StringgetPv()Set mqtt protocol version. MqttControlBuildersetPv(String pv)Set mqtt protocol version. StringgetLocalKey()Get device local secret key, device use it to encrypt message. MqttControlBuildersetLocalKey(String localKey)Set device local secret key, device use it to encrypt message. intgetProtocol()Get Thing defined MQTT communication protocol number. MqttControlBuildersetProtocol(int protocol)Set Thing defined MQTT communication protocol number. intgetT()Get timestamp. MqttControlBuildersetT(int t)Set timestamp. StringgetTopicId()Get the topic to publish to. MqttControlBuildersetTopicId(String topicId)Set the topic to publish to. intgetS()Same as getSn MqttControlBuildersetS(int s)Same as setSn intgetO()Get the serial number of communication with the device. MqttControlBuildersetO(int o)Set the serial number of communication with the device, it's a big random number. intgetSn()Get message sequence number, each time you send will increment by 1. MqttControlBuildersetSn(int sn)Set message sequence number, each time you send will increment by 1. -
-
Method Detail
-
getData
Object getData()
Get the data to publish to device.
-
setData
MqttControlBuilder setData(Object data)
Set the data to publish to device.
- Parameters:
data- the data to publish to device.
-
getPv
String getPv()
Set mqtt protocol version.
-
setPv
MqttControlBuilder setPv(String pv)
Set mqtt protocol version.
- Parameters:
pv- mqtt protocol version.
-
getLocalKey
String getLocalKey()
Get device local secret key, device use it to encrypt message.
-
setLocalKey
MqttControlBuilder setLocalKey(String localKey)
Set device local secret key, device use it to encrypt message.
- Parameters:
localKey- device local secret key.
-
getProtocol
int getProtocol()
Get Thing defined MQTT communication protocol number.
-
setProtocol
MqttControlBuilder setProtocol(int protocol)
Set Thing defined MQTT communication protocol number.
-
getT
int getT()
Get timestamp.
-
setT
MqttControlBuilder setT(int t)
Set timestamp.
-
getTopicId
String getTopicId()
Get the topic to publish to.
-
setTopicId
MqttControlBuilder setTopicId(String topicId)
Set the topic to publish to.
- Parameters:
topicId- topic
-
setS
MqttControlBuilder setS(int s)
Same as setSn
-
getO
int getO()
Get the serial number of communication with the device.
-
setO
MqttControlBuilder setO(int o)
Set the serial number of communication with the device, it's a big random number.
-
getSn
int getSn()
Get message sequence number, each time you send will increment by 1.
-
setSn
MqttControlBuilder setSn(int sn)
Set message sequence number, each time you send will increment by 1.
- Parameters:
sn- message sequence number.
-
-
-
-