PilatusCamera.sip 2.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace Pilatus
{
  class Camera
  {
%TypeHeaderCode
#include <PilatusInterface.h>
#include <PilatusCamera.h>
%End
  public:
    enum Status
      {
        ERROR,
        DISCONNECTED,
        STANDBY,
        SETTING_ENERGY,
        SETTING_THRESHOLD,
        SETTING_EXPOSURE,
        SETTING_NB_IMAGE_IN_SEQUENCE,
        SETTING_EXPOSURE_PERIOD,
        SETTING_HARDWARE_TRIGGER_DELAY,
        SETTING_EXPOSURE_PER_FRAME,
22
        SETTING_ROI,
23
        KILL_ACQUISITION,
24
25
        RUNNING,
	RESET_HIGH_VOLTAGE
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
      };

    enum Gain
      {
        DEFAULT_GAIN,
        LOW,
        MID,
        HIGH,
        UHIGH
      };

    enum TriggerMode
      {
        INTERNAL_SINGLE,
        INTERNAL_MULTI,
        EXTERNAL_SINGLE,
        EXTERNAL_MULTI,
        EXTERNAL_GATE
      };

46
    Camera(const char *host = "localhost",int port = 41234);
47
48
49
50
51
52
53
54
    ~Camera();
    
    void connect(const char* host,int port);
    
    const char* serverIP() const;
    int serverPort() const;

    void setImgpath(const std::string& path);
55
    const std::string& imgpath() const;
56
57
    
    void setFileName(const std::string& name);
58
    const std::string& fileName() const;
59
60
61
62
63
64
65
66
67
68
    
    Status status() const;

    double energy() const;
    void setEnergy(double val);

    int threshold() const;
    Pilatus::Camera::Gain gain() const;
    void setThresholdGain(int threshold,
			  Pilatus::Camera::Gain gain = DEFAULT_GAIN);
69
    void setThreshold(int threshold,int energy = -1);
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

    double exposure() const;
    void setExposure(double expo);

    double exposurePeriod() const;
    void setExposurePeriod(double expo_period);

    int nbImagesInSequence() const;
    void setNbImagesInSequence(int nb);

    double hardwareTriggerDelay() const;
    void setHardwareTriggerDelay(double);

    int nbExposurePerFrame() const;
    void setNbExposurePerFrame(int);

    TriggerMode triggerMode() const;
    void setTriggerMode(TriggerMode);

    void startAcquisition(int image_number = 0);
    void stopAcquisition();
91
    void errorStopAcquisition();
92
93
94
95
96
97
98
99

    bool gapfill() const;
    void setGapfill(bool onOff);
    
    void send(const std::string& message);
    
    void sendAnyCommand(const std::string& message);    

100
    int nbAcquiredImages() const;
101
    void version(int& major /Out/,int& minor /Out/,int& patch /Out/) const;
102
103
104

    bool hasRoiCapability() const;
    void setRoi(const std::string&);
105
106

    bool hasHighVoltageReset();
107
    void resetHighVoltage(unsigned int sleeptime = 1);
108
109
   };
};