FrelonModel.sip 2.49 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
namespace Frelon
{

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class Firmware
{

%TypeHeaderCode
#include "FrelonModel.h"
%End

 public:
	Firmware();
	Firmware(const std::string& ver);
	~Firmware();

	void setVersionStr(const std::string& ver);
	void getVersionStr(std::string& ver /Out/) const;

	void reset();
	bool isValid() const;

	int getMajor() const;
	int getMinor() const;
	std::string getRelease() const;

47
	static const Frelon::Firmware v2_0c;
48
49
	static const Frelon::Firmware v2_1b;
	static const Frelon::Firmware v3_0i;
50
	static const Frelon::Firmware v3_1c;
51
	static const Frelon::Firmware v4_1;
52
53
54

 private:
	Firmware(const Frelon::Firmware&);
55
56
57
};


58
59
60
61
62
63
64
65
class Model
{

%TypeHeaderCode
#include "FrelonModel.h"
%End

 public:
66
67
68
69
	enum Feature {
		Taper, HamaChip,
		ModesAvail, TimeCalc, HTDCmd, GoodHTD, ImagesPerEOF, CamChar,
		SPB1, SPB2, SPB8,
70
		SeqTim,
71
72
	};

73
74
75
	Model();
	~Model();

76
	void setVersionStr(const std::string& ver);
77
	const Frelon::Firmware& getFirmware();
78
79
80
81

	void setComplexSerialNb(int  complex_ser_nb);
	void getComplexSerialNb(int& complex_ser_nb /Out/);

82
83
84
	void setCamChar(int  cam_char);
	void getCamChar(int& cam_char /Out/);
	
Alejandro Homs Puron's avatar
Alejandro Homs Puron committed
85
86
87
	void setF16ForceSingle(bool  f16_force_single);
	void getF16ForceSingle(bool& f16_force_single /Out/);

88
89
90
91
92
	void reset();
	bool isValid();

	int  getSerialNb();
	int  getAdcBits();
93
94
95
	Frelon::ChipType getChipType();
	Frelon::SPBConType getSPBConType();
	Frelon::GeomType getGeomType();
96
	bool isFrelon16();
97
	bool isFrelon16Dual();
98
	bool has(Model::Feature feature);
99
100
101
	double getPixelSize();

	std::string getName();
102
103
104
	
 private:
	Model(const Frelon::Model&);
105
106
};

107
}; // namespace Frelon