|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sump.analyzer.CapturedData
public class CapturedData
CapturedData encapsulates the data obtained by the analyzer during a single run. It also provides a method for saving the data to a file.
Data files will start with a header containing meta data marked by lines starting with ";". The actual readout values will follow after the header. 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.
Field Summary | |
---|---|
int |
channels
number of channels (1-32) |
int |
enabledChannels
bit map of enabled channels |
static int |
NOT_AVAILABLE
indicates that rate or trigger position are not available |
int |
rate
sampling rate in Hz |
int |
triggerPosition
position of trigger as index of values |
int[] |
values
captured values |
Constructor Summary | |
---|---|
CapturedData(java.io.File file)
Constructs CapturedData based on the data read from the given file. |
|
CapturedData(int[] values,
int triggerPosition,
int rate,
int channels,
int enabledChannels)
Constructs CapturedData based on the given data. |
Method Summary | |
---|---|
boolean |
hasTimingData()
Returns wether or not the object contains timing data |
boolean |
hasTriggerData()
Returns wether or not the object contains trigger data |
void |
writeToFile(java.io.File file)
Writes device data to given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOT_AVAILABLE
public final int[] values
public final int triggerPosition
public final int rate
public final int channels
public final int enabledChannels
Constructor Detail |
---|
public CapturedData(int[] values, int triggerPosition, int rate, int channels, int enabledChannels)
values
- 32bit values as read from devicetriggerPosition
- position of trigger as index of values arrayrate
- sampling rate (may be set to NOT_AVAILABLE
)channels
- number of used channelsenabledChannels
- bit mask identifying used channelspublic CapturedData(java.io.File file) throws java.io.IOException
file
- file to read captured data from
java.io.IOException
- when reading from file failesMethod Detail |
---|
public void writeToFile(java.io.File file) throws java.io.IOException
file
- file to write to
java.io.IOException
- when writing to file failespublic boolean hasTimingData()
true
when timing data is availablepublic boolean hasTriggerData()
true
when trigger data is available
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |