Reference Design Content

cancel
Showing results for 
Search instead for 
Did you mean: 

Qbus Messaging Library

Qbus is a messaging library for sending and receiving messages or data between asynchronous processes.

 

Description

 

Qbus has two types of messages:

 

  • Broadcast messages - available to any process. The sender does not specify a recipient for a broadcast message. To receive a specific type of broadcast message, each process registers for the messages it desires by name.
  • Routed messages - sent to a specific, named process. You might send a routed message when multiple processes register for a particular message name, but in a specific situation, you only want one specific process to receive and handle the message.

 

Each Qbus message consists of two parts: its name/type and its value. The Qbus API stores message values as variant data. Because message values can be of many data types, such as strings, scalar numerics, and arrays of various data types, Qbus must handle data of many different types in a generic way. The variant data type, a generic container for all other types of data in LabVIEW, is one solution for these situations.

 

Examples

 

The palette for the Qbus Messaging Library can be found under Addons.

 

QbusPalette.PNG

 

The library will be used typically in a queued messaged handler (QMH) pattern.  Below is a simple example showing a common implementation of a QMH with the Qbus Messaging Library.

 

QbusBasicExample.PNG

Below is a snippet showing use of broadcast messages:

qbus_broadcast_register_v2-1.png

 

Requirements

 

Software

  • LabVIEW 2015

 

References

 

<links to related information or content>

 

Support

 

Please post comments, feedback and questions in the comments below.

 

History

 

Version Date Description/Changes
1.0.0.2 March 2016 Initial Release
     
     

 

Downloads

 

Use VI Package Manager (VIPM) to install this library.

 

Qbus Library on VIPM

Comments
PrimaryKey
NI Employee (retired)
on

Good idea! Did you think about using Extensible Session Framework as basis of this tool? Also there is a dictionary library you could use instead of directly using variant attributes.

 

https://forums.ni.com/t5/Reference-Design-Content/Dictionary-Library-Key-Value-Pairs/ta-p/3537786

https://forums.ni.com/t5/Reference-Design-Content/Extensible-Session-Framework-ESF-Library/ta-p/3522...

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect
smithd
Active Participant
Active Participant
on

I can't speak for Jack but I'm not a huge fan of the ESF for more general uses like this (or the dictionary) as it makes everything a global. As I understand it ESF was mostly targeted at teststand and it definitely can make sense in situations where you're crossing application boundaries (I'd feel the same way about using ESF to communicate with a web service), but turning everything into a global is a mistake in my opinion.

Contributors