Coder Social home page Coder Social logo

mqtt-labview's Introduction

mqtt-LabVIEW

AN MQTT Driver implementation for LabVIEW

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software including without limitation the rights to use, copy, modify, merge, publish, distribute, copies of the Software "free of charge".

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software including a reference link to the associated GutHub repository.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mqtt-labview's People

Contributors

cowen71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mqtt-labview's Issues

PR or Fork?

I stumbled upon this project after having some headaches connecting C implementations of the MQTT client with LabVIEW Realtime. I forked it intending to PR my changes, but honestly I've refactored a lot of the code and I'm not sure if you'll want it or not. It would definitely be a breaking change to any existing installs you have.

Highlights:

  • All messages (datagrams) inherit from a base message class
  • A lot of reorganization in terms of when the datagram is actually turned into a binary packet
  • Mostly removed the notifier - most user functions are now async (may add synchronous calls back in)
  • Removed the LV2 globals that were being used for configuration - now holding config in the private data for the MQTT class (necessary for multiple instances)
  • Made most class VIs private instead of public
  • Message ID moved to non-user code
  • All user functions (Send/Subscribe) now require a class instance
  • The connection is auto-reconnected if it's broken

A lot of this was to make MQTT suitable to match up with some other internal communications libraries (TCP/UDP/UDP Multicast). There's actually some other wrappers I've built above this library that I'm not sure if I should include or not around JSON formatted messages and multiple queues receiving a copy of a message.

Let me know if you want me to PR all this back to you or if it would be better to rename my fork and carry it forward as it's own implementation.

MQTT vs HTTP ?

Hi, is there a performance test between MQTT vs HTTP ?

overflow problem

Hello,
First of all i want to thank for the mqtt library. I have run into overflow problem when i want to send data that is bigger than 128. Normally, the payload must be 8-byte. On the other hand, payload counts 9 byte or 10 byte during the data between 128 and 256.
I made same change in the sub-vi (mqttCmdCalculateByteArrayLength.vi ) to solve this problembut it doesnt work.
I have added my changes to the attachment.
before
before
after
after

Does not work with mosquitto 1.6.x broker

When we use this library to connect to mosquitto v 1.4.x and 1.5.x it works fine. When we try to connect to mosquitto 1.6.x broker, the connection can not be established. Is this problem known? Does https://github.com/victorclaessen/mqtt-LabVIEW solve this problem? Thank you

Error message in mosquitto broker:

Socket error on client <unknown>, disconnecting.

mosquitto.conf:

log_dest stdout
log_type error
log_type warning
log_type notice
log_type information
log_type debug

allow_anonymous true

user root
port 1883
protocol mqtt
listener 9001
protocol websockets
persistence true
persistence_file infrastructure_messaging_mosquitto.db
persistence_location /mosquitto/data/
autosave_on_changes false
autosave_interval 60

Keep Alive bytes swapped

Hi, thanks for making this library. It's really nice!

However, I think I found a bug:

The MQTT spec (3.1.2.10) specifies that the Keep Alive bytes are in order MSB, LSB. But in mqttCmdConnect\mqttCmdBuildVarHdr.vi the high and low bytes of the keepalive value are swapped before building the CONNECT header. I suspect that that swap is unnecessary, and results in the wrong value being used by the broker for the keep alive time. I verified that with Wireshark by checking the transmitted TCP packet of the CONNECT command.

Best regards,

Victor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.