BertecDeviceJava
Class BertecDevice

java.lang.Object
  extended by BertecDeviceJava.BertecDevice

public class BertecDevice
extends java.lang.Object


Nested Class Summary
static class BertecDevice.AutoZeroStateValue
          Values that can be returned from reading the AutoZeroState property.
 class BertecDevice.DataEvent
           
static interface BertecDevice.DataEventListener
           
 class BertecDevice.DeviceSortEvent
           
static interface BertecDevice.DeviceSortEventListener
           
static class BertecDevice.ErrorValue
          Error values that can be returned via the event or data poll.
 class BertecDevice.StatusEvent
           
static interface BertecDevice.StatusEventListener
           
 class BertecDevice.TransducerInfo
           
 
Constructor Summary
BertecDevice()
           
 
Method Summary
 void addDataEventListener(BertecDevice.DataEventListener l)
           
 void addDeviceSortEventListener(BertecDevice.DeviceSortEventListener l)
           
 void addStatusEventListener(BertecDevice.StatusEventListener l)
           
 int ClearPollBuffer()
          Discards all current data in the buffer
 int DataPoll(int[] channelsOut, double[] dataOut)
          Poll for data from the devices.
 void dispose()
           
protected  void finalize()
           
 int getAcquireRate()
          How often the buffer should get data.
 int getAutoZeroing()
          Enables autozeroing of the plate, which occurs if the plate is loaded at less than 40 Newtons for about 3.5 seconds.
 int getAutoZeroState()
          Returns the current enum status of the autozeroing.
 int getAveragingSize()
          The averaging sample filter size.
 int getLowpassFilterSamples()
          The low-pass filtering value.
 boolean getMayBeMissingSyncCable()
          Attempt to detect a missing sync cable for multiple plates.
 double getPollingBufferSize()
          The size of the polling buffer, in seconds
 int getStatus()
          Overall status of system.
 boolean getSynchronized()
          If set, then all of the devices are synchronized
 int getTransducerCount()
          How many attached devices are in the Transducers list
 BertecDevice.TransducerInfo[] getTransducers()
          List of attached Transducers
 java.lang.String getTransducerSerialNumber(int v)
          A given transducer's serial number.
 int getTransducerStatus(int v)
          A given transducer's current status, separate from the overall state.
 int getVersion()
          Version of the Bertec DLL
 void removeDataEventListener(BertecDevice.DataEventListener l)
           
 void removeDeviceSortEventListener(BertecDevice.DeviceSortEventListener l)
           
 void removeStatusEventListener(BertecDevice.StatusEventListener l)
           
 int ResetSyncCounters()
          Reset the internal sync counters to zero - used with dual synced plates.
 void setAcquireRate(int v)
           
 void setAutoZeroing(int v)
           
 void setAveragingSize(int v)
           
 void setEnableSequenceNumberCheck(int v)
          Enables checking for data sequence numbers in the data stream.
 void setLowpassFilterSamples(int v)
           
 void setPollingBufferSize(double v)
           
 void setUsbThreadPriority(int priority)
          Set the usb thread reader priority, making it higher or lower than the default.
 int Start()
          Start the data gathering.
 int Stop()
          Stop the data gathering.
 int ZeroNow()
          Zero all the input channels to the current load
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BertecDevice

public BertecDevice()
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

dispose

public void dispose()

addStatusEventListener

public void addStatusEventListener(BertecDevice.StatusEventListener l)

removeStatusEventListener

public void removeStatusEventListener(BertecDevice.StatusEventListener l)

addDataEventListener

public void addDataEventListener(BertecDevice.DataEventListener l)

removeDataEventListener

public void removeDataEventListener(BertecDevice.DataEventListener l)

addDeviceSortEventListener

public void addDeviceSortEventListener(BertecDevice.DeviceSortEventListener l)

removeDeviceSortEventListener

public void removeDeviceSortEventListener(BertecDevice.DeviceSortEventListener l)

Start

public int Start()
Start the data gathering. Return a zero value if the process is started correctly.


Stop

public int Stop()
Stop the data gathering. Return a zero value if the process is stopped correctly.


DataPoll

public int DataPoll(int[] channelsOut,
                    double[] dataOut)
Poll for data from the devices. Will return the number of samples (rows) of data, or a negative error number. The channelsOut[] array must be set to at least a size of [1] - only the zero element is set. The dataOut[] array must be set to how big your polling buffer is to be.


ZeroNow

public int ZeroNow()
Zero all the input channels to the current load


ClearPollBuffer

public int ClearPollBuffer()
Discards all current data in the buffer


getVersion

public int getVersion()
Version of the Bertec DLL


getStatus

public int getStatus()
Overall status of system. Zero is good, negative bad


getSynchronized

public boolean getSynchronized()
If set, then all of the devices are synchronized


getTransducerCount

public int getTransducerCount()
How many attached devices are in the Transducers list


getTransducers

public BertecDevice.TransducerInfo[] getTransducers()
List of attached Transducers


getPollingBufferSize

public double getPollingBufferSize()
The size of the polling buffer, in seconds


setPollingBufferSize

public void setPollingBufferSize(double v)

getAutoZeroing

public int getAutoZeroing()
Enables autozeroing of the plate, which occurs if the plate is loaded at less than 40 Newtons for about 3.5 seconds.


setAutoZeroing

public void setAutoZeroing(int v)

getAutoZeroState

public int getAutoZeroState()
Returns the current enum status of the autozeroing. See AutoZeroStateValue


setEnableSequenceNumberCheck

public void setEnableSequenceNumberCheck(int v)
Enables checking for data sequence numbers in the data stream. Missing sequences are zero-filled.


getAveragingSize

public int getAveragingSize()
The averaging sample filter size. Less than 2 = no averaging.


setAveragingSize

public void setAveragingSize(int v)

getLowpassFilterSamples

public int getLowpassFilterSamples()
The low-pass filtering value. Should be >=1. Setting to 0 or less turns it off


setLowpassFilterSamples

public void setLowpassFilterSamples(int v)

getAcquireRate

public int getAcquireRate()
How often the buffer should get data. The default is 10, valid values are from 1 to 50; 0=default of 10. Smaller values = faster+more callback action with smaller sample blocks, larger = less often callbacks, but bigger blocks of samples. The total AMOUNT of data in a given timeframe will be the same, this controls how often you get chunks of it.


setAcquireRate

public void setAcquireRate(int v)

getTransducerSerialNumber

public java.lang.String getTransducerSerialNumber(int v)
A given transducer's serial number.


getTransducerStatus

public int getTransducerStatus(int v)
A given transducer's current status, separate from the overall state. Zero is good, negative bad.


setUsbThreadPriority

public void setUsbThreadPriority(int priority)
Set the usb thread reader priority, making it higher or lower than the default. Advanced functionality, usually not needed.


getMayBeMissingSyncCable

public boolean getMayBeMissingSyncCable()
Attempt to detect a missing sync cable for multiple plates. Returns true if possibly missing.


ResetSyncCounters

public int ResetSyncCounters()
Reset the internal sync counters to zero - used with dual synced plates.