//---------------------------------------------------------------------------- // Dr.Frucht Systems Ltd. // Copyright © 2000-2016. All Rights Reserved. // Version 2.0 3/30/2016 // Last modification: 3/30/2016 // PROJECT: // SUBSYSTEM: // FILE: detectorStructures.h // AUTHOR: gagua // OVERVIEW // ~~~~~~~~ // Header file of detectorStructures.h //---------------------------------------------------------------------------- // #ifndef __ALG_DETECTOR_STRUCTURES_HEADER__ #define __ALG_DETECTOR_STRUCTURES_HEADER__ #include "../../components/base/basicTypes.h" #define LGS_MIRROR_BLANK_RANGE 20 #define LGS_BLIND_TYPE_MR_ENTER 0L #define LGS_BLIND_TYPE_MR_EXIT 1L #define LGS_BLIND_TYPE_180_DEGRESE_ENTER 2L #define LGS_BLIND_TYPE_FS_ENTER 3L #define LGS_BLIND_TYPE_FS_EXIT 4L #define LGS_BLIND_TYPE_PD_ENTER 5L #define LGS_BLIND_TYPE_PD_EXIT 6L #define LGS_BLIND_TYPE_180_DEGRESE_EXIT 7L #define LGS_BLIND_TYPE_FAR_FOG_ENTER 8L #define LGS_BLIND_TYPE_FAR_FOG_EXIT 9L #define LGS_BLIND_TYPE_NEAR_FOG_ENTER 10L #define LGS_BLIND_TYPE_NEAR_FOG_EXIT 11L typedef struct S_QPD { U8 nOffset; U8 nOrder; } QPD, *LPQPD; typedef struct S_SAF { INT16 nMax; INT16 nMin; } SAF, *LPSAF; typedef struct S_HW_PARAMS { uint32_t Q_shift : 9; uint32_t B_shift : 12; uint32_t AutostartMotors : 1; uint32_t SignalSimulator : 1; uint32_t BBinterlace : 3; uint32_t Spike_TH : 2; uint32_t Sunbit_filter : 1; uint32_t popo : 3; //--------------------------------- uint16_t HorizontalFreq; uint16_t VerticalFreq; //--------------------------------- uint16_t MirrorScanCount; // Encoder Counts ? uint16_t BaseScanCount; //--------------------------------- uint8_t MirrorsCount; uint8_t DetectorsCount; //--------------------------------- uint16_t isMaster : 1; uint16_t LaserPulsesOn : 1; uint16_t VerticalMotorOn : 1; uint16_t HorizontalMotorOn : 1; uint16_t BuildThByCore : 1; uint16_t DryContactMode1 : 1; uint16_t DryContactStatus1 : 1; uint16_t DryContactMode2 : 1; uint16_t DryContactStatus2 : 1; uint16_t QQinterlace : 3; uint16_t TGZ_canENA : 1; uint16_t TGZ_canBus : 1; uint16_t TGZ_divider : 2; //---------------------------------- uint16_t TGZ_ParamQ; //---------------------------------- uint16_t TGZ_ParamB; //---------------------------------- uint16_t TGZ_canSRC; uint16_t TGZ_canDST; } HW_PARAMS, *PHW_PARAMS; typedef struct S_LGS_2D_SETTINGS { LONG nOrder; LONG nOffset; LONG nDelta; LONG nWidth; LONG nFlip; LONG nShift; LONG nSun; } LGS_2D_SETTINGS, *PLGS_2D_SETTINGS; typedef struct S_LGS_2D_PARAMETERS { uint16_t nOrder; uint16_t nOffset; uint16_t nDelta; uint16_t nWidth; uint16_t nFlip; uint16_t nSun; uint8_t bSST; } LGS_2D_PARAMETERS, *PLGS_2D_PARAMETERS; // typedef struct S_RELAY_PARAMETERS { // uint8_t bAuto; // allow auto relay // uint8_t bNormallyClose; // uint16_t nAutoDelay; // in 0.1 sec (0,0 .. 3000,0 sec) // } RELAY_PARAMETERS, *PRELAY_PARAMETERS; typedef struct S_LGS_3D_PARAMETERS { uint8_t nOrder; uint8_t nOffset; uint8_t nDelta; uint8_t nSun; uint8_t bSST; uint16_t nFlip; // For Quick models (pls30) must be up to 1024 uint32_t nWidth; // With future devices may gain big numbers /* 3D LRF Specific */ uint8_t nGPointSamples; union { uint8_t flags_binary[sizeof(HW_PARAMS)]; HW_PARAMS flags; }; } LGS_3D_PARAMETERS, *PLGS_3D_PARAMETERS; typedef struct S_TARGET { uint8_t bType; // target type uint32_t nAngle; // target angle // BOOL bSent; #ifdef LOW_BIT_DATA uint8_t nRange; // target range uint16_t nWidth; // target width #else uint16_t nRange; // target range uint32_t nWidth; // target width #endif } TARGET, *PTARGET; typedef struct S_TARGET_EX { TARGET target; uint8_t nRemoveTime; // time when target shuld be removed as false alarm // uint8_t nDetectionTime; // time when begins comparison with other incoming targets uint8_t nLevel; // current SST level of target uint8_t bFlags; uint32_t nAngleMin; // scan2scan area left order in board angle units uint32_t nAngleMax; // scan2scan area right order in board angle units #ifdef LOW_BIT_DATA uint8_t nRangeMin; // scan2scan area bottom offset in board range units uint8_t nRangeMax; // scan2scan area top offset in board range units #else uint16_t nRangeMin; // scan2scan area bottom offset in board range units uint16_t nRangeMax; // scan2scan area top offset in board range units #endif } TARGET_EX, *PTARGET_EX, *LPTARGET_EX; typedef struct RAY { uint8_t bType; #ifdef LOW_BIT_DATA uint8_t nMin; uint8_t nMax; #else uint16_t nMin; uint16_t nMax; #endif } RAY, *LPRAY; typedef struct RAY_LINE { uint32_t nCount; LPRAY lpShadow; } RAY_LINE, *LPRAY_LINE; typedef struct HZ_POLYGON { U8 bType; uint32_t wCount; // LGS::LPHZ_POINT lpPoint; } HZ_POLYGON, *LPHZ_POLYGON; #endif