You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# ifndef GLOBAL_H
# define GLOBAL_H
# include <QColor>
# include <QCryptographicHash>
# include <QDateTime>
# include <map>
extern QString g_SoftwareVersion ; // 软件版本号
/*******************系统颜色***************************************/
extern QColor g_themeColor ;
extern QString g_PushBtnStyle ;
extern QString g_PushBtnSelStyle ;
extern QString g_ToolBtnStyle ;
extern QString g_ToolBtnSelStyle ;
/*******************系统颜色***************************************/
/**
* @brief calCRC16
* @param cpu8Data
* @param u16Len
* @return
*/
extern uint16_t calCRC16 ( const uint8_t * cpu8Data , uint16_t u16Len ) ;
/**
* @brief 计算字符串MD5值
* @param str: 字符串
* @return 字符串MD5值
*/
extern QString calculateMD5 ( const QString & str ) ;
/**
* @brief 生成推流地址
* @param uavID: 飞控ID
* @param uavName: 飞机型号, 默认981cs
* @param clientID: 客户端ID, 0为地面端, 1为载荷端。
* @param pushDomain: 推流域名
* @param appName: app名称
* @param expireTime: 过期时间( 单位是秒) , 默认1h。
* @param pushKey: 推流域名配置的鉴权Key
* @return 返回推流地址
*/
extern QString generatePushURL ( int uavID , QString appName = " nmyj " ,
QString uavName = " 981cs " , int clientID = 0 ,
QString pushDomain = " push.htsdfp.com " ,
long expireTime = 4 * 3600 ,
QString pushKey = " 2G2Fu4MXO9D9Hrs7 " ) ;
extern std : : map < int , std : : string > g_mapAppName ;
class global {
public :
global ( ) ;
} ;
# endif // GLOBAL_H