‘’‘
buildroot-2017.02.8/output/build/python-paho-mqtt-1.2/src/paho/mqtt
‘’‘python
‘’‘
self.__mqtt_id = str(math.floor(time.time()))
self.mqtt = mqtt.Client(self.__mqtt_id)
self.__mqtt__.username_pw_set(self.config["mqtt"]["username"])
self.__mqtt__.on_connect = self.on_connect
self.__mqtt__.on_disconnect = self.on_disconnect
self.__mqtt__.on_message = self.on_message函數
self.__mqtt__.connect(self.config["mqtt"]["wss_addr"], \ self.config["mqtt"]["wss_port"], keepalive=10)
‘’’ui