TwiceAsNice  2019-02-18
Classes | Enumerations | Functions
fishcamp.h File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdbool.h>
#include "fishcamp_common.h"
Include dependency graph for fishcamp.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  fc_camInfo
 

Enumerations

enum  fc_cmd {
  fcNOP, fcRST, fcGETINFO, fcSETREG,
  fcGETREG, fcSETINTTIME, fcSTARTEXP, fcABORTEXP,
  fcGETSTATE, fcSETFGTP, fcRDSCANLINE, fcGETIMAGESTATS,
  fcSETROI, fcSETBIN, fcSETRELAY, fcCLRRELAY,
  fcPULSERELAY, fcSETLED, fcSETTEMP, fcGETTEMP,
  fcGETRAWFRAME, fcTURNOFFTEC, fcSETREADMODE, fcSETGAIN,
  fcSETOFFSET, fcSETGUIDEINTTIME, fcSTARTGUIDEEXP, fcABORTGUIDEEXP,
  fcGETGUIDESTATE, fcGETPEDESTAL, fcSETREG32, fcGETREG32,
  fcSETPROPERTY, fcGETPROPERTY, fcNOP, fcRST,
  fcGETINFO, fcSETREG, fcGETREG, fcSETINTTIME,
  fcSTARTEXP, fcABORTEXP, fcGETSTATE, fcSETFGTP,
  fcRDSCANLINE, fcGETIMAGESTATS, fcSETROI, fcSETBIN,
  fcSETRELAY, fcCLRRELAY, fcPULSERELAY, fcSETLED,
  fcSETTEMP, fcGETTEMP, fcGETRAWFRAME, fcTURNOFFTEC,
  fcSETREADMODE, fcSETGAIN, fcSETOFFSET, fcSETGUIDEINTTIME,
  fcSTARTGUIDEEXP, fcABORTGUIDEEXP, fcGETGUIDESTATE, fcGETPEDESTAL,
  fcSETREG32, fcGETREG32, fcSETPROPERTY, fcGETPROPERTY
}
 
enum  fcFindCamState {
  fcFindCam_notYetStarted, fcFindCam_looking4supported, fcFindCam_initializingUSB, fcFindCam_initializingIP,
  fcFindCam_finished, fcFindCam_notYetStarted, fcFindCam_looking4supported, fcFindCam_initializingUSB,
  fcFindCam_initializingIP, fcFindCam_finished
}
 
enum  fc_relay {
  fcRELAYNORTH, fcRELAYSOUTH, fcRELAYWEST, fcRELAYEAST,
  fcRELAYNORTH, fcRELAYSOUTH, fcRELAYWEST, fcRELAYEAST
}
 
enum  fc_dataFormat {
  fc_8b_data, fc_10b_data, fc_12b_data, fc_14b_data,
  fc_16b_data, fc_8b_data, fc_10b_data, fc_12b_data,
  fc_14b_data, fc_16b_data
}
 
enum  fc_dataXfrModes {
  fc_classicDataXfr, fc_DMAwFBDataXfr, fc_DMASensor2USBDataXfr, fc_classicDataXfr,
  fc_DMAwFBDataXfr, fc_DMASensor2USBDataXfr
}
 
enum  fc_imageFilter {
  fc_filter_none, fc_filter_3x3, fc_filter_5x5, fc_filter_hotPixel,
  fc_filter_none, fc_filter_3x3, fc_filter_5x5, fc_filter_hotPixel
}
 
enum  fc_property {
  fcPROP_NUMSAMPLES, fcPROP_PATTERNENABLE, fcPROP_PIXCAPTURE, fcPROP_SHUTTERMODE,
  fcPROP_MOVESHUTTERFLAG, fcPROP_COLNORM, fcPROP_SERVOOPENPOS, fcPROP_SERVOCLOSEDPOS,
  fcPROP_NUMSAMPLES, fcPROP_PATTERNENABLE, fcPROP_PIXCAPTURE, fcPROP_SHUTTERMODE,
  fcPROP_MOVESHUTTERFLAG, fcPROP_COLNORM, fcPROP_SERVOOPENPOS, fcPROP_SERVOCLOSEDPOS
}
 

Functions

void Starfish_Log (char *logString)
 
void fcUsb_init (void)
 
void fcUsb_setLogging (bool loggingState)
 
void fcUsb_setSimulation (bool simState)
 
void fcUsb_close (void)
 
int fcUsb_FindCameras (void)
 
int fcUsb_GetFindCamsState (void)
 
float fcUsb_GetFindCamsPercentComplete (void)
 
int fcUsb_OpenCamera (int camNum)
 
int fcUsb_CloseCamera (int camNum)
 
int fcUsb_GetNumCameras (void)
 
bool fcUsb_haveCamera (void)
 
int fcUsb_GetCameraSerialNum (int camNum)
 
int fcUsb_GetCameraVendorID (int camNum)
 
int fcUsb_GetCameraProductID (int camNum)
 
int fcUsb_cmd_nop (int camNum)
 
int fcUsb_cmd_rst (int camNum)
 
int fcUsb_cmd_getinfo (int camNum, fc_camInfo *camInfo)
 
int fcUsb_cmd_setRegister (int camNum, UInt16 regAddress, UInt16 dataValue)
 
UInt16 fcUsb_cmd_getRegister (int camNum, UInt16 regAddress)
 
int fcUsb_cmd_setIntegrationTime (int camNum, UInt32 theTime)
 
int fcUsb_cmd_setGuiderIntegrationTime (int camNum, UInt32 theTime)
 
int fcUsb_cmd_startExposure (int camNum)
 
int fcUsb_cmd_startGuiderExposure (int camNum)
 
int fcUsb_cmd_abortExposure (int camNum)
 
int fcUsb_cmd_abortGuiderExposure (int camNum)
 
UInt16 fcUsb_cmd_getState (int camNum)
 
UInt16 fcUsb_cmd_getGuiderState (int camNum)
 
int fcUsb_cmd_setFrameGrabberTestPattern (int camNum, UInt16 state)
 
int fcUsb_cmd_rdScanLine (int camNum, UInt16 lineNum, UInt16 Xmin, UInt16 Xmax, UInt16 *lineBuffer)
 
int fcUsb_cmd_setRoi (int camNum, UInt16 left, UInt16 top, UInt16 right, UInt16 bottom)
 
int fcUsb_cmd_setBin (int camNum, UInt16 binMode)
 
int fcUsb_cmd_setRelay (int camNum, int whichRelay)
 
int fcUsb_cmd_clearRelay (int camNum, int whichRelay)
 
int fcUsb_cmd_pulseRelay (int camNum, int whichRelay, int onMs, int offMs, bool repeats)
 
int fcUsb_cmd_setTemperature (int camNum, SInt16 theTemp)
 
SInt16 fcUsb_cmd_getTemperature (int camNum)
 
UInt16 fcUsb_cmd_getTECPowerLevel (int camNum)
 
bool fcUsb_cmd_getTECInPowerOK (int camNum)
 
int fcUsb_cmd_turnOffCooler (int camNum)
 
int fcUsb_cmd_getRawFrame (int camNum, UInt16 numRows, UInt16 numCols, UInt16 *frameBuffer)
 
int fcUsb_cmd_setReadMode (int camNum, int DataXfrReadMode, int DataFormat)
 
void fcUsb_setStarfishDefaultRegs (int camNum)
 
int fcUsb_cmd_setCameraGain (int camNum, UInt16 theGain)
 
int fcUsb_cmd_setCameraOffset (int camNum, UInt16 theOffset)
 
void fcUsb_cmd_setImageFilter (int camNum, int theImageFilter)
 
UInt16 fcUsb_cmd_getBlackPedestal (int camNum)
 
void fcUsb_cmd_setCameraProperty (int camNum, int propertyType, int propertyValue)
 

Enumeration Type Documentation

◆ fc_cmd

enum fc_cmd
Enumerator
fcNOP 
fcRST 
fcGETINFO 
fcSETREG 
fcGETREG 
fcSETINTTIME 
fcSTARTEXP 
fcABORTEXP 
fcGETSTATE 
fcSETFGTP 
fcRDSCANLINE 
fcGETIMAGESTATS 
fcSETROI 
fcSETBIN 
fcSETRELAY 
fcCLRRELAY 
fcPULSERELAY 
fcSETLED 
fcSETTEMP 
fcGETTEMP 
fcGETRAWFRAME 
fcTURNOFFTEC 
fcSETREADMODE 
fcSETGAIN 
fcSETOFFSET 
fcSETGUIDEINTTIME 
fcSTARTGUIDEEXP 
fcABORTGUIDEEXP 
fcGETGUIDESTATE 
fcGETPEDESTAL 
fcSETREG32 
fcGETREG32 
fcSETPROPERTY 
fcGETPROPERTY 
fcNOP 
fcRST 
fcGETINFO 
fcSETREG 
fcGETREG 
fcSETINTTIME 
fcSTARTEXP 
fcABORTEXP 
fcGETSTATE 
fcSETFGTP 
fcRDSCANLINE 
fcGETIMAGESTATS 
fcSETROI 
fcSETBIN 
fcSETRELAY 
fcCLRRELAY 
fcPULSERELAY 
fcSETLED 
fcSETTEMP 
fcGETTEMP 
fcGETRAWFRAME 
fcTURNOFFTEC 
fcSETREADMODE 
fcSETGAIN 
fcSETOFFSET 
fcSETGUIDEINTTIME 
fcSTARTGUIDEEXP 
fcABORTGUIDEEXP 
fcGETGUIDESTATE 
fcGETPEDESTAL 
fcSETREG32 
fcGETREG32 
fcSETPROPERTY 
fcGETPROPERTY 

◆ fc_dataFormat

Enumerator
fc_8b_data 
fc_10b_data 
fc_12b_data 
fc_14b_data 
fc_16b_data 
fc_8b_data 
fc_10b_data 
fc_12b_data 
fc_14b_data 
fc_16b_data 

◆ fc_dataXfrModes

Enumerator
fc_classicDataXfr 
fc_DMAwFBDataXfr 
fc_DMASensor2USBDataXfr 
fc_classicDataXfr 
fc_DMAwFBDataXfr 
fc_DMASensor2USBDataXfr 

◆ fc_imageFilter

Enumerator
fc_filter_none 
fc_filter_3x3 
fc_filter_5x5 
fc_filter_hotPixel 
fc_filter_none 
fc_filter_3x3 
fc_filter_5x5 
fc_filter_hotPixel 

◆ fc_property

Enumerator
fcPROP_NUMSAMPLES 
fcPROP_PATTERNENABLE 
fcPROP_PIXCAPTURE 
fcPROP_SHUTTERMODE 
fcPROP_MOVESHUTTERFLAG 
fcPROP_COLNORM 
fcPROP_SERVOOPENPOS 
fcPROP_SERVOCLOSEDPOS 
fcPROP_NUMSAMPLES 
fcPROP_PATTERNENABLE 
fcPROP_PIXCAPTURE 
fcPROP_SHUTTERMODE 
fcPROP_MOVESHUTTERFLAG 
fcPROP_COLNORM 
fcPROP_SERVOOPENPOS 
fcPROP_SERVOCLOSEDPOS 

◆ fc_relay

enum fc_relay
Enumerator
fcRELAYNORTH 
fcRELAYSOUTH 
fcRELAYWEST 
fcRELAYEAST 
fcRELAYNORTH 
fcRELAYSOUTH 
fcRELAYWEST 
fcRELAYEAST 

◆ fcFindCamState

Enumerator
fcFindCam_notYetStarted 
fcFindCam_looking4supported 
fcFindCam_initializingUSB 
fcFindCam_initializingIP 
fcFindCam_finished 
fcFindCam_notYetStarted 
fcFindCam_looking4supported 
fcFindCam_initializingUSB 
fcFindCam_initializingIP 
fcFindCam_finished 

Function Documentation

◆ fcUsb_close()

void fcUsb_close ( void  )

◆ fcUsb_CloseCamera()

int fcUsb_CloseCamera ( int  camNum)

◆ fcUsb_cmd_abortExposure()

int fcUsb_cmd_abortExposure ( int  camNum)

◆ fcUsb_cmd_abortGuiderExposure()

int fcUsb_cmd_abortGuiderExposure ( int  camNum)

◆ fcUsb_cmd_clearRelay()

int fcUsb_cmd_clearRelay ( int  camNum,
int  whichRelay 
)

◆ fcUsb_cmd_getBlackPedestal()

UInt16 fcUsb_cmd_getBlackPedestal ( int  camNum)

◆ fcUsb_cmd_getGuiderState()

UInt16 fcUsb_cmd_getGuiderState ( int  camNum)

◆ fcUsb_cmd_getinfo()

int fcUsb_cmd_getinfo ( int  camNum,
fc_camInfo camInfo 
)

◆ fcUsb_cmd_getRawFrame()

int fcUsb_cmd_getRawFrame ( int  camNum,
UInt16  numRows,
UInt16  numCols,
UInt16 frameBuffer 
)

◆ fcUsb_cmd_getRegister()

UInt16 fcUsb_cmd_getRegister ( int  camNum,
UInt16  regAddress 
)

◆ fcUsb_cmd_getState()

UInt16 fcUsb_cmd_getState ( int  camNum)

◆ fcUsb_cmd_getTECInPowerOK()

bool fcUsb_cmd_getTECInPowerOK ( int  camNum)

◆ fcUsb_cmd_getTECPowerLevel()

UInt16 fcUsb_cmd_getTECPowerLevel ( int  camNum)

◆ fcUsb_cmd_getTemperature()

SInt16 fcUsb_cmd_getTemperature ( int  camNum)

◆ fcUsb_cmd_nop()

int fcUsb_cmd_nop ( int  camNum)

◆ fcUsb_cmd_pulseRelay()

int fcUsb_cmd_pulseRelay ( int  camNum,
int  whichRelay,
int  onMs,
int  offMs,
bool  repeats 
)

◆ fcUsb_cmd_rdScanLine()

int fcUsb_cmd_rdScanLine ( int  camNum,
UInt16  lineNum,
UInt16  Xmin,
UInt16  Xmax,
UInt16 lineBuffer 
)

◆ fcUsb_cmd_rst()

int fcUsb_cmd_rst ( int  camNum)

◆ fcUsb_cmd_setBin()

int fcUsb_cmd_setBin ( int  camNum,
UInt16  binMode 
)

◆ fcUsb_cmd_setCameraGain()

int fcUsb_cmd_setCameraGain ( int  camNum,
UInt16  theGain 
)

◆ fcUsb_cmd_setCameraOffset()

int fcUsb_cmd_setCameraOffset ( int  camNum,
UInt16  theOffset 
)

◆ fcUsb_cmd_setCameraProperty()

void fcUsb_cmd_setCameraProperty ( int  camNum,
int  propertyType,
int  propertyValue 
)

◆ fcUsb_cmd_setFrameGrabberTestPattern()

int fcUsb_cmd_setFrameGrabberTestPattern ( int  camNum,
UInt16  state 
)

◆ fcUsb_cmd_setGuiderIntegrationTime()

int fcUsb_cmd_setGuiderIntegrationTime ( int  camNum,
UInt32  theTime 
)

◆ fcUsb_cmd_setImageFilter()

void fcUsb_cmd_setImageFilter ( int  camNum,
int  theImageFilter 
)

◆ fcUsb_cmd_setIntegrationTime()

int fcUsb_cmd_setIntegrationTime ( int  camNum,
UInt32  theTime 
)


special handling for the starfish guide camera if (gCamerasFound[camNum - 1].camFinalProduct == starfish_mono_rev2_final_deviceID) { tell the camera the new setting of the read black cols mode bit. We will read the black cols anytime the integration time is less than 2 seconds. fcUsb_cmd_setReadMode(camNum, gDataXfrReadMode[camNum - 1], gDataFormat[camNum - 1]); resend the ROI params. the fcUsb_cmd_setReadMode routine will have set the gReadBlack variable so the next routine will trick the camera into using a wider ROI. fcUsb_cmd_setRoi(camNum, gRoi_left[camNum - 1], gRoi_top[camNum - 1], gRoi_right[camNum - 1], gRoi_bottom[camNum - 1]); }

◆ fcUsb_cmd_setReadMode()

int fcUsb_cmd_setReadMode ( int  camNum,
int  DataXfrReadMode,
int  DataFormat 
)

◆ fcUsb_cmd_setRegister()

int fcUsb_cmd_setRegister ( int  camNum,
UInt16  regAddress,
UInt16  dataValue 
)

◆ fcUsb_cmd_setRelay()

int fcUsb_cmd_setRelay ( int  camNum,
int  whichRelay 
)

◆ fcUsb_cmd_setRoi()

int fcUsb_cmd_setRoi ( int  camNum,
UInt16  left,
UInt16  top,
UInt16  right,
UInt16  bottom 
)

◆ fcUsb_cmd_setTemperature()

int fcUsb_cmd_setTemperature ( int  camNum,
SInt16  theTemp 
)

◆ fcUsb_cmd_startExposure()

int fcUsb_cmd_startExposure ( int  camNum)

◆ fcUsb_cmd_startGuiderExposure()

int fcUsb_cmd_startGuiderExposure ( int  camNum)

◆ fcUsb_cmd_turnOffCooler()

int fcUsb_cmd_turnOffCooler ( int  camNum)

◆ fcUsb_FindCameras()

int fcUsb_FindCameras ( void  )

◆ fcUsb_GetCameraProductID()

int fcUsb_GetCameraProductID ( int  camNum)

◆ fcUsb_GetCameraSerialNum()

int fcUsb_GetCameraSerialNum ( int  camNum)

◆ fcUsb_GetCameraVendorID()

int fcUsb_GetCameraVendorID ( int  camNum)

◆ fcUsb_GetFindCamsPercentComplete()

float fcUsb_GetFindCamsPercentComplete ( void  )

◆ fcUsb_GetFindCamsState()

int fcUsb_GetFindCamsState ( void  )

◆ fcUsb_GetNumCameras()

int fcUsb_GetNumCameras ( void  )

◆ fcUsb_haveCamera()

bool fcUsb_haveCamera ( void  )

◆ fcUsb_init()

void fcUsb_init ( void  )

◆ fcUsb_OpenCamera()

int fcUsb_OpenCamera ( int  camNum)

◆ fcUsb_setLogging()

void fcUsb_setLogging ( bool  loggingState)

◆ fcUsb_setSimulation()

void fcUsb_setSimulation ( bool  simState)

◆ fcUsb_setStarfishDefaultRegs()

void fcUsb_setStarfishDefaultRegs ( int  camNum)

◆ Starfish_Log()

void Starfish_Log ( char *  logString)