|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAcquisition.DaqSystem
nidaqdev.NIDAQProcess
public class NIDAQProcess
| Nested Class Summary | |
|---|---|
(package private) class |
NIDAQProcess.AllowMultiBoard
|
(package private) class |
NIDAQProcess.NICaptureThread
New capture thread for JNI operation |
(package private) class |
NIDAQProcess.NITransferThread
|
(package private) class |
NIDAQProcess.SelectBoard
|
| Field Summary | |
|---|---|
private AcquisitionDialog |
acquisitionDialog
|
private javax.swing.JCheckBox |
allowMultiBoard
|
private javax.swing.JComboBox |
audioDevices
|
private long[] |
channelSampleCount
|
private int |
daqChannels
|
private AcquisitionControl |
daqControl
|
private javax.swing.JPanel |
daqDialog
|
private int |
dataUnitSamples
|
private javax.swing.JComboBox |
inputType
|
private java.util.List<RawDataUnit> |
newDataUnits
|
private NIChannelListPanel |
niChannelListPanel
|
private Nidaq |
nidaq
|
private java.util.ArrayList<NIDeviceInfo> |
niDevices
|
private NIDaqParams |
niParameters
|
private int |
rawBufferSize
|
private javax.swing.JLabel |
warningText
|
| Fields inherited from class Acquisition.DaqSystem |
|---|
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING |
| Constructor Summary | |
|---|---|
NIDAQProcess(AcquisitionControl daqControl)
|
|
| Method Summary | |
|---|---|
boolean |
canPlayBack(float sampleRate)
|
private void |
checkDevice()
|
private javax.swing.JPanel |
createDaqDialogPanel()
|
void |
daqHasEnded()
Called after DAQ has stopped - for whatever reason. |
boolean |
dialogGetParams()
Called by AcquisitionDialog.GetParams so that parameters can be extracted from the dialog component. |
void |
dialogSetParams()
Called by AcquisitionDialog.SetParams so that the dialog componenet can update it's fields |
void |
enableMasterDevice()
|
private void |
enableMultiBoardOps()
|
void |
fullBuffer(int iChan,
double[] data)
Get's called back from the C side. |
int |
getChannels()
|
ChannelListPanel |
getDaqSpecificChannelListPanel(AcquisitionDialog acquisitionDialog)
GEt a channel list panel (invented for NI cards which have many more options) |
javax.swing.JPanel |
getDaqSpecificDialogComponent(AcquisitionDialog acquisitionDialog)
The AcquisitionDialog has been designed to that each data source type can plug in it's own panel of device specific controls. |
int |
getDataUnitSamples()
|
NIDeviceInfo |
getDeviceInfo(int iDevice)
|
protected int[] |
getDeviceList()
|
java.lang.String |
getDeviceName()
Gets a name for the acquisition device (may just be a number but need to generalise). |
protected int[] |
getHWChannelList()
|
protected int |
getMasterDevice()
|
int |
getMaxChannels()
|
int |
getMaxSampleRate()
|
java.util.ArrayList<NIDeviceInfo> |
getNiDevices()
|
NIDaqParams |
getNiParameters()
|
double |
getPeak2PeakVoltage(int swChannel)
|
int |
getSampleRate()
|
java.io.Serializable |
getSettingsReference()
|
long |
getSettingsVersion()
|
java.lang.String |
getSystemName()
|
java.lang.String |
getSystemType()
|
java.lang.String |
getUnitName()
|
java.lang.String |
getUnitType()
|
protected boolean |
isEnabledMultiBoardOps()
|
boolean |
isRealTime()
|
boolean |
prepareSystem(AcquisitionControl daqControl)
Prepare the DaqSystem. |
protected double |
readSampleRate()
Pass through for easy access from channellistpanel |
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
|
protected void |
setDeviceList(int[] deviceList)
|
protected void |
setHWChannelList(int[] hwChannelsList)
|
void |
setMasterDevice(int iDevice)
|
protected void |
setVP2P(double vp2p)
|
boolean |
startSystem(AcquisitionControl daqControl)
Start the DaqSystem. |
void |
stopSystem(AcquisitionControl daqControl)
Stop the DaqSystem. |
boolean |
supportsChannelLists()
|
void |
useSettings()
|
private boolean |
warnMultiBoardOps()
If it's true that multi board is enabled, issue a warning and possibly return false in which case the checkbox will be unchecked again. |
| Methods inherited from class Acquisition.DaqSystem |
|---|
areSampleSettingsOk, getInputChannelMap, getPlaybackSystem, getStatusBarComponent, getStreamStatus, setSelected, setStreamStatus, showSampleSettingsDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.swing.JPanel daqDialog
private javax.swing.JComboBox audioDevices
private javax.swing.JComboBox inputType
private javax.swing.JLabel warningText
private javax.swing.JCheckBox allowMultiBoard
private NIDaqParams niParameters
private AcquisitionControl daqControl
private AcquisitionDialog acquisitionDialog
private int rawBufferSize
private int daqChannels
private Nidaq nidaq
private long[] channelSampleCount
private java.util.List<RawDataUnit> newDataUnits
private java.util.ArrayList<NIDeviceInfo> niDevices
private NIChannelListPanel niChannelListPanel
private int dataUnitSamples
| Constructor Detail |
|---|
public NIDAQProcess(AcquisitionControl daqControl)
| Method Detail |
|---|
public boolean prepareSystem(AcquisitionControl daqControl)
DaqSystemUsually this is the time for opening files, preparing data buffers, etc.
prepareSystem in class DaqSystemdaqControl - AcquisitionControl unit.
public int getDataUnitSamples()
getDataUnitSamples in class DaqSystempublic boolean startSystem(AcquisitionControl daqControl)
DaqSystemMost things should be ready from the call to PrepareSystem. In StartSystem you will generally need to start a thread which will read in the data and place PamDataUnits in a buffer from where they are read by the main thred and passed on to other Pam modules for processing (see SoundCardSystem for an example)
startSystem in class DaqSystemdaqControl - AcquisitionControl unit.
public void stopSystem(AcquisitionControl daqControl)
DaqSystem
stopSystem in class DaqSystempublic ChannelListPanel getDaqSpecificChannelListPanel(AcquisitionDialog acquisitionDialog)
DaqSystem
getDaqSpecificChannelListPanel in class DaqSystemacquisitionDialog - reference to main acquisition dialog
public javax.swing.JPanel getDaqSpecificDialogComponent(AcquisitionDialog acquisitionDialog)
DaqSystemThe AcquisitionDialog will handle placing this component on the dialog when a particular DaqSystem is selected. The component will be placed between a drop down list of available DaqSystem's and a section of the dialog showing the sample rate and number of channels.
getDaqSpecificDialogComponent in class DaqSystemacquisitionDialog - the AcquisitionDialog this component will be added to
protected void setVP2P(double vp2p)
private javax.swing.JPanel createDaqDialogPanel()
public NIDaqParams getNiParameters()
public void dialogSetParams()
DaqSystem
dialogSetParams in class DaqSystemprotected int getMasterDevice()
public NIDeviceInfo getDeviceInfo(int iDevice)
public boolean dialogGetParams()
DaqSystem
dialogGetParams in class DaqSystempublic java.lang.String getSystemType()
getSystemType in class DaqSystemCalling functions should be able to handle 'null'
public java.lang.String getSystemName()
getSystemName in class DaqSystempublic int getMaxChannels()
getMaxChannels in class DaqSystempublic int getMaxSampleRate()
getMaxSampleRate in class DaqSystemprotected double readSampleRate()
public boolean isRealTime()
isRealTime in class DaqSystempublic boolean canPlayBack(float sampleRate)
canPlayBack in class DaqSystempublic int getChannels()
protected boolean isEnabledMultiBoardOps()
private void enableMultiBoardOps()
public int getSampleRate()
public double getPeak2PeakVoltage(int swChannel)
getPeak2PeakVoltage in class DaqSystempublic java.io.Serializable getSettingsReference()
getSettingsReference in interface PamSettingspublic long getSettingsVersion()
getSettingsVersion in interface PamSettingspublic java.lang.String getUnitName()
getUnitName in interface PamSettingspublic java.lang.String getUnitType()
getUnitType in interface PamSettingspublic boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings in interface PamSettingspublic void useSettings()
private void checkDevice()
public void enableMasterDevice()
public void setMasterDevice(int iDevice)
private boolean warnMultiBoardOps()
public void fullBuffer(int iChan,
double[] data)
We also need to swap threads at this point, so add the new data to a list that some other process will be emptying on a timer.
iChan - channel numberdata - data array.public void daqHasEnded()
DaqSystem
daqHasEnded in class DaqSystemprotected void setDeviceList(int[] deviceList)
protected int[] getDeviceList()
protected void setHWChannelList(int[] hwChannelsList)
protected int[] getHWChannelList()
public boolean supportsChannelLists()
supportsChannelLists in class DaqSystempublic java.util.ArrayList<NIDeviceInfo> getNiDevices()
public java.lang.String getDeviceName()
DaqSystem
getDeviceName in class DaqSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||