private void connect() { client.Connect("Fire_sensor_board", null, null, true, 1); this.Subscribe("incendio"); StatusLed.led.SetLed(3, true); DisplayLCD.addMqttInfo(true); }
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); }
void client_ConnectionClosed(object sender, EventArgs e) { DisplayLCD.addMqttInfo(false); StatusLed.led.SetLed(3, false); connectInfinite(); }