DataTurbine Proxy PlugIn

rbnbProxy

User Manual

V2.4

January, 2004

Copyright 2003, 2004 Creare Inc.



Table of Contents

Introduction

Overview
Setup and Startup

Examples

Mutiplexed by One Data

Multiplexed by Five Data


Introduction

Overview

The rbnbProxy utility provides a way to send numerical data to the DataTurbine without the use of the Java or HTTP interfaces.  Once configured, an application simply writes data to a socket, which rbnbProxy reads and configures into ChannelMaps that are sent to the DataTurbine.  The utility is suitable for many data acquisition applications, offering high performance and modular system architectures.

Setup and Startup

The rbnbProxy PlugIn needs to be run under a Java Virtual Machine (JVM).  Different flavors of Java come by different names (e.g. java, jre, jview). See the Installation Guide which came with your software for how to setup a script or shortcut to execute rbnbProxy.  The utility may also be configured and started via the WebTurbine, in which case it runs under the WebTurbine's JVM.

The rbnbProxy application has the following optional command line arguments:
 

Option Description
-h Print usage guide on the console
-x proxyPort Proxy server port to receive data on, default 3000
-a host:port DataTurbine host and port to send data to, default is localhost:3333
-s sourceName Source name for the data stream, default is "Proxy"
-M
Creates a separate connection to the server for each channel.
-O cutoffDuration
Archive cutoff duration in seconds.

By default, no cutoffs occur.  A single connection (or one per channel) is created and all data is sent to it.  If this value is set, then an existing archive is closed whenever the time since midnight modulo this value is zero.  This means that the first file may be short, subsequent files will end exactly on intervals equal to the duration specified.
-N numberOfDetachedConnections
Specifies how many detached connections to the server are maintained.  Can only be used in conjunction with cutoffs.

By default, when a cutoff occurs, the connection is simply closed.  If this value is set to something greater than one, then connections are detached.  Detached connections are closed once the total number of connections reaches this value.
-S
Specifies that separate threads are to be used for each connection to the server.  Can only be used in conjunction with cutoffs.

By default a single thread is used.
-T
Input includes timestamps?

By default, the input stream does not include timestamps.  If this flag is set, then each block of data is preceeded by a time value.  The initial one of these is used to set the time of the first frame of data.  Subsequent values are used by to calculate the cutoff times.
-c cacheFrames  Number of cache frames for the source, default 1000
-d diskArchiveFrames Number of disk archive frames for the source, default 0
-n numberOfChannels Number of channels of data, default 1   Cannot be used with -C.
 -C channel[,channel,...]
Specifies the names of the channels.  Cannot be used with -n.
-t dataType  Type of the data (i8, i16, i32, i64, f32, f64), default i16
-w wordOrder Word or byte order (MSB, LSB), default MSB
-b blockDuration Block duration in seconds, default 1
-p blockSize Block size in points per channel, default 1
-f frameFactor Frame factor in blocks, default 1000

When starting rbnbProxy via the WebTurbine interface, simply configure these options directly on the form, as shown below.


Examples

All examples here will assume 3 channels, 16 bit integer data (i16), MSB word order, and the default RBNB server address, proxy server port, source name, cache frames, and archive frames.  The application of block duration, block size, and frame size will be illustrated.  A block of data is defined as the smallest sample of data that includes all channels, which is repeated to form the data stream.  Block size is defined in units of points per channel, and block duration is defined in units of seconds, which may be fractional.  The frame factor defines how many blocks (of aggregate channels) to group into a single write to the DataTurbine server.

Larger frames are more efficiently handled by the DataTurbine server, but introduce a larger latency into the system and require larger intermediate data buffers.  In general, 1 to 50 frames/second provides a good balance between efficiency and latency for many data acquisition systems.  Note that the frame factor times the block duration is the update interval of data from rbnbProxy to the DataTurbine server.

Multiplexed by One Data

Multiplexed by one data is written to the socket in a stream of the form 123123123123123..., where the number represents the channel the sample is from.  The block size is 1 point.  Assume the acquisition were at 1000 Hz, and 1/2 second frames are to be sent to the DataTurbine server.  The block duration is 0.001 second, and the frame factor is 500 blocks.  The command line arguments for this example are
    -n 3 -b 0.001 -p 1 -f 500

If the acquisition were at 500 Hz, the block size would remain 1 point, but the block duration would increase to 0.002 seconds and the frame factor would decrease to 250 blocks.

Multiplexed by Five Data

Multiplexed by five data is written to the socket in a stream of the form 111112222233333111112222233333...  The block size is 5 points.  Again assume the acquisition were at 1000 Hz, and 1/2 second frames are to be sent to the DataTurbine server.  The block duration is 0.005 seconds, and the frame factor is 100 blocks.  The command line arguments for this example are
    -n 3 -b 0.005 -p 5 -f 100

If the acquisition were at 500 Hz, the block size would remain 5 points, but the block duration would increase to 0.01 seconds and the frame factor would decrease to 50 blocks.