PylonRecorder/singlecamwrapper.h

45 lines
991 B
C++

#ifndef SINGLECAMWRAPPER_H
#define SINGLECAMWRAPPER_H
#include <pylon/PylonIncludes.h>
#include <pylon/BaslerUniversalInstantCamera.h>
#include "mylogger.h"
#include "util.h"
#include "myimage.h"
class SingleCamWrapper
{
public:
SingleCamWrapper(const std::string &name);
SingleCamWrapper(const CameraLayout &layout);
~SingleCamWrapper();
ImageSettings getImageSettings();
bool isOpen();
void terminate();
bool openCamera(std::string &message);
void closeCamera();
bool grabFrame(MyImage &img);
bool frameRate(uint framerate);
double frameRate();
double maxFrameRate();
double exposureTime();
bool exposureTime(double exposure_time);
double gain();
bool gain(double gain_db);
QString userName();
Pylon::CInstantCamera *getCamera();
void resetCamera();
private:
Pylon::CInstantCamera *camera;
bool valid, withLayout;
std::string fullName;
CameraLayout layout;
};
#endif // SINGLECAMWRAPPER_H