Class CalibrationHandler

java.lang.Object
tethys.CollectionHandler
tethys.calibration.CalibrationHandler
All Implemented Interfaces:
TethysStateObserver

public class CalibrationHandler extends CollectionHandler implements TethysStateObserver
  • Field Details Link icon

    • updateOptions Link icon

      public static final String[] updateOptions
    • calibrationMethods Link icon

      public static final String[] calibrationMethods
    • qaTypes Link icon

      public static final String[] qaTypes
    • helpPoint Link icon

      public static final String helpPoint
      See Also:
  • Constructor Details Link icon

    • CalibrationHandler Link icon

      public CalibrationHandler(TethysControl tethysControl)
      Parameters:
      tethysControl -
  • Method Details Link icon

    • updateState Link icon

      public void updateState(TethysState tethysState)
      Description copied from interface: TethysStateObserver
      Receive state updates when Tethys has done something (made a connection, moved some data, etc.)
      Note that this is for RECEIVING state updates, not for sending them. To avoid infinite notifications loops, use tethysControl.sendStateUpdate(TethysState) to send out state notifications.
      Specified by:
      updateState in interface TethysStateObserver
    • exportAllCalibrations Link icon

      public int exportAllCalibrations()
    • formatDate Link icon

      public static String formatDate(long timeInMillis)
      Format the data in the dd MMMM yyyy format
      Parameters:
      timeInMillis - time in milliseconds
      Returns:
      formatted string.
    • createCalibrationDocumentRoot Link icon

      public String createCalibrationDocumentRoot()
      Get a start of name for a calibration document. This will be used in the document name with a date and a channel, and the document Id just of the root and the channel.
      Returns:
      root string for document names and document id's.
    • createCalibrationDocument Link icon

      public nilus.Calibration createCalibrationDocument(int channelIndex)
      Create a calibration document for a single hydrophone channel.
      Parameters:
      channelIndex - channel id. One document per channel for a multi hydrophone array.
      pDeployment - deployment, for cross referencing.
      Returns:
      Calibration document.
    • createCalibrationDocument Link icon

      public nilus.Calibration createCalibrationDocument(AcquisitionControl soundAcquisition, int channelIndex)
      Create a calibration document for a single hydrophone channel.
      Parameters:
      soundAcquisition - Daq information - needed to get the ADC calibration information.
      channelIndex - channel id. One document per channel for a multi hydrophone array.
      pDeployment - deployment, for cross referencing.
      Returns:
      Calibration document.
    • calDocumentExists Link icon

      public boolean calDocumentExists(String documentName)
      See if a document already exists. This should only occur if you try to export the same document twice with the same calibration date.
      Parameters:
      documentName -
      Returns:
      true if a document already exists.
    • haveAllChannelCalibrations Link icon

      public boolean haveAllChannelCalibrations()
      Return if we have at least one document for every channel.
      Returns:
      true if all cal documents exist.
    • haveChannelCalibration Link icon

      public boolean haveChannelCalibration(int iChan)
      Find whether we have a document for this instrument and channel.
      Parameters:
      iChan -
      Returns:
      true if we have an appropriate doc.
    • getHydrophoneId Link icon

      public String getHydrophoneId(int channelIndex)
      Get an id based on the instrument identifiers and channel number. This is the internal id of the document, not the document name which includes an additional date part in the name.
      Parameters:
      channelIndex -
      Returns:
      id string - instrument type + instrument id + channel
    • makeChannelNamePart Link icon

      public String makeChannelNamePart(int channelIndex)
      Make the final part of the document name / id which is the channel number.
      Parameters:
      channelIndex - channel index
      Returns:
      string in the form ch%02d (e.g. ch03)
    • getCalibrationDataList Link icon

      public ArrayList<DocumentNilusObject<nilus.Calibration>> getCalibrationDataList()
      Returns:
      the calibrationDataBlock
    • getHelpPoint Link icon

      public String getHelpPoint()
      Specified by:
      getHelpPoint in class CollectionHandler