38 lines
731 B
C++
38 lines
731 B
C++
#ifndef GENERATOR_H
|
|
#define GENERATOR_H
|
|
|
|
#include "hw_global.h"
|
|
|
|
#include <QDateTime>
|
|
|
|
#include "hw/gtl_hw_device.h"
|
|
#include "hw/gtl_hw_generator_analog_input.h"
|
|
|
|
namespace gtl
|
|
{
|
|
namespace hw
|
|
{
|
|
class HW_EXPORT generator : public gtl::hw::device
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit generator(QObject *parent = nullptr);
|
|
virtual ~generator();
|
|
|
|
virtual QString type() const;
|
|
|
|
virtual bool start(QString id, qreal rate);
|
|
virtual bool stop();
|
|
|
|
private:
|
|
void run();
|
|
virtual analog_input* create_ai(int idx);
|
|
|
|
private:
|
|
std::vector<qreal> _buffer;
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif // GENERATOR_H
|