|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDevice
Device provides access to the physical logic analyzer device through a serial port. It requires the rxtx package from http://www.rxtx.org/ to function.
Constructor Summary | |
Device()
Creates a device object. |
Method Summary | |
boolean |
attach(java.lang.String portName)
Attaches the given serial port to the device object. |
void |
detach()
Detaches the currently attached port, if one exists. |
int[] |
run()
Sends the configuration to the device, starts it, reads the captured data and returns an int-array with each int representing one capture of all 32 channels |
void |
setRate(int rate)
Set the sampling rate. |
void |
setRatio(double ratio)
Sets the ratio for samples to read before and after started. |
void |
setSize(int size)
Sets the number of samples to obtain when started. |
void |
setTrigger(int mask,
int value)
Configures the conditions that must be met to fire the trigger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Device()
Method Detail |
public boolean attach(java.lang.String portName)
true
does not guarantee that a
logic analyzer is actually attached to the port.
portName
- the name of the port to open
true
when the port has been assigned successfully;
false
otherwise.public void detach()
public void setSize(int size)
size
- number of samples, must be between 4 and 256*1024public void setRatio(double ratio)
ratio
- value between 0 and 1; 0 means all before start, 1 all afterpublic void setRate(int rate)
rate
- sampling rate in Hzpublic void setTrigger(int mask, int value)
To disable the trigger, set mask to 0. This will cause it to always fire.
mask
- bit map defining which channels to watchvalue
- bit map defining what value to wait for on watched channelspublic int[] run() throws java.lang.Exception
java.lang.Exception
- when writing to or reading from device fails
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |