Neural Autonomic Transport System (NATS) is a lightweight publish/subscribe messaging protocol built on top of TCP/IP that provides at-most-once QoS messaging.
The entire toolkit is written in native LabVIEW and requires no external dependencies to run the code (other than a freely available functioning NATS server).
For an in-depth look at the NATS client protocol, visit the official documentation.
To learn more about NATS and to download the free, open-source server application visit https://nats.io
You can install NATS Core with VI Package Manager.
- LabVIEW 2013 or later
-
Written entirely in LabVIEW with no additional package dependencies
-
Supports publishing client commands:
CONNECT
,PUB
,HPUB
,SUB
,UNSUB
,PING
,PONG
-
Supports reading server messages:
INFO
,MSG
,HMSG
,PING
,PONG
,+OK
,-ERR
-
Server
INFO
and clientCONNECT
commands kept in JSON format to aid in futureproofing -
Automatic
PONG
response to serverPING
requests for keep-alive functionality -
Server/client configuration checks to verify if
HPUB
can be used -
Supports usage of subscriber queue groups
-
TCP connection refnum exposed to allow use of LabVIEW 2020 native TLS
Running a NATS server is quick and easy because there is no software installation. You can simply download a precompiled binary from the official NATS site and run it from any location.
Note: The precompiled binary for linux-386 runs on a cRIO 904x without needing to download any other dependencies. Last tested with nats-server v2.8.4 (May 2022).
The NATS Core palette is added to the Functions >> Data Communication palette.
There are currently two examples included with the NATS Core package: a simple NATS writer and a simple NATS reader. These examples can be accessed through the NI Example Finder ( Help >> Find Examples... )
This is not a JetStream enabled client.
Contributions are what make the open source community such an amazing place to be, learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Keep in mind that LabVIEW VIs are binary files, which are difficult to merge.
- Only change a single VI or library.
- Avoid conflicts with other pull requests (don't work on the same libraries or VIs).
- Send VI Snippets (via issues) instead of pull requests when possible.
This section shamelessly stolen from the LabVIEW Composition project. I couldn't have said it better myself.
Unless otherwise noted, the NATS Core source files are distributed under the BSD 3-clause license found in the LICENSE file.
Thanks to everyone that publishes LabVIEW libraries for public use.