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

#ifndef __CathxIF_H
#define __CathxIF_H

#include "TaskInterface.h"


#define CathxIFServerName "CathxIFServer"

/****************************************************************************/
/* Copyright (c) 2015 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CathxIF.idl                                                   */
/* Author   : Henthorn                                                      */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 09/06/2015                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
CLASS 
CathxIF

DESCRIPTION
TaskInterface to Cathx camera device server

*/
class CathxIF : public TaskInterface {

  friend class CathxIF_SK;

  public:

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

  
  
  struct Actions {
    short profileNumber;
    // Profile request; < 0 means no request 
    short imageCapture;
  };
  // Capture command; < 0 = noaction, 0 = stop, > 0 start 
  struct Data {
    CathxIF::CameraState cameraState;
    short profile;
  };
  CathxIF(const char *name, int timeout = 10);

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

  ~CathxIF();

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

  /////////////////////////////////////////////////////////
  // Request to perform actions.
  void actions(CathxIF::Actions *orders);

  
  protected:

  // Message codes for each method
  enum CathxIFMsgCode {
    GetMsgCode,
    ActionsMsgCode
  };

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

  struct ActionsMsg : Request, Reply {
    CathxIF::Actions orders;
  
  } _actionsMsg;

};

#endif

