forked from algebrato/PenguinSBIG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbigudrv.h
1656 lines (1444 loc) · 31.7 KB
/
sbigudrv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
SBIGUDRV.H
Contains the function prototypes and enumerated constants
for the Universal Parallel/USB/Ethernet driver.
This supports the following devices:
ST-7E/8E/9E/10E
ST-5C/237/237A (PixCel255/237)
ST-1K, ST-2K, ST-4K
STL Large Format Cameras
ST-402 Family of Cameras
AO-7, AOL, AO-8
CFW-8, CFW-9, CFW-10, CFW-L
ST Focuser
STX Cameras
ST-8300 Cameras
STF-8300 Cameras
ST-i Cameras
STT Cameras (Preliminary)
Differential Guider Accessory (Preliminary)
FW5-8300, FW8-8300
Version 4.75 - March 27, 2012
(c)1995-2012 - Santa Barbara Instrument Group
*/
#ifndef _PARDRV_
#define _PARDRV_
/*
SBIG Specific Code
*/
#ifndef TARGET
#define ENV_WIN 1 /* Target for Windows environment */
#define ENV_WINVXD 2 /* SBIG Use Only, Win 9X VXD */
#define ENV_WINSYS 3 /* SBIG Use Only, Win NT SYS */
#define ENV_ESRVJK 4 /* SBIG Use Only, Ethernet Remote */
#define ENV_ESRVWIN 5 /* SBIG Use Only, Ethernet Remote */
#define ENV_MACOSX 6 /* SBIG Use Only, Mac OSX */
#define ENV_LINUX 7 /* SBIG Use Only, Linux */
#define ENV_NIOS 8 /* SBIG Use Only, Embedded NIOS */
#define TARGET ENV_WIN /* Set for your target */
#endif
/*
Enumerated Constants
Note that the various constants are declared here as enums
for ease of declaration but in the structures that use the
enums unsigned shorts are used to force the various
16 and 32 bit compilers to use 16 bits.
*/
/*
Supported Camera Commands
These are the commands supported by the driver.
They are prefixed by CC_ to designate them as
camera commands and avoid conflicts with other
enums.
Some of the commands are marked as SBIG use only
and have been included to enhance testability
of the driver for SBIG.
*/
typedef enum
{
/*
General Use Commands
*/
CC_NULL,
/* 1 - 10 */
CC_START_EXPOSURE = 1,
CC_END_EXPOSURE,
CC_READOUT_LINE,
CC_DUMP_LINES,
CC_SET_TEMPERATURE_REGULATION,
CC_QUERY_TEMPERATURE_STATUS,
CC_ACTIVATE_RELAY,
CC_PULSE_OUT,
CC_ESTABLISH_LINK,
CC_GET_DRIVER_INFO,
/* 11 - 20 */
CC_GET_CCD_INFO,
CC_QUERY_COMMAND_STATUS,
CC_MISCELLANEOUS_CONTROL,
CC_READ_SUBTRACT_LINE,
CC_UPDATE_CLOCK,
CC_READ_OFFSET,
CC_OPEN_DRIVER,
CC_CLOSE_DRIVER,
CC_TX_SERIAL_BYTES,
CC_GET_SERIAL_STATUS,
/* 21 - 30 */
CC_AO_TIP_TILT,
CC_AO_SET_FOCUS,
CC_AO_DELAY,
CC_GET_TURBO_STATUS,
CC_END_READOUT,
CC_GET_US_TIMER,
CC_OPEN_DEVICE,
CC_CLOSE_DEVICE,
CC_SET_IRQL,
CC_GET_IRQL,
/* 31 - 40 */
CC_GET_LINE,
CC_GET_LINK_STATUS,
CC_GET_DRIVER_HANDLE,
CC_SET_DRIVER_HANDLE,
CC_START_READOUT,
CC_GET_ERROR_STRING,
CC_SET_DRIVER_CONTROL,
CC_GET_DRIVER_CONTROL,
CC_USB_AD_CONTROL,
CC_QUERY_USB,
/* 41 - 50 */
CC_GET_PENTIUM_CYCLE_COUNT,
CC_RW_USB_I2C,
CC_CFW,
CC_BIT_IO,
CC_USER_EEPROM,
CC_AO_CENTER,
CC_BTDI_SETUP,
CC_MOTOR_FOCUS,
CC_QUERY_ETHERNET,
CC_START_EXPOSURE2,
/* 51 - 60 */
CC_SET_TEMPERATURE_REGULATION2,
CC_READ_OFFSET2,
CC_DIFF_GUIDER,
CC_COLUMN_EEPROM,
CC_CUSTOMER_OPTIONS,
CC_DEBUG_LOG,
CC_QUERY_USB2,
CC_QUERY_ETHERNET2,
/*
SBIG Use Only Commands
*/
CC_SEND_BLOCK = 90,
CC_SEND_BYTE,
CC_GET_BYTE,
CC_SEND_AD,
CC_GET_AD,
CC_CLOCK_AD,
CC_SYSTEM_TEST,
CC_GET_DRIVER_OPTIONS,
CC_SET_DRIVER_OPTIONS,
CC_FIRMWARE,
CC_BULK_IO,
CC_RIPPLE_CORRECTION,
CC_EZUSB_RESET,
CC_LAST_COMMAND
}
PAR_COMMAND;
/*
Return Error Codes
These are the error codes returned by the driver
function. They are prefixed with CE_ to designate
them as camera errors.
*/
#ifndef CE_ERROR_BASE
#define CE_ERROR_BASE 1
#endif
typedef enum
{
/* 0 - 10 */
CE_NO_ERROR,
CE_CAMERA_NOT_FOUND = CE_ERROR_BASE,
CE_EXPOSURE_IN_PROGRESS,
CE_NO_EXPOSURE_IN_PROGRESS,
CE_UNKNOWN_COMMAND,
CE_BAD_CAMERA_COMMAND,
CE_BAD_PARAMETER,
CE_TX_TIMEOUT,
CE_RX_TIMEOUT,
CE_NAK_RECEIVED,
CE_CAN_RECEIVED,
/* 11 - 20 */
CE_UNKNOWN_RESPONSE,
CE_BAD_LENGTH,
CE_AD_TIMEOUT,
CE_KBD_ESC,
CE_CHECKSUM_ERROR,
CE_EEPROM_ERROR,
CE_SHUTTER_ERROR,
CE_UNKNOWN_CAMERA,
CE_DRIVER_NOT_FOUND,
CE_DRIVER_NOT_OPEN,
/* 21 - 30 */
CE_DRIVER_NOT_CLOSED,
CE_SHARE_ERROR,
CE_TCE_NOT_FOUND,
CE_AO_ERROR,
CE_ECP_ERROR,
CE_MEMORY_ERROR,
CE_DEVICE_NOT_FOUND,
CE_DEVICE_NOT_OPEN,
CE_DEVICE_NOT_CLOSED,
CE_DEVICE_NOT_IMPLEMENTED,
/* 31 - 40 */
CE_DEVICE_DISABLED,
CE_OS_ERROR,
CE_SOCK_ERROR,
CE_SERVER_NOT_FOUND,
CE_CFW_ERROR,
CE_MF_ERROR,
CE_FIRMWARE_ERROR,
CE_DIFF_GUIDER_ERROR,
CE_RIPPLE_CORRECTION_ERROR,
CE_EZUSB_RESET,
CE_NEXT_ERROR
} PAR_ERROR;
/*
Camera Command State Codes
These are the return status codes for the Query
Command Status command. They are prefixed with
CS_ to designate them as camera status.
*/
typedef enum
{
CS_IDLE,
CS_IN_PROGRESS,
CS_INTEGRATING,
CS_INTEGRATION_COMPLETE
}
PAR_COMMAND_STATUS;
#define CS_PULSE_IN_ACTIVE 0x8000
#define CS_WAITING_FOR_TRIGGER 0x8000
/*
Misc. Enumerated Constants
QUERY_TEMP_STATUS_REQUEST - Used with the Query Temperature Status command.
ABG_STATE7 - Passed to Start Exposure Command
MY_LOGICAL - General purpose type
DRIVER_REQUEST - Used with Get Driver Info command
CCD_REQUEST - Used with Imaging commands to specify CCD
CCD_INFO_REQUEST - Used with Get CCD Info Command
PORT - Used with Establish Link Command
CAMERA_TYPE - Returned by Establish Link and Get CCD Info commands
SHUTTER_COMMAND, SHUTTER_STATE7 - Used with Start Exposure and Miscellaneous Control Commands
TEMPERATURE_REGULATION - Used with Enable Temperature Regulation
LED_STATE - Used with the Miscellaneous Control Command
FILTER_COMMAND, FILTER_STATE - Used with the Miscellaneous Control Command
AD_SIZE, FILTER_TYPE - Used with the GetCCDInfo3 Command
AO_FOCUS_COMMAND - Used with the AO Set Focus Command
SBIG_DEVICE_TYPE - Used with Open Device Command
DRIVER_CONTROL_PARAM - Used with Get/SetDriverControl Command
USB_AD_CONTROL_COMMAND - Used with UsbADControl Command
CFW_MODEL_SELECT, CFW_STATUS, CFW_ERROR - Used with CFW command
CFW_POSITION, CFW_GET_INFO_SELECT - Used with CFW Command
BIT_IO_OPERATION, BIT_IO_NMAE - Used with BitIO command
MF_MODEL_SELECT, MF_STATUS, MF_ERROR, MF_GET_INFO_SELECT - Used with Motor Focus Command
DIFF_GUIDER_COMMAND, DIFF_GUIDER_STATE, DIFF_GUIDER_ERROR - Used with the Diff Guider Command
*/
typedef enum
{
TEMP_STATUS_STANDARD,
TEMP_STATUS_ADVANCED,
TEMP_STATUS_ADVANCED2
}
QUERY_TEMP_STATUS_REQUEST;
typedef enum
{
ABG_LOW7,
ABG_CLK_LOW7,
ABG_CLK_MED7,
ABG_CLK_HI7
}
ABG_STATE7;
typedef unsigned short MY_LOGICAL;
#define FALSE 0
#define TRUE 1
typedef enum
{
DRIVER_STD,
DRIVER_EXTENDED,
DRIVER_USB_LOADER
}
DRIVER_REQUEST;
typedef enum
{
CCD_IMAGING,
CCD_TRACKING,
CCD_EXT_TRACKING
}
CCD_REQUEST;
typedef enum
{
RM_1X1,
RM_2X2,
RM_3X3,
RM_NX1,
RM_NX2,
RM_NX3,
RM_1X1_VOFFCHIP,
RM_2X2_VOFFCHIP,
RM_3X3_VOFFCHIP,
RM_9X9, RM_NXN
}
READOUT_BINNING_MODE;
typedef enum
{
CCD_INFO_IMAGING,
CCD_INFO_TRACKING,
CCD_INFO_EXTENDED,
CCD_INFO_EXTENDED_5C,
CCD_INFO_EXTENDED2_IMAGING,
CCD_INFO_EXTENDED2_TRACKING,
CCD_INFO_EXTENDED3
}
CCD_INFO_REQUEST;
typedef enum
{
ABG_NOT_PRESENT,
ABG_PRESENT
}
IMAGING_ABG;
typedef enum
{
BR_AUTO,
BR_9600,
BR_19K,
BR_38K,
BR_57K,
BR_115K
}
PORT_RATE;
typedef enum
{
ST7_CAMERA = 4,
ST8_CAMERA,
ST5C_CAMERA,
TCE_CONTROLLER,
ST237_CAMERA,
STK_CAMERA,
ST9_CAMERA,
STV_CAMERA,
ST10_CAMERA,
ST1K_CAMERA,
ST2K_CAMERA,
STL_CAMERA,
ST402_CAMERA,
STX_CAMERA,
ST4K_CAMERA,
STT_CAMERA,
STI_CAMERA,
STF_CAMERA,
NEXT_CAMERA,
NO_CAMERA=0xFFFF
}
CAMERA_TYPE;
typedef enum
{
SC_LEAVE_SHUTTER,
SC_OPEN_SHUTTER,
SC_CLOSE_SHUTTER,
SC_INITIALIZE_SHUTTER,
SC_OPEN_EXT_SHUTTER,
SC_CLOSE_EXT_SHUTTER
}
SHUTTER_COMMAND;
typedef enum
{
SS_OPEN,
SS_CLOSED,
SS_OPENING,
SS_CLOSING
}
SHUTTER_STATE7;
typedef enum
{
REGULATION_OFF,
REGULATION_ON,
REGULATION_OVERRIDE,
REGULATION_FREEZE,
REGULATION_UNFREEZE,
REGULATION_ENABLE_AUTOFREEZE,
REGULATION_DISABLE_AUTOFREEZE
}
TEMPERATURE_REGULATION;
#define REGULATION_FROZEN_MASK 0x8000
typedef enum
{
LED_OFF,
LED_ON,
LED_BLINK_LOW,
LED_BLINK_HIGH
}
LED_STATE;
typedef enum
{
FILTER_LEAVE,
FILTER_SET_1,
FILTER_SET_2,
FILTER_SET_3,
FILTER_SET_4,
FILTER_SET_5,
FILTER_STOP,
FILTER_INIT
}
FILTER_COMMAND;
typedef enum
{
FS_MOVING,
FS_AT_1,
FS_AT_2,
FS_AT_3,
FS_AT_4,
FS_AT_5,
FS_UNKNOWN
}
FILTER_STATE;
typedef enum
{
AD_UNKNOWN,
AD_12_BITS,
AD_16_BITS
}
AD_SIZE;
typedef enum
{
FW_UNKNOWN,
FW_EXTERNAL,
FW_VANE,
FW_FILTER_WHEEL
}
FILTER_TYPE;
typedef enum
{
AOF_HARD_CENTER,
AOF_SOFT_CENTER,
AOF_STEP_IN,
AOF_STEP_OUT
}
AO_FOCUS_COMMAND;
// Ethernet stuff
#define SRV_SERVICE_PORT 5000
#define BROADCAST_PORT 5001
typedef enum
{
DEV_NONE,
DEV_LPT1,
DEV_LPT2,
DEV_LPT3,
DEV_USB = 0x7F00,
DEV_ETH,
DEV_USB1,
DEV_USB2,
DEV_USB3,
DEV_USB4,
DEV_USB5,
DEV_USB6,
DEV_USB7,
DEV_USB8
}
SBIG_DEVICE_TYPE;
typedef enum
{
DCP_USB_FIFO_ENABLE,
DCP_CALL_JOURNAL_ENABLE,
DCP_IVTOH_RATIO,
DCP_USB_FIFO_SIZE,
DCP_USB_DRIVER,
DCP_KAI_RELGAIN,
DCP_USB_PIXEL_DL_ENABLE,
DCP_HIGH_THROUGHPUT,
DCP_VDD_OPTIMIZED,
DCP_AUTO_AD_GAIN,
DCP_NO_HCLKS_FOR_INTEGRATION,
DCP_TDI_MODE_ENABLE,
DCP_VERT_FLUSH_CONTROL_ENABLE,
DCP_ETHERNET_PIPELINE_ENABLE,
DCP_FAST_LINK,
DCP_OVERSCAN_ROWSCOLS,
DCP_PIXEL_PIPELINE_ENABLE,
DCP_COLUMN_REPAIR_ENABLE,
DCP_WARM_PIXEL_REPAIR_ENABLE,
DCP_WARM_PIXEL_REPAIR_COUNT,
DCP_LAST
}
DRIVER_CONTROL_PARAM;
typedef enum
{
USB_AD_IMAGING_GAIN,
USB_AD_IMAGING_OFFSET,
USB_AD_TRACKING_GAIN,
USB_AD_TRACKING_OFFSET,
USB_AD_EXTTRACKING_GAIN,
USB_AD_EXTTRACKING_OFFSET,
USB_AD_IMAGING2_GAIN,
USB_AD_IMAGING2_OFFSET,
USB_AD_IMAGING_GAIN_RIGHT,
USB_AD_IMAGING_OFFSET_RIGHT,
}
USB_AD_CONTROL_COMMAND;
typedef enum
{
USBD_SBIGE,
USBD_SBIGI,
USBD_SBIGM,
USBD_NEXT
}
ENUM_USB_DRIVER;
typedef enum
{
CFWSEL_UNKNOWN,
CFWSEL_CFW2,
CFWSEL_CFW5,
CFWSEL_CFW8,
CFWSEL_CFWL,
CFWSEL_CFW402,
CFWSEL_AUTO,
CFWSEL_CFW6A,
CFWSEL_CFW10,
CFWSEL_CFW10_SERIAL,
CFWSEL_CFW9,
CFWSEL_CFWL8,
CFWSEL_CFWL8G,
CFWSEL_CFW1603,
CFWSEL_FW5_STX,
CFWSEL_FW5_8300,
CFWSEL_FW8_8300,
CFWSEL_FW7_STX,
CFWSEL_FW8_STT
}
CFW_MODEL_SELECT;
typedef enum
{
CFWC_QUERY,
CFWC_GOTO,
CFWC_INIT,
CFWC_GET_INFO,
CFWC_OPEN_DEVICE,
CFWC_CLOSE_DEVICE
}
CFW_COMMAND;
typedef enum
{
CFWS_UNKNOWN,
CFWS_IDLE,
CFWS_BUSY
}
CFW_STATUS;
typedef enum
{
CFWE_NONE,
CFWE_BUSY,
CFWE_BAD_COMMAND,
CFWE_CAL_ERROR,
CFWE_MOTOR_TIMEOUT,
CFWE_BAD_MODEL,
CFWE_DEVICE_NOT_CLOSED,
CFWE_DEVICE_NOT_OPEN,
CFWE_I2C_ERROR
}
CFW_ERROR;
typedef enum
{
CFWP_UNKNOWN,
CFWP_1,
CFWP_2,
CFWP_3,
CFWP_4,
CFWP_5,
CFWP_6,
CFWP_7,
CFWP_8,
CFWP_9,
CFWP_10
}
CFW_POSITION;
typedef enum
{
CFWPORT_COM1=1,
CFWPORT_COM2,
CFWPORT_COM3,
CFWPORT_COM4
}
CFW_COM_PORT;
typedef enum
{
CFWG_FIRMWARE_VERSION,
CFWG_CAL_DATA,
CFWG_DATA_REGISTERS
}
CFW_GETINFO_SELECT;
typedef enum
{
BITIO_WRITE,
BITIO_READ
}
BITIO_OPERATION;
typedef enum
{
BITI_PS_LOW,
BITO_IO1,
BITO_IO2,
BITI_IO3,
BITO_FPGA_WE
}
BITIO_NAME;
typedef enum
{
BTDI_SCHEDULE_ERROR = 1,
BTDI_OVERRUN_ERROR = 2
}
BTDI_ERROR;
typedef enum
{
MFSEL_UNKNOWN,
MFSEL_AUTO,
MFSEL_STF
}
MF_MODEL_SELECT;
typedef enum
{
MFC_QUERY,
MFC_GOTO,
MFC_INIT,
MFC_GET_INFO,
MFC_ABORT
}
MF_COMMAND;
typedef enum
{
MFS_UNKNOWN,
MFS_IDLE,
MFS_BUSY
}
MF_STATUS;
typedef enum
{
MFE_NONE,
MFE_BUSY,
MFE_BAD_COMMAND,
MFE_CAL_ERROR,
MFE_MOTOR_TIMEOUT,
MFE_BAD_MODEL,
MFE_I2C_ERROR,
MFE_NOT_FOUND
}
MF_ERROR;
typedef enum
{
MFG_FIRMWARE_VERSION,
MFG_DATA_REGISTERS
}
MF_GETINFO_SELECT;
typedef enum
{
DGC_DETECT,
DGC_GET_BRIGHTNESS,
DGC_SET_BRIGHTNESS
}
DIFF_GUIDER_COMMAND;
typedef enum
{
DGE_NO_ERROR,
DGE_NOT_FOUND,
DGE_BAD_COMMAND,
DGE_BAD_PARAMETER
}
DIFF_GUIDER_ERROR;
typedef enum
{
DGS_UNKNOWN,
DGS_IDLE,
DGS_BUSY
}
DIFF_GUIDER_STATUS;
typedef enum
{
FS_OFF,
FS_ON,
FS_AUTOCONTROL
}
FAN_STATE;
typedef enum
{
BIO_READ,
BIO_WRITE,
BIO_FLUSH
}
BULK_IO_COMMAND;
typedef enum
{
PIXEL_CHANNEL_MODE_A,
PIXEL_CHANNEL_MODE_B,
PIXEL_CHANNEL_MODE_AB
}
PIXEL_CHANNEL_MODE;
typedef enum
{
PIXEL_CHANNEL_A,
PIXEL_CHANNEL_B
}
ACTIVE_PIXEL_CHANNEL;
/*
General Purpose Flags
*/
#define END_SKIP_DELAY 0x8000
/*
set in ccd parameter of EndExposure
command to skip synchronization
delay - Use this to increase the
rep rate when taking darks to later
be subtracted from SC_LEAVE_SHUTTER
exposures such as when tracking and
imaging
*/
#define START_SKIP_VDD 0x8000
/*
set in ccd parameter of StartExposure
command to skip lowering Imaging CCD
Vdd during integration. - Use this to
increase the rep rate when you don't
care about glow in the upper-left
corner of the imaging CCD
*/
#define START_MOTOR_ALWAYS_ON 0x4000
/*
set in ccd parameter of StartExposure
and EndExposure commands to force shutter
motor to stay on all the time which reduces
delays in Start and End Exposure timing and
yields higher image throughput. Don't
do this too often or camera head will
heat up
*/
#define ABORT_DONT_END 0x2000
/*
set in ccd parameter of EndExposure
command to abort the exposure completely
instead of just ending the integration phase
for cameras with internal frame buffers
like the STX
*/
#define EXP_WAIT_FOR_TRIGGER_IN 0x80000000 // set in exposureTime to wait for trigger in pulse
#define EXP_SEND_TRIGGER_OUT 0x40000000 // set in exposureTime to send trigger out Y-
#define EXP_LIGHT_CLEAR 0x20000000 // set to do light clear of the CCD
#define EXP_MS_EXPOSURE 0x10000000 // set to interpret exposure time as milliseconds
#define EXP_FAST_READOUT 0x08000000 // activate the fast readout mode of the STF-8300, etc.
#define EXP_DUAL_CHANNEL_MODE 0x04000000 // activate the dual channel CCD readout mode of the STF-8050
#define EXP_TIME_MASK 0x00FFFFFF // mask with exposure time to remove flags
/*
Capabilities Bits - Bit Field Definitions for the
capabilitiesBits in the GetCCDInfoResults4 struct.
*/
#define CB_CCD_TYPE_MASK 0x0001 /* mask for CCD type */
#define CB_CCD_TYPE_FULL_FRAME 0x0000 /* b0=0 is full frame CCD */
#define CB_CCD_TYPE_FRAME_TRANSFER 0x0001 /* b0=1 is frame transfer CCD */
#define CB_CCD_ESHUTTER_MASK 0x0002 /* mask for electronic shutter type */
#define CB_CCD_ESHUTTER_NO 0x0000 /* b1=0 indicates no electronic shutter */
#define CB_CCD_ESHUTTER_YES 0x0002 /* b1=1 indicates electronic shutter */
#define CB_CCD_EXT_TRACKER_MASK 0x0004 /* mask for external tracker support */
#define CB_CCD_EXT_TRACKER_NO 0x0000 /* b2=0 indicates no external tracker support */
#define CB_CCD_EXT_TRACKER_YES 0x0004 /* b2=1 indicates external tracker support */
#define CB_CCD_BTDI_MASK 0x0008 /* mask for BTDI support */
#define CB_CCD_BTDI_NO 0x0000 /* b3=0 indicates no BTDI support */
#define CB_CCD_BTDI_YES 0x0008 /* b3=1 indicates BTDI support */
#define CB_AO8_MASK 0x0010 /* mask for AO-8 detected */
#define CB_AO8_NO 0x0000 /* b4=0 indicates no AO-8 detected */
#define CB_AO8_YES 0x0010 /* b4=1 indicates AO-8 detected */
#define CB_FRAME_BUFFER_MASK 0x0020 /* mask for camera with frame buffer */
#define CB_FRAME_BUFFER_NO 0x0000 /* b5=0 indicates camera without Frame Buffer */
#define CB_FRAME_BUFFER_YES 0x0020 /* b5=1 indicates camera with Frame Buffer */
#define CB_REQUIRES_STARTEXP2_MASK 0x0040 /* mask for camera that requires StartExposure2 */
#define CB_REQUIRES_STARTEXP2_NO 0x0000 /* b6=0 indicates camera works with StartExposure */
#define CB_REQUIRES_STARTEXP2_YES 0x0040 /* b6=1 indicates camera Requires StartExposure2 */
/*
Defines
*/
#define MIN_ST7_EXPOSURE 12 /* Minimum exposure in 1/100ths second */
#define MIN_ST402_EXPOSURE 4 /* Minimum exposure in 1/100ths second */
#define MIN_ST3200_EXPOSURE 9 /* Minimum exposure in 1/100ths second */
#define MIN_STF8300_EXPOSURE 9 /* Minimum exposure in 1/100ths second */
#define MIN_STF8050_EXPOSURE 1 /* Minimum exposure in 1/1000ths second since has E Shutter */
#define MIN_STF4070_EXPOSURE 1 /* Minimum exposure in 1/1000ths second since has E Shutter */
#define MIN_STX_EXPOSURE 18 /* Minimum exposure in 1/100ths second */
#define MIN_STT_EXPOSURE 12 /* Minimum exposure in 1/100ths second */
#define MIN_STU_EXPOSURE 1 /* Minimum exposure in 1/1000ths second since ST-i has E Shutter */
/*
Command Parameter and Results Structs
Make sure you set your compiler for byte structure alignment
as that is how the driver was built.
*/
/* Force 8 Byte Struct Align */
#if TARGET == ENV_MACOSX || TARGET == ENV_LINUX
#pragma pack(push,8)
#else
#pragma pack(push)
#pragma pack(8)
#endif
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
unsigned long exposureTime;
unsigned short abgState; /* ABG_STATE7 */
unsigned short openShutter; /* SHUTTER_COMMAND */
}
StartExposureParams;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
unsigned long exposureTime;
unsigned short abgState; /* ABG_STATE7 */
unsigned short openShutter; /* SHUTTER_COMMAND */
unsigned short readoutMode;
unsigned short top;
unsigned short left;
unsigned short height;
unsigned short width;
}
StartExposureParams2;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
}
EndExposureParams;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
unsigned short readoutMode;
unsigned short pixelStart;
unsigned short pixelLength;
}
ReadoutLineParams;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
unsigned short readoutMode;
unsigned short lineLength;
}
DumpLinesParams;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
}
EndReadoutParams;
typedef struct
{
unsigned short ccd; /* CCD_REQUEST */
unsigned short readoutMode;
unsigned short top;
unsigned short left;
unsigned short height;
unsigned short width;
}
StartReadoutParams;
typedef struct
{
unsigned short /* TEMPERATURE_REGULATION */ regulation;
unsigned short ccdSetpoint;
}
SetTemperatureRegulationParams;
typedef struct
{
unsigned short /* TEMPERATURE_REGULATION */ regulation;
double ccdSetpoint;
}
SetTemperatureRegulationParams2;
typedef struct
{
unsigned short /* TEMP_STATUS_REQUEST */ request;
}
QueryTemperatureStatusParams;
typedef struct
{
MY_LOGICAL enabled;
unsigned short ccdSetpoint;
unsigned short power;
unsigned short ccdThermistor;
unsigned short ambientThermistor;
}
QueryTemperatureStatusResults;
typedef struct
{
MY_LOGICAL coolingEnabled;
MY_LOGICAL fanEnabled;
double ccdSetpoint;
double imagingCCDTemperature;
double trackingCCDTemperature;
double externalTrackingCCDTemperature;
double ambientTemperature;
double imagingCCDPower;