1 2 #ifndef SS_H 3 4 /* 5 * Argyll Color Correction System 6 * 7 * Gretag Spectrolino and Spectroscan related 8 * defines and declarations. 9 * 10 * Author: Graeme W. Gill 11 * Date: 13/7/2005 12 * 13 * Copyright 2005 - 2013 Graeme W. Gill 14 * All rights reserved. 15 * 16 * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- 17 * see the License2.txt file for licencing details. 18 * 19 * Derived from DTP41.h 20 * 21 * This is an alternative driver to spm/gretag. 22 */ 23 24 /* 25 If you make use of the instrument driver code here, please note 26 that it is the author(s) of the code who take responsibility 27 for its operation. Any problems or queries regarding driving 28 instruments with the Argyll drivers, should be directed to 29 the Argyll's author(s), and not to any other party. 30 31 If there is some instrument feature or function that you 32 would like supported here, it is recommended that you 33 contact Argyll's author(s) first, rather than attempt to 34 modify the software yourself, if you don't have firm knowledge 35 of the instrument communicate protocols. There is a chance 36 that an instrument could be damaged by an incautious command 37 sequence, and the instrument companies generally cannot and 38 will not support developers that they have not qualified 39 and agreed to support. 40 */ 41 42 #undef EMSST /* Debug - emulate a SpectroScanT with a SpectroScan */ 43 44 #include "inst.h" 45 #include "ss_imp.h" 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 #define SS_MAX_WR_SIZE 1000 /* Assumed maximum normal message query size */ 52 #define SS_MAX_RD_SIZE 1000 /* Assumed maximum normal messagle answer size */ 53 54 /* Gretag Spectrolino/Spectroscan communication object */ 55 struct _ss { 56 /* **** base instrument class **** */ 57 INST_OBJ_BASE 58 59 /* *** Spectroscan/lino private data **** */ 60 inst_mode cap; /* Instrument mode capability */ 61 inst2_capability cap2; /* Instrument capability 2 */ 62 inst3_capability cap3; /* Instrument capability 3 */ 63 inst_mode nextmode; /* Next requested mode */ 64 inst_mode mode; /* Currently instrument mode */ 65 66 /* Desired measurement configuration */ 67 ss_aft filt; /* Filter type (None/UV/D65/Pol etc.) */ 68 ss_dst dstd; /* Density standard (ANSI A/ANSI T/DIN etc.) */ 69 ss_ilt illum; /* Illuminant type (A/C/D50 etc.) */ 70 ss_ot obsv; /* Observer type (2deg/10deg) */ 71 ss_wbt wbase; /* White base type (Paper/Abs>) */ 72 ss_ctt phmode; /* Photometric mode (Absolute/Relative) */ 73 double phref; /* Photometric reference (cd/m^2) */ 74 75 int calcount; /* Calibration needed counter */ 76 int pisrow; /* patches in a reading direction serpentine rows */ 77 int need_wd_cal; /* White/dark calibration needed flag */ 78 int need_t_cal; /* Transmission calibration needed flag */ 79 int noinitcalib; /* Don't mode change or do initilal calibrate */ 80 int forcecalib; /* Force a calibration even if not near white tile */ 81 inst_opt_type trig; /* Reading trigger mode */ 82 int offline; /* nz if we're off line */ 83 84 /* Emulated manual transmission mode support */ 85 double tref[36]; /* White reference spectrum */ 86 double cill[36]; /* Colorimetry illuminant */ 87 88 /* telescopic adapter compensation */ 89 int compen; /* Compensation filter enabled */ 90 double comp[36]; /* Compensation filter */ 91 92 xcalstd native_calstd; /* Instrument native calibration standard */ 93 xcalstd target_calstd; /* Returned calibration standard */ 94 95 #ifdef EMSST 96 int tmode; /* Transmission mode */ 97 ss_rt sbr; /* Standby reference */ 98 double sbx, sby; /* Standby location */ 99 #endif 100 101 /* Serialisation support: */ 102 103 /* Send buffer */ 104 char _sbuf[SS_MAX_WR_SIZE]; /* Buffer allocation */ 105 char *sbufe; /* Pointer to last valid location in _sbuf[] */ 106 char *sbuf; /* Next character output */ 107 108 /* Receive buffer */ 109 char _rbuf[SS_MAX_RD_SIZE]; /* Buffer allocation */ 110 char *rbufe; /* Pointer to last valid location in _rbuf[] */ 111 char *rbuf; /* Next character output */ 112 113 /* Accumulated device error */ 114 ss_et snerr; 115 116 }; typedef struct _ss ss; 117 118 /* Constructor */ 119 extern ss *new_ss(icoms *icom, instType itype); 120 121 #ifdef __cplusplus 122 } 123 #endif 124 125 #define SS_H 126 #endif /* SS_H */ 127