/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : Ips4Server.h                                                  */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 05/25/2001                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _Ips4Server_H
#define _Ips4Server_H
#include "Ips4IF_SK.h"
#include "Ips4Input.h"
#include "Ips4Output.h"
#include "SerialParameters.h"
#include "Ips4IF.h"
#include "DeviceInterface.h"
#include "DeviceIF.h"

class Ips4Server : public Ips4IF_SK {

public:

  Ips4Server(const char *driverName, SerialParameters *serialParams);
  ~Ips4Server();

  virtual DeviceIF::Status start(); 
  virtual DeviceIF::Status stop();

  virtual DeviceIF::Status startProfile(); 
  virtual DeviceIF::Status stopProfile();

  /////////////////////////////////////////////////////////////////////////
  // get_ice_draft() - compute the icedraft using the following inputs
  //
  //	patm    - estimated value of the atmospheric pressure (in bars)
  //    nelem   - number of elements in CTD array
  //	cond    - pointer to conductivity array (C(S,T,0)/C(35,T,0))
  //	temp    - pointer to temperature array (degress Celsius)
  //	pres    - pointer to pressure array (absolute pressure in bars)
  //
  // output:
  //      ice_draft- address of double to place calculated ice draft
  //
  virtual DeviceIF::Status get_ice_draft(double patm, short nelem, double cond[],
					 double temp[], double pres[],
					 double *ice_draft);
  

protected:

  Ips4Output *_output;
  Ips4Input  *_input;
  char *_driverName;
  SerialParameters *_serialParams;

  virtual void name(DeviceIF::Name name);
  virtual void serialNumber(DeviceIF::Name id);
  virtual DeviceIF::Status initialize();
  virtual DeviceIF::Status powerOn();
  virtual DeviceIF::Status powerOff();
  virtual DeviceIF::Status status();
  virtual DeviceIF::Status dataLoggingOn();
  virtual DeviceIF::Status dataLoggingOff();

  virtual int spawnAuxTasks();
};

#endif
