Put/get units for channels

Many would like to annotate data channels with units metadata. Physical units are an example of DataTurbine’s facility to associate any string with data channels.

This is accomplished by using the function PutUserInfo() of the ChannelMap class in com.rbnb.sapi, the DataTurbine Simple API. The convention that is used is to prefix the unit label with “units=”

For some channel ‘foo’, whose data has units ‘bar’ for which a DataTurbine Channel Map exists, do:
PutUserInfo(GetIndex(“foo”), “units=bar”);
in the Source program. This metadata can then be retrieved by Sink clients by:
after a ChannelMap has been populated with channel ‘foo’.
An example of a Source program that insrts unit metadata in this way is edu.sdsc.cleos.DaqToRbnb, which can be viewed here:
Examples of Sink clients that use this unit metadata have complied to the protocol that prefixes unit metadata with ‘units=’ are plot.jar, which ships with DataTurbine and the Real-time Data Viewer from SUNY at Buffalo, which can be found here:

Open Source DataTurbine Initiative © 2016 Frontier Theme