/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : SeabirdOutput.h                                                   */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/* 09/08/2014 Renamed file from original Seabird files, and began           */
/* 			  refactoring so that this driver can support the seabird       */
/*            25plus system.  EJM                                           */
/****************************************************************************/

#ifndef _SeabirdOutput_H
#define _SeabirdOutput_H

#include <time.h>
#include "SharedData.h"

#define SeabirdOutputName "SeabirdOutput_ShmemName"

/*
CLASS 
SeabirdOutput

DESCRIPTION
Ouput of Ctd driver

AUTHOR
Tom O'Reilly
*/
class Seabird25pOutput : public SharedData {

public:

  struct Data {

    // Indicates that device is initialized and ready
    Boolean deviceReady;

    timespec temp_updateTime;
    timespec cond_updateTime;
    float tfreq;
    float cfreq;
    float conductivity;
    float temperature;
    float salinity;
    float depth;
    float pressure;
    float voltages[8];
    char *v1name;
    char *v2name;
    char *v3name;
    char *v4name;
    char *v5name;
    char *v6name;
    char *v7name;
    char *v8name;
  };

  Seabird25pOutput(char *name, Access access = NoAccess, Boolean init = False);

  ~Seabird25pOutput();


  ////////////////////////////////////////////////////////////////////
  // Read from shared memory to this object's Data::data element
  void read();

  ////////////////////////////////////////////////////////////////////
  // Write from this object's Data::data element to shared memory
  void write();

  Data data;

};

#endif
