DAS  3.1.6 - 18/09/2017
dcldef.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *****************************************************************************
3  ** **
4  ** DCL Types & Constants definitions for camera control **
5  ** for Windows DLL or Linux LIB **
6  ** (C) 1997-2014 Digital Technology Art, All Rights Reserved **
7  ** **
8  ** **
9  ** Develope contributes: Manuele Turini **
10  ** **
11  *****************************************************************************
12  *****************************************************************************/
13 
14 #ifndef DCLDEFINITIONS
15 #define DCLDEFINITIONS
16 
310 #define MAX_CAMERA 8
311 #define MAX_IMAGE 16
312 
313 #define PROC_CALL __stdcall
314 
315 /*
316  * Use for both Win16 & Win32.
317  * For Win32 compilers supporting the "declspec" keyword.
318  */
319 #if defined(_WIN32) || defined(__WIN32__)
320  #if defined(_MSC_VER)
321  #ifdef STATIC_LIBRARY
322  #define DLL
323  #define DLL_P *
324  #define DLL_V
325  #else
326  #ifdef DLL_SOURCE_CODE
327  #define DLL __declspec(dllexport) PROC_CALL
328  #define DLL_P __declspec(dllexport) * PROC_CALL
329  #define DLL_V __declspec(dllexport)
330  #else
331  #define DLL __declspec(dllimport) PROC_CALL
332  #define DLL_P __declspec(dllimport) * PROC_CALL
333  #define DLL_V __declspec(dllimport)
334  #endif
335  #endif
336  #else
337  #if defined(__BORLANDC__)
338  #ifdef DLL_SOURCE_CODE
339  #define DLL _export PROC_CALL
340  #define DLL_P _export * PROC_CALL
341  #define DLL_V _export
342  #else
343  #define DLL _import PROC_CALL
344  #define DLL_P _import * PROC_CALL
345  #define DLL_V _import
346  #endif
347  #endif
348  #endif
349 #else
350  // UNIX
351  #define DLL
352  #define DLL_P *
353  #define DLL_V
354  #define PROC_CALL
355 #endif
356 
357 // UNIX/Windows C++ compatibility
358 #ifndef CTYPET
359  #define CTYPET
360  #ifdef __cplusplus
361  #define CTYPE extern "C"
362  #else
363  #define CTYPE
364  #endif
365 #endif
366 
369 #ifndef DCL_VARTYPES
370 #define DCL_VARTYPES
371 typedef unsigned char U8;
372 typedef char S8;
373 typedef char STR;
374 typedef short int S16;
375 typedef short unsigned U16;
376 typedef unsigned long U32;
377 typedef long S32;
378 typedef float F32;
379 typedef double F64;
380 #endif
381 
385 typedef void (PROC_CALL *DTA1_CB) (const char *str, int Port);
386 typedef void (PROC_CALL *DTA2_CB) (const char *str, int perc, int Port);
387 
388 typedef int (PROC_CALL *DTA_FN)(void);
389 typedef U16 (PROC_CALL *DTA_IO)(void);
390 
392 
393 
396 #define CCDHANDLE 1
397 #define TEMPHANDLE 2
399 #define TRIGGER 4
401 #define CLEARCCD 8
406 #define NOSHUTTER 16
408 #define MUTE 32
410 #define FAN 64
413 #define DIGFLT 128
415 #define FLUSHOR 256
417 #define MAXPOW 512
419 #define ANTIBLOOM 1024
421 #define WIN_NT 2048
423 #define DISABINT 4096
426 #define LARGEDMA 8192
428 #define SETDMA16BIT 16384
431 #define MEMALLOC 32768
433 
435 
439 #define MAT_CREATE 0
440 #define MAT_REDIM 1
441 #define MAT_CLOSE 2
442 #define MAT_NULL 0
443 
444 
448 #define KELVIN 0
449 #define CELSIUS 1
450 #define FAHRENHEIT 2
451 
452 
456 #define COOLER_ON 1
457 #define COOLER_OFF 0
458 
459 
464 
468 #define DEMO 1
469 #define HIRES_I 10
471 #define HIRES_II 20
472 #define HIRES_IIA 21
473 #define HIRES_III 22
474 #define HIRES_IIIA 23
475 #define HIRES_IV 24
476 #define HIRES_IV_P 25
477 #define HIRES_V 28
478 #define HURRICANE 30
479 #define CHROMA 40
480 #define CHROMAF 41
481 #define CHROMAHS 42
482 #define CHROMAH 43
483 #define C3 44
484 #define C3_32 45
485 #define C3_8 46
486 #define C3_PLUS 47
487 #define C4 48
488 #define NCC 50
489 #define DISCO 60
490 #define DISCOP 61
491 #define ICAM 70
492 #define ICAM_II 71
493 #define VLA 80
494 #define ALFA 90
495 #define PHASER 100
496 #define ELECTRA 200
497 #define ELECTRAP 205
498 #define MARY 300
499 #define GCAM 400
500 #define GCAM_E 450
501 
502 
506 #define FCHROMA 10
507 #define FCHROMAX 11
508 #define FCHROMAXP 12
509 #define FHIRES 20
510 #define FHURRI 30
511 #define FNCC 40
512 #define FSCC 50
513 #define FICAM 60
514 #define FVLA 70
515 #define FDISCO 80
516 #define FALPHA 90
517 #define FPHASER 100
518 #define FELECTRA 110
519 #define FELECTRAP 115
520 #define FMARY 200
521 #define FDEMO 1000
522 #define FGCAM 2000
523 
524 
528 #define EEV 0
529 #define HAMAMATSU 5
530 #define PHILIPS 10
531 #define KODAK 20
532 #define LMF 25
533 #define SITE 30
534 #define SONY 33
535 #define SU 35
536 #define TEXAS 40
537 #define THOMSON 50
538 #define ANDANTA 60
539 
540 
542 // CCDs definitions
543 // when this list is modified please update default.cfg file in hp directory
544 
549 
553 #define CCD30_11 120
554 #define CCD30_11B 133
555 #define CCD30_11D 135
556 #define CCD39_02 121
557 #define CCD42_10 122
558 #define CCD42_40 123
559 #define CCD42_80 124
560 #define CCD42_90 126
561 #define CCD44_82 127
562 #define CCD47_10 125
563 #define CCD47_20 128
564 #define CCD55_20 134
565 #define CCD55_30 129
566 #define CCD57_10 130
567 #define CCD62_06 131
568 #define CCD77_00 132
569 
570 
575 #define FT18 195
576 #define FTT1010 200
577 #define FTF3020 210
578 
579 
584 #define KAF0260 250
585 #define KAF400E 255
586 #define KAF1000 260
587 #define KAF1300 265
588 #define KAF1400 270
589 #define KAF1600 275
590 #define KAF3200 279
591 #define KAF4201 280
592 #define KAF4300 281
593 #define KAF5100 282
594 #define KAF6302CE 283
595 #define KAF6303 285
596 #define KAF8300 286
597 #define KAF9000 287
598 #define KAF16800 290
599 #define KAF16800CE 295
600 
601 
606 #define STA001A 300
607 #define SIA003A 305
608 #define SI424 306
609 #define SIA502A 310
610 
611 // @}
612 
616 #define TH7887 400
617 #define TH7888 405
618 #define TH7889 410
619 
620 
625 #define SU128 500
626 #define SU320 505
627 #define SU512 506
628 
629 
634 #define TC213 1001
635 #define TC215 1002
636 #define TC237 1000
637 #define TC241 1005
638 #define TC245 1010
639 #define TC253 1011
640 #define TC255 1015
641 #define TC281 1016
642 
643 
648 #define CCD442 2000
649 #define CCD447 2001
650 #define CCD485 2005
651 #define CCD486 2006
652 #define CCD595 2007
653 
654 
659 #define KAC0310 3000
660 #define KAC1310 3001
661 
662 
667 #define DCCD512 9998
668 #define DCCD1K 9999
669 
670 
675 #define ICX074AL 3500
676 #define ICX074AK 3510
677 #define ICX085AL 3520
678 #define ICX085AK 3530
679 #define ICX098BL 3540
680 #define ICX098BQ 3550
681 #define ICX204AL 3560
682 #define ICX204AK 3570
683 #define ICX205AL 3580
684 #define ICX205AK 3590
685 #define ICX274AL 3600
686 #define ICX274AQ 3610
687 #define ICX285AL 3620
688 #define ICX285AQ 3630
689 #define ICX424AL 3640
690 #define ICX424AQ 3650
691 
692 
697 #define KAI0340 3800
698 #define KAI1003 3805
699 #define KAI1010 3810
700 #define KAI1020 3815
701 #define KAI2001 3820
702 #define KAI2020 3825
703 #define KAI2093 3830
704 #define KAI4010 3835
705 #define KAI4020 3840
706 
707 #define KAI01050 3945
708 #define KAI01150 3946
709 #define KAI02050 3947
710 #define KAI02150 3948
711 #define KAI02170 3960
712 #define KAI04050 3962
713 #define KAI04070 3964
714 #define KAI08050 3968
715 #define KAI16050 3980
716 #define KAI16070 3985
717 #define KAI29050 3990
718 
719 
724 #define S10420_1106 4000
725 
726 
731 #define FPA640X512 5000
732 
733 
738 #define OUT_A 0
739 #define OUT_B 1
740 #define OUT_C 2
741 #define OUT_D 3
742 
743 
748 #define MPPMODE 1
749 #define COLOR 2
750 #define MONOCHROME 3
751 #define AIMO 4
752 #define NIMO 5
753 
754 
759 #define FRONTSIDE 0
760 #define BACKSIDE 1
761 
762 
764 
768 #define NOFW 0
769 #define FWIN8 1
770 #define FWIN6 2
771 #define RPF6 3
772 #define RPF8 4
773 #define MAXF 5
774 #define RGBLCD 6
775 
776 
781 #define FWIN 0
782 #define FWAUX 1
783 #define FWSER 2
784 #define FWPAR 3
785 
786 
791 #define LPTX 0
792 #define FDL 1
793 #define FDL_PCI 2
794 #define FDL_PCI32 3
795 #define FDLPCIX 4
796 #define PCMCIA 5
797 #define USB 6
798 #define FIREWIRE 7
799 #define ETHERNET 8
800 #define RS232 9
801 
803 
807 #define LPT0 0x3BC
808 #define LPT1 0x378
809 #define LPT2 0x278
810 #define LPT3 0x27C
811 #define LPT4 0x26C
812 #define LPT5 0x268
813 #define PCI0 0x9800
814 #define PCI1 0xA000
815 #define PCI2 0xA400
816 #define PCI3 0xA800
817 #define PCI4 0xB000
818 #define PCI5 0xB400
819 
820 
825 #define PAR 0
826 #define FOL 1
827 #define COAX 3
828 #define SER 4
829 
830 
835 #define EMSHUT 0
836 #define ELECTR 1
837 #define EXTERN 2
838 #define FLC 3
839 #define LCD 4
840 
841 
843 
844 // Serial port definitions
845 #define S_COM1 0x3F8
846 #define S_COM2 0x2F8
847 
848 // Filter wheel commands
849 #define FWCALIBRATE 0 // Calibrate filter wheel
850 #define FWFILTER 1 // Select a new filter position
851 #define FWOFFSET 2 // Set an offset on filter position
852 #define FWSPEED 3 // Set filter wheel speed
853 #define FWTORQUE 4 // Set filter wheel motor torque
854 
855 
856 // Control of FW rotation
857 #define CW 0
858 #define CCW 1
859 
860 // Definition for frequency converter
861 #define PERIOD 0
862 #define FREQUENCY 1
863 
864 // Commands for QuerySts function
867 #define QRY_SHUTTER 1
868 #define QRY_TRSFDMA 2
869 
870 
872 // Read/Write data
875 #define CCD_INFO 0
876 #define PTF_INFO 1
877 #define CTRLMODE 2
878 #define CCDFAMIL 3
879 
880 
884 #define READ_DATA 1
885 #define WRITE_DATA 0
886 
887 
891 #define SOFT_START 1
892 #define TRIG_START 2
893 
894 
897 #define CLEARBIT 0
898 #define SETBIT 1
899 
901 #define DC_TRUE 1
902 #define DC_FALSE 0
903 
905 #define DC_EXPOSURE 1
906 #define DC_GETDARK 0
907 
910 #define DC_TIMER_OFF 0
911 #define DC_TIMER_ON 1
912 #define DC_TIMER_BEGIN 2
913 #define DC_TIMER_STOP 3
914 
915 
917 // DC_Sts Errors code
920 #define SUCCESSFUL 0
921 #define ERR_CAM_NOT_FOUND 1
922 #define ERR_LINK_FAIL 2
923 #define ERR_UNSUP_PTF 3
924 #define ERR_FDL_LOCK 4
925 #define ERR_PTF_NULL 5
926 #define ERR_CCD_NULL 6
927 #define ERR_FW_ZERO 7
928 #define ERR_PG_OVFL 8
929 #define ERR_DMA_MEM 9
930 #define ERR_SER_LNK 10
931 #define ERR_SER_ID 11
932 #define ERR_ARRY_PTF 12
933 #define ERR_INV_HANDLE 13
934 #define ERR_LICENSE 14
935 #define ERR_FDL_PCI 15
936 #define ERR_IMG_MEM 16
937 #define ERR_USB_NODEV 17
938 #define ERR_USB_NOPEN 18
939 #define ERR_IODLL_NOT_FOUND 19
940 #define ERR_FDLUSB_NOT_FOUND 20
941 #define ERR_FDLUSB_LICENSE 21
942 #define ERR_PG_ALLOC 22
943 #define ERR_PG_FD 23
944 #define ERR_COPROCESSOR 24
945 #define ERR_ARM_SYNC 25
946 #define ERR_GCAM_REG_RW 26
947 
948 
950 // Motorized objective control codes
953 #define MOB_CALIBRATE_ZOOM 0
954 #define MOB_CALIBRATE_IRIS 1
955 #define MOB_CALIBRATE_FOCUS 2
956 #define MOB_DECREMENT_ZOOM 3
957 #define MOB_INCREMENT_ZOOM 4
958 #define MOB_DECREMENT_IRIS 5
959 #define MOB_INCREMENT_IRIS 6
960 #define MOB_INCREMENT_FOCUS 7
961 #define MOB_DECREMENT_FOCUS 8
962 
963 
965 // Index of internal function
968 #define DC_CAMERA_INIT 0
969 #define DC_COOLER_POWER 1
970 #define DC_RELE 2
971 #define DC_OUT_PORT 3
972 #define DC_POKE 4
973 #define DC_PEEK 5
974 #define DC_POKW_WORD 6
975 #define DC_PEEK_WORD 7
976 #define DC_LOAD_PATTERN 8
977 #define DC_BUILD_PATTERN 9
978 #define DC_CLEAR_CCD 10
979 #define DC_READ_CCD_TEMP 11
980 #define DC_GETCCD 12
981 #define DC_SHUTTER 13
982 #define DC_FOCUS 14
983 #define DC_GET_USR_CCD 15
984 #define DC_COOLER 16
985 #define DC_READ_REGISTER 17
986 #define DC_WRITE_REGISTER 18
987 #define DC_WAIT_REQUEST 19
988 #define DC_INIT_FPGA 20
989 #define DC_IN_PORT 21
990 #define DC_ARM_SHUTTER 22
991 #define DC_CLEAR_HORIZ 23
992 #define DC_FILTER_WHEEL 24
993 #define DC_WRITE_DATA 25
994 #define DC_SET_ADDRESS 26
995 #define DC_ENABLE_READ 27
996 #define DC_READ_DATA 28
997 #define DC_GET_STATUS 29
998 #define DC_SET_CCD_GAIN 30
999 #define DC_HTRG_GET_CCD 31
1000 #define DC_ARRAY_INIT 32
1001 #define DC_ARRAY_GET_CCD 33
1002 
1004 
1005 // Chip select in camera array mode for CHROMA & C3
1006 #define CAM0 0xFFFE // Camera 0
1007 #define CAM1 0xFFFD // Camera 1
1008 #define CAM2 0xFFFB // Camera 2
1009 #define CAM3 0xFFF7 // Camera 3
1010 #define CAM4 0xFFEF // Camera 4
1011 #define CAM5 0xFFDF // Camera 5
1012 #define CAM6 0xFFBF // Camera 6
1013 #define CAM7 0xFF7F // Camera 7
1014 
1015 
1020 typedef struct ccd { // 66 bytes
1024  S16 ld[4];
1030  F64 pxd;
1037 }ccd;
1038 
1043 typedef struct ptf { // 84 bytes
1053  F64 patc[2];
1054  F64 vgain[4];
1055 }ptf;
1056 
1063 typedef struct config { // 156
1083  STR Def[80];
1084 }config;
1085 
1089 typedef struct ccdarray {
1090  U8 on;
1094 }ccdarray;
1095 
1099 typedef struct carray {
1100  F64 expo[8];
1101  U32 hbin[8];
1102  U32 vbin[8];
1103  U32 gain[8];
1104  F64 itc[8];
1105  F64 tccd[8];
1106  U32 power[8];
1107  U32 filter[8];
1111 }carray;
1112 
1113 #endif
1114 
double F64
8 byte floating point
Definition: dcldef.h:379
struct carray carray
Camera configuration for array mode.
U32 FDL_PCI_Index
(R/W) Index selector of all available FDL-PCI. 0 - 7 range.
Definition: dcldef.h:1070
S16 shut
Shutter type: 0 = Full Frame, 1 = Frame Transfer, 2 = Interline.
Definition: dcldef.h:1029
F64 ev
Electron volt conversion in uV.
Definition: dcldef.h:1036
F64 sizey
Photosensitive Area Y (mm)
Definition: dcldef.h:1034
U32 LinkType
(R/W) Used link of selected interface Link options with FDL-PCI interface
Definition: dcldef.h:1071
U32 nseq
Preset frame number.
Definition: dcldef.h:1109
U16 vphase
Vertical phase period (us)
Definition: dcldef.h:1047
U32 FWPortType
(R/W) Used interface for FW
Definition: dcldef.h:1074
U32 FilterWheel
(R/W) FW allowed filters Filter wheel types
Definition: dcldef.h:1072
F64 pyd
Y pixel dimension in um.
Definition: dcldef.h:1032
S16 ld[4]
Dummy line for binning 1 to 8.
Definition: dcldef.h:1024
S16 ccdg
Gain ccd: 0 = no, 1 = yes.
Definition: dcldef.h:1028
F64 pxd
X pixel dimension in um.
Definition: dcldef.h:1031
U32 CCDType
(R/W) Used CCD CCD code definitions
Definition: dcldef.h:1066
F64 adck
Clock in uS A/D.
Definition: dcldef.h:1052
char STR
1 byte with sign, range -128+127
Definition: dcldef.h:373
U32 MPP
(R/W) 1 = MPP, 2 = Color CCD Mode & type
Definition: dcldef.h:1078
U32 Sts
(R/W) Bit 0: 1 = Correct defect pixels
Definition: dcldef.h:1080
struct ccd ccd
CCD data types for all info. All this info are present into CCD directory for each CCD model...
U32 TaskSettings
(R/W) Camera activity
Definition: dcldef.h:1081
U32 CamAdd
(R/W) Intrinsic camera address
Definition: dcldef.h:1069
S16 adc
A/D converter num. of bits.
Definition: dcldef.h:1045
F64 ampd
Amplifier delay in uS.
Definition: dcldef.h:1051
S16 abgck
Antiblooming Timer 0 = No, 1 = Yes.
Definition: dcldef.h:1049
S16 dx
Num. of X pixels.
Definition: dcldef.h:1022
S16 kind
CCD manufacturer codes CCD code definitions.
Definition: dcldef.h:1021
U8 run
Array semaphore.
Definition: dcldef.h:1093
U32 ShutDly
(R/W) Shutter hysteresis (closing time)
Definition: dcldef.h:1076
F64 sizex
Photosensitive Area X (mm)
Definition: dcldef.h:1033
U32 FrontBack
(R/W) Front or Backside CCD CCD Technology
Definition: dcldef.h:1079
S16 abg
Antiblooming Gate 0 = no, 1 = yes, 2 = yes (clocked)
Definition: dcldef.h:1027
unsigned char U8
1 byte without sign, range 0-255
Definition: dcldef.h:371
short unsigned U16
2 byte without sign, range 0-65535
Definition: dcldef.h:375
F64 tmb
Time base in MHz.
Definition: dcldef.h:1050
S16 id
FPGA identification number.
Definition: dcldef.h:1046
unsigned long U32
4 byte without sign, range 0-4294967295
Definition: dcldef.h:376
float F32
4 byte floating point
Definition: dcldef.h:378
F64 fw
Full well capacity.
Definition: dcldef.h:1035
U8 on
Camera array flag, 1 = Active.
Definition: dcldef.h:1090
U16 fw
FW enable, 1 bit for each camera.
Definition: dcldef.h:1092
void(PROC_CALL * DTA2_CB)(const char *str, int perc, int Port)
Definition of a generic procedure that can show percent value (0:100)
Definition: dcldef.h:386
U32 ADSel
(R/W) Selected A/D (0 or 1)
Definition: dcldef.h:1064
U32 delay
Interval delay between frames.
Definition: dcldef.h:1110
U32 frame
Frame number.
Definition: dcldef.h:1108
U32 Cable
(R/W) 1 = Cable > 2.5 mt
Definition: dcldef.h:1082
U32 FWPortAddress
(R/W) FW interface address
Definition: dcldef.h:1073
U32 Output
(R/W) CCD output selection CCD outputs selection
Definition: dcldef.h:1077
S16 kind
Platform code Camera platform definitions.
Definition: dcldef.h:1044
unsigned char Port
struct ptf ptf
Camera Platform data types. All this info are present into directory HP for each camera model...
S16 dy
Num. of Y pixels.
Definition: dcldef.h:1023
long S32
4 byte with sign, range +2147483647-2147483647
Definition: dcldef.h:377
U32 ShutterType
(R/W) Shutter types Shutter types
Definition: dcldef.h:1075
short int S16
2 byte with sign, -32768+32767
Definition: dcldef.h:374
U16 ena
Camera enable, 1 bit for each camera.
Definition: dcldef.h:1091
struct config config
Camera configuration. Camera configuration data type. With this variable it is possible to configure ...
S16 gain
Num. of CCD presetted gains (1 - 4)
Definition: dcldef.h:1048
#define PROC_CALL
Definition: dcldef.h:354
S16 ddx
Dummy pixel of the hor. reg.
Definition: dcldef.h:1025
U16(PROC_CALL * DTA_IO)(void)
Definition of a i/o instruction.
Definition: dcldef.h:389
U32 Address
(R/W) Interface Address (if possible)
Definition: dcldef.h:1068
int(PROC_CALL * DTA_FN)(void)
Definition of a i/o procedure.
Definition: dcldef.h:388
Definition: dcldef.h:1020
Definition: dcldef.h:1043
void(PROC_CALL * DTA1_CB)(const char *str, int Port)
Definition of a generic procedure that can show exposure countdown.
Definition: dcldef.h:385
struct ccdarray ccdarray
Camera configuration for array mode used in DC_OpenArray.
char S8
1 byte with sign, range -128+127
Definition: dcldef.h:372
U32 Platform
(R/W) Platform code Camera platform definitions
Definition: dcldef.h:1065
U32 PortType
(R/W) Used interface Camera Interface
Definition: dcldef.h:1067
S16 nx
Horiz. register dimension.
Definition: dcldef.h:1026
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:08 for DAS - Rel. 3.1.6 - 18/09/2017.