OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Hawkeye.h File Reference
#include <stdint.h>
Include dependency graph for Hawkeye.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PingParams
 
struct  PingShortResponse
 
struct  PingMediumResponse
 
struct  PingLongResponse
 
struct  SetPowerStateParams
 
struct  GetPowerStateResponse
 
struct  TelemetryPair
 
struct  GetTelemetryResponse
 
struct  SetMissionTimeParams
 
struct  SetExposureParametersParams
 
struct  StartExposureParams
 
struct  EndExposureParams
 
struct  GetExposureStateResponse
 
struct  GenerateTestExposureParams
 
struct  PostProcessImageParams
 
struct  SetImageSectorSizeParams
 
struct  SetImageSectorSizeResponse
 
struct  BandCompression
 
struct  SetSpectralCompressionParametersParams
 
struct  GetImageSectorsParams
 
struct  GetImageSectorsResponse
 
struct  FlashOperationsParams
 
struct  UGASetExposureParametersParams
 
struct  UGAPostProcessImageParams
 
struct  UGAGetExposureStateResponse
 
struct  UGAGenerateTestExposureParams
 
struct  DBDownloadParams
 
struct  DBMicronGrabParams
 
struct  DBMicronGrabResponse
 
struct  DBKLIGrabParams
 
struct  DBKLIStreamParams
 
struct  DBEchoParams
 
struct  DBCameraInfoResponse
 

Macros

#define HAWKEYE_CANDC_PORT   5625
 
#define HAWKEYE_IMAGE_PORT   5626
 
#define FINDERSCOPE_VBINNING   1
 
#define FINDERSCOPE_FPGA_BINNING   0
 
#define FINDERSCOPE_LIGHT_WIDTH   752
 
#define FINDERSCOPE_LIGHT_HEIGHT   (480/FINDERSCOPE_VBINNING)
 
#define FINDERSCOPE_CAPTURE_DARK_WIDTH   36
 
#define FINDERSCOPE_DOWNLOAD_DARK_WIDTH   4
 
#define FINDERSCOPE_CAPTURE_WIDTH   (FINDERSCOPE_CAPTURE_DARK_WIDTH + FINDERSCOPE_LIGHT_WIDTH)
 
#define FINDERSCOPE_DOWNLOAD_WIDTH   (FINDERSCOPE_DOWNLOAD_DARK_WIDTH + FINDERSCOPE_LIGHT_WIDTH)
 
#define FINDERSCOPE_MAX_IMAGES   25
 
#define FINDERSCOPE_MAX_IMAGES_UGA   250
 
#define FINDERSCOPE_MIN_PERIOD_MS   18
 
#define FINDERSCOPE_MAX_PERIOD_MS   80
 
#define BAND_IMAGE_HEIGHT   6000
 
#define BAND_IMAGE_WIDTH   1800
 
#define BAND_DARK_WIDTH   16
 
#define BAND_TOTAL_WIDTH   (BAND_DARK_WIDTH + BAND_IMAGE_WIDTH)
 
#define BAND_DARK_TOP   0
 
#define BAND_DARK_BOTTOM   1
 
#define BAND_DARK_POSITION   BAND_DARK_BOTTOM
 
#define BAND_DARK_BOTTOM_TRANSITION   20
 
#define BAND_US_PER_EXPOSURE_COUNT   10
 
#define BAND_DARK_MAX_RECORDS   12
 
#define TELEMETRY_MAX_RECORDS   12
 
#define MISSION_LOG_MAX_RECORDS   3
 
#define MISSION_LOG_LENGTH   10000
 
#define MIN_SECTOR_SIZE   30
 
#define MAX_SECTOR_SIZE   1024
 
#define ACK   0x06
 
#define NAK   0x15
 
#define DC1   0x11
 
#define DC2   0x12
 
#define CAN   0x18
 

Typedefs

typedef SetMissionTimeParams GetMissionTimeResponse
 
typedef SetExposureParametersParams GetExposureParametersResponse
 
typedef SetSpectralCompressionParametersParams GetSpectralCompressionParametersResponse
 
typedef UGASetExposureParametersParams UGAGetExposureParametersResponse
 
typedef DBMicronGrabResponse DBKLIGrabResponse
 
typedef DBMicronGrabResponse DBKLIStreamResponse
 
typedef DBEchoParams DBEchoResponse
 

Enumerations

enum  HAWKEYE_COMMAND {
  HC_NULL, HC_PING, HC_SET_POWER_STATE, HC_GET_POWER_STATE,
  HC_GET_TELEMETRY, HC_SET_EXPOSURE_PARAMETERS, HC_GET_EXPOSURE_PARAMETERS, HC_START_EXPOSURE,
  HC_END_EXPOSURE, HC_GET_EXPOSURE_STATE, HC_GENERATE_TEST_EXPOSURE, HC_SET_IMAGE_SECTOR_SIZE,
  HC_SET_SPECTRAL_COMPRESSION_PARAMETERS, HC_GET_SPECTRAL_COMPRESSION_PARAMETERS, HC_POST_PROCESS_IMAGE, HC_GET_MISSION_TIME,
  HC_SET_MISSION_TIME, HC_GET_IMAGE_SECTORS, HC_FLASH_OPERATIONS, HC_LAST_COMMAND,
  HC_UGA_NULL = 100, HC_UGA_SET_EXPOSURE_PARAMETERS, HC_UGA_GET_EXPOSURE_PARAMETERS, HC_UGA_POST_PROCESS_IMAGE,
  HC_UGA_GET_EXPOSURE_STATE, HC_UGA_GENERATE_TEST_EXPOSURE, HC_UGA_LAST_COMMAND, HC_DB_NULL = 200,
  HC_DB_DOWNLOAD, HC_DB_MICRON_GRAB, HC_DB_KLI_GRAB, HC_DB_KLI_STREAM,
  HC_DB_ECHO, HC_DB_CAMERA_INFO, HC_DB_LAST_COMMAND
}
 
enum  PING_TYPE { PT_SHORT, PT_MEDIUM, PT_LONG }
 
enum  POWER_STATE {
  PS_POWERED_OFF, PS_LOW_POWER, PS_FULL_POWER, PS_START_SHUTDOWN,
  PS_SHUTDOWN_COMPLETE
}
 
enum  TELEMETRY_CHANNELS {
  TC_SOFTWARE_VERSION, TC_FPGA_VERSION, TC_INDEX, TC_CCD1_TEMP,
  TC_CCD2_TEMP, TC_CCD3_TEMP, TC_CCD4_TEMP, TC_FPGA_TEMP,
  TC_FPGA_VAUX, TC_FPGA_VINT, TC_FPGA_VNVP, TC_CCD_VDD_OC,
  TC_AD7490_CH01, TC_AD7490_CH02, TC_AD7490_CH03, TC_AD7490_CH04,
  TC_AD7490_CH05, TC_AD7490_CH06, TC_AD7490_CH07, TC_AD7490_CH08,
  TC_AD7490_CH09, TC_AD7490_CH10, TC_AD7490_CH11, TC_AD7490_CH12,
  TC_AD7490_CH13, TC_AD7490_CH14, TC_AD7490_CH15, TC_AD7490_CH16,
  TC_NO_CHANNELS
}
 
enum  TELEMETRY_INTERPRETATION { TI_NOT_INTERPRETED, TI_NOMINAL, TI_LOW, TI_HIGH }
 
enum  EXPOSURE_STATE { ES_IDLE, ES_ACTIVE, ES_POST_PROCESSING_IMAGE, ES_POST_PROCESSING_COMPLETE }
 
enum  TEST_IMAGE { TI_GRADIENT, TI_SQUARE_BULLS_EYE }
 
enum  DATA_COMPRESSION { DC_UNCOMPRESSED, DC_PACKED, DC_DELTA }
 
enum  FLASH_OPERATIONS_COMMAND { FO_ERASE, FO_SAVE, FO_RESTORE }
 
enum  SHUTTER_SOLENOID { SS_NONE, SS_SOLENOID1, SS_SOLENOID2 }
 
enum  READOUT_ORDER { RO_GREEN_FIRST, RO_BLUE_FIRST }
 
enum  DB_MICRON_GRAB_FLAGS { UGF_DARK_PIXELS = 1, UGF_USE_SIMULATOR = 2 }
 
enum  DB_DOWNLOAD_BUFFER { DLB_MICRON, DLB_KLI4104, DLB_STREAM }
 
enum  VALIDATE_RESULT {
  RR_VALID, RR_ACK, RR_NAK, RR_CAN,
  RR_DC1, RR_DC2, RR_BAD_CHECKSUM, RR_BAD_START,
  RR_BAD_COMMAND, RR_BAD_LENGTH, RR_UNKNOWN
}
 
enum  DB_ECHO_CHANNEL { DBE_CANDC, DBE_QSPI }
 

Functions

uint16_t Checksum (uint8_t *src, int len)
 
uint16_t Swap2 (uint16_t us)
 
uint32_t Swap4 (uint32_t ul)
 
void Swap2Copy (uint16_t *dest, uint16_t *scr, int len)
 
int HawkeyeBuildCommand (uint8_t *dest, int command, void *pParams, uint16_t paramsLen)
 
VALIDATE_RESULT HawkeyeValidateResponse (uint8_t *src, int command, void *pResponse, uint16_t responseLen)
 

Macro Definition Documentation

◆ ACK

#define ACK   0x06

Definition at line 68 of file Hawkeye.h.

◆ BAND_DARK_BOTTOM

#define BAND_DARK_BOTTOM   1

Definition at line 48 of file Hawkeye.h.

◆ BAND_DARK_BOTTOM_TRANSITION

#define BAND_DARK_BOTTOM_TRANSITION   20

Definition at line 50 of file Hawkeye.h.

◆ BAND_DARK_MAX_RECORDS

#define BAND_DARK_MAX_RECORDS   12

Definition at line 57 of file Hawkeye.h.

◆ BAND_DARK_POSITION

#define BAND_DARK_POSITION   BAND_DARK_BOTTOM

Definition at line 49 of file Hawkeye.h.

◆ BAND_DARK_TOP

#define BAND_DARK_TOP   0

Definition at line 47 of file Hawkeye.h.

◆ BAND_DARK_WIDTH

#define BAND_DARK_WIDTH   16

Definition at line 44 of file Hawkeye.h.

◆ BAND_IMAGE_HEIGHT

#define BAND_IMAGE_HEIGHT   6000

Definition at line 42 of file Hawkeye.h.

◆ BAND_IMAGE_WIDTH

#define BAND_IMAGE_WIDTH   1800

Definition at line 43 of file Hawkeye.h.

◆ BAND_TOTAL_WIDTH

#define BAND_TOTAL_WIDTH   (BAND_DARK_WIDTH + BAND_IMAGE_WIDTH)

Definition at line 45 of file Hawkeye.h.

◆ BAND_US_PER_EXPOSURE_COUNT

#define BAND_US_PER_EXPOSURE_COUNT   10

Definition at line 53 of file Hawkeye.h.

◆ CAN

#define CAN   0x18

Definition at line 72 of file Hawkeye.h.

◆ DC1

#define DC1   0x11

Definition at line 70 of file Hawkeye.h.

◆ DC2

#define DC2   0x12

Definition at line 71 of file Hawkeye.h.

◆ FINDERSCOPE_CAPTURE_DARK_WIDTH

#define FINDERSCOPE_CAPTURE_DARK_WIDTH   36

Definition at line 24 of file Hawkeye.h.

◆ FINDERSCOPE_CAPTURE_WIDTH

#define FINDERSCOPE_CAPTURE_WIDTH   (FINDERSCOPE_CAPTURE_DARK_WIDTH + FINDERSCOPE_LIGHT_WIDTH)

Definition at line 26 of file Hawkeye.h.

◆ FINDERSCOPE_DOWNLOAD_DARK_WIDTH

#define FINDERSCOPE_DOWNLOAD_DARK_WIDTH   4

Definition at line 25 of file Hawkeye.h.

◆ FINDERSCOPE_DOWNLOAD_WIDTH

#define FINDERSCOPE_DOWNLOAD_WIDTH   (FINDERSCOPE_DOWNLOAD_DARK_WIDTH + FINDERSCOPE_LIGHT_WIDTH)

Definition at line 27 of file Hawkeye.h.

◆ FINDERSCOPE_FPGA_BINNING

#define FINDERSCOPE_FPGA_BINNING   0

Definition at line 19 of file Hawkeye.h.

◆ FINDERSCOPE_LIGHT_HEIGHT

#define FINDERSCOPE_LIGHT_HEIGHT   (480/FINDERSCOPE_VBINNING)

Definition at line 23 of file Hawkeye.h.

◆ FINDERSCOPE_LIGHT_WIDTH

#define FINDERSCOPE_LIGHT_WIDTH   752

Definition at line 22 of file Hawkeye.h.

◆ FINDERSCOPE_MAX_IMAGES

#define FINDERSCOPE_MAX_IMAGES   25

Definition at line 28 of file Hawkeye.h.

◆ FINDERSCOPE_MAX_IMAGES_UGA

#define FINDERSCOPE_MAX_IMAGES_UGA   250

Definition at line 30 of file Hawkeye.h.

◆ FINDERSCOPE_MAX_PERIOD_MS

#define FINDERSCOPE_MAX_PERIOD_MS   80

Definition at line 40 of file Hawkeye.h.

◆ FINDERSCOPE_MIN_PERIOD_MS

#define FINDERSCOPE_MIN_PERIOD_MS   18

Definition at line 31 of file Hawkeye.h.

◆ FINDERSCOPE_VBINNING

#define FINDERSCOPE_VBINNING   1

Definition at line 18 of file Hawkeye.h.

◆ HAWKEYE_CANDC_PORT

#define HAWKEYE_CANDC_PORT   5625

Definition at line 15 of file Hawkeye.h.

◆ HAWKEYE_IMAGE_PORT

#define HAWKEYE_IMAGE_PORT   5626

Definition at line 16 of file Hawkeye.h.

◆ MAX_SECTOR_SIZE

#define MAX_SECTOR_SIZE   1024

Definition at line 66 of file Hawkeye.h.

◆ MIN_SECTOR_SIZE

#define MIN_SECTOR_SIZE   30

Definition at line 65 of file Hawkeye.h.

◆ MISSION_LOG_LENGTH

#define MISSION_LOG_LENGTH   10000

Definition at line 63 of file Hawkeye.h.

◆ MISSION_LOG_MAX_RECORDS

#define MISSION_LOG_MAX_RECORDS   3

Definition at line 62 of file Hawkeye.h.

◆ NAK

#define NAK   0x15

Definition at line 69 of file Hawkeye.h.

◆ TELEMETRY_MAX_RECORDS

#define TELEMETRY_MAX_RECORDS   12

Definition at line 60 of file Hawkeye.h.

Typedef Documentation

◆ DBEchoResponse

Definition at line 395 of file Hawkeye.h.

◆ DBKLIGrabResponse

Definition at line 382 of file Hawkeye.h.

◆ DBKLIStreamResponse

Definition at line 388 of file Hawkeye.h.

◆ GetExposureParametersResponse

◆ GetMissionTimeResponse

Definition at line 172 of file Hawkeye.h.

◆ GetSpectralCompressionParametersResponse

◆ UGAGetExposureParametersResponse

Enumeration Type Documentation

◆ DATA_COMPRESSION

Enumerator
DC_UNCOMPRESSED 
DC_PACKED 
DC_DELTA 

Definition at line 99 of file Hawkeye.h.

◆ DB_DOWNLOAD_BUFFER

Enumerator
DLB_MICRON 
DLB_KLI4104 
DLB_STREAM 

Definition at line 105 of file Hawkeye.h.

◆ DB_ECHO_CHANNEL

Enumerator
DBE_CANDC 
DBE_QSPI 

Definition at line 107 of file Hawkeye.h.

◆ DB_MICRON_GRAB_FLAGS

Enumerator
UGF_DARK_PIXELS 
UGF_USE_SIMULATOR 

Definition at line 104 of file Hawkeye.h.

◆ EXPOSURE_STATE

Enumerator
ES_IDLE 
ES_ACTIVE 
ES_POST_PROCESSING_IMAGE 
ES_POST_PROCESSING_COMPLETE 

Definition at line 97 of file Hawkeye.h.

◆ FLASH_OPERATIONS_COMMAND

Enumerator
FO_ERASE 
FO_SAVE 
FO_RESTORE 

Definition at line 100 of file Hawkeye.h.

◆ HAWKEYE_COMMAND

Enumerator
HC_NULL 
HC_PING 
HC_SET_POWER_STATE 
HC_GET_POWER_STATE 
HC_GET_TELEMETRY 
HC_SET_EXPOSURE_PARAMETERS 
HC_GET_EXPOSURE_PARAMETERS 
HC_START_EXPOSURE 
HC_END_EXPOSURE 
HC_GET_EXPOSURE_STATE 
HC_GENERATE_TEST_EXPOSURE 
HC_SET_IMAGE_SECTOR_SIZE 
HC_SET_SPECTRAL_COMPRESSION_PARAMETERS 
HC_GET_SPECTRAL_COMPRESSION_PARAMETERS 
HC_POST_PROCESS_IMAGE 
HC_GET_MISSION_TIME 
HC_SET_MISSION_TIME 
HC_GET_IMAGE_SECTORS 
HC_FLASH_OPERATIONS 
HC_LAST_COMMAND 
HC_UGA_NULL 
HC_UGA_SET_EXPOSURE_PARAMETERS 
HC_UGA_GET_EXPOSURE_PARAMETERS 
HC_UGA_POST_PROCESS_IMAGE 
HC_UGA_GET_EXPOSURE_STATE 
HC_UGA_GENERATE_TEST_EXPOSURE 
HC_UGA_LAST_COMMAND 
HC_DB_NULL 
HC_DB_DOWNLOAD 
HC_DB_MICRON_GRAB 
HC_DB_KLI_GRAB 
HC_DB_KLI_STREAM 
HC_DB_ECHO 
HC_DB_CAMERA_INFO 
HC_DB_LAST_COMMAND 

Definition at line 79 of file Hawkeye.h.

◆ PING_TYPE

enum PING_TYPE
Enumerator
PT_SHORT 
PT_MEDIUM 
PT_LONG 

Definition at line 89 of file Hawkeye.h.

◆ POWER_STATE

Enumerator
PS_POWERED_OFF 
PS_LOW_POWER 
PS_FULL_POWER 
PS_START_SHUTDOWN 
PS_SHUTDOWN_COMPLETE 

Definition at line 90 of file Hawkeye.h.

◆ READOUT_ORDER

Enumerator
RO_GREEN_FIRST 
RO_BLUE_FIRST 

Definition at line 102 of file Hawkeye.h.

◆ SHUTTER_SOLENOID

Enumerator
SS_NONE 
SS_SOLENOID1 
SS_SOLENOID2 

Definition at line 101 of file Hawkeye.h.

◆ TELEMETRY_CHANNELS

Enumerator
TC_SOFTWARE_VERSION 
TC_FPGA_VERSION 
TC_INDEX 
TC_CCD1_TEMP 
TC_CCD2_TEMP 
TC_CCD3_TEMP 
TC_CCD4_TEMP 
TC_FPGA_TEMP 
TC_FPGA_VAUX 
TC_FPGA_VINT 
TC_FPGA_VNVP 
TC_CCD_VDD_OC 
TC_AD7490_CH01 
TC_AD7490_CH02 
TC_AD7490_CH03 
TC_AD7490_CH04 
TC_AD7490_CH05 
TC_AD7490_CH06 
TC_AD7490_CH07 
TC_AD7490_CH08 
TC_AD7490_CH09 
TC_AD7490_CH10 
TC_AD7490_CH11 
TC_AD7490_CH12 
TC_AD7490_CH13 
TC_AD7490_CH14 
TC_AD7490_CH15 
TC_AD7490_CH16 
TC_NO_CHANNELS 

Definition at line 91 of file Hawkeye.h.

◆ TELEMETRY_INTERPRETATION

Enumerator
TI_NOT_INTERPRETED 
TI_NOMINAL 
TI_LOW 
TI_HIGH 

Definition at line 96 of file Hawkeye.h.

◆ TEST_IMAGE

enum TEST_IMAGE
Enumerator
TI_GRADIENT 
TI_SQUARE_BULLS_EYE 

Definition at line 98 of file Hawkeye.h.

◆ VALIDATE_RESULT

Enumerator
RR_VALID 
RR_ACK 
RR_NAK 
RR_CAN 
RR_DC1 
RR_DC2 
RR_BAD_CHECKSUM 
RR_BAD_START 
RR_BAD_COMMAND 
RR_BAD_LENGTH 
RR_UNKNOWN 

Definition at line 106 of file Hawkeye.h.

Function Documentation

◆ Checksum()

uint16_t Checksum ( uint8_t *  src,
int  len 
)

◆ HawkeyeBuildCommand()

int HawkeyeBuildCommand ( uint8_t *  dest,
int  command,
void *  pParams,
uint16_t  paramsLen 
)

◆ HawkeyeValidateResponse()

VALIDATE_RESULT HawkeyeValidateResponse ( uint8_t *  src,
int  command,
void *  pResponse,
uint16_t  responseLen 
)

◆ Swap2()

uint16_t Swap2 ( uint16_t  us)

◆ Swap2Copy()

void Swap2Copy ( uint16_t *  dest,
uint16_t *  scr,
int  len 
)

◆ Swap4()

uint32_t Swap4 ( uint32_t  ul)