LabVIEW-Open-Source / MQTT-Connection

Fundamental building blocks for building MQTT clients and servers
Other
1 stars 1 forks source link

Create Debugging Terminal for Session #7

Closed francois-normandin closed 4 months ago

francois-normandin commented 2 years ago

Debugging why a connection is refused is painful with the current library. Having access to a generic, low-level, debug terminal would allow inspection of reasons of failures more efficiently.

An example use case is when connecting to a new service or client library. I've been using the Paho MQTT client over Websockets with a local LabVIEW-based MQTT server and the browser's javascript code was not subscribing after a connection attempt.

Debugging at the byte stream layer gives a lot of insights. For example, this is a quick attempt at monitoring and highlighting streams at the session layer, for a client connected to the server.

image

francois-normandin commented 2 years ago

Ideally, the debugging panel would be configurable (max buffer size, input/output) and provide insight into packet-specific information to extract. For example, the CONNACK packet listed below represents a rejected connection. It would be useful to be able to select a packet from the stream, and list its properties in a human readable way.

image

francois-normandin commented 2 years ago
francois-normandin commented 5 months ago

package release 4.1.2 includes an Implementation of a Terminal Class distributed with this MQTT Connection package, which can be injected into the Connection of a MQTT server or a client class.

The process (and View) is not exhaustive and is meant to be overwritable as an injectable VI reference into the "Launch Terminal" method. If unwired, the default (simple) panel is used. This will allow extensions to be developed and distributed (or not) by developer based on the example process provided. The provided terminal process (example code) limits the incoming and outgoing buffers to 5000 packets. Developers can use it as an example and develop their own UX + configurability.

To be used as this example:

image

francois-normandin commented 4 months ago

I will be adding more flexibility to this feature in MQTT-Connection 4.2.0

image