areaDetector  3-5-0
EPICS areaDetector framework
siliconSoftware.h
Go to the documentation of this file.
1 
8 #ifdef USE_SISW
9 
10 #ifndef _siSoftware_H
11 #define _siSoftware_H
12 
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16 #include "time.h"
17 
18 //#include "board_and_dll_chooser.h"
19 #include "grabberInterface.h"
20 #include "fgrab_struct.h"
21 #include "fgrab_prototyp.h"
22 #include "fgrab_define.h"
23 //#include "SapClassGui.h"
24 
25 #include "logfile.h"
26 
27 //#include <AncDlgLogo.h>
28 
29 #ifndef WIN32
30 
31 #define TRUE true
32 #define FALSE false
33 
34 #endif
35 
44 class siSoftware : public grabberInterface {
45  // Construction
46  public:
47  siSoftware(bool is_use_fpga); // standard constructor
48 
49  int getGrabberType();
50 
51  bool CreateObjects();
52  bool DestroyObjects();
54  void GetSignalStatus();
55  void setCamController(void *cc);
56 
57  virtual bool initialize(int size_x, int size_y);
58  // use to override the image size in the ccf file.
59  virtual bool initialize(int size_x, int size_y, bool is_force_size);
60  void setConfigFileName(char *name);
61  // set CC pins on the card.
62  void setPin(char *pinstr, int val);
63  void snap();
64  void grab();
65  void freeze();
66  void abort();
67  bool isFrameAvailable(void);
68  bool getFrame(void *mem_ptr);
69  bool getFrame(void *mem_ptr, unsigned int *siSoftware_timestamp);
70  bool getFrame(void *copy_memory, unsigned int *siSoftware_timestamp,
71  int nbytes);
72 
73  bool isMissedFrame(void);
74  void clearMissedFrames(void);
75  long getTotalMissedFrames(void);
76  long getRecentMissedFrames(void);
77  void setNumBuffers(int b);
78  void makeView(void);
79  void setDoubleWidth(int isdw);
80 
81  int getWidth(void);
82  int getHeight(void);
83 
84  // clears any images left in buffer memory by resetting all counters to 0
85  void resetBufferCount(void){};
86 
87  int getNumFreeBuffers(void);
88  int getNumBuffers(void);
89 
90  // inc missed frames counter
91  void incMissedFrames(void);
92 
93  bool is_force_size;
94 
95  bool is_destroyed;
96 
97  static volatile long frames_to_cpu;
98  static volatile long frame_count;
99  static volatile long missed_frames;
100  static volatile long recent_missed_frames;
101  static volatile bool is_missed_frame;
102 
103  static volatile int sap_buffer_count;
104  volatile int sensor_width;
105  volatile int sensor_height;
106  volatile int num_buffers;
107 
108  bool is_blocking;
109 
110  bool is_rst_server;
111 
112  bool m_IsSignalDetected; // TRUE if camera signal is detected
113 
114  int acq_device_number;
115 
116  char camera_format_file[256];
117  // char fpga_file[256];
118  char acq_server_name[256];
119  char device_name[256];
120  // SapView *m_View;
121  static siSoftware *mycard;
122 
123  int dispId0;
124  int boardNr;
125  Fg_Struct *fg;
126  void *ptrMem;
127  size_t totalBufferSize;
128  int camPort;
129  bool is_display;
130 
131  // if we grab 16 bit pix in 8 bit mode, as in edge, we have to doub width.
132  // othersize we don't worry about it..
133  double is_doub_width;
134 
135  int dbg_last_imgnum;
136 
137  log_file lf;
138 
139  // true of we have special siso fpga fw (dll or hapfile) for edge global shut
140  bool is_edge_globalshut;
141  int act_sccmos_version;
142 
143  enum { HAP_VERSION_NOISE = 12 };
144 };
145 
146 #endif // !defined(AFX_ANCROTATIONDEMODLG_H__82BFE149_F01E_11D1_AF74_00A0C91AC0FB__INCLUDED_)
147 
148 #endif
virtual void grab()=0
virtual int getGrabberType()=0
virtual void snap()=0
Virtual class to represent any vendor frame grabber.
Definition: grabberInterface.h:13
virtual int getHeight(void)=0
virtual void setConfigFileName(char *name)=0
name
Definition: makeDbAndEdl.py:232
virtual long getRecentMissedFrames(void)=0
virtual void setCamController(void *cc)=0
virtual bool DestroyObjects()=0
virtual long getTotalMissedFrames(void)=0
virtual bool isMissedFrame(void)=0
virtual void resetBufferCount(void)=0
virtual bool DestroyObjectsNoDelete()=0
virtual void clearMissedFrames(void)=0
virtual int getNumBuffers(void)=0
Class LOG_FILE.
Definition: logfile.h:38
virtual int getNumFreeBuffers(void)=0
virtual bool getFrame(void *mem_ptr)=0
virtual bool CreateObjects()=0
virtual void setNumBuffers(int b)=0
virtual void incMissedFrames(void)=0
virtual void setDoubleWidth(int isdw)=0
virtual void GetSignalStatus()=0
virtual int getWidth(void)=0
virtual void freeze()=0
virtual bool initialize(int size_x, int size_y)=0
virtual bool isFrameAvailable(void)=0
virtual void abort()=0
virtual void setPin(char *pinstr, int val)=0
virtual void makeView(void)=0