package sensicamJNI;

/** Definitions from senlib/cam_types.h */
public abstract class CamTypes {
	public static final int NOBOARD    = 0x0000;
	public static final int PCI520     = 0x0001;
	public static final int PCI525     = 0x0002;
	public static final int PCI530     = 0x0003;
	public static final int KOAX       = 0x0100;
	public static final int LWL        = 0x0200;
	//cam_typ
	public static final int NOCAM      = 0x0;
	public static final int FASTEXP    = 0x1;
	public static final int LONGEXP    = 0x2;
	public static final int OEM        = 0x3; //reserved
	public static final int TESTCAM    = 0x4; //reserved
	public static final int DICAM      = 0x5;
	public static final int LONGEXPI   = 0x6;
	public static final int LONGEXPQE  = 0x7;
	public static final int FASTEXPQE  = 0x8;
	//mode
	public static final int M_LONG     = 0x00;
	public static final int M_FAST     = 0x01;
	public static final int M_DICAM    = 0x05;
	//submode FASTEXP
	public static final int NORMALFAST = 0x0;
	public static final int DOUBLE     = 0x1; //special hardware needed
	public static final int DOUBLEL    = 0x2; //special hardware needed
	public static final int FMODU      = 0x3; //special hardware needed
	public static final int TRIPLE     = 0x4; //special hardware needed
	public static final int CYCLE      = 0x5;
	public static final int ABB        = 0x6; //special hardware needed
	public static final int QUAD       = 0x7; //special hardware needed
	public static final int QUADT      = 0x8; //special hardware needed
	public static final int QUADL      = 0x9; //special hardware needed
	//submode LONGEXP
	public static final int NORMALLONG = 0x0;
	public static final int VIDEO      = 0x1;
	public static final int MECHSHUT   = 0x2;
	public static final int MECHSHUTV  = 0x3;
	public static final int BINNING32  = 0x4;
	public static final int FASTFRAME  = 0x5;
	public static final int DOUBLELONG = 0x6;
	public static final int QE_FAST    = 0x8;
	public static final int QE_DOUBLE  = 0x9; //special hardware needed
	public static final int ASYNC_INT   = 0x10;
	public static final int ASYNC_INT_D = 0x11;
	public static final int ASYNC_EXT   = 0x12;
	public static final int ASYNC_EXT_D = 0x13;
	public static final int EM_FAST     = 0x14;
	public static final int EM_FAST_V   = 0x15;
	public static final int EM_FAST_M   = 0x16;
	public static final int EM_FAST_MV  = 0x17;
	//submode DICAM
	public static final int DPSINGLE   = 0x0;
	public static final int DPMULTI    = 0x1;
	public static final int DPDOUBLE   = 0x2;
	
	public static String camTypeToString(int cameraType) {
		switch(cameraType){
		case NOCAM: return "No camera. What?";
		case FASTEXP: return "Sensicam Fast Exposure";
		case LONGEXP: return "Sensicam Long Exposure";
		case OEM: return "'OEM'";
		case TESTCAM: return "Test Camera";
		case DICAM: return "DICAM";
		case LONGEXPI: return "Sensicam Long Exposure 'I'";
		case LONGEXPQE: return "Sensicam QE Long Exposure";
		case FASTEXPQE: return "Sensicam QE Fast Exposure";
		default: return "Unknown/unrecognised";
		}
	}

	public static String exposureModeToString(int exposureMode, int subMode) {
		if(exposureMode != M_LONG)
			throw new RuntimeException("Not implemented for exposureMode != M_LONG");
		
		switch(subMode){
			case NORMALLONG: return "NORMALLONG: Seq., Busy out";
			case VIDEO: return "VIDEO: Sim. busy out";
			case MECHSHUT: return "MECHSHUT: Seq., exp. out";
			case MECHSHUTV: return "MECHSHUTV: Sim., exp. out";
			case FASTFRAME: return "FASTFRAME : ???";
			case DOUBLELONG: return "DOUBLELONG : ???";
			case QE_FAST: return "QE_FAST: Times in ms";
			case QE_DOUBLE: return "QE_DOUBLE: 2 imgs, ext. trig.";
			case ASYNC_INT: return "ASYNC_INT: ???";
			case ASYNC_INT_D:  return "ASYNC_INT_D: ???";
			case ASYNC_EXT: return "ASYNC_EXT: ???";
			case ASYNC_EXT_D: return "ASYNC_EXT_D: ???";
			case EM_FAST: return "EM_FAST: ???";
			case EM_FAST_V: return "EM_FAST_V: ???";
			case EM_FAST_M: return "EM_FAST_M: ???";
			case EM_FAST_MV: return "EM_FAST_MV: ???";
			default: return "Unknown Exposure Mode";
		}
	}

}
