damaris-backends/drivers/frequgen.h
2014-06-26 11:10:51 +00:00

65 lines
1.4 KiB
C++

/* **************************************************************************
Author: Achim Gaedke
Created: June 2004
****************************************************************************/
#ifndef FREQUGEN_H
#define FREQUGEN_H
#include "core/states.h"
#include "core/core_exception.h"
/**
\addtogroup basedrivers
@{
*/
/**
* frequency generator exception
*/
class frequ_exception: public RecoverableException
{
public:
explicit frequ_exception(const std::string& msg) throw (): RecoverableException(msg) {}
explicit frequ_exception(const char* msg) throw (): RecoverableException(msg) {}
virtual ~frequ_exception() throw () {}
protected:
virtual const std::string prefix() const { return "ERROR (frequ_exception): "; }
};
/**
\brief the frequency generator can set the reference frequency and pulse output
also phase shifts and different channels are possible
*/
class frequgen {
protected:
/** reference frequency output */
double frequency;
/**
default phase offset of the frequency generator
*/
double phase;
/**
should move to frequgen
*/
int pulse_channel;
/**
should move to frequgen
*/
int gate_channel;
/**
should move to frequgen
*/
double gate_time;
public:
virtual void set_frequency(double f)=0;
virtual void set_frequency(state& experiment)=0;
virtual ~frequgen() {}
};
/**
@}
*/
#endif