921 lines
45 KiB
C
921 lines
45 KiB
C
|
|
#ifndef ELECTROOPTICRADARSDK_H
|
|||
|
|
#define ELECTROOPTICRADARSDK_H
|
|||
|
|
|
|||
|
|
#ifndef __linux__
|
|||
|
|
#if defined(ELECTROOPTICRADARSDK_LIBRARY)
|
|||
|
|
# define ELECTROOPTICRADARSDKSHARED_EXPORT __declspec(dllexport)
|
|||
|
|
#else
|
|||
|
|
# define ELECTROOPTICRADARSDKSHARED_EXPORT __declspec(dllimport)
|
|||
|
|
#endif
|
|||
|
|
#else
|
|||
|
|
#if defined(ELECTROOPTICRADARSDK_LIBRARY)
|
|||
|
|
# define ELECTROOPTICRADARSDKSHARED_EXPORT Q_DECL_EXPORT
|
|||
|
|
#else
|
|||
|
|
# define ELECTROOPTICRADARSDKSHARED_EXPORT Q_DECL_IMPORT
|
|||
|
|
#endif
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#include <QString>
|
|||
|
|
#include <QMetaType>
|
|||
|
|
|
|||
|
|
#pragma pack(1)
|
|||
|
|
|
|||
|
|
|
|||
|
|
//网络连接类型
|
|||
|
|
enum NET_CONNECT_TYPE
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
NET_CONNECT_TYPE_UDP = 0, //udp连接
|
|||
|
|
NET_CONNECT_TYPE_TCP = 1, //TCP连接
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
enum COMMUNICATION_TYPE
|
|||
|
|
{
|
|||
|
|
COMMUNICATION_TYPE_NET = 0, //网络通讯
|
|||
|
|
COMMUNICATION_TYPE_COM = 1, //串口通讯
|
|||
|
|
COMMUNICATION_TYPE_CAN = 2, //CAN通讯
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
typedef void (/*__stdcall*/ *CALLBACK_DATA)(unsigned char *pData, int nLen, void *pUser);
|
|||
|
|
|
|||
|
|
typedef struct tagCOMMUNICATION_PARAM
|
|||
|
|
{
|
|||
|
|
COMMUNICATION_TYPE eCommunicationType; //连接类型
|
|||
|
|
|
|||
|
|
//01-网络通信参数
|
|||
|
|
NET_CONNECT_TYPE eNetType; //网络通信类型
|
|||
|
|
int nLocalPort; //本机端口
|
|||
|
|
QString strLocalIP; //本机IP
|
|||
|
|
int nRemotePort; //对端端口
|
|||
|
|
QString strRemoteIP; //对端IP
|
|||
|
|
|
|||
|
|
//02-CAN通信参数
|
|||
|
|
int m_nCanIndex; //CAN卡索引
|
|||
|
|
int m_nCanNum; //CAN通道号
|
|||
|
|
int m_nMode; //工作模式,0正常,1只听模式
|
|||
|
|
QString m_strCode; //验收码:"00000000"
|
|||
|
|
QString m_strMask; //屏蔽码"ffffffff"
|
|||
|
|
int m_nFilterType; //滤波方式 0双滤波 1单滤波
|
|||
|
|
QString m_strTiming0; //定时器0,常用“00” //波特率kbps 1000 800 500 250 125 100 50 20 10 5
|
|||
|
|
//定时器0 00 00 00 01 03 04 09 18 31 BF
|
|||
|
|
//定时器1 14 16 1C 1C 1C 1C 1C 1C 1C FF
|
|||
|
|
QString m_strTiming1; //定时器1,常用“1C”
|
|||
|
|
int m_nSendFrmType; //帧类型 0标准 1扩展
|
|||
|
|
int m_nSendFrmFmt; //帧格式 0数据帧 1远程帧
|
|||
|
|
int m_nSendType; //发送格式 0正常发送 1单次发送 2自发自收 3单次自发自收
|
|||
|
|
|
|||
|
|
//03-串口通信参数
|
|||
|
|
QString strComName; //串口名称
|
|||
|
|
int nComBaudrate; //串口波特率
|
|||
|
|
|
|||
|
|
CALLBACK_DATA pFnDataCallback; //上返数据回调
|
|||
|
|
void* pUser; //用户指针数据
|
|||
|
|
}COMMUNICATION_PARAM,*LPCOMMUNICATION_PARAM;
|
|||
|
|
|
|||
|
|
typedef struct tagCONNECT_RECV_DATA_INFO
|
|||
|
|
{
|
|||
|
|
unsigned char *pData; //接收数据指针
|
|||
|
|
int nSize; //数据长度
|
|||
|
|
unsigned int nFrmID; //CAN接收数据中有帧ID
|
|||
|
|
}CONNECT_RECV_DATA_INFO,*LPCONNECT_RECV_DATA_INFO;
|
|||
|
|
|
|||
|
|
typedef void (/*__stdcall*/ *CALLBACK_CONNECT_RECV_DATA)(CONNECT_RECV_DATA_INFO stData, void *pUser);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef struct tagCONNECT_PARAM
|
|||
|
|
{
|
|||
|
|
COMMUNICATION_PARAM stCommunicationParam;
|
|||
|
|
void *pUser;
|
|||
|
|
CALLBACK_CONNECT_RECV_DATA pFnCallback;
|
|||
|
|
}CONNECT_PARAM,*LPCONNECT_PARAM;
|
|||
|
|
|
|||
|
|
#pragma pack(push, 1)
|
|||
|
|
//设备状态
|
|||
|
|
struct DeviceState
|
|||
|
|
{
|
|||
|
|
//红外组件信息
|
|||
|
|
float fIRViewAngel; //传输值=实际值*10
|
|||
|
|
float fIRFocus; //传输值=实际值*10
|
|||
|
|
unsigned char ucIRSelfCheckState; //镜头自检状态,0异常,1正常
|
|||
|
|
unsigned char ucIRTanCeQiState; //探测器状态,0异常,1正常
|
|||
|
|
unsigned char ucIRCoolerState; //制冷状态,0正在制冷,1制冷完成
|
|||
|
|
unsigned char ucIRJiXingState; //极性状态,0白热,1黑热
|
|||
|
|
unsigned char ucIRViewChangeValu; //电子变倍,0-1倍,1-2倍,2-4倍
|
|||
|
|
unsigned char ucIRMirrorState; //镜头状态,0-镜头无操作,1调焦,2变焦,3自动聚焦
|
|||
|
|
unsigned char ucIRBrightLevel; //亮度等级,0~100
|
|||
|
|
unsigned char ucIRContrastLevel; //对比度等级,0~100
|
|||
|
|
unsigned char ucIRDDELevel; //DDE等级,0~4
|
|||
|
|
unsigned char ucIRCommandType; //指令类型,0空闲,1机芯指令,2镜头指令
|
|||
|
|
unsigned char ucIRLimitPosFlags; //镜头限位标志,0-中间位置,1-到达大视场限位,2-到达小视场限位
|
|||
|
|
|
|||
|
|
//可见光组件信息
|
|||
|
|
float fVLViewAngel; //传输值=实际值*10
|
|||
|
|
float fVLFocus; //传输值=实际值*10
|
|||
|
|
unsigned char ucVLBrightLevel; //亮度等级,0~19
|
|||
|
|
unsigned char ucVLContrastLevel; //对比度等级,0~19
|
|||
|
|
unsigned char ucVLDDELevel; //DDE等级,0~9
|
|||
|
|
unsigned char ucVLFogOpenState; //电子透雾开关状态,0-关,1-开
|
|||
|
|
unsigned char ucVLSelfCheckState; //镜头自检状态,0异常,1正常
|
|||
|
|
unsigned char ucVLMirrorState; //镜头状态,0-镜头无操作,1调焦,2变焦,3自动聚焦
|
|||
|
|
unsigned char ucVLCommandType; //指令类型,0空闲,1机芯指令,2镜头指令
|
|||
|
|
unsigned char ucVLLimitPosFlags; //镜头限位标志,0-中间位置,1-到达大视场限位,2-到达小视场限位
|
|||
|
|
|
|||
|
|
|
|||
|
|
//激光测距相关信息
|
|||
|
|
unsigned char ucLaserState; //测距状态,0-测距无效,1-有效
|
|||
|
|
unsigned char ucLaserBackWaveState; //回波,0-无回波,1-有回波
|
|||
|
|
unsigned char ucLaserRest; //强制休息状态,0-非强制休息,1-强制休息
|
|||
|
|
unsigned char ucLaserEnegly; //能量,0-正常能量,1-小能量
|
|||
|
|
unsigned char ucLaserSelfCheck; //自检,0-正常,1-故障
|
|||
|
|
unsigned char ucLaserWaveState; //主波,0-无主波发射,1-主波发射
|
|||
|
|
unsigned char ucLaserTemprature; //温度告警,0-温度正常,1-温度告警
|
|||
|
|
unsigned char ucLaserLowPower; //低功耗,0-静止,1-使能
|
|||
|
|
|
|||
|
|
unsigned char ucLaserWorkMode; //激光工作模式,0-空闲,1-准备中,2-待机,3-1Hz,4-5Hz,5-自检中,6-激光照射,7-单次测距
|
|||
|
|
unsigned char ucLaserHightPower; //高压状态,0-正常,1-异常
|
|||
|
|
unsigned char ucLaserUsedEnegly; //使能状态,0-禁止,1-使能
|
|||
|
|
unsigned char ucLaserRecv; //接收状态,0-关闭,1-开启
|
|||
|
|
unsigned char ucLaserTimeStata; //时统状态,0-内时统,1-外时统
|
|||
|
|
|
|||
|
|
float fLaserDistance; //激光距离,保留小数
|
|||
|
|
unsigned char ucLaserTemp; //温度信息,-128~+127
|
|||
|
|
unsigned char ucLaserCode; //照射编号,13H编号1,15H编号2,16H编号3,19H编号4,1AH编号5,1CH编号6,23H编号7,25H编号8
|
|||
|
|
//26H编号9,29H编号10,2AH编号11,2CH编号12,31H编号13,32H编号14,34H编号15,37H编号16
|
|||
|
|
|
|||
|
|
unsigned char ucLaserTagNum; //目标数,0-3
|
|||
|
|
unsigned char ucLaserSourceStata; //驱动源状态,0-正常,1-异常
|
|||
|
|
unsigned char ucLaserRecvConnect; //接收上位机通讯,0-正常,1-异常
|
|||
|
|
|
|||
|
|
//综合信息
|
|||
|
|
float fLoadTemperature; //载荷环境温度+100
|
|||
|
|
unsigned char ucLoadHumidity; //载荷湿度
|
|||
|
|
unsigned short ucLoadPressure; //载荷气压
|
|||
|
|
unsigned char ucLoadIRPower; //红外电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadVLPower; //可见光电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadHisiPower; //海思板电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadLaserPower; //激光电源,0-异常,1-正常
|
|||
|
|
unsigned char ucWuYuanLocateState;
|
|||
|
|
//跟踪板信息
|
|||
|
|
unsigned char ucTrackerVideoSource; //视频源,0-红外,1-可见光,2-黑白可见光
|
|||
|
|
unsigned char ucTrackerMode; //跟踪器模式,0-未知,1-待命,2-搜索,3-跟踪,4-局部跟踪,5-丢失重捕,6-末端盲区,7-捕获,8-定位
|
|||
|
|
float fTrackOffsetX; //跟踪脱靶量X
|
|||
|
|
float fTrackOffsetY; //跟踪脱靶量Y
|
|||
|
|
double dTrackBoardLongitude; //经纬高-经度
|
|||
|
|
double dTrackBoardLatitude; //经纬高-纬度
|
|||
|
|
double dTrackBoardHeight; //经纬高-高度
|
|||
|
|
unsigned short usTrackerRecordTime; //录像时间
|
|||
|
|
unsigned char ucTrackerRecordStatus; //录像状态,0-未录像,1-正在录像
|
|||
|
|
unsigned char ucTrackerProjectID; //项目ID
|
|||
|
|
float fTrackerVLMaxTimes; //可见光放大倍数
|
|||
|
|
float fTrackerIRMaxTimes; //红外放大倍数
|
|||
|
|
|
|||
|
|
|
|||
|
|
//伺服上返信息
|
|||
|
|
unsigned char workstate; //工作模式
|
|||
|
|
float orientationAngle; //方位角度值(内框)
|
|||
|
|
float pitchAngle; //俯仰角度值(内框)
|
|||
|
|
float orientationAngleOutside; //方位角度值(外框)
|
|||
|
|
float pitchAngleOutside; //俯仰角度值(外框)
|
|||
|
|
float orientationAngleSpeed; //方位角速度
|
|||
|
|
float pitchAngleSpeed; //俯仰角速度
|
|||
|
|
|
|||
|
|
unsigned char ucServoError1_0; //内框方位堵转
|
|||
|
|
unsigned char ucServoError1_1; //内框俯仰堵转
|
|||
|
|
unsigned char ucServoError1_2; //内框方位旋变故障
|
|||
|
|
unsigned char ucServoError1_3; //内框俯仰旋变故障
|
|||
|
|
unsigned char ucServoError1_4; //内框方位陀螺故障
|
|||
|
|
unsigned char ucServoError1_5; //内框俯仰陀螺故障
|
|||
|
|
unsigned char ucServoError1_6; //内框方位电流异常
|
|||
|
|
unsigned char ucServoError1_7; //内框俯仰电流异常
|
|||
|
|
|
|||
|
|
unsigned char ucServoError2_0; //内框方位飞转
|
|||
|
|
unsigned char ucServoError2_1; //内框俯仰飞转
|
|||
|
|
unsigned char ucServoError2_2; //外框方位堵转
|
|||
|
|
unsigned char ucServoError2_3; //外框俯仰堵转
|
|||
|
|
unsigned char ucServoError2_4; //外框方位旋变故障
|
|||
|
|
unsigned char ucServoError2_5; //外框俯仰旋变故障
|
|||
|
|
unsigned char ucServoError2_6; //外框方位电流异常
|
|||
|
|
unsigned char ucServoError2_7; //外框俯仰电流异常
|
|||
|
|
|
|||
|
|
unsigned char ucServoError3_0; //角传板通信故障
|
|||
|
|
unsigned char ucServoError3_1; //载荷综控板通信异常
|
|||
|
|
unsigned char ucServoError3_2; //跟踪板通信异常
|
|||
|
|
unsigned char ucServoError3_3; //预留
|
|||
|
|
unsigned char ucServoError3_4; //内框方位共振
|
|||
|
|
unsigned char ucServoError3_5; //内框俯仰共振
|
|||
|
|
|
|||
|
|
double dHeight; //载体海拔高
|
|||
|
|
double dLongitude; //载体经度
|
|||
|
|
double dLatitude; //载体纬度
|
|||
|
|
|
|||
|
|
double dCarAz; //载体偏航角
|
|||
|
|
double dCarPt; //载体俯仰角
|
|||
|
|
double dCarRoll; //载体横滚角
|
|||
|
|
float fJZRoll; //矫正横滚角
|
|||
|
|
float fJZYaw; //矫正偏航角
|
|||
|
|
float fJZPt; //矫正俯仰角
|
|||
|
|
|
|||
|
|
|
|||
|
|
unsigned char ucFrameIDTotal; //帧计数,0~255循环
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
struct SystemRecvData
|
|||
|
|
{
|
|||
|
|
//帧头
|
|||
|
|
unsigned char ucHead1; //帧头0x55
|
|||
|
|
unsigned char ucHead2; //帧头0xAA
|
|||
|
|
unsigned char ucAddr; //地址0xFF
|
|||
|
|
unsigned char ucLen; //数据长度0x7A
|
|||
|
|
unsigned char ucCommand1; //命令字1 0xF0
|
|||
|
|
unsigned char ucCommand2; //命令字2 0xFF
|
|||
|
|
|
|||
|
|
//红外组件信息
|
|||
|
|
unsigned short usIRViewAngel; //传输值=实际值*10
|
|||
|
|
unsigned short usIRFocus; //传输值=实际值*10
|
|||
|
|
unsigned char ucIRSelfCheckState:1; //镜头自检状态,0异常,1正常
|
|||
|
|
unsigned char ucIRTanCeQiState:1; //探测器状态,0异常,1正常
|
|||
|
|
unsigned char ucIRCoolerState:1; //制冷状态,0正在制冷,1制冷完成
|
|||
|
|
unsigned char ucIRJiXingState:1; //极性状态,0白热,1黑热
|
|||
|
|
unsigned char ucIRViewChangeValu:2; //电子变倍,0-1倍,1-2倍,2-4倍
|
|||
|
|
unsigned char ucIRMirrorState:2; //镜头状态,0-镜头无操作,1调焦,2变焦,3自动聚焦
|
|||
|
|
unsigned char ucIRBrightLevel; //亮度等级,0~100
|
|||
|
|
unsigned char ucIRContrastLevel; //对比度等级,0~100
|
|||
|
|
unsigned char ucIRDDELevel:4; //图像增强等级,0~4
|
|||
|
|
unsigned char ucIRCommandType:2; //指令类型,0空闲,1机芯指令,2镜头指令
|
|||
|
|
unsigned char ucIRLimitPosFlags:2; //镜头限位标志,0-中间位置,1-到达大视场限位,2-到达小视场限位
|
|||
|
|
unsigned char arrIRResever[2]; //红外预留2字节
|
|||
|
|
|
|||
|
|
//可见光组件信息
|
|||
|
|
unsigned short usVLViewAngel; //传输值=实际值*10
|
|||
|
|
unsigned short usVLFocus; //传输值=实际值*10
|
|||
|
|
unsigned char ucVLBrightLevel; //亮度等级,0~19
|
|||
|
|
unsigned char ucVLContrastLevel; //对比度等级,0~19
|
|||
|
|
unsigned char ucVLDDELevel:4; //DDE等级,0~9
|
|||
|
|
unsigned char ucVLFogOpenState:1; //电子透雾开关状态,0-关,1-开
|
|||
|
|
unsigned char ucVLSelfCheckState:1; //镜头自检状态,0异常,1正常
|
|||
|
|
unsigned char ucVLMirrorState:2; //镜头状态,0-镜头无操作,1调焦,2变焦,3自动聚焦
|
|||
|
|
unsigned char ucVLCommandType:2; //指令类型,0空闲,1机芯指令,2镜头指令
|
|||
|
|
unsigned char ucVLLimitPosFlags:2; //镜头限位标志,0-中间位置,1-到达大视场限位,2-到达小视场限位
|
|||
|
|
unsigned char ucVLResever:4; //预留
|
|||
|
|
// unsigned char arrVLResever[2]; //可见光预留2字节
|
|||
|
|
|
|||
|
|
//激光测距相关信息
|
|||
|
|
unsigned char ucLaserState:1; //测距状态,0-测距无效,1-有效
|
|||
|
|
unsigned char ucLaserBackWaveState:1; //回波,0-无回波,1-有回波
|
|||
|
|
unsigned char ucLaserRest:1; //强制休息状态,0-非强制休息,1-强制休息
|
|||
|
|
unsigned char ucLaserEnegly:1; //能量,0-正常能量,1-小能量
|
|||
|
|
unsigned char ucLaserSelfCheck:1; //自检,0-正常,1-故障
|
|||
|
|
unsigned char ucLaserWaveState:1; //主波,0-无主波发射,1-主波发射
|
|||
|
|
unsigned char ucLaserTemprature:1; //温度告警,0-温度正常,1-温度告警
|
|||
|
|
unsigned char ucLaserLowPower:1; //低功耗,0-静止,1-使能
|
|||
|
|
|
|||
|
|
unsigned char ucLaserWorkMode:4; //激光工作模式,0-空闲,1-准备中,2-待机,3-1Hz,4-5Hz,5-自检中,6-激光照射,7-单次测距
|
|||
|
|
unsigned char ucLaserHightPower:1; //高压状态,0-正常,1-异常
|
|||
|
|
unsigned char ucLaserUsedEnegly:1; //使能状态,0-禁止,1-使能
|
|||
|
|
unsigned char ucLaserRecv:1; //接收状态,0-关闭,1-开启
|
|||
|
|
unsigned char ucLaserTimeStata:1; //时统状态,0-内时统,1-外时统
|
|||
|
|
|
|||
|
|
//unsigned int nLaserDistance; //激光距离
|
|||
|
|
unsigned short nLaserDistance; //激光距离
|
|||
|
|
unsigned char ucLaserTemp; //温度信息,-128~+127
|
|||
|
|
unsigned char ucLaserCode; //照射编号,13H编号1,15H编号2,16H编号3,19H编号4,1AH编号5,1CH编号6,23H编号7,25H编号8
|
|||
|
|
//26H编号9,29H编号10,2AH编号11,2CH编号12,31H编号13,32H编号14,34H编号15,37H编号16
|
|||
|
|
|
|||
|
|
unsigned char ucLaserTagNum:2; //目标数,0-3
|
|||
|
|
unsigned char ucLaserSourceStata:1; //驱动源状态,0-正常,1-异常
|
|||
|
|
unsigned char ucLaserRecvConnect:1; //接收上位机通讯,0-正常,1-异常
|
|||
|
|
unsigned char ucLaserResever:4; //激光测距预留
|
|||
|
|
|
|||
|
|
unsigned char ucLaserResever1; //激光测距预留
|
|||
|
|
|
|||
|
|
//综合信息
|
|||
|
|
unsigned char ucLoadTemperature; //载荷环境温度+100
|
|||
|
|
unsigned char ucLoadHumidity; //载荷湿度
|
|||
|
|
unsigned short ucLoadPressure; //载荷气压
|
|||
|
|
unsigned char ucLoadIRPower:1; //红外电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadVLPower:1; //可见光电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadHisiPower:1; //海思板电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadLaserPower:1; //激光测距机电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadFanPower:1; //风扇电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadHotPiecePower:1; //加热片电源,0-异常,1-正常
|
|||
|
|
unsigned char ucLoadZongheReserve:2; //预留
|
|||
|
|
// unsigned char ucLoadCommandState:6; //指令状态,0-无操作,1-红外,2-可见光,3-激光,4-跟踪
|
|||
|
|
// unsigned char ucLoadZongheReserve_2:2; //预留
|
|||
|
|
unsigned char ucLoadCommandState:5; //指令状态,0-无操作,1-红外,2-可见光,3-激光,4-跟踪
|
|||
|
|
unsigned char ucWuYuanLocateState:1; //无源定位状态
|
|||
|
|
unsigned char ucOneKeyState:2;
|
|||
|
|
|
|||
|
|
|
|||
|
|
//跟踪板信息
|
|||
|
|
unsigned char ucTrackerVideoSource; //视频源,0-红外,1-可见光,2-黑白可见光
|
|||
|
|
unsigned char ucTrackerMode; //跟踪器模式,0-未知,1-待命,2-搜索,3-跟踪,4-局部跟踪,5-丢失重捕,6-末端盲区,7-捕获
|
|||
|
|
ushort sTrackOffsetX; //跟踪脱靶量X
|
|||
|
|
ushort sTrackOffsetY; //跟踪脱靶量Y
|
|||
|
|
int nTrackBoardLongitude; //经纬高-经度
|
|||
|
|
int nTrackBoardLatitude; //经纬高-纬度
|
|||
|
|
int nTrackBoardHeight; //经纬高-高度
|
|||
|
|
unsigned short usTrackerRecordTime; //录像时间
|
|||
|
|
unsigned char ucTrackerRecordStatus; //录像状态,0-未录像,1-正在录像
|
|||
|
|
unsigned char ucTrackerProjectID; //项目ID
|
|||
|
|
unsigned short usTrackerVLMaxTimes; //可见光放大倍数
|
|||
|
|
unsigned short usTrackerIRMaxTimes; //红外放大倍数
|
|||
|
|
unsigned char arrTrackerResever[1]; //跟踪板上返信息预留1个字节
|
|||
|
|
|
|||
|
|
//伺服上返信息
|
|||
|
|
unsigned char workstate; //工作模式
|
|||
|
|
unsigned short usOrientationAngle; //方位角度值(内框)
|
|||
|
|
unsigned short usPitchAngle; //俯仰角度值(内框)
|
|||
|
|
unsigned short usOrientationAngleOutside; //方位角度值(外框)
|
|||
|
|
unsigned short usPitchAngleOutside; //俯仰角度值(外框)
|
|||
|
|
int iOrientationAngleSpeed; //方位角速度
|
|||
|
|
int iPitchAngleSpeed; //俯仰角速度
|
|||
|
|
unsigned char ucServoError1_0:1; //内框方位堵转
|
|||
|
|
unsigned char ucServoError1_1:1; //内框俯仰堵转
|
|||
|
|
unsigned char ucServoError1_2:1; //内框方位旋变故障
|
|||
|
|
unsigned char ucServoError1_3:1; //内框俯仰旋变故障
|
|||
|
|
unsigned char ucServoError1_4:1; //内框方位陀螺故障
|
|||
|
|
unsigned char ucServoError1_5:1; //内框俯仰陀螺故障
|
|||
|
|
unsigned char ucServoError1_6:1; //内框方位电流异常
|
|||
|
|
unsigned char ucServoError1_7:1; //内框俯仰电流异常
|
|||
|
|
unsigned char ucServoError2_0:1; //内框方位飞转
|
|||
|
|
unsigned char ucServoError2_1:1; //内框俯仰飞转
|
|||
|
|
unsigned char ucServoError2_2:1; //外框方位堵转
|
|||
|
|
unsigned char ucServoError2_3:1; //外框俯仰堵转
|
|||
|
|
unsigned char ucServoError2_4:1; //外框方位旋变故障
|
|||
|
|
unsigned char ucServoError2_5:1; //外框俯仰旋变故障
|
|||
|
|
unsigned char ucServoError2_6:1; //外框方位电流异常
|
|||
|
|
unsigned char ucServoError2_7:1; //外框俯仰电流异常
|
|||
|
|
unsigned char ucServoError3_0:1; //角传板通信故障
|
|||
|
|
unsigned char ucServoError3_1:1; //载荷综控板通信异常
|
|||
|
|
unsigned char ucServoError3_2:1; //跟踪板通信异常
|
|||
|
|
unsigned char ucServoError3_3:3; //预留
|
|||
|
|
unsigned char ucServoError3_4:1; //内框方位共振
|
|||
|
|
unsigned char ucServoError3_5:1; //内框俯仰共振
|
|||
|
|
short usCarAz; //载体偏航角
|
|||
|
|
short usCarPt; //载体俯仰角
|
|||
|
|
short usCarRoll; //载体横滚角
|
|||
|
|
short usHeight; //载体海拔高
|
|||
|
|
float fJZRoll; //矫正横滚角
|
|||
|
|
int nLongitude; //载体经度
|
|||
|
|
int nLatitude; //载体纬度
|
|||
|
|
unsigned char ucServoResever; //伺服预留
|
|||
|
|
|
|||
|
|
//通讯状态
|
|||
|
|
unsigned char ucCommunicationState1_0:1;
|
|||
|
|
unsigned char ucCommunicationState1_1:1;
|
|||
|
|
unsigned char ucCommunicationState1_2:1;
|
|||
|
|
unsigned char ucCommunicationState1_3:1;
|
|||
|
|
unsigned char ucCommunicationState1_4:4;
|
|||
|
|
|
|||
|
|
unsigned char ucCommunicationState2_0:1;
|
|||
|
|
unsigned char ucCommunicationState2_1:1;
|
|||
|
|
unsigned char ucCommunicationState2_2:1;
|
|||
|
|
unsigned char ucCommunicationState2_3:1;
|
|||
|
|
unsigned char ucCommunicationState2_4:4;
|
|||
|
|
|
|||
|
|
unsigned char ucReserveData[7];
|
|||
|
|
float fJZYaw; //矫正偏航角
|
|||
|
|
float fJZPt; //矫正俯仰角
|
|||
|
|
unsigned char ucReserveData1[2];
|
|||
|
|
unsigned char ucFrameIDTotal; //帧计数,0~255循环
|
|||
|
|
unsigned char ucXor; //异或校验
|
|||
|
|
unsigned char ucTail; //帧尾,0xF0
|
|||
|
|
};
|
|||
|
|
#pragma pack(pop)
|
|||
|
|
//模块类型
|
|||
|
|
typedef enum eMODULE_TYPE
|
|||
|
|
{
|
|||
|
|
MODULE_TYPE_Power, //电源管理模块
|
|||
|
|
MODULE_TYPE_IR, //红外模块
|
|||
|
|
MODULE_TYPE_VL, //可见光模块
|
|||
|
|
MODULE_TYPE_Laser, //激光模块
|
|||
|
|
MODULE_TYPE_TrackBoard, //跟踪板模块
|
|||
|
|
MODULE_TYPE_Servo, //伺服模块
|
|||
|
|
}MODULE_TYPE;
|
|||
|
|
|
|||
|
|
|
|||
|
|
// 电源控制命令类型
|
|||
|
|
enum ModulePowerControlCommand
|
|||
|
|
{
|
|||
|
|
IRPowerOpen, //打开红外电源
|
|||
|
|
IRPowerClose, //关闭红外电源
|
|||
|
|
VLPowerOpen, //打开可见光电源
|
|||
|
|
VLPowerClose, //关闭可见光电源
|
|||
|
|
VLTrackPowerOpen, //打开可见光跟踪电源
|
|||
|
|
VLTrackPowerClose, //关闭可见光跟踪电源
|
|||
|
|
IRTrackPowerOpen, //打开红外跟踪电源
|
|||
|
|
IRTrackPowerClose, //关闭红外跟踪电源
|
|||
|
|
ServoPowerClose, //关闭伺服板电源
|
|||
|
|
ServoPowerOpen, //打开伺服板电源
|
|||
|
|
MakeAllOpen, //使能命令下发
|
|||
|
|
MakeAllClose, //关闭上位机
|
|||
|
|
LaserDisPowerOpen, //打开激光测距电源
|
|||
|
|
LaserDisPowerClose, //关闭激光测距电源
|
|||
|
|
LaserLightPowerOpen, //打开激光照明电源
|
|||
|
|
LaserLightPowerClose, //关闭激光照明电源
|
|||
|
|
HangXiangjiaoPYL, //航向角偏移量
|
|||
|
|
TargetLonLatheight,
|
|||
|
|
OneKeyParity,
|
|||
|
|
OneKeyParityClean,
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
// ******************************枚举类型******************************
|
|||
|
|
// 红外控制命令枚举
|
|||
|
|
// 主要命令包括:白热、黑热、亮度+、亮度-、对比度+、对比度-、调焦+、调焦-、
|
|||
|
|
// 调焦停、变倍+、变倍-、变倍停、自动聚焦...
|
|||
|
|
enum IRControlCommandEo
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
IRFocusAdd = 0, //调焦+ //********一级菜单--光学控制页*********
|
|||
|
|
IRFocusDec, //调焦-
|
|||
|
|
IRFocusStop, //调焦停
|
|||
|
|
IRAutoZoomAdd, //连续变倍+
|
|||
|
|
IRAutoZoomDec, //连续变倍-
|
|||
|
|
IRAutoZoomStop, //连续变倍停
|
|||
|
|
IRAutoFocus, //自动对焦
|
|||
|
|
IRBrightAdd, //亮度+
|
|||
|
|
IRBrightDec, //亮度-
|
|||
|
|
IRContrastAdd, //对比度+
|
|||
|
|
IRContrastDec, //对比度-
|
|||
|
|
IRDiaoGuangLine, //线性调光
|
|||
|
|
IRDiaoGuangHistogram, //直方图调光
|
|||
|
|
IRDiaoGuangMix, //混合调光
|
|||
|
|
IRDDESwitch, //DDE开关
|
|||
|
|
IRDDELevel, //DDE强度
|
|||
|
|
IRPolarWhite, //白热
|
|||
|
|
IRPolarBlack, //黑热
|
|||
|
|
IRUserMenuSwitch, //用户菜单开关
|
|||
|
|
IRExpertMenuSwitch, //专家菜单开关
|
|||
|
|
IRMenuLeftSlide, //菜单左移
|
|||
|
|
IRMenuRightSlide, //菜单右移
|
|||
|
|
IRMenuParamConfirmDec, //菜单参数确认-
|
|||
|
|
IRMenuParamConfirmAdd, //菜单参数确认+
|
|||
|
|
IRMenuButtonRelease, //按键弹起 (对应通用按键设置页每一次按键按下)
|
|||
|
|
IRCollectTimeAdd, //积分时间+
|
|||
|
|
IRCollectTimeDec, //积分时间-
|
|||
|
|
IRCollectTimeSet, //积分时间设置
|
|||
|
|
IRB1Collect, //B1采集
|
|||
|
|
IRB2Collect, //B2采集
|
|||
|
|
IRShutterRevise, //快门补偿
|
|||
|
|
IRFocusCompensation, //虚焦补偿
|
|||
|
|
IRBadPointThreshold, //坏点阈值 //*******二级菜单--非均匀校正页*******
|
|||
|
|
IRStaticReviseBadPoint, //静态校坏点
|
|||
|
|
IRSaveBadPoint, //保存坏点
|
|||
|
|
IRLoadBadPoint, //加载坏点
|
|||
|
|
IRClearBadPoint, //清空坏点
|
|||
|
|
IRZOOM, //ZOOM放大
|
|||
|
|
IRBigLoop, //大闭环
|
|||
|
|
IRSceneCompensation, //虚焦补偿
|
|||
|
|
|
|||
|
|
|
|||
|
|
//---------------end-------------------
|
|||
|
|
|
|||
|
|
IRWidthView, //宽视场
|
|||
|
|
IRNarrowView, //窄视场
|
|||
|
|
IRMiddleView, //中视场
|
|||
|
|
IRSaveConfig, //保存设置 //*******二级菜单--SETUP设置页*******
|
|||
|
|
IRLoadConfig, //加载设置
|
|||
|
|
IRSaveFactoryConfig, //保存出厂设置
|
|||
|
|
IRRecoverFactoryConfig, //恢复出厂设置
|
|||
|
|
|
|||
|
|
IRDynamicReviseBadPointOpen, //动态校坏点开启
|
|||
|
|
IRDynamicReviseBadPointClose, //动态校坏点关闭
|
|||
|
|
|
|||
|
|
//红外跟踪指令
|
|||
|
|
IRTrackFree, //空闲
|
|||
|
|
IRTrackLock, //锁定
|
|||
|
|
IRTrackUnLock, //解锁
|
|||
|
|
IRAutoTrackOpen, //自动跟踪开
|
|||
|
|
IRAutoTrackClose, //自动跟踪关
|
|||
|
|
IRBox_WidthNormal_HeightNormal, //波门宽度不变 高度不变
|
|||
|
|
IRBox_WidthNormal_HeightAdd, //波门宽度不变 高度增加
|
|||
|
|
IRBox_WidthNormal_HeightDec, //波门宽度不变 高度减少
|
|||
|
|
|
|||
|
|
IRBox_WidthAdd_HeightNormal, //波门宽度增加 高度不变
|
|||
|
|
IRBox_WidthAdd_HeightAdd, //波门宽度增加 高度增加
|
|||
|
|
IRBox_WidthAdd_HeightDec, //波门宽度增加 高度减少
|
|||
|
|
|
|||
|
|
IRBox_WidthDec_HeightNormal, //波门宽度减少 高度不变
|
|||
|
|
IRBox_WidthDec_HeightAdd, //波门宽度减少 高度增加
|
|||
|
|
IRBox_WidthDec_HeightDec, //波门宽度减少 高度减少
|
|||
|
|
|
|||
|
|
IRBox_PosYNormal_PosXNormal, //波门垂直位置不变 水平位置不变
|
|||
|
|
IRBox_PosYNormal_PosXLeft, //波门垂直位置不变 水平位置左移
|
|||
|
|
IRBox_PosYNormal_PosXRight, //波门垂直位置不变 水平位置右移
|
|||
|
|
|
|||
|
|
|
|||
|
|
IRBox_PosYDown_PosXNormal, //波门垂直下移 水平位置不变
|
|||
|
|
IRBox_PosYDown_PosXLeft, //波门垂直下移 水平位置左移
|
|||
|
|
IRBox_PosYDown_PosXRight, //波门垂直下移 水平位置右移
|
|||
|
|
|
|||
|
|
IRBox_PosYUp_PosXNormal, //波门垂直上移 水平位置不变
|
|||
|
|
IRBox_PosYUp_PosXLeft, //波门垂直上移 水平位置左移
|
|||
|
|
IRBox_PosYUp_PosXRight, //波门垂直上移 水平位置右移
|
|||
|
|
|
|||
|
|
IRStopRecord, //停止录像
|
|||
|
|
IRStartRecord, //开始录像
|
|||
|
|
IRSwitchVideoSource_Color, //视频源切换 (彩色可见光)
|
|||
|
|
IRSwitchVideoSource_BW, //视频源切换 (黑白可见光)
|
|||
|
|
|
|||
|
|
IRTargetIdentifyOn, //目标识别开
|
|||
|
|
IRTargetIdentifyOff, //目标识别关
|
|||
|
|
|
|||
|
|
IRTargetDetectionOn, //小目标检测开
|
|||
|
|
IRTargetDetectionOff, //小目标检测关
|
|||
|
|
IRFaceTargetDetectionParamSet, //面目标检测参数设置
|
|||
|
|
|
|||
|
|
//通用按键设置页
|
|||
|
|
|
|||
|
|
IRFocusCustom, //焦距定制
|
|||
|
|
IRFilterLight1Switch, //切换到滤光片1
|
|||
|
|
IRFilterLight2Switch, //切换到滤光片2
|
|||
|
|
IRFilterLight3Switch, //切换到滤光片3
|
|||
|
|
IRMainBoardControl, //串口透传 主板控制
|
|||
|
|
IRServoBoardControl, //串口透传 伺服板控制
|
|||
|
|
IRStepNumberSet, //阶段号设置
|
|||
|
|
IRSaveClearPoint, //保存清晰点
|
|||
|
|
IRHitFocusFar, //踩点远焦
|
|||
|
|
IRHitFocusNear, //踩点近焦
|
|||
|
|
IRHitFocusStop, //踩点调焦停
|
|||
|
|
IRHitZoomOut, //踩点变倍+
|
|||
|
|
IRHitZoomIn, //踩点变倍-
|
|||
|
|
IRHitZoomStop, //踩点变倍停
|
|||
|
|
|
|||
|
|
IRFaceTargetDetectionOn, //面目标检测开
|
|||
|
|
IRFaceTargetDetectionOff, //面目标检测关
|
|||
|
|
|
|||
|
|
IRDynamicTargetDetectionOn, //动目标检测开
|
|||
|
|
IRDynamicTargetDetectionOff,//动目标检测关
|
|||
|
|
|
|||
|
|
IRAITargetDetectionOn, //AI目标检测开
|
|||
|
|
IRAITargetDetectionOff, //AI目标检测关
|
|||
|
|
|
|||
|
|
IRTargetDetectParamSet, //小目标检测参数设置
|
|||
|
|
IRDynamicTargetDetectParamSet, //动目标检测参数设置
|
|||
|
|
IRAITargetDetectParamSet, //AI目标检测参数设置
|
|||
|
|
IRImageImproveOn, //目标图像增强开
|
|||
|
|
IRImageImproveOff, //目标图像增强关
|
|||
|
|
IRFunctionDistanceOn, //作用距离开
|
|||
|
|
IRFunctionDistanceOff, //作用距离关
|
|||
|
|
IRCycleTargetInfoSend, //向跟踪板周期性发送目标信息
|
|||
|
|
IRAIWorkStateSet, //AI参数设置 工作模式
|
|||
|
|
IRRadarGuideSet, //雷达导引
|
|||
|
|
IRZoomSpeedAdd, //变倍速度+
|
|||
|
|
IRZoomSpeedDec, //变倍速度-
|
|||
|
|
IRTempeChangeByMachine, //温度档随机芯改变
|
|||
|
|
IRTempeChangeNotByMachine, //温度档不随机芯改变
|
|||
|
|
IRShutterOpen, //快门开
|
|||
|
|
IRShutterClose, //快门关
|
|||
|
|
|
|||
|
|
IRAdjustLight, //调光模式设置
|
|||
|
|
IRVideoOutParamSet, //视频输出参数设置
|
|||
|
|
IRDisPlayControl, //显示控制
|
|||
|
|
|
|||
|
|
/*****图像控制*****/
|
|||
|
|
IR_SYLB, //时域滤波
|
|||
|
|
IR_KYLB, //空域滤波
|
|||
|
|
IR_KDT, //宽动态
|
|||
|
|
IR_BACA, //BACA
|
|||
|
|
IR_FKTG, //分块调光
|
|||
|
|
IR_DTFWSet, //动态范围压缩
|
|||
|
|
|
|||
|
|
IRNoUseEo,
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
//可见光控制命令类型
|
|||
|
|
enum VLControlCommandEo
|
|||
|
|
{
|
|||
|
|
VLSetAllInit = 0, //可见光机芯初始化
|
|||
|
|
VLSetExposureMode, //曝光模式
|
|||
|
|
VLSetElecFogMode, //设置电子透雾
|
|||
|
|
VLSetMixFogMode, //设置混合透雾
|
|||
|
|
VLSetVLClarityDefault, //设置清晰度为默认值
|
|||
|
|
VLSetVLClarityLevel, //设置清晰度等级
|
|||
|
|
VLSetWhiteBalance, //白平衡
|
|||
|
|
VLSetICRFilterPiece, //ICR滤光片
|
|||
|
|
VLSetLightCompensation, //背光补偿
|
|||
|
|
|
|||
|
|
|
|||
|
|
VLSetZoomPosition, //设置变倍位置
|
|||
|
|
VLSetFocusPosition, //设置调焦位置
|
|||
|
|
VLSetBrightLevel, //设置亮度等级
|
|||
|
|
VLSetContrastLevel, //设置对比度等级
|
|||
|
|
VLSetSATLevel, //设置饱和度等级
|
|||
|
|
VLSetSharpLevel, //设置锐度等级
|
|||
|
|
VLSetTemperatureLevel, //设置色温等级
|
|||
|
|
VLSetWDRLevel, //设置宽动态等级
|
|||
|
|
VLSetDNRLevel, //设置降噪滤波等级
|
|||
|
|
|
|||
|
|
|
|||
|
|
VLSetVLCFilter, //透雾滤光片切换
|
|||
|
|
VLSetVLWideDynamicRange,
|
|||
|
|
VLSetVLDeHeatHaze, //除热浪等级设定
|
|||
|
|
VLSetVLColorSaturationLevel,
|
|||
|
|
VLSetVLSharpnessLevel,
|
|||
|
|
VLSetVLColorTemperatureOnWhiteBalance,
|
|||
|
|
VLSetVLSelectWhiteBalance,
|
|||
|
|
VLSetVLNRLevel,
|
|||
|
|
VLSetVLInfraredWaveLength,
|
|||
|
|
VLSetVLLightStable, //光学防抖开关
|
|||
|
|
VLSetVLHDFormat, //设置HD分辨率
|
|||
|
|
|
|||
|
|
VLZoomPlus, //变倍+
|
|||
|
|
VLZoomMinus, //变倍-
|
|||
|
|
VLZoomStopEo, //变倍停
|
|||
|
|
|
|||
|
|
VLFocusPlus, //调焦+
|
|||
|
|
VLFocusMinus, //调焦-
|
|||
|
|
VLFocusStopEo, //变倍/调焦停
|
|||
|
|
VLOneTimesFocus, //一键聚焦
|
|||
|
|
VLLowLuxEnhance, //低照度增强
|
|||
|
|
VLElectronicEnlarge, //可见光电子变倍
|
|||
|
|
VLNoUseEo
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
enum LaserType
|
|||
|
|
{
|
|||
|
|
LaserDis = 0, //激光测距
|
|||
|
|
LaserLight //激光照明
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
//激光模块命令类型,包含激光测距和激光测照
|
|||
|
|
enum LaserCommandEo
|
|||
|
|
{
|
|||
|
|
//激光测距机相关
|
|||
|
|
LaserDisSelfCheck = 0, //激光测距机自检
|
|||
|
|
LaserDisOnce, //激光测距机单次测距
|
|||
|
|
LaserDisStart, //激光测距机连续测距开始
|
|||
|
|
LaserDisStop, //激光测距机连续测距停止
|
|||
|
|
LaserDisCtrl, //测距控制
|
|||
|
|
LaserDisMark, //Mark测距控制
|
|||
|
|
|
|||
|
|
//激光照明相关
|
|||
|
|
LaserLightStart, //激光测照机开启
|
|||
|
|
LaserLightStop, //激光测照机关闭
|
|||
|
|
LaserLightAngleSet, //激光测照机发散角设置
|
|||
|
|
LaserLightMotorReset, //激光测照机电机复位
|
|||
|
|
|
|||
|
|
//激光测照机
|
|||
|
|
LaserMeaOnce, //激光测照机单次测距
|
|||
|
|
LaserMeaOneHz, //激光测照机1Hz测距
|
|||
|
|
LaserMeaFiveHz, //激光测照机5Hz测距
|
|||
|
|
LaserMeaStop, //激光测照机停止测距
|
|||
|
|
LaserMeaExtSync, //激光测照机外同步
|
|||
|
|
LaserMeaInterSync, //激光测照机内同步
|
|||
|
|
LaserMeaInterSyncSet, //激光测照机内同步设置
|
|||
|
|
LaserMeaAtresiaOpen, //激光测照机闭锁开
|
|||
|
|
LaserMeaAtresiaClose, //激光测照机闭锁关
|
|||
|
|
LaserMeaSoftPowerOn, //软上电
|
|||
|
|
LaserMeaSoftPowerOff, //软下电
|
|||
|
|
LaserMeaDimAxis, //调光轴模式
|
|||
|
|
|
|||
|
|
LaserMeaCoder, //编码装订
|
|||
|
|
LaserMeaUsedNum, //打光次数查询
|
|||
|
|
LaserMeaUsedEnegly, //激光器使能
|
|||
|
|
LaserMeaSilence, //激光器静止
|
|||
|
|
LaserMeaLowPowerOn, //低功耗开启
|
|||
|
|
LaserMeaLowPowerOff, //低功耗关闭
|
|||
|
|
LaserMeaRecvOn, //接收开启
|
|||
|
|
LaserMeaRecvOff, //接收关闭
|
|||
|
|
LaserMeaNormal, //正常能量
|
|||
|
|
LaserMeaSmall, //小能量
|
|||
|
|
LaserMeaSetDeadZone, //设置盲区
|
|||
|
|
LaserLightTwo
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// ******************************枚举类型******************************
|
|||
|
|
// 跟踪板控制命令枚举
|
|||
|
|
// 主要命令包括:锁定、解锁
|
|||
|
|
// 调焦停、变倍+、变倍-、变倍停、自动聚焦...
|
|||
|
|
enum TrackBoardControlCommand
|
|||
|
|
{
|
|||
|
|
// TrackBoardStartTrack = 0, //锁定
|
|||
|
|
// TrackBoardStopTrack, //解锁
|
|||
|
|
|
|||
|
|
// TrackBoardWaveSize, //波门大小
|
|||
|
|
// TrackBoardWavePos, //波门位置
|
|||
|
|
// TrackBoardVideoSwitch, //视频源切换
|
|||
|
|
|
|||
|
|
// VLImageStableOpen, //可见光防抖开
|
|||
|
|
// VLImageStableClose, //可见光防抖关
|
|||
|
|
// IRImageStableOpen, //红外防抖开
|
|||
|
|
// IRImageStableClose, //红外防抖关
|
|||
|
|
|
|||
|
|
// CURSOR_OPERATE, //光标操作
|
|||
|
|
|
|||
|
|
// TRACK_PARAM_SET, //跟踪参数,尺度设置,精搜开关
|
|||
|
|
// DETECT_PARAM_SET, //目标检测开关设置
|
|||
|
|
|
|||
|
|
// AUTO_TRACK, //自动跟踪控制
|
|||
|
|
|
|||
|
|
// AI_PARAM_SET, //设置AI参数
|
|||
|
|
// AI_WORK_MODE_SET, //设置AI工作模式
|
|||
|
|
// AI_SINGLE_SWITCH_SET, //设置AI单项开关
|
|||
|
|
|
|||
|
|
// TimerTestData, //周期发送指令
|
|||
|
|
|
|||
|
|
TrackBoardStartTrack = 0, //锁定
|
|||
|
|
TrackBoardStopTrack, //解锁
|
|||
|
|
TrackBoardFree, //空闲
|
|||
|
|
|
|||
|
|
TrackBoardWaveSize, //波门大小
|
|||
|
|
TrackBoardWavePos, //波门位置
|
|||
|
|
TrackBoardVideoSwitch, //视频源切换
|
|||
|
|
TrackBoardWaveSizeWH, //波门宽高
|
|||
|
|
|
|||
|
|
VLImageStableOpen, //可见光防抖开
|
|||
|
|
VLImageStableClose, //可见光防抖关
|
|||
|
|
IRImageStableOpen, //红外防抖开
|
|||
|
|
IRImageStableClose, //红外防抖关
|
|||
|
|
|
|||
|
|
VLElecZoom, //可见光电子变倍
|
|||
|
|
IRElecZoom, //红外电子变倍
|
|||
|
|
|
|||
|
|
CURSOR_OPERATE, //光标操作
|
|||
|
|
|
|||
|
|
TRACK_PARAM_SET, //跟踪参数,尺度设置,精搜开关
|
|||
|
|
DETECT_PARAM_SET, //目标检测开关设置
|
|||
|
|
|
|||
|
|
AUTO_TRACK, //自动跟踪控制
|
|||
|
|
|
|||
|
|
AI_PARAM_SET, //设置AI参数
|
|||
|
|
AI_WORK_MODE_SET, //设置AI工作模式
|
|||
|
|
AI_SINGLE_SWITCH_SET, //设置AI单项开关
|
|||
|
|
|
|||
|
|
StartVideoRecord, //开始视频录像
|
|||
|
|
StopVideoRecord, //关闭视频录像
|
|||
|
|
ImageSnapShot, //拍照
|
|||
|
|
VideoRecordControl, //回放控制
|
|||
|
|
|
|||
|
|
PicInPicClose, //画中画关闭
|
|||
|
|
PicInPicOpen, //画中画开启
|
|||
|
|
|
|||
|
|
SystemTime, //系统时间
|
|||
|
|
LocalGPS, //本地GPS
|
|||
|
|
TgtGPS, //目标GPS
|
|||
|
|
WordHide, //字符消隐
|
|||
|
|
CodeSpeed, //编码速率
|
|||
|
|
CodeSpeedOld, //编码速率
|
|||
|
|
WuYuanLocateSwitch,
|
|||
|
|
LocationArithSet, //定位算法设置
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 转台控制命令枚举
|
|||
|
|
// 主要命令包括:手动、归零、方位扇扫、俯仰扇扫、定位...
|
|||
|
|
enum TurntableCommand
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
TurnCloseMode = 0, //关闭模式
|
|||
|
|
TurnHandMode, //手动模式
|
|||
|
|
TurnCollectMode, //收藏模式
|
|||
|
|
TurnLocationMode, //定位模式
|
|||
|
|
TurnZeroMode, //归零模式
|
|||
|
|
TurnAutoCollect, //自动搜索
|
|||
|
|
TurnTrackMode, //跟踪模式
|
|||
|
|
TurnAllRoundScan, //周扫模式
|
|||
|
|
TurnReviseDrift, //校漂模式
|
|||
|
|
TurnAngleSectorScan,//方位扇扫
|
|||
|
|
TurnPitchSectorScan,//俯仰扇扫
|
|||
|
|
TurnTorqueMode, //转矩模式
|
|||
|
|
TurnPWMMode, //PWM模式
|
|||
|
|
TurnLockMode, //锁定模式
|
|||
|
|
TurnMagneticZeroPoint, //磁链零位
|
|||
|
|
TurnMachineZero, //机械零位
|
|||
|
|
TurnManualTrack,
|
|||
|
|
|
|||
|
|
|
|||
|
|
TurnAutoReviseDrift, //自动校漂开始
|
|||
|
|
TurnHandRevisedDrift_Orientation_Add, //手动校漂 方位 +
|
|||
|
|
TurnHandRevisedDrift_Orientation_Dec, //手动校漂 方位 -
|
|||
|
|
TurnHandRevisedDrift_Pitch_Add, //手动校漂 俯仰 +
|
|||
|
|
TurnHandRevisedDrift_Pitch_Dec, //手动校漂 俯仰 -
|
|||
|
|
TurnHandRevisedDrift_SaveToFlash, //校漂保存
|
|||
|
|
TurnMachineZeroSetCurr_Zero_AZ, //方位置零
|
|||
|
|
TurnMachineZeroSetCurr_Zero_PT, //俯仰置零
|
|||
|
|
TurnMachineZeroSetCurr_Zero_ROLL, //横滚置零
|
|||
|
|
TurnMachineZeroSetCurr_Zero_SAVEToFlash,//零位保存
|
|||
|
|
|
|||
|
|
TurnOpenAzimuthSpeedCompensation, //开启方位再生速度补偿
|
|||
|
|
TurnOpenPitchingSpeedCompensation, //开启俯仰再生速度补偿
|
|||
|
|
TurnCloseAzimuthSpeedCompensation, //关闭方位再生速度补偿
|
|||
|
|
TurnClosePitchingSpeedCompensation, //关闭俯仰再生速度补偿
|
|||
|
|
TurnSetTargetMoveType, //设置目标运动类型
|
|||
|
|
TurnObjLocation, //目标定位
|
|||
|
|
TurnGeoGuide, //地理引导
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
// 控制命令参数
|
|||
|
|
// 定义三个参数param1、dParam2、dParam3,不同的命令,参数含义不同。例如,当设置
|
|||
|
|
// 手动或定位模式时,参数param1为方位角速度,参数param2为俯仰角速度;当设置方位
|
|||
|
|
// 扇扫模式时,param1为方位中心角,param2为方位角度范围,param2为方位角速度。
|
|||
|
|
typedef struct tagCommandParams
|
|||
|
|
{
|
|||
|
|
double dParam1; //浮点参数
|
|||
|
|
double dParam2;
|
|||
|
|
double dParam3;
|
|||
|
|
double dParam4;
|
|||
|
|
double dParam5;
|
|||
|
|
double dParam6;
|
|||
|
|
double dParam7;
|
|||
|
|
double dParam8;
|
|||
|
|
|
|||
|
|
int nIntValue1; //整形参数
|
|||
|
|
int nIntValue2;
|
|||
|
|
int nIntValue3;
|
|||
|
|
int nIntValue4;
|
|||
|
|
int nIntValue5;
|
|||
|
|
int nIntValue6;
|
|||
|
|
int nIntValue7;
|
|||
|
|
int nIntValue8;
|
|||
|
|
float fParam1; //浮点参数
|
|||
|
|
float fParam2;
|
|||
|
|
float fParam3;
|
|||
|
|
|
|||
|
|
tagCommandParams()
|
|||
|
|
{
|
|||
|
|
dParam1 = -1;
|
|||
|
|
dParam2 = -1;
|
|||
|
|
dParam3 = -1;
|
|||
|
|
dParam4 = -1;
|
|||
|
|
dParam5 = -1;
|
|||
|
|
dParam6 = -1;
|
|||
|
|
dParam7 = -1;
|
|||
|
|
dParam8 = -1;
|
|||
|
|
|
|||
|
|
nIntValue1 = -1;
|
|||
|
|
nIntValue2 = -1;
|
|||
|
|
nIntValue3 = -1;
|
|||
|
|
nIntValue4 = -1;
|
|||
|
|
nIntValue5 = -1;
|
|||
|
|
nIntValue6 = -1;
|
|||
|
|
nIntValue7 = -1;
|
|||
|
|
nIntValue8 = -1;
|
|||
|
|
fParam1 = 0; //浮点参数
|
|||
|
|
fParam2 = 0;
|
|||
|
|
fParam3 = 0;
|
|||
|
|
}
|
|||
|
|
}CommandParams;
|
|||
|
|
Q_DECLARE_METATYPE(CommandParams);
|
|||
|
|
|
|||
|
|
typedef struct tagTRACK_DOOR_INFO
|
|||
|
|
{
|
|||
|
|
int iVLDoorW;
|
|||
|
|
int iVLDoorH;
|
|||
|
|
int iIRDoorW;
|
|||
|
|
int iIRDoorH;
|
|||
|
|
|
|||
|
|
tagTRACK_DOOR_INFO()
|
|||
|
|
{
|
|||
|
|
iVLDoorW = 80;
|
|||
|
|
iVLDoorH = 80;
|
|||
|
|
iIRDoorW = 40;
|
|||
|
|
iIRDoorH = 40;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}Track_Door_Info;
|
|||
|
|
Q_DECLARE_METATYPE(Track_Door_Info);
|
|||
|
|
|
|||
|
|
#pragma pack()
|
|||
|
|
|
|||
|
|
class DeviceControl;
|
|||
|
|
|
|||
|
|
// 初始化SDK
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_Init();
|
|||
|
|
|
|||
|
|
//反初始化SDK
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_UnInit();
|
|||
|
|
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_SetParam(COMMUNICATION_PARAM stParam);
|
|||
|
|
|
|||
|
|
//打开设备
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_OpenDev();
|
|||
|
|
|
|||
|
|
//关闭设备
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_CloseDev();
|
|||
|
|
|
|||
|
|
|
|||
|
|
//设备控制
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_ControlDev(MODULE_TYPE eModuleType, int nControlType, CommandParams stControlCommandParam);
|
|||
|
|
|
|||
|
|
QStringList ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_GetCurrentSendData();
|
|||
|
|
|
|||
|
|
QString ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_GetCurrentReceiveData();
|
|||
|
|
|
|||
|
|
void ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_ReSetCurrentData();
|
|||
|
|
|
|||
|
|
void ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_SendDebugData(QByteArray deByte);
|
|||
|
|
|
|||
|
|
//获取设备状态信息
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_GetDevState(DeviceState& stStateInfo);
|
|||
|
|
|
|||
|
|
//获取设备打开状态
|
|||
|
|
bool ELECTROOPTICRADARSDKSHARED_EXPORT GD_Dev_IsOpen();
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif // ELECTROOPTICRADARSDK_H
|