com.pentec.adaq.fist
Class PhoenixComm

java.lang.Object
  extended by com.pentec.adaq.fist.PhoenixComm
All Implemented Interfaces:
IPhoenixComm

public class PhoenixComm
extends java.lang.Object
implements IPhoenixComm

Communication and control class for the Indigo Phoenix camera. Requires: aphoenix.dll (directly) Camera Control.dll (chain loaded) Digitizer Control.dll (chain loaded) IscSyncBrdCtrl.dll (chain loaded) All methods throw PhoenixException on native code errors. Whenever possible, the exception's message will be a textual version of the error code. All methods prefixed with cltCmnd and cltCmndD control the camera across the RS232 line. Methods prefixed with cltCmnd are calls to Camera Control.dll, and methods prefixed with cltCmndD are calls to Digitizer Control.dll. All methods prefixed with syncBrd control the camera across the sync board's HSI serial line and are calls to IscSyncBrdCtrl.dll. Dwell Count: Valid dwell counts are from 0 (off) to 4095. Preset: Valid presets are from 0 to 3. They are referred to as PRESET_[A-D] internally to this class.

Author:
Pender Technology

Field Summary
 
Fields inherited from interface com.pentec.adaq.fist.IPhoenixComm
CLOCK_FREQ, MSTR_SYNC_EXTERNAL, MSTR_SYNC_ONBOARD, PRESET_A, PRESET_B, PRESET_C, PRESET_D, PRESETS, REFRAME_SYNC_ENABLED, REFRAME_SYNC_NORMAL_OPERATION, RESTORE_DIGI_STATE, SAVE_DIGI_STATE
 
Constructor Summary
PhoenixComm(java.lang.String $ComPort)
          This will take a while as we have to wait for the FPA to reach its target temperature before proceeding.
 
Method Summary
 void autoInit()
          Waits until the temperature has dropped below 80, then calls init()
 void close()
          Warning: Calling any other methods after calling close() may lead to access violations in the native code.
private  void cltCmndDDigiStateImage(short sState)
           
 double cltCmndDGetFpaTemp()
           
 FpaWindow cltCmndDGetFpaWindow(byte bPreset)
           
private  void cltCmndDGetFpaWindow(byte bPreset, FpaWindow fpaWindow)
           
 long cltCmndDGetFrameLength(byte bPreset)
           
 long cltCmndDGetIntegrationTime(byte bPreset, long lPixelClocksPerFrame)
           
 short cltCmndDGetPresetDwellCounter(byte bPreset)
           
 void cltCmndDLoadDigitizerCalFile(java.lang.String $CalFile)
           
 void cltCmndDSetFpaWindow(byte bPreset, FpaWindow fpaWindow)
           
private  void cltCmndDSetFpaWindow(byte bPreset, short sXSize, short sYSize, short sXPos, short sYPos)
           
 void cltCmndDSetIntegrationTime(byte bPreset, long lIntegrationTime, long lPixelClocksPerFrame)
           
 void cltCmndDSetPresetDwellCounter(byte bPreset, short sDwellCount)
           
private  void cltCmndDSwitchProcessorClock(long lClockFreq)
           
 void cltCmndVideoTestPattern(boolean isEnabled)
           
 void init()
          Initialize the camera and set defaults.
static void main(java.lang.String[] arg)
           
private  void serComDelete()
           
private  void serComInit(java.lang.String $ComPort)
           
 int syncBrdGetMstrSync()
           
 short syncBrdGetPresetDwellCount(byte bPreset)
           
private  void syncBrdInitialize()
          This must be called at least once per system boot, or the sync board won't talk, usually causing a crash.
private  void syncBrdReframeSync(byte bEnabled)
           
 void syncBrdSelectMstrSync(int iMstrClockSyncSource)
           
 void syncBrdSetNumMstrClocksPerFrame(byte bPreset, long lPixelClocksPerFrame)
           
 void syncBrdSetPresetDwellCount(byte bPreset, short sDwellCount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhoenixComm

public PhoenixComm(java.lang.String $ComPort)
            throws PhoenixException
This will take a while as we have to wait for the FPA to reach its target temperature before proceeding.

Throws:
PhoenixException
Method Detail

autoInit

public void autoInit()
              throws PhoenixException
Waits until the temperature has dropped below 80, then calls init()

Throws:
PhoenixException

close

public void close()
Warning: Calling any other methods after calling close() may lead to access violations in the native code. So don't do that! Consider this object dead after calling close().

Specified by:
close in interface IPhoenixComm

cltCmndDDigiStateImage

private void cltCmndDDigiStateImage(short sState)
                             throws PhoenixException
Throws:
PhoenixException

cltCmndDGetFpaTemp

public double cltCmndDGetFpaTemp()
                          throws PhoenixException
Specified by:
cltCmndDGetFpaTemp in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDGetFpaWindow

public FpaWindow cltCmndDGetFpaWindow(byte bPreset)
                               throws PhoenixException
Specified by:
cltCmndDGetFpaWindow in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDGetFpaWindow

private void cltCmndDGetFpaWindow(byte bPreset,
                                  FpaWindow fpaWindow)
                           throws PhoenixException
Throws:
PhoenixException

cltCmndDGetFrameLength

public long cltCmndDGetFrameLength(byte bPreset)
                            throws PhoenixException
Specified by:
cltCmndDGetFrameLength in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDGetIntegrationTime

public long cltCmndDGetIntegrationTime(byte bPreset,
                                       long lPixelClocksPerFrame)
                                throws PhoenixException
Specified by:
cltCmndDGetIntegrationTime in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDGetPresetDwellCounter

public short cltCmndDGetPresetDwellCounter(byte bPreset)
                                    throws PhoenixException
Specified by:
cltCmndDGetPresetDwellCounter in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDLoadDigitizerCalFile

public void cltCmndDLoadDigitizerCalFile(java.lang.String $CalFile)
                                  throws PhoenixException
Throws:
PhoenixException

cltCmndDSetFpaWindow

public void cltCmndDSetFpaWindow(byte bPreset,
                                 FpaWindow fpaWindow)
                          throws PhoenixException
Specified by:
cltCmndDSetFpaWindow in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDSetFpaWindow

private void cltCmndDSetFpaWindow(byte bPreset,
                                  short sXSize,
                                  short sYSize,
                                  short sXPos,
                                  short sYPos)
                           throws PhoenixException
Throws:
PhoenixException

cltCmndDSetIntegrationTime

public void cltCmndDSetIntegrationTime(byte bPreset,
                                       long lIntegrationTime,
                                       long lPixelClocksPerFrame)
                                throws PhoenixException
Specified by:
cltCmndDSetIntegrationTime in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDSetPresetDwellCounter

public void cltCmndDSetPresetDwellCounter(byte bPreset,
                                          short sDwellCount)
                                   throws PhoenixException
Specified by:
cltCmndDSetPresetDwellCounter in interface IPhoenixComm
Throws:
PhoenixException

cltCmndDSwitchProcessorClock

private void cltCmndDSwitchProcessorClock(long lClockFreq)
                                   throws PhoenixException
Throws:
PhoenixException

cltCmndVideoTestPattern

public void cltCmndVideoTestPattern(boolean isEnabled)
                             throws PhoenixException
Specified by:
cltCmndVideoTestPattern in interface IPhoenixComm
Throws:
PhoenixException

init

public void init()
          throws PhoenixException
Initialize the camera and set defaults. This should be called only after the FPA temperature has dropped below 80.

Throws:
PhoenixException

main

public static void main(java.lang.String[] arg)
                 throws java.lang.Exception
Throws:
java.lang.Exception

serComDelete

private void serComDelete()

serComInit

private void serComInit(java.lang.String $ComPort)
                 throws PhoenixException
Throws:
PhoenixException

syncBrdGetMstrSync

public int syncBrdGetMstrSync()
                       throws PhoenixException
Specified by:
syncBrdGetMstrSync in interface IPhoenixComm
Throws:
PhoenixException

syncBrdGetPresetDwellCount

public short syncBrdGetPresetDwellCount(byte bPreset)
                                 throws PhoenixException
Specified by:
syncBrdGetPresetDwellCount in interface IPhoenixComm
Throws:
PhoenixException

syncBrdInitialize

private void syncBrdInitialize()
                        throws PhoenixException
This must be called at least once per system boot, or the sync board won't talk, usually causing a crash. Multiple calls per boot cause no ill effects. Calling this once per program start is advised.

Throws:
PhoenixException

syncBrdReframeSync

private void syncBrdReframeSync(byte bEnabled)
                         throws PhoenixException
Throws:
PhoenixException

syncBrdSelectMstrSync

public void syncBrdSelectMstrSync(int iMstrClockSyncSource)
                           throws PhoenixException
Specified by:
syncBrdSelectMstrSync in interface IPhoenixComm
Throws:
PhoenixException

syncBrdSetNumMstrClocksPerFrame

public void syncBrdSetNumMstrClocksPerFrame(byte bPreset,
                                            long lPixelClocksPerFrame)
                                     throws PhoenixException
Specified by:
syncBrdSetNumMstrClocksPerFrame in interface IPhoenixComm
Throws:
PhoenixException

syncBrdSetPresetDwellCount

public void syncBrdSetPresetDwellCount(byte bPreset,
                                       short sDwellCount)
                                throws PhoenixException
Specified by:
syncBrdSetPresetDwellCount in interface IPhoenixComm
Throws:
PhoenixException