/* * 2004/11/09 Created by Keiichi Matsuzaki * release 0.1 * 2004/11/11 Modified by KM * release 0.2 */ #include #include #include "xrteStatus.h" int CAL_INFO; int CHIP_SUM; int ROI_H_STA_POS; int ROI_V_STA_POS; int ROI_H_SIZE; int ROI_V_SIZE; int CCD_READ_PORT; int CCD_TEMP; int CCD_OPE_STS1; int CCD_OPE_STS2; int CCD_OPE_STS3; int CCD_OPE_STS4; int CCD_OPE_STS5; int CCD_OPE_STS6; int CCD_OPE_STS7; int CCD_OPE_STS8; extern short EXP_STA_TIME; extern short EXP_END_TIME; extern short READ_END_TIME; extern short TIMER_COUNTER; float floatData; double doubleData; extern int parse(char* input, int len); static unsigned char buf[17+12]; int main(){ int i,j; for(i=0;i<17;i++){ buf[i] = 0xff; } for(j=0;j<=17*8;j++){ *((float *)(void*)(buf+17)) = (float) j; *((double*)(void*)(buf+21)) = (double) j; parse(buf,(17+12)*8); for(i=17-1;i>0;i--){ buf[i] = (buf[i]>>1) + 0x80 * (buf[i-1]%2); } buf[0] = buf[0]>>1; } return 0; } void recievedStatus() { printf( "%1x ", CAL_INFO ); printf( "%1x ", CHIP_SUM ); printf( "%02x ", ROI_H_STA_POS ); printf( "%02x ", ROI_V_STA_POS ); printf( "%02x ", ROI_H_SIZE ); printf( "%02x ", ROI_V_SIZE ); printf( "%+1d ", CCD_READ_PORT ); printf( "%02x ", CCD_TEMP ); printf( "%1x ", CCD_OPE_STS1 ); printf( "%1x ", CCD_OPE_STS2 ); printf( "%1x ", CCD_OPE_STS3 ); printf( "%1x ", CCD_OPE_STS4 ); printf( "%1x ", CCD_OPE_STS5 ); printf( "%1x ", CCD_OPE_STS6 ); printf( "%1x ", CCD_OPE_STS7 ); printf( "%1x ", CCD_OPE_STS8 ); printf( "%04x ", EXP_STA_TIME & 0xffff); printf( "%04x ", EXP_END_TIME & 0xffff); printf( "%04x ", READ_END_TIME & 0xffff); printf( "%04x ", TIMER_COUNTER & 0xffff); printf( "%g ", floatData); printf( "%g ", doubleData); printf( "\n" ); }