Frelon.h 2.73 KB
Newer Older
1
2
3
4
5
6
#ifndef FRELON_H
#define FRELON_H

#include "EspiaSerialLine.h"
#include <string>
#include <map>
ahoms's avatar
ahoms committed
7
#include <vector>
8
9
10
11

namespace lima
{

12
namespace Frelon
13
14
{

15
enum Reg {
ahoms's avatar
ahoms committed
16
	NbFrames,	ExpTime,	ShutCloseTime,	LatencyTime,
17
18
19
20
	RoiLineBegin,	RoiLineWidth,	RoiPixelBegin,	RoiPixelWidth,
	ChanMode,	TimeUnit,	RoiEnable,	RoiFast, 
	AntiBloom,	BinVert,	BinHorz,	ConfigHD,
	RoiKinetic,	ShutEnable,	HardTrigDisable,
21
	PixelFreq,	LineFreq,	FlipMode,	IntCalib,
22
23
24
25
	DisplayImage,	AdcFloatDiode,	AdcSignal,	
	DarkPixelCalib,	DarkPixelMode,	ChanControl,	Mire,
	AoiLineBegin,	AoiLineWidth,	AoiPixelBegin,	AoiPixelWidth,
	AoiImageHeight,	AoiImageWidth,	ChanOnImage,	ChanOnCcd,
26
27
28
29
	Version,	CompSerNb,	Warn,		LastWarn,
	LineClockPer,	PixelClockPer,	FirstPHIVLen,	PHIHSetupLen,
	SingleVertXfer,	SingleHorzXfer,	AllVertXfer,	AllHorzXfer,
	ReadoutTime,	TransferTime,   CcdModesAvail,
30
};
31

ahoms's avatar
ahoms committed
32
33
34
typedef std::map<Reg, std::string> RegStrMapType;
extern RegStrMapType RegStrMap;

35
typedef std::vector<Reg> RegListType;
36
extern RegListType CacheableRegList;
37
38

extern const int MaxRegVal;
39

40
41
42
enum Cmd {
	Reset,		Start,		Stop,		Save,
};
43

ahoms's avatar
ahoms committed
44
45
46
typedef std::map<Cmd, std::string> CmdStrMapType;
extern CmdStrMapType CmdStrMap;

47

48
49
enum MultiLineCmd {
	Help,		Config,		Dac,		Volt,
50
	Aoi,		PLL,		Timing,
51
52
};

ahoms's avatar
ahoms committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
typedef std::map<MultiLineCmd, std::string> MultiLineCmdStrMapType;
extern MultiLineCmdStrMapType MultiLineCmdStrMap;


enum FrameTransferMode {
	FFM = 0, FTM = 1,
};

enum InputChan {
	Chan1    = (1 << 0),
	Chan2    = (1 << 1),
	Chan3    = (1 << 2),
	Chan4    = (1 << 3),
	Chan13   = Chan1  | Chan3,
	Chan24   = Chan2  | Chan4,
	Chan12   = Chan1  | Chan2,
	Chan34   = Chan3  | Chan4,
	Chan1234 = 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;


enum SerNbParam {
	SerNb = 0x00ff,
	F4M   = 0x2000,
	F2k16 = 0x4000,
	Taper = 0x8000,
};

enum RoiMode {
	None, Slow, Fast, Kinetic,
};

93
94
95
96
97
98
99
100
enum TimeUnitFactor {
	Milliseconds, Microseconds,
};

typedef std::map<TimeUnitFactor, double> TimeUnitFactorMapType;
extern TimeUnitFactorMapType TimeUnitFactorMap;


ahoms's avatar
ahoms committed
101
102
extern const FrameDim MaxFrameDim;

103
104
105
enum ChipType {
	Atmel,
	Kodak,
106
	E2V,
107
108
109
110
111
112
113
114
115
};

typedef std::map<ChipType, double> ChipPixelSizeMapType;
extern ChipPixelSizeMapType ChipPixelSizeMap;

enum {
	MaxBinX = 8,
	MaxBinY = 1024,
};
116

117
118
119
120
121
122
123
124
125
126
127
enum Status {
        Wait     = 0x80,
        Transfer = 0x40,
        Exposure = 0x20,
        Shutter  = 0x10,
        Readout  = 0x08,
        Latency  = 0x04,
        ExtStart = 0x02,
        ExtStop  = 0x01,
};

128

129
130
} // namespace Frelon

131
132
133
} // namespace lima

#endif // FRELON_H