FrelonCamera.sip 4.62 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//###########################################################################
// This file is part of LImA, a Library for Image Acquisition
//
// Copyright (C) : 2009-2011
// European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
22
23
24
25
26
27
28
29
30
31
32
33
34

namespace Frelon
{

class Camera
{

%TypeHeaderCode
#include "FrelonCamera.h"
%End

 public:
	Camera(Espia::SerialLine& espia_ser_line);
35
	~Camera();
36

kirov's avatar
kirov committed
37
	Frelon::SerialLine& getSerialLine();
38
39
40

	void writeRegister(Frelon::Reg reg, int  val);
	void readRegister (Frelon::Reg reg, int& val /Out/);
41
	void readFloatRegister(Frelon::Reg reg, double& val /Out/);
42
43

	void hardReset();
44
	void getVersionStr(std::string& ver /Out/);
45
	void getComplexSerialNb(int& complex_ser_nb /Out/);
46
	Frelon::Model& getModel();
47

48
	bool getDefInputChan(Frelon::FrameTransferMode ftm, 
49
			     Frelon::InputChan& input_chan /Out/);
50
51
52
53
54
55
	void setInputChan(Frelon::InputChan  input_chan);
	void getInputChan(Frelon::InputChan& input_chan /Out/);

	void setFrameTransferMode(Frelon::FrameTransferMode  ftm);
	void getFrameTransferMode(Frelon::FrameTransferMode& ftm /Out/);

56
57
	std::string getInputChanModeName(Frelon::FrameTransferMode ftm, 
					 Frelon::InputChan input_chan);
58

59
	void getMaxFrameDim(FrameDim& max_frame_dim /Out/);
60
61
	void getFrameDim(FrameDim& frame_dim /Out/);

62
	bool isChanActive(Frelon::InputChan curr, Frelon::InputChan chan);
63

64
	void checkFlip(Flip& flip /In,Out/);
65
66
	void setFlip(const Flip& flip);
	void getFlip(Flip& flip /Out/);
67

68
	void checkBin(Bin& bin /In,Out/);
69
70
71
72
73
74
75
76
77
78
	void setBin(const Bin& bin);
	void getBin(Bin& bin /Out/);

	void setRoiMode(Frelon::RoiMode  roi_mode);
	void getRoiMode(Frelon::RoiMode& roi_mode /Out/);

	void checkRoi(const Roi& set_roi, Roi& hw_roi /Out/);
	void setRoi(const Roi& set_roi);
	void getRoi(Roi& hw_roi /Out/);

79
80
81
	void setRoiBinOffset(const Point& roi_bin_offset);
	void getRoiBinOffset(Point& roi_bin_offset /Out/);

82
83
84
85
86
87
	void setTrigMode(TrigMode  trig_mode);
	void getTrigMode(TrigMode& trig_mode /Out/);
	
	void setExpTime(double  exp_time);
	void getExpTime(double& exp_time /Out/);

88
89
90
	void setShutMode(Frelon::ShutMode  shut_mode);
	void getShutMode(Frelon::ShutMode& shut_mode /Out/);

91
92
93
	void setShutCloseTime(double  shut_time);
	void getShutCloseTime(double& shut_time /Out/);

94
95
96
97
98
99
100
	void setUserLatTime(double  lat_time);
	void getUserLatTime(double& lat_time /Out/);
	void getReadoutTime(double& readout_time /Out/);
	void getTransferTime(double& xfer_time /Out/);
	void getDeadTime(double& dead_time /Out/);
	void setTotalLatTime(double  lat_time);
	void getTotalLatTime(double& lat_time /Out/);
101
102
103
104

	void setNbFrames(int  nb_frames);
	void getNbFrames(int& nb_frames /Out/);

105
106
107
	void setSPB2Config(Frelon::SPB2Config  spb2_config);
	void getSPB2Config(Frelon::SPB2Config& spb2_config /Out/);

108
	std::string getSPB2ConfigName(Frelon::SPB2Config spb2_config);
109

110
111
112
113
114
	void setExtSyncEnable(Frelon::ExtSync  ext_sync_ena);
	void getExtSyncEnable(Frelon::ExtSync& ext_sync_ena /Out/);

	void getStatus(Frelon::Status& status /Out/, bool use_ser_line=false,
		       bool read_spb2=false);
115
	bool waitStatus(Frelon::Status& status /In,Out/, Frelon::Status mask, 
116
117
118
119
			double timeout, bool user_ser_line=false,
			bool read_spb2=false);

	void getImageCount(unsigned int& img_count /Out/, bool only_lsw=false);
120
	void getMissingExtStartPulses(int& missing_pulses /Out/);
121

122
	void prepare();
123
124
	void start();
	void stop();
125
	bool isRunning();
126

127
	bool needSeqTimMeasure();
128
	void latchSeqTimValues(Frelon::SeqTimValues& st /Out/);
129
130
131
	void measureSeqTimValues(Frelon::SeqTimValues& st /Out/, double timeout = -1);
	void setAutoSeqTimMeasure(bool  auto_measure);
	void getAutoSeqTimMeasure(bool& auto_measure /Out/);
132

133
134
135
136
	void registerDeadTimeChangedCallback(Frelon::DeadTimeChangedCallback& cb);
	void unregisterDeadTimeChangedCallback(Frelon::DeadTimeChangedCallback& cb);
	void registerMaxImageSizeCallback(HwMaxImageSizeCallback& cb);
	void unregisterMaxImageSizeCallback(HwMaxImageSizeCallback& cb);
137
138
139

 private:
	Camera(const Frelon::Camera&);
140
141
142
143
};


}; // namespace Frelon