//================================================================================================= /*! @file PegasusStructDefs.h @ingroup Software group @author Jean-Francois Hammond @brief Main API */ //================================================================================================= /*================================================================================================= Copyright (C) 2011 ANRAD Corporation This software is the sole property of ANRAD Corporation and may not be copied or reproduced in any way without prior written permission from ANRAD Corporation. This software is intended for use in systems produced by ANRAD Corporation. This software or any other copies thereof may not be provided or otherwise made available to any other person without written permission from ANRAD Corporation. No title to and ownership of the software is hereby transferred. The information in this software is subject to change without notice and should not be construed as a commitment by ANRAD Corporation. =================================================================================================*/ #ifndef PegasusStructDefs_H #define PegasusStructDefs_H #pragma pack(push, enter_PegasusStructDefsh) // Save the current packing alignment // Set packing alignment to 8 or 16 bytes for all data structures in this file // This is done to prevent compatibility problems due to different compilers / options #ifdef _WIN64 #pragma pack(16) #else #ifdef _WIN32 #pragma pack(8) #else #error "_WIN32 is not define" #endif #endif // //==================================== [ INCLUDE FILES ] ========================================== #define PEGASUS_CALIBRATION_GAIN "GAIN" #define PEGASUS_CALIBRATION_SHADING "SHADING" #define PEGASUS_CALIBRATION_DEFECT "DEFECT" // //==================================== [ DEFINES ] ================================================ #define PEGASUS_MAX_STRING_LENGTH 512 #define PEGASUS_MAX_TARGET_FILTER_LENGTH 256 /* This type specifies information about the detector. */ typedef struct { PEGASUS_Context current_context; /* Context currently loaded on the detector. */ PEGASUS_State pegasusState; PEGASUS_DetectorState detectorState; /* State of the detector (for debugging purposes). */ float temperature; /* Current temperature of the detector. */ } PEGASUS_Info; typedef struct { char detectorID[PEGASUS_MAX_STRING_LENGTH]; /* Detector's board ID. */ char panelId[PEGASUS_MAX_STRING_LENGTH]; /* Detector's TFT panel ID. */ char sysRelease[PEGASUS_MAX_STRING_LENGTH]; /* Detector's system configuration release. */ char cpuBootVer[PEGASUS_MAX_STRING_LENGTH]; /* Bool loader software version. */ char cpuVer[PEGASUS_MAX_STRING_LENGTH]; /* Micro-controller software version. */ char fpgaVer[PEGASUS_MAX_STRING_LENGTH]; /* FPGAVer firmware version. */ char fpgaT0[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 0 firmware version. */ char fpgaT1[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 1 firmware version. */ char fpgaT2[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 2 firmware version. */ char fpgaT3[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 3 firmware version. */ char fpgaB0[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 0 firmware version. */ char fpgaB1[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 1 firmware version. */ char fpgaB2[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 2 firmware version. */ char fpgaB3[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 3 firmware version. */ } PEGASUS_FirmwareInfo; /* This type specifies information about the firmware version. */ typedef struct { char cpuBootVer[PEGASUS_MAX_STRING_LENGTH]; /* Bool loader software version. */ char cpuVer[PEGASUS_MAX_STRING_LENGTH]; /* Micro-controller software version. */ char fpgaVer[PEGASUS_MAX_STRING_LENGTH]; /* FPGAVer firmware version. */ char fpgaT0[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 0 firmware version. */ char fpgaT1[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 1 firmware version. */ char fpgaT2[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 2 firmware version. */ char fpgaT3[PEGASUS_MAX_STRING_LENGTH]; /* FPGA Top 3 firmware version. */ char fpgaB0[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 0 firmware version. */ char fpgaB1[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 1 firmware version. */ char fpgaB2[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 2 firmware version. */ char fpgaB3[PEGASUS_MAX_STRING_LENGTH]; /* FPBA Bottom 3 firmware version. */ } PEGASUS_FirmwareVersion; typedef struct { PEGASUS_BoardType board_type; /* Board type. */ PEGASUS_FirmwareDetectorType fw_detector_type; /* Firmware detector type. */ char detectorID[PEGASUS_MAX_STRING_LENGTH]; /* Detector's board ID. */ char panelId[PEGASUS_MAX_STRING_LENGTH]; /* Detector's TFT panel ID. */ char sysRelease[PEGASUS_MAX_STRING_LENGTH]; /* Detector's system configuration release. */ } PEGASUS_DetectorConfiguration; typedef struct { int imagingMode; int rawWidth; /* Number of pixels for each line of a raw frame produced by the detector. */ int rawHeight; /* Number of lines of a raw frame produced by the detector. */ int rawSize; /* total image size in byte */ int rawPixelSize; /* number of bytes per pixel */ int width; /* Number of pixels for each line of an image produced by the detector. */ int height; /* Number of lines of an image produced by the detector. */ int size; /* total image size in byte */ int pixelSize; /* number of bytes per pixel */ int aecWidth; /* Number of pixels for each line of an aec image produced by the detector. */ int aecHeight; /* Number of lines of an aec image produced by the detector. */ int aecSize; /* total image size in byte */ int aecPixelSize; /* number of bytes per pixel */ } PEGASUS_ImageInfo; /* This type specifies information about the detector. */ typedef struct { PEGASUS_DetectorType detector_type; /* Detector type. */ PEGASUS_Context current_context; /* Context currently loaded on the detector. */ PEGASUS_FirmwareInfo firmwareInfo; PEGASUS_ImageInfo imageInfo; float temperature; /* Current temperature of the detector. */ PEGASUS_State pegasusState; PEGASUS_DetectorState detectorState; /* State of the detector (for debugging purposes). */ char eclipseVersion[PEGASUS_MAX_STRING_LENGTH]; /* Eclipse software version. */ char pegasusVersion[PEGASUS_MAX_STRING_LENGTH]; /* Eclipse software version. */ } PEGASUS_DetailedInfo; /* This type specifies information about the detector. */ typedef struct { PEGASUS_ProductType productType; /* Product Type. */ PEGASUS_DetectorConfiguration detectorConfiguration; /* Detector configuration. */ PEGASUS_Context current_context; /* Context currently loaded on the detector. */ PEGASUS_FirmwareVersion firmwareVersion; /* Firmware version of the detector. */ PEGASUS_ImageInfo imageInfo; float temperature; /* Current temperature of the detector. */ PEGASUS_State pegasusState; PEGASUS_DetectorState detectorState; /* State of the detector (for debugging purposes). */ char eclipseVersion[PEGASUS_MAX_STRING_LENGTH]; /* Eclipse software version. */ char pegasusVersion[PEGASUS_MAX_STRING_LENGTH]; /* Eclipse software version. */ } PEGASUS_SystemDetailedInfo; typedef struct { int numTopTempSensorExceededWarningLimit; int numBottomTempSensorExceededWarningLimit; int numTopTempSensorExceededShutdownLimit; int numBottomTempSensorExceededShutdownLimit; int numExposures; int numMinutesOn; int numExposureSequences; } PEGASUS_DetectorStats; typedef struct { int numTempSensor1ExceededWarningLimit; int numTempSensor2ExceededWarningLimit; int numTempSensor3ExceededWarningLimit; int numTempSensor1ExceededShutdownLimit; int numTempSensor2ExceededShutdownLimit; int numTempSensor3ExceededShutdownLimit; int numExposures; int numMinutesOn; } PEGASUS_DetectorStatsLMAM3; /* This type specifies information about the image cropping information. */ typedef struct { int cropOffsetCol; /* Input value : Number of pixels for each line of a full image produced by the detector. */ int cropOffsetRow; /* Input value : Number of lines of a full image produced by the detector. */ int cropWidth; /* Input value : Number of pixels for each line of a full image produced by the detector. */ int cropHeight; /* Input value : Number of lines of a full image produced by the detector. */ } PEGASUS_ImageCropInfo; /* This type specifies information about the image. */ typedef struct { PEGASUS_ImageCropInfo cropInfo; /* Input value : Number of pixels for each line of a full image produced by the detector. */ void *pImage; /* Output value : Image buffer */ } PEGASUS_Image; /* This type specifies information about the exposure. */ typedef struct { int imageLeft; double mas; int kv; bool use_grid; bool use_AEC; PEGASUS_TargetFilter targetFilter; PEGASUS_FocusType focus; PEGASUS_Context context; PEGASUS_State pegasusState; } PEGASUS_ExposureData; /* This type specifies information about the acquisition properties. NOTE: If target filter array length is not sufficient, then the last element in the target filter array will be used for next image. */ typedef struct { int targetFilterArrayLength; // Target filter array length PEGASUS_TargetFilter targetFilterArray[PEGASUS_MAX_TARGET_FILTER_LENGTH]; // Pointer to receive target filter array bool isAecMode; // Specify if AEC mode to use. PEGASUS_Context context; // Specify context to use. } PEGASUS_AcquisitionProperties; typedef void PEGASUS_EventRegistrationCallback( PEGASUS_EventType event, // Input value : event code PEGASUS_ErrorCode error, // Input value : error code void *pContext // Input value : pContext ); typedef void PEGASUS_MultiEventRegistrationCallback( PEGASUS_MultiEventType event, // Input value : multi event code PEGASUS_ErrorCode error, // Input value : error code int sequenceId, // Input value : sequence Id int imageIndex // Input value : image index ); typedef void PEGASUS_ProgressionEventCallback( int progression, // Input value : progression en % (0% - 100%) ou simplement un compte (0 ??) char taskName[PEGASUS_MAX_STRING_LENGTH] // Input value : task name ); /* SERVICE INTERFACE */ typedef struct { int width; /* Number of pixels for each line of an image produced by the detector. */ int height; /* Number of lines of an image produced by the detector. */ int size; /* Total image size in byte */ int pixelSize; /* Number of bytes per pixel */ PEGASUS_PixelFormat pixelFormat; /* Pixel format */ } PEGASUS_ServiceImageInfo; /* This type specifies information about date. */ typedef struct { int year; int month; int day; int hour; int minute; int second; } PEGASUS_Date; /* This type specifies information about one calibration table. */ typedef struct { PEGASUS_Date date; /* Date of the calibration. */ } PEGASUS_CalibrationTableInfo; #define PEGASUS_NB_SHADING_TABLE 6 /* This type specifies information about all calibration tables. */ typedef struct { PEGASUS_CalibrationTableInfo gain; PEGASUS_CalibrationTableInfo defect; PEGASUS_CalibrationTableInfo shading[PEGASUS_NB_SHADING_TABLE]; } PEGASUS_CalibrationInfo; /* This type specifies information about a calibration type. */ typedef struct { size_t len; PEGASUS_Date date; float temperature; } PEGASUS_CalibrationStats; // This structure is used to define a weak line/column defect typedef struct { PEGASUS_DefectType defectType; int value; int ref1; int ref2; } PEGASUS_WeakDefect; // This structure is used to define a pixel/line/column defect typedef struct { PEGASUS_DefectType defectType; int column; int row; } PEGASUS_GenericDefect; // This structure is used to return image information typedef struct { int sequenceId; int imageIndex; float temperature; int width; int height; int pixelSize; int size; PEGASUS_Context context; PEGASUS_TargetFilter targetFilter; bool isAec; } PEGASUS_ImageInformation; // //==================================== [ EXTERNS ] ================================================ // //==================================== [ STATIC GLOBAL ] ========================================== // //==================================== [ PROTOTYPES ] ============================================= // Return to original packing alignment #pragma pack(pop, enter_PegasusStructDefsh) #endif /* PegasusStructDefs_H */