예제 #1
0
파일: Alta.cpp 프로젝트: azwing/indi
//////////////////////////// 
// OPEN     CONNECTION
void Alta::OpenConnection( const std::string & ioType,
             const std::string & DeviceAddr,
             const uint16_t FirmwareRev,
             const uint16_t Id )
{
#ifdef DEBUGGING_CAMERA
    apgHelper::DebugMsg( "Alta::OpenConnection -> ioType= %s, DeviceAddr = %s, FW = %d, ID = %d", 
        ioType.c_str(), DeviceAddr.c_str(), FirmwareRev, Id  );
#endif

    CreateCamIo( ioType, DeviceAddr );

     // save the input data
    m_FirmwareVersion =  FirmwareRev;
    m_Id = Id;

    if( CamModel::ETHERNET == m_CamIo->GetInterfaceType() )
    {
        m_PlatformType = CamModel::ALTAE;

        // because the ethernet discover message does not 
        // contain the correct firmware version, we are going 
        // to fetch it and store here....kinda silly, but it make this 
        // interface backwards compatible
        m_FirmwareVersion = m_CamIo->GetFirmwareRev();
    }

    //make sure the input id and firmware rev
    //match the camera we just connected to
    VerifyFrmwrRev();
    VerifyCamId();

    //create the ccd specific object
    CfgCamFromId( m_Id );

    //set up the camera mode fsm
    m_CamMode = std::shared_ptr<ModeFsm>( new AltaModeFsm(m_CamIo,
        m_CamCfgData, m_FirmwareVersion) );

  
    //create the adc and pattern file handler object
    m_CcdAcqSettings = std::shared_ptr<CcdAcqParams>(
        new AltaCcdAcqParams(m_CamCfgData, m_CamIo, m_CameraConsts) );

    m_IsConnected = true;
    LogConnectAndDisconnect( true );
}
예제 #2
0
//////////////////////////// 
// OPEN     CONNECTION
void Ascent::OpenConnection( const std::string & ioType,
             const std::string & DeviceAddr,
             const uint16_t FirmwareRev,
             const uint16_t Id )
{
 #ifdef DEBUGGING_CAMERA
    apgHelper::DebugMsg( "Ascent::OpenConnection -> ioType= %s, DeviceAddr = %s, FW = %d, ID = %d", 
        ioType.c_str(), DeviceAddr.c_str(), FirmwareRev,Id  );
#endif

    //create the camera interface
    CreateCamIo( ioType, DeviceAddr );

    // save the input data
    m_FirmwareVersion =  FirmwareRev;
    m_Id = Id;

    //make the input id and firmware rev
    //match the camera we just connected to
    VerifyFrmwrRev();

    VerifyCamId();

    //create the ccd specific object
    CfgCamFromId( m_Id );

    // overwrite cfg matrix data with
    // information from the camera
    UpdateCfgWithStrDbInfo();

    //set the camera mode fsm
    m_CamMode = std::tr1::shared_ptr<ModeFsm>( new CamGen2ModeFsm(m_CamIo,
        m_CamCfgData, m_FirmwareVersion) );

    //create the adc and pattern file handler object
    m_CcdAcqSettings = std::tr1::shared_ptr<CcdAcqParams>( 
        new CamGen2CcdAcqParams(m_CamCfgData,m_CamIo,m_CameraConsts) );

    
    m_IsConnected = true;
    LogConnectAndDisconnect( true );
}