|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cesys.cebo.cebomsr.Device
public final class Device
The primary object to communicate with a CeboMsr-compatible device. Every instance holds a single
connection to a device. Instances are created during enumeration in LibraryInterface
.enumerate().
Field Summary | |
---|---|
static int |
FlagResetInputFifo
Valid flags to use with Device .resetPeripherals(). |
Method Summary | |
---|---|
int |
calculateMaxBufferedInputFrames()
Calculate maximum count of frames that can be buffered on the device when using multiple frame mode. |
void |
close()
Close device. |
OutputFrame |
createOutputFrame()
Create OutputFrame instance specific to this device. |
java.util.List<AnalogOutput> |
getAnalogOutputs()
Return list of analog outputs. |
java.util.List<Counter> |
getCounters()
Return list of counters. |
java.util.List<CurrentSource> |
getCurrentSources()
Return list of current sources. |
DeviceType |
getDeviceType()
Get actual type of device. |
java.util.List<AnalogInput> |
getDifferentialInputs()
Return list of differential analog inputs. |
java.util.List<DigitalPort> |
getDigitalPorts()
Return list of digital ports. |
java.lang.String |
getFirmwareVersion()
Read string which contains the firmware version. |
java.lang.String |
getIdentifier()
Return unique id of device. |
java.util.List<Led> |
getLeds()
Return list of LED's. |
java.lang.String |
getSerialNumber()
Return serial number of device. |
java.util.List<AnalogInput> |
getSingleEndedInputs()
Return list of single ended analog inputs. |
float |
getTemperature()
Read device temperature in degree celsius. |
java.util.List<Trigger> |
getTriggers()
Return list of triggers. |
static boolean |
isSystemAvailable()
Check if the CeboMsr API is available. |
void |
open()
Open device. |
void |
readBlock(long address,
byte[] buffer)
*** Internal use only *** |
void |
readBlock(long address,
byte[] buffer,
int size)
*** Internal use only *** |
java.util.List<InputFrame> |
readBlocking(int frameCount)
Read exact frameCount frames, return after completion, blocks until all data is available. |
InputFrame |
readFrame()
Read multiple inputs using the previously defined list (setupInputFrame()). |
java.util.List<InputFrame> |
readNonBlocking()
Read at much possible available frames, return immediately. |
long |
readRegister(long address)
*** Internal use only *** |
void |
resetDevice()
Restore startup defaults in device. |
void |
resetPeripherals(int mask)
Reset specified elements in device. |
void |
setupInputFrame(Input[] inputs)
Define the inputs that were included in the next frame request (readFrame(), readBlocking() and readNonBlocking()). |
void |
setupOutputFrame(Output[] outputs)
Define the outputs that should be set using the next frame based out transfer. |
float |
startBufferedDataAcquisition(float frameRate,
int frameCount,
boolean externalStarted)
Initialize a buffered data acquisition. |
void |
startBufferedExternalTimedDataAcquisition(int frameCount)
Initialize a buffered data acquisition. |
float |
startContinuousDataAcquisition(float frameRate,
boolean externalStarted)
Initialize a continuous data acquisition. |
void |
startContinuousExternalTimedDataAcquisition()
Initialize a continuous data acquisition. |
void |
stopDataAcquisition()
Stop any form of hardware managed data acquisition. |
java.lang.String |
toString()
|
void |
writeBlock(long address,
byte[] buffer)
*** Internal use only *** |
void |
writeBlock(long address,
byte[] buffer,
int size)
*** Internal use only *** |
void |
writeFrame(OutputFrame frame)
Write multiple outputs at once. |
void |
writeRegister(long address,
long value)
*** Internal use only *** |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FlagResetInputFifo
Device
.resetPeripherals().
Method Detail |
---|
public void open() throws java.io.IOException
java.io.IOException
public void close()
public void resetDevice() throws java.io.IOException
java.io.IOException
public void resetPeripherals(int mask) throws java.io.IOException
mask
- Bit vector constructed of Device
.FlagReset*.
java.io.IOException
public java.lang.String getIdentifier()
public DeviceType getDeviceType()
public java.lang.String getFirmwareVersion() throws java.io.IOException
java.io.IOException
public java.lang.String getSerialNumber() throws java.io.IOException
java.io.IOException
public float getTemperature() throws java.io.IOException
java.io.IOException
public int calculateMaxBufferedInputFrames() throws java.io.IOException
java.io.IOException
public void setupInputFrame(Input[] inputs) throws java.io.IOException
inputs
- Collection of inputs.
java.io.IOException
public float startBufferedDataAcquisition(float frameRate, int frameCount, boolean externalStarted) throws java.io.IOException
frameRate
- Frequency in Hz to capture frame.frameCount
- Maximum count of frames to capture. Maximum possible frames can
calculated using calculateMaxBufferedInputFrames().externalStarted
- If true, sampling starts if an external trigger is detected,
immediately otherwise.
java.io.IOException
public void startBufferedExternalTimedDataAcquisition(int frameCount) throws java.io.IOException
frameCount
- Maximum count of frames to capture. Maximum possible frames can calculated
using calculateMaxBufferedInputFrames().
java.io.IOException
public float startContinuousDataAcquisition(float frameRate, boolean externalStarted) throws java.io.IOException
frameRate
- Frequency in Hz to capture frame.externalStarted
- If true, sampling starts if an external trigger is detected,
immediately otherwise.
java.io.IOException
public void startContinuousExternalTimedDataAcquisition() throws java.io.IOException
java.io.IOException
public void stopDataAcquisition() throws java.io.IOException
java.io.IOException
public java.util.List<InputFrame> readBlocking(int frameCount) throws java.io.IOException
frameCount
- Count of frames to read.
java.io.IOException
public java.util.List<InputFrame> readNonBlocking() throws java.io.IOException
java.io.IOException
public InputFrame readFrame() throws java.io.IOException
java.io.IOException
public void setupOutputFrame(Output[] outputs) throws java.io.IOException
outputs
- Collection of outputs.
java.io.IOException
public void writeFrame(OutputFrame frame) throws java.io.IOException
frame
- Instance that holds all values to set.
java.io.IOException
public OutputFrame createOutputFrame()
public java.util.List<AnalogInput> getSingleEndedInputs()
public java.util.List<AnalogInput> getDifferentialInputs()
public java.util.List<AnalogOutput> getAnalogOutputs()
public java.util.List<DigitalPort> getDigitalPorts()
public java.util.List<Counter> getCounters()
public java.util.List<Trigger> getTriggers()
public java.util.List<CurrentSource> getCurrentSources()
public java.util.List<Led> getLeds()
public static boolean isSystemAvailable()
public void readBlock(long address, byte[] buffer) throws java.io.IOException
java.io.IOException
public void readBlock(long address, byte[] buffer, int size) throws java.io.IOException
java.io.IOException
public long readRegister(long address) throws java.io.IOException
java.io.IOException
public void writeBlock(long address, byte[] buffer) throws java.io.IOException
java.io.IOException
public void writeBlock(long address, byte[] buffer, int size) throws java.io.IOException
java.io.IOException
public void writeRegister(long address, long value) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |