/*
********************************************************
Copyright 2000 MBARI.
MBARI Proprietary Information. All rights reserved.
NOTE: This file is automatically generated.
DO NOT MODIFY.
********************************************************
*/

#ifndef __CameraIF_H
#define __CameraIF_H

#include "TaskInterface.h"


#define CameraIFServerName "CameraIFServer"

/****************************************************************************/
/* Copyright (c) 2006 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CameraIF.idl                                                  */
/* Author   : rsm, based on hjt code                                        */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 5/01/2008                                                     */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
CLASS 
CameraIF

DESCRIPTION
TaskInterface to Camera device sever

*/
class CameraIF : public TaskInterface {

  friend class CameraIF_SK;

  public:

  // Forward declarations of public structures
  struct Data;
  
  enum CameraState {
    Ready,
    Busy,
    Error
  };

  
  
  struct Data {
    CameraIF::CameraState cameraState;
    long nPhotos;
    //Number of photos to take. 
    long photoCntr;
    //Number of photos taken. 
    long nSamplePeriods;
    double distance;
    double dmg;
    Boolean onContinuously;
  };
  CameraIF(const char *name, int timeout = 10);

  CameraIF(const char *name, const char *serverName, int timeout = 10);

  ~CameraIF();

  /////////////////////////////////////////////////////////
  // Get all available data from the instrument.
  void get(CameraIF::Data *data);

  /////////////////////////////////////////////////////////
  // Start taking a specified number (nPhotos) of photos.
  void start(long nPhotos, long nSamplePeriods, double distance);

  /////////////////////////////////////////////////////////
  // Take photos continuously until commanded to stop.
  void onContinuously(long nSamplePeriods, double distance);

  /////////////////////////////////////////////////////////
  // Stop taking photos.
  void stop();

  
  protected:

  // Message codes for each method
  enum CameraIFMsgCode {
    GetMsgCode,
    StartMsgCode,
    OnContinuouslyMsgCode,
    StopMsgCode
  };

  // Define message structure for each method
  struct GetMsg : Request, Reply {
    CameraIF::Data data;
  
  } _getMsg;

  struct StartMsg : Request, Reply {
    long nPhotos;
    long nSamplePeriods;
    double distance;
  
  } _startMsg;

  struct OnContinuouslyMsg : Request, Reply {
    long nSamplePeriods;
    double distance;
  
  } _onContinuouslyMsg;

  struct StopMsg : Request, Reply {
  
  } _stopMsg;

};

#endif

