/****************************************************************************/
/* Copyright (c) 2008 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CameraServer.h                                                */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 05/01/2008                                                       */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _CameraServer_H
#define _CameraServer_H
#include <process.h>
#include "CameraIF_SK.h"
#include "CameraOutput.h"
#include "SerialParameters.h"

/** Implements camera interface to other AUV drivers */
class CameraServer: public CameraIF_SK {

public:

  CameraServer(const char *name);
  CameraServer(const char *driverName, SerialParameters *serialParams, 
	       Boolean test=False, Boolean sim=False);
  ~CameraServer();


protected:

  virtual void start(long nPhotos, long nSamplePeriods, double distance);
  virtual void onContinuously(long nSamplePeriods, double distance);
  virtual void stop();
  virtual void get( CameraIF::Data *data );
  virtual int spawnAuxTasks();


private:
  /** Camera output */
  CameraOutput *_cameraOutput;
  /** Serial IO parameters */
  SerialParameters *_serialParams;
  /** Driver name */
  const char *_driverName;
  /** test if TRUE */
  Boolean _test;
  Boolean _sim;
};

#endif
