|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamController.PamControlledUnit
Acquisition.AcquisitionControl
public class AcquisitionControl
Main data acquisition control to get audio data from sound cards, NI cards (via UDP), files, directories of files, etc.
Uses a plug in architecture to allow new types to be added. This is done through RegisterDaqType()
DaqSystem| Nested Class Summary | |
|---|---|
(package private) class |
AcquisitionControl.acquisitionSettings
|
| Field Summary | |
|---|---|
private AcquisitionControl |
acquisitionControl
|
AcquisitionParameters |
acquisitionParameters
|
private AcquisitionProcess |
acquisitionProcess
|
private int |
ARRAY_ERROR_NO_ARRAY
|
private int |
ARRAY_ERROR_NO_ARRAYMANAGER
|
private int |
ARRAY_ERROR_NOT_ENOUGH_HYDROPHONES
|
private int |
ARRAY_ERROR_OK
|
private DAQChannelListManager |
daqChannelListManager
|
protected MenuItemEnabler |
daqMenuEnabler
|
private FolderInputSystem |
folderSystem
|
private DaqSystem |
lastSelSystem
|
private javax.swing.JProgressBar |
levelBar
|
private OfflineFileServer |
offlineFileServer
|
protected PamController |
pamController
|
private java.awt.Component |
statusBarComponent
|
private javax.swing.JLabel |
statusBarText
|
protected java.util.ArrayList<DaqSystem> |
systemList
|
private javax.swing.JPanel |
systemPanel
|
static java.lang.String |
unitType
|
| Fields inherited from class PamController.PamControlledUnit |
|---|
isViewer |
| Constructor Summary | |
|---|---|
AcquisitionControl(java.lang.String name)
Main control unit for audio data acquisition. |
|
AcquisitionControl(java.lang.String name,
boolean isSimulator)
|
|
| Method Summary | |
|---|---|
private int |
arrayChannelsOK()
|
int |
ChannelsToHydrophones(int channels)
|
boolean |
checkArrayChannels(java.awt.Frame parentFrame)
Run a check to see that all read out channels are connected to a hydrophone and if not, do something about it. |
javax.swing.JMenuItem |
createDetectionMenu(java.awt.Frame parentFrame)
Create a JMenu object containing MenuItems associated with PamProcesses |
void |
createOfflineDataMap(java.awt.Window parentFrame)
Create a basic map of the data including first and last times and some kind of data/unit time count plus ideally some kind of start and stop time list of where there are gaps in the data. |
(package private) void |
fillStatusBarText()
|
protected boolean |
fillXMLParameters(org.w3c.dom.Document doc,
org.w3c.dom.Element paramsEl)
Add Module specific XML data. |
DaqSystem |
findDaqSystem(java.lang.String systemType)
Finds a reference to a given DAQ system based on it's type (e.g. |
int |
findHydrophoneChannel(int hydrophoneId)
finds the ADC channel for a given hydrophone. |
AcquisitionParameters |
getAcquisitionParameters()
Getter for acquisition parameters. |
AcquisitionProcess |
getAcquisitionProcess()
|
(package private) java.lang.String |
getArrayErrorMessage(int error)
|
int |
getChannelHydrophone(int channel)
|
static java.util.ArrayList<AcquisitionControl> |
getControllers()
|
DAQChannelListManager |
getDaqChannelListManager()
|
AcquisitionProcess |
getDaqProcess()
|
java.lang.String |
getDataSourceName()
Get the data source name |
FolderInputSystem |
getFolderSystem()
|
int[] |
getHydrophoneList()
Return a list of which channels are connected to which hydrophones in the currentarray. |
OfflineFileServer |
getOfflineFileServer()
|
double |
getPeak2PeakVoltage(int swChannel)
|
java.io.Serializable |
getSettingsReference()
|
long |
getSettingsVersion()
|
private java.awt.Component |
getStatusBarComponent()
|
private java.lang.String |
getStatusBarText()
Prepares text for the status bar |
boolean |
loadData(PamDataBlock dataBlock,
long dataStart,
long dataEnd)
Load data for a given datablock between two time limits. |
void |
notifyModelChanged(int changeType)
General notification when the PAMGAURD model changes. |
void |
registerDaqSystem(DaqSystem daqSystem)
Registered new DAQ systems and makes them available via the AcquisitionCialog |
boolean |
removeUnit()
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
|
boolean |
saveData(PamDataBlock dataBlock)
Save data previously loaded from the store during offline viewing. |
void |
setDaqProcess(AcquisitionProcess acquisitionProcess)
|
void |
setHydrophoneList(int[] hydrophoneList)
Sets the list of hydrophone numbers. |
private void |
setSelectedSystem()
|
void |
setStatusBarLevel(double peakValue)
Sets a level meter on the status bar |
void |
setupControlledUnit()
called for all PamControlledUnits after all units have been created. |
(package private) void |
setupStatusBar()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface PamController.PamSettings |
|---|
getUnitName, getUnitType |
| Field Detail |
|---|
protected java.util.ArrayList<DaqSystem> systemList
public AcquisitionParameters acquisitionParameters
private AcquisitionProcess acquisitionProcess
protected MenuItemEnabler daqMenuEnabler
private OfflineFileServer offlineFileServer
private javax.swing.JLabel statusBarText
private javax.swing.JProgressBar levelBar
public static final java.lang.String unitType
private AcquisitionControl acquisitionControl
private java.awt.Component statusBarComponent
protected PamController pamController
private DAQChannelListManager daqChannelListManager
private FolderInputSystem folderSystem
private javax.swing.JPanel systemPanel
private DaqSystem lastSelSystem
private final int ARRAY_ERROR_OK
private final int ARRAY_ERROR_NO_ARRAYMANAGER
private final int ARRAY_ERROR_NO_ARRAY
private final int ARRAY_ERROR_NOT_ENOUGH_HYDROPHONES
| Constructor Detail |
|---|
public AcquisitionControl(java.lang.String name)
It is possible to instantiate several instances of this, preferebly with different names to simultaneously aquire sound from a number of sources such as multiple sound cards, fast ADC boards, etc.
Each different acquisition device must implement the DaqSystem interface and register with each AcquisitionControl.
name - name of the Acquisition control that will apear in menus. These should be
different for each instance of AcquistionControl since the names are used by PamProcesses
to find the correct data blocks.DaqSystem
public AcquisitionControl(java.lang.String name,
boolean isSimulator)
| Method Detail |
|---|
private java.awt.Component getStatusBarComponent()
public void registerDaqSystem(DaqSystem daqSystem)
daqSystem - public static java.util.ArrayList<AcquisitionControl> getControllers()
public AcquisitionProcess getDaqProcess()
public void setDaqProcess(AcquisitionProcess acquisitionProcess)
public DaqSystem findDaqSystem(java.lang.String systemType)
systemType -
public javax.swing.JMenuItem createDetectionMenu(java.awt.Frame parentFrame)
PamControlledUnit
createDetectionMenu in class PamControlledUnitparentFrame - The owner frame of the menu
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
private void setSelectedSystem()
public boolean checkArrayChannels(java.awt.Frame parentFrame)
private int arrayChannelsOK()
java.lang.String getArrayErrorMessage(int error)
void fillStatusBarText()
public java.lang.String toString()
toString in class PamControlledUnitpublic void setStatusBarLevel(double peakValue)
peakValue - Maximum amplitude fom AcquisitionProcessvoid setupStatusBar()
private java.lang.String getStatusBarText()
public java.io.Serializable getSettingsReference()
getSettingsReference in interface PamSettingspublic long getSettingsVersion()
getSettingsVersion in interface PamSettingspublic boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings in interface PamSettingspublic void setupControlledUnit()
PamControlledUnit
setupControlledUnit in class PamControlledUnitpublic int ChannelsToHydrophones(int channels)
public int[] getHydrophoneList()
public void setHydrophoneList(int[] hydrophoneList)
hydrophoneList - List of hydrophone numbers in channel orderpublic int findHydrophoneChannel(int hydrophoneId)
hydrophoneId - Number of a hydrophone in a PamArray
public int getChannelHydrophone(int channel)
public double getPeak2PeakVoltage(int swChannel)
public boolean removeUnit()
removeUnit in class PamControlledUnitpublic AcquisitionParameters getAcquisitionParameters()
public AcquisitionProcess getAcquisitionProcess()
public DAQChannelListManager getDaqChannelListManager()
public OfflineFileServer getOfflineFileServer()
protected boolean fillXMLParameters(org.w3c.dom.Document doc,
org.w3c.dom.Element paramsEl)
PamControlledUnitthis will generally be the place where most modules set their xml settings data.
fillXMLParameters in class PamControlledUnitpublic void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged in class PamControlledUnitchangeType - type of changepublic FolderInputSystem getFolderSystem()
public void createOfflineDataMap(java.awt.Window parentFrame)
OfflineDataStore
createOfflineDataMap in interface OfflineDataStorepublic java.lang.String getDataSourceName()
OfflineDataStore
getDataSourceName in interface OfflineDataStore
public boolean loadData(PamDataBlock dataBlock,
long dataStart,
long dataEnd)
OfflineDataStore
loadData in interface OfflineDataStoredataBlock - datablock owner of the datadataStart - start time in millisecondsdataEnd - end time in milliseconds
public boolean saveData(PamDataBlock dataBlock)
OfflineDataStore
saveData in interface OfflineDataStoredataBlock - datablock owner of the data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||