Sub Class_Globals
Private fx As JFX
Private mqtt_test As MqttClient
End Sub
Public Sub Initialize(uri As String, id As String)
mqtt_test.Initialize("mqtt", uri, id)
End Sub
public Sub connect
mqtt_test.Connect
EndSub
Sub mqtt_Connected (Success As Boolean)
'Dim client AsMqttClient = Sender
'Log(client.clientId)
If Success = False Then
Log(LastException)
Else
LogError("Connected")
End If
End Sub
Private Sub mqtt_MessageArrived (Topic As String, Payload() As Byte)
Log(BytesToString(Payload, 0, Payload.Length, "utf8"))
End Sub