
#ifndef _DELTATINPUT_H
#define _DELTATINPUT_H

#include "SharedData.h"

#define DeltaTInputName "DeltaTInput_ShmemName"

/*
CLASS 
DeltaTInput

DESCRIPTION
Control variables for DeltaT driver

AUTHOR
Henthorn
*/
class DeltaTInput : public SharedData {

public:

  struct Data {
    Boolean enabled;
  };

  //DeltaTInput(Access access = NoAccess, Boolean init = False); 
  DeltaTInput(char* name = DeltaTInputName,
	      Access access = ReadWrite, Boolean init = False);
	      

  ~DeltaTInput();

  // A single function to build a unique name for the memory.
  // User passes in a suffix to append to DeltaTInputName, a buffer
  // to place the resulting name, and the length of the buffer.
  // Returns a pointer to the buffer as well.
  // Usage:
  //  char buf[100];
  //  _input = new DeltaTInput(DeltaTInput::makeName("suf",buf,sizeof(buf)));
  //
  static char* makeName(char* dest, char* suffix, int destlen);

  ////////////////////////////////////////////////////////////////////
  // 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();

  ////////////////////////////////////////////////////////////////////
  // Your application accesses the fields of this Data object, before 
  // calling write() or after calling read().
  Data data;

};

#endif
