Acquisition
Class AcquisitionParameters

java.lang.Object
  extended by Acquisition.AcquisitionParameters
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class AcquisitionParameters
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Field Summary
private  int[] channelList
          List of channels data are acquired from (not necessarily 0,1,2, etc.) With NI boards, this has become a pain since if multiple boards are used, there may be repeats within this list.
(package private)  int[] channelListIndexes
          list of indexes for each hardware channel in channelList (i.e.
(package private)  java.lang.String daqSystemType
           
private  int[] hydrophoneList
          Hydrophone list is a short list of length equal to the number of channels, so if your channel list does not start at zero, you have to first use the channelListIndexes before using this lookup table.
 int nChannels
           
 Preamplifier preamplifier
           
 float sampleRate
           
(package private) static long serialVersionUID
           
 double voltsPeak2Peak
           
 
Constructor Summary
AcquisitionParameters()
           
 
Method Summary
protected  AcquisitionParameters clone()
           
 int getChannelList(int index)
          Gets the channel number for a particular channel index.
 int[] getChannelListIndexes()
          Gets the complete list of channel indexes.
 int getChannelListIndexes(int channel)
          Gets the channel index for a particular hardware channel
 java.lang.String getDaqSystemType()
           
 int[] getHardwareChannelList()
          Gets / creates a list of hardware channels used.
 int getHydrophone(int channel)
          Gets a hydrophone number from a channel number (not channel index)
 int[] getHydrophoneList()
          Gets a list of hydrophones from channel Indexes (not channel numbers)
 int[] getNChannelList()
           
 int getNChannels()
           
 Preamplifier getPreamplifier()
           
 float getSampleRate()
           
 double getVoltsPeak2Peak()
           
 void setChannelList(int[] channelList)
           
 void setChannelList(int index, int channelNumber)
           
 void setChannelListIndexes(int[] channelListIndexes)
          Sets the channel list indeces
 void setDaqSystemType(java.lang.String daqSystemType)
           
 void setDefaultChannelList()
          Creates a default channel list 0,1,2,3,4 etc.
 void setHydrophoneList(int[] hydrophoneList)
          Set a hydrophone list.
 void setNChannels(int channels)
           
 void setPreamplifier(Preamplifier preamplifier)
           
 void setSampleRate(float sampleRate)
           
 void setVoltsPeak2Peak(double voltsPeak2Peak)
           
private  void sortChannelListIndexes()
          Creates a set of easily accessible channel indexes which can be used to convert from channel numbers to channel index e.g.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

daqSystemType

java.lang.String daqSystemType

sampleRate

public float sampleRate

nChannels

public int nChannels

voltsPeak2Peak

public double voltsPeak2Peak

channelList

private int[] channelList
List of channels data are acquired from (not necessarily 0,1,2, etc.) With NI boards, this has become a pain since if multiple boards are used, there may be repeats within this list.


preamplifier

public Preamplifier preamplifier

hydrophoneList

private int[] hydrophoneList
Hydrophone list is a short list of length equal to the number of channels, so if your channel list does not start at zero, you have to first use the channelListIndexes before using this lookup table.


channelListIndexes

transient int[] channelListIndexes
list of indexes for each hardware channel in channelList (i.e. opposite LUT)

Constructor Detail

AcquisitionParameters

public AcquisitionParameters()
Method Detail

clone

protected AcquisitionParameters clone()
Overrides:
clone in class java.lang.Object

getDaqSystemType

public java.lang.String getDaqSystemType()

setDaqSystemType

public void setDaqSystemType(java.lang.String daqSystemType)

getHydrophoneList

public int[] getHydrophoneList()
Gets a list of hydrophones from channel Indexes (not channel numbers)

Returns:
list of hydrophones.

setHydrophoneList

public void setHydrophoneList(int[] hydrophoneList)
Set a hydrophone list.

Parameters:
hydrophoneList -

getHydrophone

public int getHydrophone(int channel)
Gets a hydrophone number from a channel number (not channel index)

Parameters:
channel - software channel number
Returns:
a specific hydrophone number from the selected array

getNChannels

public int getNChannels()

setNChannels

public void setNChannels(int channels)

getNChannelList

public int[] getNChannelList()

getPreamplifier

public Preamplifier getPreamplifier()

setPreamplifier

public void setPreamplifier(Preamplifier preamplifier)

getSampleRate

public float getSampleRate()

setSampleRate

public void setSampleRate(float sampleRate)

getVoltsPeak2Peak

public double getVoltsPeak2Peak()

setVoltsPeak2Peak

public void setVoltsPeak2Peak(double voltsPeak2Peak)

getHardwareChannelList

public int[] getHardwareChannelList()
Gets / creates a list of hardware channels used.

i.e. converts from channel indexes to channel numbers.

Returns:
List of channel numbers

setChannelList

public void setChannelList(int[] channelList)

setChannelList

public void setChannelList(int index,
                           int channelNumber)

setDefaultChannelList

public void setDefaultChannelList()
Creates a default channel list 0,1,2,3,4 etc.


getChannelList

public int getChannelList(int index)
Gets the channel number for a particular channel index.

Parameters:
index - channel index
Returns:
channel number

getChannelListIndexes

public int[] getChannelListIndexes()
Gets the complete list of channel indexes.

Returns:
list of channel indexes.

setChannelListIndexes

public void setChannelListIndexes(int[] channelListIndexes)
Sets the channel list indeces

Parameters:
channelListIndexes -

getChannelListIndexes

public int getChannelListIndexes(int channel)
Gets the channel index for a particular hardware channel

Parameters:
channel -
Returns:
channel index or -1 if it doesn't exist.

sortChannelListIndexes

private void sortChannelListIndexes()
Creates a set of easily accessible channel indexes which can be used to convert from channel numbers to channel index e.g. used channel numbers might be 3 and 4 so the listIndexes will be {-1 -1 -1 0 1]