org.sump.analyzer
Class DeviceData

java.lang.Object
  extended byorg.sump.analyzer.DeviceData

public class DeviceData
extends java.lang.Object

DeviceData encapsulates the data obtained by the analyzer during a single run. It also provides a method for (partially) saving the data to a file.

Data files will only contain the actual readout values. A value is a single logic level measurement of all channels at a particular time. This means a value is 32bits long. The value is encoded in hex and each value is followed by a new line.

In the java code each value is represented by an integer.

Author:
Michael "Mr. Sump" Poppitz

Field Summary
 int triggerPosition
           
 int[] values
           
 
Constructor Summary
  DeviceData(java.io.File file)
          Constructs DeviceData based on the data read from the given file.
protected DeviceData(int[] values, int triggerPosition)
          Constructs DeviceData based on the given data.
 
Method Summary
 void writeToFile(java.io.File file)
          Writes diagram data to given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

public final int[] values

triggerPosition

public final int triggerPosition
Constructor Detail

DeviceData

protected DeviceData(int[] values,
                     int triggerPosition)
Constructs DeviceData based on the given data.

Parameters:
values - 32bit values as read from device
triggerPosition - position of trigger as index of values array

DeviceData

public DeviceData(java.io.File file)
           throws java.io.IOException
Constructs DeviceData based on the data read from the given file.

Parameters:
file - file to read device data from
Throws:
java.io.IOException - when reading from file failes
Method Detail

writeToFile

public void writeToFile(java.io.File file)
                 throws java.io.IOException
Writes diagram data to given file.

Parameters:
file - file to write to
Throws:
java.io.IOException - when writing to file failes