|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAcquisition.DaqSystem
simulatedAcquisition.SimProcess
public class SimProcess
Simulation of simulated sound.
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
| Nested Class Summary | |
|---|---|
(package private) class |
SimProcess.GenerationThread
Generates data as fast as it can. |
private class |
SimProcess.SimMouseAdapter
|
| Field Summary | |
|---|---|
private PamArray |
currentArray
|
private AcquisitionControl |
daqControl
|
private int |
dataUnitSamples
|
private boolean |
dontStop
|
private SimProcess.GenerationThread |
genThread
|
protected java.util.List<RawDataUnit> |
newDataUnits
|
private PropagationModel |
propagationModel
|
protected java.util.ArrayList<PropagationModel> |
propagationModels
|
private java.util.Random |
random
|
private SimDialogPanel |
simdialogPanel
|
private SimGraphics |
simGraphics
|
private SimProcess.SimMouseAdapter |
simMouseAdapter
|
private SimObjectsDataBlock |
simObjectsDataBlock
|
(package private) SimParameters |
simParameters
|
protected SimSignals |
simSignals
|
private long |
startTimeMillis
|
private boolean |
stillRunning
|
private java.lang.Thread |
theThread
|
private long |
totalSamples
|
private boolean |
wasSelected
|
| Fields inherited from class Acquisition.DaqSystem |
|---|
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING |
| Constructor Summary | |
|---|---|
SimProcess(AcquisitionControl daqControl)
|
|
| Method Summary | |
|---|---|
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 |
private void |
generateData()
|
private void |
generateNoise(double[] data,
double noise)
|
private void |
generateSignals(SimObjectDataUnit sdu,
double[] data,
int phone,
long startSample)
|
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()
|
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)
|
private void |
setArray()
|
void |
setPropagationModel(PropagationModel propagationModel)
|
void |
setSelected(boolean select)
Tell a DAQ system it's been selected or deselected. |
protected void |
setupObjects()
|
protected void |
setupSim()
|
private void |
sortMapMice()
|
boolean |
startSystem(AcquisitionControl daqControl)
Start the DaqSystem. |
void |
stopSystem(AcquisitionControl daqControl)
Stop the DaqSystem. |
private void |
updateObjectPosition(long timeMilliseconds,
SimObjectDataUnit simObjectDataUnit)
|
private void |
updateObjectPositions(long timeMilliseconds)
|
| Methods inherited from class Acquisition.DaqSystem |
|---|
areSampleSettingsOk, getDaqSpecificChannelListPanel, getInputChannelMap, getPlaybackSystem, getStatusBarComponent, getStreamStatus, setStreamStatus, showSampleSettingsDialog, supportsChannelLists |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private AcquisitionControl daqControl
private SimObjectsDataBlock simObjectsDataBlock
private PamArray currentArray
private java.util.Random random
private long totalSamples
private long startTimeMillis
SimParameters simParameters
private SimDialogPanel simdialogPanel
private SimGraphics simGraphics
private volatile boolean dontStop
private volatile boolean stillRunning
private SimProcess.GenerationThread genThread
private java.lang.Thread theThread
protected java.util.List<RawDataUnit> newDataUnits
private SimProcess.SimMouseAdapter simMouseAdapter
protected SimSignals simSignals
protected java.util.ArrayList<PropagationModel> propagationModels
private PropagationModel propagationModel
private boolean wasSelected
private int dataUnitSamples
| Constructor Detail |
|---|
public SimProcess(AcquisitionControl daqControl)
| Method Detail |
|---|
private void sortMapMice()
public void setSelected(boolean select)
DaqSystem
setSelected in class DaqSystemprotected void setupObjects()
protected void setupSim()
public PropagationModel getPropagationModel()
public PropagationModel getPropagationModel(java.lang.String propName)
public void setPropagationModel(PropagationModel propagationModel)
private void updateObjectPositions(long timeMilliseconds)
private void updateObjectPosition(long timeMilliseconds,
SimObjectDataUnit simObjectDataUnit)
public void notifyArrayChanged()
public float getSampleRate()
private void setArray()
private void generateData()
private void generateSignals(SimObjectDataUnit sdu,
double[] data,
int phone,
long startSample)
private void generateNoise(double[] data,
double noise)
public boolean canPlayBack(float sampleRate)
canPlayBack in class DaqSystempublic void daqHasEnded()
DaqSystem
daqHasEnded in class DaqSystempublic boolean dialogGetParams()
DaqSystem
dialogGetParams in class DaqSystempublic void dialogSetParams()
DaqSystem
dialogSetParams in class DaqSystempublic javax.swing.JComponent 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
public int getMaxChannels()
getMaxChannels in class DaqSystempublic int getMaxSampleRate()
getMaxSampleRate in class DaqSystempublic double getPeak2PeakVoltage(int swChannel)
getPeak2PeakVoltage in class DaqSystempublic java.lang.String getSystemName()
getSystemName in class DaqSystempublic java.lang.String getSystemType()
getSystemType in class DaqSystemCalling functions should be able to handle 'null'
public boolean isRealTime()
isRealTime in class DaqSystempublic 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 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 AcquisitionControl getDaqControl()
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 | |||||||||