示例#1
0
 private void connect()
 {
     client.Connect("Fire_sensor_board", null, null, true, 1);
     this.Subscribe("incendio");
     StatusLed.led.SetLed(3, true);
     DisplayLCD.addMqttInfo(true);
 }
示例#2
0
        private MqttClient newMqttClient()
        {
            MqttClient client = new MqttClient(EndPoint);

            //client.Settings.InflightQueueSize = 5;
            client.ConnectionClosed       += client_ConnectionClosed;
            client.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
            client.MqttMsgPublished       += client_MqttMsgPublished;
            DisplayLCD.addMqttInfo(false);
            return(client);
        }
示例#3
0
 void client_ConnectionClosed(object sender, EventArgs e)
 {
     DisplayLCD.addMqttInfo(false);
     StatusLed.led.SetLed(3, false);
     connectInfinite();
 }