• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

ApnCamera_Linux.cpp

Go to the documentation of this file.
00001 // ApnCamera.cpp: extras from the CCameraIO class.
00002 //
00004 
00005 #include "stdafx.h"
00006 
00007 #include "ApnCamera.h"
00008 #include "ApnCamTable.h"
00009 //#include "tcl.h"
00010 //#include "ccd.h"
00011 
00012 
00013 // Determine if camera is present
00014 // True if camera is present, false otherwise.
00015 bool CApnCamera::read_Present()
00016 {
00017     // OutputDebugString( "read_Present()" );
00018 
00019     USHORT ApStatus;
00020     USHORT DatumA;
00021     USHORT DatumB;
00022     char    szMsg[80];
00023 
00024     DatumA      = 0x0;
00025     DatumB      = 0x0;
00026     ApStatus    = 0;
00027 
00028     Write( FPGA_REG_SCRATCH, 0x8086 );
00029     Read( FPGA_REG_SCRATCH, DatumA );
00030 
00031     Write( FPGA_REG_SCRATCH, 0x1F2F );
00032     Read( FPGA_REG_SCRATCH, DatumB );
00033 
00034     if ( (DatumA != 0x8086) || (DatumB != 0x1F2F) )
00035     {
00036         // OutputDebugString( "read_Present FAILED." );
00037         sprintf( szMsg, "read_Present FAILED.  DatumA:  0x%X   DatumB:  0x%X", DatumA, DatumB );
00038         // OutputDebugString( szMsg );
00039         return false;
00040     }
00041 
00042     // OutputDebugString( "read_Present SUCCESS" );
00043 
00044     return true;
00045 }
00046 
00047 bool CApnCamera::sensorInfo()
00048 {
00049     strcpy(m_Sensor,m_ApnSensorInfo->m_Sensor);
00050     strcpy(m_CameraModel,m_ApnSensorInfo->m_CameraModel);
00051     m_CameraId  =   m_ApnSensorInfo->m_CameraId;
00052     m_InterlineCCD  =   m_ApnSensorInfo->m_InterlineCCD;
00053     m_SupportsSerialA = m_ApnSensorInfo->m_SupportsSerialA;
00054     m_SupportsSerialB   =   m_ApnSensorInfo->m_SupportsSerialB;
00055     m_SensorTypeCCD     =m_ApnSensorInfo->m_SensorTypeCCD;
00056     m_TotalColumns  =m_ApnSensorInfo->m_TotalColumns;
00057     m_ImagingColumns=   m_ApnSensorInfo->m_ImagingColumns;
00058     m_ClampColumns= m_ApnSensorInfo->m_ClampColumns;
00059     m_PreRoiSkipColumns =m_ApnSensorInfo->m_PreRoiSkipColumns;
00060     m_PostRoiSkipColumns=   m_ApnSensorInfo->m_PostRoiSkipColumns;
00061     m_OverscanColumns   =m_ApnSensorInfo->m_OverscanColumns;
00062     m_TotalRows =m_ApnSensorInfo->m_TotalRows;
00063     m_ImagingRows   =m_ApnSensorInfo->m_ImagingRows;
00064     m_UnderscanRows=    m_ApnSensorInfo->m_UnderscanRows;
00065     m_OverscanRows  =m_ApnSensorInfo->m_OverscanRows;
00066     m_VFlushBinning =m_ApnSensorInfo->m_VFlushBinning;
00067     m_HFlushDisable     =m_ApnSensorInfo->m_HFlushDisable;
00068     m_ShutterCloseDelay=    m_ApnSensorInfo->m_ShutterCloseDelay;
00069     m_PixelSizeX    =   m_ApnSensorInfo->m_PixelSizeX;
00070     m_PixelSizeY    =   m_ApnSensorInfo->m_PixelSizeY;
00071     m_Color =   m_ApnSensorInfo->m_Color;
00072 //  m_ReportedGainTwelveBit =   m_ApnSensorInfo->m_ReportedGainTwelveBit;
00073     m_ReportedGainSixteenBit=       m_ApnSensorInfo->m_ReportedGainSixteenBit;
00074     m_MinSuggestedExpTime   =   m_ApnSensorInfo->m_MinSuggestedExpTime;
00075 //  m_TempRegRate   =m_ApnSensorInfo->m_TempRegRate;
00076     m_TempRampRateOne   =m_ApnSensorInfo->m_TempRampRateOne;
00077     m_TempRampRateTwo   =m_ApnSensorInfo->m_TempRampRateTwo;
00078     m_DefaultGainTwelveBit  =m_ApnSensorInfo->m_DefaultGainTwelveBit;
00079     m_DefaultOffsetTwelveBit=   m_ApnSensorInfo->m_DefaultOffsetTwelveBit;
00080     m_DefaultRVoltage   =m_ApnSensorInfo->m_DefaultRVoltage;
00081     return true;
00082 
00083 }
00084 
00085 #if 0
00086 bool CApnCamera::BufferImage(char *bufferName )
00087 {
00088     unsigned short *pImageData;
00089     bool status; 
00090     short cols,rows,hbin,vbin;
00091     unsigned short xSize, ySize;
00092     unsigned long count;
00093 
00094     cols = m_pvtExposurePixelsH;
00095     rows = m_pvtExposurePixelsV;
00096 
00097     /* ALTA code has already applied binning calculations*/
00098     hbin = 1;
00099     vbin = 1;
00100 
00101     pImageData = (unsigned short *)CCD_locate_buffer(bufferName, 2 , cols, rows, hbin, vbin );
00102     if (pImageData == NULL) {
00103        return 0;
00104     }
00105     
00106     status = GetImageData(pImageData, xSize, ySize, count);
00107     return status;
00108 }
00109 
00110 
00111 
00112 bool CApnCamera::BufferDriftScan(char *bufferName, int delay, int rowCount, int nblock , int npipe)
00113 {
00114     unsigned short *pImageData, *ptr;
00115     bool status; 
00116     int irow;
00117     short cols,rows,hbin,vbin;
00118 
00119     cols = m_pvtExposurePixelsH;
00120     rows = rowCount;
00121     hbin = m_RoiBinningH;
00122     vbin = 1;
00123     return 1;
00124 }
00125 
00126 #endif
00127 
00128 
00129 

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal