Channel units in the Data Turbine
Paul Hubbard
Terry Weymouth
Jason Hanley
V1.0: Feb 11, 2005
V1.1: Apr 18, 2005 Added image and URL to doc head
Background
As shipped, the Creare Data Turbine does not understand units. (I.e.,
'channel C0 measurements are in meters') We needed a way to add unit
support for plots, as a requirement of our user community. The turbine
has support for user metadata, but bugs in the
implementation blocked our use of that method. This page explains how
we solved the problem, and how you can write code to interoperate.
The initial use of units is limited to sources from data acquisition
(DAQ). Other channels, such as audio and video, do not have the same
requirements.
Goals
- Simple to implement, in both source and sink
- ASCII format, human-readable, easily parsed
- Dynamic - units may change on the fly if necessary
- Does not break existing code!
The Solution
A channel called _Units containing an entry for each source. The format
is a string with name=value pairs. Delimter is tab or comma, as spaces
are valid in some units. If the units change, re-create and send the
entire string, not just the new value.
Example:
c0=mm, c1=kips, c2=G
Or
Channel 1=mm Hg [tab]Channel 2=megaparsecs per fortnight
The mime type for the source must be set to
text/plain
So the _Units source has multiple sources within it. This screenshot
shows that (lower left) as well as graphs with units (See the legend,
bottom center of the plot):

Notes
- Example code can be found in the RBNBDataViewer (pictured) for
parsing the units
- Exampe code for creating units can be found in fake_daq (C
source), and DaqToRbnb.
- Please email the NEES DV
list if you have questions.
- We maintain a test data turbine at neestpm.sdsc.edu:3333 with DAQ
and fake_daq channels if you need a testing platform.
All this code can be found in the NEES CVS
archive (instructions and info page).
Navigation