public class SimProcess extends DaqSystem implements PamSettings
Sound simulated on a time at approximately 10x real time
Slow it down with a sound playback module if needs be.
Controls creation and movement of simulated objects
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING
Constructor and Description |
---|
SimProcess(AcquisitionControl daqControl) |
Modifier and Type | Method and Description |
---|---|
boolean |
canPlayBack(float sampleRate) |
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
|
AcquisitionControl |
getDaqControl() |
javax.swing.JComponent |
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() |
java.lang.String |
getDeviceName()
Gets a name for the acquisition device (may just be a number
but need to generalise).
|
int |
getMaxChannels() |
int |
getMaxSampleRate() |
double |
getPeak2PeakVoltage(int swChannel) |
PropagationModel |
getPropagationModel() |
PropagationModel |
getPropagationModel(java.lang.String propName) |
float |
getSampleRate() |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
PamDataBlock |
getSimObjectsDataBlock() |
SimSoundDataBlock |
getSimSoundsDataBlock()
Get the datablock for individual sounds (not the objects creating the sounds)
|
double |
getSimulatorSpeedOfSound()
Get the speed of sound to use in simulations.
|
java.lang.String |
getSystemName() |
java.lang.String |
getSystemType() |
java.lang.String |
getUnitName() |
java.lang.String |
getUnitType() |
boolean |
isRealTime() |
void |
notifyArrayChanged() |
boolean |
prepareSystem(AcquisitionControl daqControl)
Prepare the DaqSystem.
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
void |
setPropagationModel(PropagationModel propagationModel) |
void |
setSelected(boolean select)
Tell a DAQ system it's been selected or deselected.
|
boolean |
startSystem(AcquisitionControl daqControl)
Start the DaqSystem.
|
void |
stopSystem(AcquisitionControl daqControl)
Stop the DaqSystem.
|
areSampleSettingsOk, fillXMLParameters, getChannelGain, getDaqSpecificChannelListPanel, getInputChannelMap, getPlaybackSystem, getSampleBits, getStatusBarComponent, getStreamStatus, setStreamStatus, showSampleSettingsDialog, supportsChannelLists
public SimProcess(AcquisitionControl daqControl)
public void setSelected(boolean select)
DaqSystem
setSelected
in class DaqSystem
public PropagationModel getPropagationModel()
public PropagationModel getPropagationModel(java.lang.String propName)
public void setPropagationModel(PropagationModel propagationModel)
public void notifyArrayChanged()
public float getSampleRate()
public boolean canPlayBack(float sampleRate)
canPlayBack
in class DaqSystem
public void daqHasEnded()
DaqSystem
daqHasEnded
in class DaqSystem
public boolean dialogGetParams()
DaqSystem
dialogGetParams
in class DaqSystem
public void dialogSetParams()
DaqSystem
dialogSetParams
in class DaqSystem
public javax.swing.JComponent getDaqSpecificDialogComponent(AcquisitionDialog acquisitionDialog)
DaqSystem
The 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 DaqSystem
acquisitionDialog
- the AcquisitionDialog this component will be added topublic int getMaxChannels()
getMaxChannels
in class DaqSystem
public int getMaxSampleRate()
getMaxSampleRate
in class DaqSystem
public double getPeak2PeakVoltage(int swChannel)
getPeak2PeakVoltage
in class DaqSystem
public java.lang.String getSystemName()
getSystemName
in class DaqSystem
public java.lang.String getSystemType()
getSystemType
in class DaqSystem
Calling functions should be able to handle 'null'
public boolean isRealTime()
isRealTime
in class DaqSystem
public boolean prepareSystem(AcquisitionControl daqControl)
DaqSystem
Usually this is the time for opening files, preparing data buffers, etc.
prepareSystem
in class DaqSystem
daqControl
- AcquisitionControl unit.public int getDataUnitSamples()
getDataUnitSamples
in class DaqSystem
public boolean startSystem(AcquisitionControl daqControl)
DaqSystem
Most 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 DaqSystem
daqControl
- AcquisitionControl unit.public void stopSystem(AcquisitionControl daqControl)
DaqSystem
stopSystem
in class DaqSystem
public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public java.lang.String getUnitName()
getUnitName
in interface PamSettings
public java.lang.String getUnitType()
getUnitType
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public AcquisitionControl getDaqControl()
public java.lang.String getDeviceName()
DaqSystem
getDeviceName
in class DaqSystem
public double getSimulatorSpeedOfSound()
public SimSoundDataBlock getSimSoundsDataBlock()
public PamDataBlock getSimObjectsDataBlock()