Frelon.sip 5.46 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

namespace Frelon
{

%TypeHeaderCode
#include "Frelon.h"
28
#include "lima/MiscUtils.h"
29
30
31
32
#ifndef LIMA_SIP_FRELON_GLOBAL_DEFINED
#define LIMA_SIP_FRELON_GLOBAL_DEFINED
namespace lima { namespace Frelon { class Global {}; } }
#endif 
33
34
35
36
37
38
39
40
%End

enum Reg {
	NbFrames,	ExpTime,	ShutCloseTime,	LatencyTime,
	RoiLineBegin,	RoiLineWidth,	RoiPixelBegin,	RoiPixelWidth,
	ChanMode,	TimeUnit,	RoiEnable,	RoiFast, 
	AntiBloom,	BinVert,	BinHorz,	ConfigHD,
	RoiKinetic,	ShutEnable,	HardTrigDisable,
41
	PixelFreq,	LineFreq,	FlipMode,	IntCalib,
42
43
44
45
	DisplayImage,	AdcFloatDiode,	AdcSignal,	
	DarkPixelCalib,	DarkPixelMode,	ChanControl,	Mire,
	AoiLineBegin,	AoiLineWidth,	AoiPixelBegin,	AoiPixelWidth,
	AoiImageHeight,	AoiImageWidth,	ChanOnImage,	ChanOnCcd,
46
47
48
	Version,	CompSerNb,	Warn,		LastWarn,
	LineClockPer,	PixelClockPer,	FirstPHIVLen,	PHIHSetupLen,
	SingleVertXfer,	SingleHorzXfer,	AllVertXfer,	AllHorzXfer,
49
50
	ReadoutTime,	TransferTime,   CcdModesAvail,	StatusSeqA,
	StatusAMTA,	StatusAMTB,	StatusAMTC,	StatusAMTD,
51
	LookUpTable,	ImagesPerEOF,
52
53
54
55
};
/*
typedef std::map<Reg, std::string> RegStrMapType;
extern RegStrMapType RegStrMap;
56
57
58
59
60
61
62
*/
class Global
{
public:
	static std::map<int, std::string> RegStrMap();
%MethodCode
	typedef std::map<int, std::string> MapType;
63
64
	sipRes = new MapType(Frelon::RegStrMap.begin(), 
			     Frelon::RegStrMap.end());
65
66
%End
};
67

68
/*
69
typedef std::vector<Reg> RegListType;
70
71
72
73
74
extern RegListType CacheableRegList;
extern RegListType FloatRegList;

typedef std::map<Reg, double> RegDoubleMapType;
extern RegDoubleMapType RegSleepMap;
75
*/
76

77
78
const int MaxRegVal;

79
enum Cmd {
80
	Reset,		Start,		Stop,		Save,		Reload,
81
	SendEOF,
82
};
83
/*
84
85
typedef std::map<Cmd, std::string> CmdStrMapType;
extern CmdStrMapType CmdStrMap;
86
*/
87
88
89

enum MultiLineCmd {
	Help,		Config,		Dac,		Volt,
90
	Aoi,		PLL,		Timing,		StatusCam,
91
};
92
/*
93
94
95
96
97
98
99
typedef std::map<MultiLineCmd, std::string> MultiLineCmdStrMapType;
extern MultiLineCmdStrMapType MultiLineCmdStrMap;
*/

enum FrameTransferMode {
	FFM = 0, FTM = 1,
};
100
101
102
103
/*
typedef std::map<FrameTransferMode, std::string> FTMStrMapType;
extern FTMStrMapType FTMNameMap;
*/
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

enum InputChan {
	Chan1    = 1 /*(1 << 0)*/,
	Chan2    = 2 /*(1 << 1)*/,
	Chan3    = 4 /*(1 << 2)*/,
	Chan4    = 8 /*(1 << 3)*/,
	Chan13   = 5 /*Chan1  | Chan3*/,
	Chan24   = 10 /*Chan2  | Chan4*/,
	Chan12   = 3 /*Chan1  | Chan2*/,
	Chan34   = 12 /*Chan3  | Chan4*/,
	Chan1234 = 15 /*Chan12 | Chan34*/,
};
/*
typedef std::pair<int, int> ChanRange;
typedef std::map<FrameTransferMode, ChanRange> FTMChanRangeMapType;
extern FTMChanRangeMapType FTMChanRangeMap;

typedef std::vector<InputChan> InputChanList;
typedef std::map<FrameTransferMode, InputChanList> FTMInputChanListMapType;
extern FTMInputChanListMapType FTMInputChanListMap;
124
*/
125
126

enum SerNbParam {
127
128
129
130
131
132
	SerNb      = 0x00ff,
	SPB1Kodak  = 0x2000,
	SPB1Adc16  = 0x4000,
	SPB2Sign   = 0x0100,
	SPB2Type   = 0x7000,
	Taper      = 0x8000,
133
};
134

135
136
137
enum RoiMode {
	None, Slow, Fast, Kinetic,
};
138

139
140
141
enum TimeUnitFactor {
	Milliseconds, Microseconds,
};
142
/*
143
144
145
146
typedef std::map<TimeUnitFactor, double> TimeUnitFactorMapType;
extern TimeUnitFactorMapType TimeUnitFactorMap;


147
*/
148
149
150
enum ChipType {
	Atmel,
	Kodak,
151
152
153
154
155
	E2V_2k,
	E2V_2kNotMPP,
	E2V_4k,
	E2V_4kNotMPP,
	Hama,
156
};
157
/*
158
159
160
typedef std::map<ChipType, FrameDim> ChipMaxFrameDimMapType;
extern ChipMaxFrameDimMapType ChipMaxFrameDimMap;

161
162
typedef std::map<ChipType, double> ChipPixelSizeMapType;
extern ChipPixelSizeMapType ChipPixelSizeMap;
163
*/
164
165
166
167
168
enum {
	AtmelModesAvail = 0x0fff,
	KodakModesAvail = 0x0100,
};

169
170
171
172
enum {
	MaxBinX = 8,
	MaxBinY = 1024,
};
173

174
175
176
177
178
179
180
enum ExtSync {
	ExtSyncNone  = 0,
	ExtSyncStart = 1,
	ExtSyncStop  = 2,
	ExtSyncBoth  = 3,
};

181
enum Status {
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
	InInit     = 0x200,
	EspiaXfer  = 0x100,
        Wait       = 0x080,
        Transfer   = 0x040,
        Exposure   = 0x020,
        Shutter    = 0x010,
        Readout    = 0x008,
        Latency    = 0x004,
        ExtStart   = 0x002,
        ExtStop    = 0x001,
	StatusMask = 0x3ff,
};

enum StatusSPB2 {
	SPB2_GBitFifoPixEmpty = 0x8000,
	SPB2_FifoOutEmpty     = 0x4000,
	SPB2_FifoInEmpty      = 0x2000,
	SPB2_FifoLUTEmpty     = 0x1000,
	SPB2_FifoChan4Empty   = 0x0800,
	SPB2_FifoChan3Empty   = 0x0400,
	SPB2_FifoChan2Empty   = 0x0200,
	SPB2_FifoChan1Empty   = 0x0100,
	SPB2_TstEnvFrmOut     = 0x0040,
	SPB2_TstEnvFrmIn      = 0x0020,
	SPB2_TstEnvMask       = 0x0060,
	SPB2_TstFlashUsrReady = 0x0010,
	SPB2_EndInitRam       = 0x0008,
	SPB2_EndFlashRead     = 0x0004,
	SPB2_AuroraChanUp     = 0x0002,
	SPB2_DcmLocked        = 0x0001,
	SPB2_TstInitMask      = 0x001f,
	SPB2_TstInitGood      = 0x001f,
214
215
};

216
217
218
219
enum ShutMode {
	Off, AutoFrame,
};

220
221
222
enum SPB2Config {
	SPB2Precision, SPB2Speed,
};
223
224

}; // namespace Frelon