depthReadout
Class MccDepthSystem

java.lang.Object
  extended by depthReadout.MccDepthSystem
All Implemented Interfaces:
DepthSystem, PamSettings

public class MccDepthSystem
extends java.lang.Object
implements DepthSystem, PamSettings


Field Summary
private  double depth
           
(package private)  DepthControl depthControl
           
private  int errorCode
           
(package private)  MccDepthParameters mccDepthParameters
           
(package private)  MccJniInterface mccJniInterface
           
private  double rawValue
           
 
Fields inherited from interface depthReadout.DepthSystem
DEPTH_NO_DATA, DEPTH_OUT_OF_RANGE
 
Constructor Summary
MccDepthSystem(DepthControl depthControl)
           
 
Method Summary
 boolean canConfigure()
          Say whether ot not a particular sensor can be configured.
 boolean configureSensor(java.awt.Frame parentFrame)
          Configure one of the sensors.
 double getDepth(int iSensor)
          Get the depth (should be in meters)
 double getDepthRawData(int iSensor)
          Get the depth (should be in meters)
 java.io.Serializable getSettingsReference()
           
 long getSettingsVersion()
           
 java.lang.String getUnitName()
           
 java.lang.String getUnitType()
           
 boolean readSensor(int iSensor)
          Read all data from a sensor.
 boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
           
 boolean shouldPoll()
          DepthProcess should ask this system for data every so often if this return false, then the data are comign from somewhere beyond the immediate contron of Pamgaurd and we just wait for it to arrive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

depthControl

DepthControl depthControl

mccJniInterface

MccJniInterface mccJniInterface

mccDepthParameters

MccDepthParameters mccDepthParameters

rawValue

private double rawValue

depth

private double depth

errorCode

private int errorCode
Constructor Detail

MccDepthSystem

public MccDepthSystem(DepthControl depthControl)
Method Detail

canConfigure

public boolean canConfigure()
Description copied from interface: DepthSystem
Say whether ot not a particular sensor can be configured.

Specified by:
canConfigure in interface DepthSystem
Returns:
true if the sensor can be configured

configureSensor

public boolean configureSensor(java.awt.Frame parentFrame)
Description copied from interface: DepthSystem
Configure one of the sensors.

Specified by:
configureSensor in interface DepthSystem
Parameters:
parentFrame - owner frame for dialog
Returns:
true if configurations went Ok.

readSensor

public boolean readSensor(int iSensor)
Description copied from interface: DepthSystem
Read all data from a sensor. These data should be stored locally in the concrete class and will then be retreived with other get... functions.

Specified by:
readSensor in interface DepthSystem
Parameters:
iSensor - number of the sensor
Returns:
true if the read went OK.

getDepthRawData

public double getDepthRawData(int iSensor)
Description copied from interface: DepthSystem
Get the depth (should be in meters)

Specified by:
getDepthRawData in interface DepthSystem
Returns:
depth in meters. or DEPTH_OUT_OF_RANGE or DEPTH_NO_DATA

getDepth

public double getDepth(int iSensor)
Description copied from interface: DepthSystem
Get the depth (should be in meters)

Specified by:
getDepth in interface DepthSystem
Returns:
depth in meters. or DEPTH_OUT_OF_RANGE or DEPTH_NO_DATA

shouldPoll

public boolean shouldPoll()
Description copied from interface: DepthSystem
DepthProcess should ask this system for data every so often if this return false, then the data are comign from somewhere beyond the immediate contron of Pamgaurd and we just wait for it to arrive.

Specified by:
shouldPoll in interface DepthSystem
Returns:
true if the sensor needs to be polled.

getSettingsReference

public java.io.Serializable getSettingsReference()
Specified by:
getSettingsReference in interface PamSettings
Returns:
The serialisable object that will be stored

getSettingsVersion

public long getSettingsVersion()
Specified by:
getSettingsVersion in interface PamSettings
Returns:
An integer version number for the settings

getUnitName

public java.lang.String getUnitName()
Specified by:
getUnitName in interface PamSettings
Returns:
A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.

getUnitType

public java.lang.String getUnitType()
Specified by:
getUnitType in interface PamSettings
Returns:
A Name specific to the type, e.g. Glick detector

restoreSettings

public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
Specified by:
restoreSettings in interface PamSettings
Returns:
true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required