Procházet zdrojové kódy

1、添加新的结构体;
2、添加部分OutPutDebugString打印;

Jeff před 5 roky
rodič
revize
4590420796
2 změnil soubory, kde provedl 46 přidání a 1 odebrání
  1. 11 1
      SATHTTP/SATHTTP/SATHTTP.cpp
  2. 35 0
      SATHTTP/SATHTTP/SATHTTP.h

+ 11 - 1
SATHTTP/SATHTTP/SATHTTP.cpp

@@ -378,6 +378,12 @@ SATHTTP_API int Heartbeat(std::string url, const SATHTTP::STHeartbeatReq &stHear
 
 	char *pText = cJSON_Print(pRoot);
 	std::string post_data = "requestMsg=";
+#if 1
+	std::string log = "查询参数:requestMsg=";
+	log.append(pText);
+	log.append(_T("\n"));
+	OutputDebugString(log.c_str());
+#endif
 	post_data.append(CharEncoding::EnCode_UTF8URL(pText));
 
 	// 释放堆内存;
@@ -401,7 +407,11 @@ SATHTTP_API int Heartbeat(std::string url, const SATHTTP::STHeartbeatReq &stHear
 		if ( curlCode == CURLE_OK )
 		{
 			reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
-
+#if 1
+			std::string log = "结果参数:";
+			log.append(reponse+_T("\n"));
+			OutputDebugString(reponse.c_str());
+#endif
 			// 解析返回值;
 			pRoot = cJSON_Parse(reponse.c_str());
 			if (pRoot != NULL)

+ 35 - 0
SATHTTP/SATHTTP/SATHTTP.h

@@ -211,6 +211,14 @@ namespace SATHTTP{
 		std::string strMonkeyPctNav;
 	}STJob, *pSTJob;
 
+	typedef struct __ST_SOMKING_CYCLE__
+	{
+		int				nType;		// 0:立即执行, 1:每天,  2:每周, 3:每月x日;
+		int				nWeek;		// 星期:0~6
+		int				nDay;		// 日:1~31
+		std::string		strTime;	// 时间,格式:"时:分"
+	}STSomkingCycle, *pSTSomkingCycle;
+
 	typedef struct __ST_TASKINFO__
 	{
 		// 任务Case用例是否支持并发;
@@ -240,6 +248,11 @@ namespace SATHTTP{
 		//std::string strTaskId;
 		// 任务日志;
 		std::string _strTaskLog;
+		// 服务器名称;
+		std::string strBuildServerName;
+		// 冒烟任务执行周期json;
+		//std::string strSomkingCycle;
+		STSomkingCycle stSomkingCycle;
 		__ST_TASKINFO__() {
 			_bConcurrent = false;
 			// 0表示未执行;1表示执行中;2表示执行完毕;
@@ -249,6 +262,15 @@ namespace SATHTTP{
 		}
 	}STTaskInfo, *pSTTaskInfo;
 
+	//////////////////////////////////////////////////////////////////////////
+	// 升级包信息;
+	typedef struct __ST_UPGRADE_IMG_INFO__{
+		std::string strSoftwareName;
+		std::string strSoftwareNumber;
+		std::string strSoftwareVersion;
+		std::string strProjectId;
+	}STUpgradeImgInfo, *pSTUpgradeImgInfo;
+
 	typedef struct __ST_TASK__
 	{
 		int					_curRound;
@@ -257,6 +279,7 @@ namespace SATHTTP{
 		int					_roundCount;		// 有多少轮;
 		STTaskInfo			taskInfo;
 		STJob				Job;
+		STUpgradeImgInfo	SoftwareInfo;		// 软件信息;
 		std::vector<STCase> vtCases;
 		__ST_TASK__(){
 			_curRound = 1;
@@ -427,6 +450,18 @@ namespace SATHTTP{
 	{
 		std::string strData;
 	}STSaveImgResp, *pSTSaveImgResp;
+
+	//////////////////////////////////////////////////////////////////////////
+	// 10、编译服务器信息
+	typedef struct __ST_BUILD_SERVER_INFO__
+	{
+		std::string strBuildServerName;					// 编译服务器名;
+		std::string strBuildServerAddress;				// 服务器地址;
+		int			nBuildServerPort;					// 服务器ssh端口号;
+		std::string strBuildServerUser;					// 服务器用户名(sftp);
+		std::string strBuildServerPwd;					// 服务器用户密码;
+		std::string strBuildServerImgPath;				// 服务器升级包路径;
+	}STBuildServerInfo, *pSTBuildServerInfo;
 }
 
 extern SATHTTP_API int nSATHTTP;