389 lines
12 KiB
C
389 lines
12 KiB
C
|
|
#ifndef SYSTEMCONTROLCOMMONDEFINE_H
|
|||
|
|
#define SYSTEMCONTROLCOMMONDEFINE_H
|
|||
|
|
|
|||
|
|
#include <QString>
|
|||
|
|
#include <QVariant>
|
|||
|
|
|
|||
|
|
//可见光
|
|||
|
|
typedef struct tagVL_STATUS
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
QString strVLState; //可见光---获取运行状态
|
|||
|
|
QString strVLVersion; //可见光---版本号
|
|||
|
|
//Report
|
|||
|
|
float fVLFocalLen; //可见光---焦距
|
|||
|
|
float fVLZoomValue; //可见光---视场角
|
|||
|
|
float fVLSharpness; //清晰度
|
|||
|
|
|
|||
|
|
tagVL_STATUS()
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
strVLState = "";
|
|||
|
|
strVLVersion = "";
|
|||
|
|
//Report
|
|||
|
|
fVLFocalLen = 0;
|
|||
|
|
fVLZoomValue = 0;
|
|||
|
|
fVLSharpness = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}VL_STATUS;
|
|||
|
|
|
|||
|
|
//红外
|
|||
|
|
typedef struct tagIR_STATUS
|
|||
|
|
{
|
|||
|
|
//Report
|
|||
|
|
float fIRFocalLen; //焦距
|
|||
|
|
float fIRZoomValue; //视场角
|
|||
|
|
float fIRSharpness; //清晰度
|
|||
|
|
float fIRTemp; //温度
|
|||
|
|
|
|||
|
|
tagIR_STATUS()
|
|||
|
|
{
|
|||
|
|
//Report
|
|||
|
|
fIRFocalLen = 0;
|
|||
|
|
fIRZoomValue = 0;
|
|||
|
|
fIRSharpness = 0;
|
|||
|
|
fIRTemp = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}IR_STATUS;
|
|||
|
|
|
|||
|
|
//跟踪
|
|||
|
|
typedef struct tagTRACK_STATUS
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
QString strTrackState; //跟踪---获取运行状态
|
|||
|
|
QString strTrackVersion; //跟踪---版本号
|
|||
|
|
unsigned short shVLGateWidth; //跟踪---可见光波门宽
|
|||
|
|
unsigned short shVLGateHeight; //跟踪---可见光波门高
|
|||
|
|
unsigned short shIRGateWidth; //跟踪---红外波门宽
|
|||
|
|
unsigned short shIRGateHeight; //跟踪---红外波门高
|
|||
|
|
bool bAutoTracking; //自动跟踪
|
|||
|
|
bool bSmallTd; //小目标检测
|
|||
|
|
bool bFaceDetection; //面目标
|
|||
|
|
bool bMoveDetection; //动目标
|
|||
|
|
bool bAIDetection; //AI检测
|
|||
|
|
QString strScaleSwitch; //尺度开关
|
|||
|
|
bool bSearchSwitch; //精搜开关
|
|||
|
|
QString strTrackingAlgorithm; //跟踪算法
|
|||
|
|
|
|||
|
|
//Report
|
|||
|
|
int nVLGateWidth; //跟踪---可见光波门宽
|
|||
|
|
int nVLGateHeight; //跟踪---可见光波门高
|
|||
|
|
int nIRGateWidth; //跟踪---红外波门宽
|
|||
|
|
int nIRGateHeight; //跟踪---红外波门高
|
|||
|
|
|
|||
|
|
int nVideoSource; //脱靶量--视频源
|
|||
|
|
int nWorkMode; //脱靶量--工作模式
|
|||
|
|
int nDeltaX; //X方向脱靶量
|
|||
|
|
int nDeltaY; //Y方向脱靶量
|
|||
|
|
int nAzimuthRS; //方位角分辨率
|
|||
|
|
int nPitchRS; //俯仰角分辨率
|
|||
|
|
|
|||
|
|
tagTRACK_STATUS()
|
|||
|
|
{
|
|||
|
|
strTrackState = ""; //跟踪---获取运行状态
|
|||
|
|
strTrackVersion = ""; //跟踪---版本号
|
|||
|
|
shVLGateWidth = 0; //跟踪---可见光波门宽
|
|||
|
|
shVLGateHeight = 0; //跟踪---可见光波门高
|
|||
|
|
shIRGateWidth = 0; //跟踪---红外波门宽
|
|||
|
|
shIRGateHeight = 0; //跟踪---红外波门高
|
|||
|
|
bAutoTracking = false; //自动跟踪
|
|||
|
|
bSmallTd = false; //小目标检测
|
|||
|
|
bFaceDetection = false; //面目标
|
|||
|
|
bMoveDetection = false; //动目标
|
|||
|
|
bAIDetection = false; //AI检测
|
|||
|
|
strScaleSwitch = ""; //尺度开关
|
|||
|
|
bSearchSwitch = false; //精搜开关
|
|||
|
|
strTrackingAlgorithm = ""; //跟踪算法
|
|||
|
|
//Report
|
|||
|
|
nVLGateWidth = 0;
|
|||
|
|
nVLGateHeight = 0;
|
|||
|
|
nIRGateWidth = 0;
|
|||
|
|
nIRGateHeight = 0;
|
|||
|
|
nVideoSource = 0;
|
|||
|
|
nWorkMode = 0;
|
|||
|
|
nDeltaX = 0;
|
|||
|
|
nDeltaY = 0;
|
|||
|
|
nAzimuthRS = 0;
|
|||
|
|
nPitchRS = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}TRACK_STATUS;
|
|||
|
|
|
|||
|
|
//激光
|
|||
|
|
typedef struct tagLASER_STATUS
|
|||
|
|
{
|
|||
|
|
//Report
|
|||
|
|
int nLDVol; //LD电压状态
|
|||
|
|
int nDataCheck; // 存储数据状态
|
|||
|
|
int nViasVol; //偏压状态
|
|||
|
|
int nZbSta; //主波状态
|
|||
|
|
int nDischargeTime; //LD放电时间
|
|||
|
|
int nMwvstate; //主回波状态
|
|||
|
|
float fFirstDis; //首目标距离
|
|||
|
|
float fSecondDis; //次目标距离
|
|||
|
|
float fThirdDis; //末目标距离
|
|||
|
|
float fFirstFall; //首目标下降沿信息
|
|||
|
|
float fFirstUp; //首目标上升沿信息
|
|||
|
|
int nFirstPW; //首目标脉冲宽度
|
|||
|
|
float fSecondFall; //次目标下降沿信息
|
|||
|
|
float fSecondUp; //次目标上升沿信息
|
|||
|
|
int nSecondPW; //次目标脉冲宽度
|
|||
|
|
float fThirdFall; //末目标下降沿信息
|
|||
|
|
float fThirdUp; //末目标上升沿信息
|
|||
|
|
int nThirdPW; //末目标脉冲宽度
|
|||
|
|
QString strDeviceNum; //设备参数
|
|||
|
|
QString strLaserVersion; //程序版本信息
|
|||
|
|
int nCurrent; //工作电流/A
|
|||
|
|
int nVbiasM; //偏压模式
|
|||
|
|
float fVbias; //偏压值/V
|
|||
|
|
int nMaxdischargetime; //最大放电时间/us
|
|||
|
|
int nGaindelay; //增益调节/us
|
|||
|
|
int nPowermode; //功耗模式
|
|||
|
|
float fChargevol; //充电电压/V
|
|||
|
|
float fMwvtv; //主波阈值/V
|
|||
|
|
float fBwvtv; //回波阈值/V
|
|||
|
|
int nRealDischargetime; //实际放电时间/us
|
|||
|
|
int nMeasureTimes; //测距次数
|
|||
|
|
|
|||
|
|
tagLASER_STATUS()
|
|||
|
|
{
|
|||
|
|
nLDVol = 0;
|
|||
|
|
nDataCheck = 0;
|
|||
|
|
nViasVol = 0;
|
|||
|
|
nZbSta = 0;
|
|||
|
|
nDischargeTime = 0;
|
|||
|
|
nMwvstate = 0;
|
|||
|
|
fFirstDis = 0;
|
|||
|
|
fSecondDis = 0;
|
|||
|
|
fThirdDis = 0;
|
|||
|
|
fFirstFall = 0;
|
|||
|
|
fFirstUp = 0;
|
|||
|
|
nFirstPW = 0;
|
|||
|
|
fSecondFall = 0;
|
|||
|
|
fSecondUp = 0;
|
|||
|
|
nSecondPW = 0;
|
|||
|
|
fThirdFall = 0;
|
|||
|
|
fThirdUp = 0;
|
|||
|
|
nThirdPW = 0;
|
|||
|
|
strDeviceNum = "";
|
|||
|
|
strLaserVersion = "";
|
|||
|
|
nCurrent = 0;
|
|||
|
|
nVbiasM = 0;
|
|||
|
|
fVbias = 0;
|
|||
|
|
nMaxdischargetime = 0;
|
|||
|
|
nGaindelay = 0;
|
|||
|
|
nPowermode = 0;
|
|||
|
|
fChargevol = 0;
|
|||
|
|
fMwvtv = 0;
|
|||
|
|
fBwvtv = 0;
|
|||
|
|
nRealDischargetime = 0;
|
|||
|
|
nMeasureTimes = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}LASER_STATUS;
|
|||
|
|
|
|||
|
|
//综控
|
|||
|
|
typedef struct tagINTEGRATED_STATUS
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
int nPicture; //拍照
|
|||
|
|
bool bRecord; //录像
|
|||
|
|
|
|||
|
|
//Report
|
|||
|
|
bool bIRPower; //红外电源
|
|||
|
|
bool bVLPower; //可见光电源
|
|||
|
|
bool bSFPower; //伺服电源
|
|||
|
|
bool bLaserPower; //激光电源
|
|||
|
|
bool bTrackPower; //跟踪板电源
|
|||
|
|
bool bFanPower; //风扇电源
|
|||
|
|
|
|||
|
|
int nWaterSensor; //水浸传感器
|
|||
|
|
int nAirSensor; //气压传感器
|
|||
|
|
int nHumiditySensor; //湿度传感器
|
|||
|
|
int nTempSensor; //温度传感器
|
|||
|
|
|
|||
|
|
tagINTEGRATED_STATUS()
|
|||
|
|
{
|
|||
|
|
//综控
|
|||
|
|
nPicture = 0; //拍照
|
|||
|
|
bRecord = false; //录像
|
|||
|
|
|
|||
|
|
//Report
|
|||
|
|
bIRPower = false; //红外电源
|
|||
|
|
bVLPower = false; //可见光电源
|
|||
|
|
bSFPower = false; //伺服电源
|
|||
|
|
bLaserPower = false; //激光电源
|
|||
|
|
bTrackPower = false; //跟踪板电源
|
|||
|
|
bFanPower = false; //风扇电源
|
|||
|
|
nWaterSensor = 0;
|
|||
|
|
nAirSensor = 0;
|
|||
|
|
nHumiditySensor = 0;
|
|||
|
|
nTempSensor = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}INTEGRATED_STATUS;
|
|||
|
|
|
|||
|
|
//伺服
|
|||
|
|
typedef struct tagSERVO_STATUS
|
|||
|
|
{
|
|||
|
|
//Report
|
|||
|
|
QString strWorkMode; //伺服---工作模式
|
|||
|
|
float fInHAngle; //内框方位角度
|
|||
|
|
float fInVAngle; //内框俯仰角度
|
|||
|
|
float fOutHAngle; //外框方位角度
|
|||
|
|
float fOutVAngle; //外框俯仰角度
|
|||
|
|
float fHSpeed; //方位角速度
|
|||
|
|
float fVSpeed; //俯仰角速度
|
|||
|
|
int nState; //伺服状态
|
|||
|
|
float fYaw; //载体偏航角
|
|||
|
|
float fPitch; //载体俯仰角
|
|||
|
|
float fRoll; //载体横滚角
|
|||
|
|
float fAltitude; //海拔高度
|
|||
|
|
int nGpsTime; //GPS时间
|
|||
|
|
float fLong; //载体经度
|
|||
|
|
float fLat; //载体纬度
|
|||
|
|
int nVersion; //伺服编号
|
|||
|
|
int nFrame; //帧编号
|
|||
|
|
|
|||
|
|
tagSERVO_STATUS()
|
|||
|
|
{
|
|||
|
|
strWorkMode = "";
|
|||
|
|
fInHAngle = 0;
|
|||
|
|
fInVAngle = 0;
|
|||
|
|
fOutHAngle = 0;
|
|||
|
|
fOutVAngle = 0;
|
|||
|
|
fHSpeed = 0;
|
|||
|
|
fVSpeed = 0;
|
|||
|
|
nState = 0;
|
|||
|
|
fYaw = 0;
|
|||
|
|
fPitch = 0;
|
|||
|
|
fRoll = 0;
|
|||
|
|
fAltitude = 0;
|
|||
|
|
nGpsTime = 0;
|
|||
|
|
fLong = 0;
|
|||
|
|
fLat = 0;
|
|||
|
|
nVersion = 0;
|
|||
|
|
nFrame = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}SERVO_STATUS;
|
|||
|
|
|
|||
|
|
//设备系统
|
|||
|
|
typedef struct tagDEV_SYSTEM_STATUS
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
QString strDevState; //设备系统---获取运行状态
|
|||
|
|
QString strDevSoftVersion; //设备系统---软件版本号
|
|||
|
|
QString strHardVersion; //设备系统---硬件版本号
|
|||
|
|
QString strProduction; //设备系统---生产批次、型号等信息
|
|||
|
|
|
|||
|
|
//Report
|
|||
|
|
//设备系统日志
|
|||
|
|
QString strLogMoudle; //日志模块
|
|||
|
|
QString strLogMsg; //日志字符串
|
|||
|
|
QString strLogLevel; //日志级别
|
|||
|
|
//告警
|
|||
|
|
QString strAlarmMoudle; //告警模块
|
|||
|
|
QString strAlarmLevel; //告警级别
|
|||
|
|
QString strAlarmMsg; //告警信息
|
|||
|
|
//连接状态
|
|||
|
|
QString strDevConnectState; //连接状态
|
|||
|
|
QString strDevConnectModule; //对应的模块/红外、可见光、伺服......
|
|||
|
|
//资源状态
|
|||
|
|
QString strResourcesModule; //资源模块
|
|||
|
|
QList<QMap<QString,QVariant>> m_resourceList; //资源信息list,大小可变
|
|||
|
|
|
|||
|
|
tagDEV_SYSTEM_STATUS()
|
|||
|
|
{
|
|||
|
|
//设备系统
|
|||
|
|
strDevState = ""; //设备系统---获取运行状态
|
|||
|
|
strDevSoftVersion = ""; //设备系统---软件版本号
|
|||
|
|
strHardVersion = ""; //设备系统---硬件版本号
|
|||
|
|
strProduction = ""; //设备系统---生产批次、型号等信息
|
|||
|
|
//Report
|
|||
|
|
strLogMoudle = "";
|
|||
|
|
strLogMsg = "";
|
|||
|
|
strLogLevel = "";
|
|||
|
|
strAlarmMoudle = "";
|
|||
|
|
strAlarmLevel = "";
|
|||
|
|
strAlarmMsg = "";
|
|||
|
|
strDevConnectState = "";
|
|||
|
|
strDevConnectModule = "";
|
|||
|
|
strResourcesModule = "";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}DEV_SYSTEM_STATUS;
|
|||
|
|
|
|||
|
|
//OTA升级
|
|||
|
|
typedef struct tagOTA_UPGRADE_STATUS
|
|||
|
|
{
|
|||
|
|
//RPC
|
|||
|
|
QString strSoftVersion; //软件版本号
|
|||
|
|
QString strOTAStart; //是否允许升级
|
|||
|
|
int nLength; //数据块大小--长度
|
|||
|
|
int nIndex; //偏移
|
|||
|
|
int nBlocks; //数据块数量
|
|||
|
|
//Report
|
|||
|
|
float fOTAUpgradeState; //升级进度
|
|||
|
|
|
|||
|
|
tagOTA_UPGRADE_STATUS()
|
|||
|
|
{
|
|||
|
|
//升级
|
|||
|
|
strSoftVersion = ""; //软件版本号
|
|||
|
|
strOTAStart = ""; //是否允许升级
|
|||
|
|
nLength = 0; //数据块大小--长度
|
|||
|
|
nIndex = 0; //偏移
|
|||
|
|
nBlocks = 0; //数据块数量
|
|||
|
|
fOTAUpgradeState = 0.00;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}OTA_UPGRADE_STATUS;
|
|||
|
|
|
|||
|
|
|
|||
|
|
//设备上返信息
|
|||
|
|
typedef struct tagSYSTEM_STATUS
|
|||
|
|
{
|
|||
|
|
int nMsgId; //消息ID
|
|||
|
|
int nCode; //200成功,其他失败
|
|||
|
|
QString strMsg; //
|
|||
|
|
QString strTopic; //接收消息主题
|
|||
|
|
QString strFunc; //消息接口
|
|||
|
|
|
|||
|
|
VL_STATUS stVLStatus;
|
|||
|
|
IR_STATUS stIRStatus;
|
|||
|
|
TRACK_STATUS stTrackStatus;
|
|||
|
|
LASER_STATUS stLaserStatus;
|
|||
|
|
INTEGRATED_STATUS stIntegratedStatus;
|
|||
|
|
SERVO_STATUS stServoStatus;
|
|||
|
|
DEV_SYSTEM_STATUS stDevSystemStatus;
|
|||
|
|
OTA_UPGRADE_STATUS stOTAUpgradeStatus;
|
|||
|
|
|
|||
|
|
tagSYSTEM_STATUS()
|
|||
|
|
{
|
|||
|
|
nMsgId = 0;
|
|||
|
|
nCode = 0;
|
|||
|
|
strMsg = "";
|
|||
|
|
strTopic = "";
|
|||
|
|
strFunc = "";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}SYSTEM_STATUS;
|
|||
|
|
|
|||
|
|
typedef struct tagDEVICE_INFO
|
|||
|
|
{
|
|||
|
|
long lDeviceID; //设备ID
|
|||
|
|
}DEVICE_INFO;
|
|||
|
|
|
|||
|
|
|
|||
|
|
//设备信息回调函数,sdk内部使用
|
|||
|
|
typedef void (*SystemStatusCallback)(SYSTEM_STATUS stInfo, void* pUser);
|
|||
|
|
|
|||
|
|
//设备信息回调函数,sdk外部使用,添加设备信息结构体
|
|||
|
|
typedef void (*SystemStatusCallbackDevice)(SYSTEM_STATUS stInfo, DEVICE_INFO stDeviceInfo, void* pUser);
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif // SYSTEMCONTROLCOMMONDEFINE_H
|