فهرست منبع

Z991239-5240 #comment validityVertifier 实体移除

80374374 1 سال پیش
والد
کامیت
3ad141f2bf

+ 0 - 5
Module/CMakeLists.txt

@@ -164,7 +164,6 @@ endif(MSVC)
 
 if(MSVC)
 
-add_subdirectory(mod_validityVertifier)
 add_subdirectory(mod_CardReadAdapter)
 add_subdirectory(mod_cardissuer)
 add_subdirectory(mod_CardIssuerStand)
@@ -232,12 +231,8 @@ add_subdirectory(mod_sipphone)
 #pad remove
 add_subdirectory(mod_cardswiper)
 add_subdirectory(mod_PortableScanner)
-
 add_subdirectory(mod_cardissuerstore)
-
 else()
-
-add_subdirectory(mod_validityVertifier)
 add_subdirectory(mod_CardReadAdapter)
 add_subdirectory(mod_cardissuer)
 add_subdirectory(mod_CardIssuerStand)

+ 10 - 10
Module/mod_chromium/mod_chromium.h

@@ -15,10 +15,10 @@
 #include "../mod_ResourceWatcher/ResourceWatcher_msg_g.h"
 #include "Chromium_server_g.h"
 #include <boost/thread/mutex.hpp>
-#include <boost/container/deque.hpp> //不知为什么,vs2010中std::deque没有函数提示
+#include <boost/container/deque.hpp> //涓嶇煡涓轰粈涔堬紝vs2010涓璼td::deque娌℃湁鍑芥暟鎻愮ず
 
 
-//ns::msg 在gcc下拼接有点问题,暂时不得不重新定义一个
+//ns::msg 鍦╣cc涓嬫嫾鎺ユ湁鐐归棶棰橈紝鏆傛椂涓嶅緱涓嶉噸鏂板畾涔変竴涓�
 #define SP_MSG_HANDLE_NS_EX(ns, msg, ns_msg, OnMsg) \
 	case eMsg_##msg: \
 				if (eMsgSig_##msg == dwMessageSignature) { \
@@ -115,24 +115,24 @@ namespace Chromium {
 	private:
 		CSystemStaticInfo m_sysInfo;
 		CWebsocketServer* m_pWsServer;
-		ITimerListener* m_pTimerListener, * pBusinessLimitTimerListener;//浏览器监控Timer,业务禁用Timer
+		ITimerListener* m_pTimerListener, * pBusinessLimitTimerListener;//娴忚�鍣ㄧ洃鎺�imer锛屼笟鍔$�鐢═imer
 		int m_iTcpBridgePort;
 		HANDLE m_hIOCP;
 		HANDLE m_hThreadIOCP;
 		CSimpleStringA m_strCustomMainUrl, m_strCustomAdUrl;
-		bool m_runAd/*广告*/, m_runMain/*业务*/, m_runExtend/*低柜副屏*/, m_runLogin/*用户桌面,可能木有用*/, m_withBrowser/*是否需要与browser交互*/;
-		bool m_withDebugMode/*是否启动debug模式*/, m_withMagic/*启用随机共享内存*/, m_withNoFileLog/*是否不需要本地日志落盘*/, m_withMedia/*开启多媒体选项*/;
+		bool m_runAd/*骞垮憡*/, m_runMain/*涓氬姟*/, m_runExtend/*浣庢煖鍓�睆*/, m_runLogin/*鐢ㄦ埛妗岄潰锛屽彲鑳芥湪鏈夌敤*/, m_withBrowser/*鏄�惁闇€瑕佷笌browser浜や簰*/;
+		bool m_withDebugMode/*鏄�惁鍚�姩debug妯″紡*/, m_withMagic/*鍚�敤闅忔満鍏变韩鍐呭瓨*/, m_withNoFileLog/*鏄�惁涓嶉渶瑕佹湰鍦版棩蹇楄惤鐩�*/, m_withMedia/*寮€鍚��濯掍綋閫夐」*/;
 		bool m_withConsole;
-		bool m_withSpecialTest/*开启一些终端功能的测试*/;
+		bool m_withSpecialTest/*寮€鍚�竴浜涚粓绔�姛鑳界殑娴嬭瘯*/;
 		bool m_withMin, m_withClose, m_installMode;
 
 		boost::container::deque<SYS_EVENT_PARAM> m_eventArr;
-		boost::mutex m_eventContorl, m_eventConditionMu; //sysvarEvent变化时阻塞修改
-		boost::condition_variable_any m_eventCondition;//满足有数据时激活线程
+		boost::mutex m_eventContorl, m_eventConditionMu; //sysvarEvent鍙樺寲鏃堕樆濉炰慨鏀�
+		boost::condition_variable_any m_eventCondition;//婊¤冻鏈夋暟鎹�椂婵€娲荤嚎绋�
 		CAutoArray<CSimpleStringA> m_strArgs;
 		CSmartPointer<ITransactionContext> m_pTransactionContext;
 	public:
-		boost::timed_mutex m_firstStartMain;//首次启动主页
+		boost::timed_mutex m_firstStartMain;//棣栨�鍚�姩涓婚〉
 		int getBrowserStartTimes();
 	private:
 		//subscribe
@@ -145,7 +145,7 @@ namespace Chromium {
 		virtual void OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName);
 		void DoWithSysVarEvent();
 
-		void OnTerminalManage(const char* pszEntityName, DWORD dwMessageId, DWORD dwMessageSignature, HealthManager::TerminalManager& evt);//终端锁定罚出
+		void OnTerminalManage(const char* pszEntityName, DWORD dwMessageId, DWORD dwMessageSignature, HealthManager::TerminalManager& evt);//缁堢�閿佸畾缃氬嚭
 
 		void checkUrlStartTime();
 

+ 0 - 17
Module/mod_validityVertifier/CMakeLists.txt

@@ -1,17 +0,0 @@
-# 定义实体名称
-define_module("validityVertifier")
-
-set(${MODULE_PREFIX}_SRCS
-	mod_validityVertifier.cpp
-	${OTHER_LIB_BASE_DIR}/libpublicFun/publicFunExport.h)
-
-
-set(MOD_VERSION_STRING "1.0.0-dev1")
-add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING} libpublicFun)
-
-
-# 添加实体需要依赖的其他共享库(包括系统库)
-set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_LIBS})
-target_link_libraries(${MODULE_NAME}  ${${MODULE_PREFIX}_LIBS} libpublicFun)
-
-deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 0 - 1
Module/mod_validityVertifier/ChangeLog

@@ -1 +0,0 @@
-* 取消本实体对其他实体的握手(廖桂发,2021年1月20日)

+ 0 - 8
Module/mod_validityVertifier/TestDeamon.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="gb2312" ?>
-<entity name="TestDeamon">
-	<class name="validityVertifierSrv" overlap="true" exclusive="false">
-	</class>
-	<message name="validityVertifierBroadcast">
-			<param name="broadcastJson" type="string"/>
-	</message>
-</entity>

+ 0 - 81
Module/mod_validityVertifier/TestDeamon_client_g.h

@@ -1,81 +0,0 @@
-
-#ifndef __TESTDEAMON_CLIENT_G_H
-#define __TESTDEAMON_CLIENT_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "TestDeamon_def_g.h"
-
-namespace TestDeamon {
-class validityVertifierSrv_ClientBase : public CClientSessionBase {
-public:
-	explicit validityVertifierSrv_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
-
-	validityVertifierSrv_ClientBase* operator () (const linkContext &curLink) 
-	{
-		m_context = curLink;
-		return this;
-	}
-
-protected:
-	virtual ~validityVertifierSrv_ClientBase()
-	{
-		/// override by user
-	}
-public:
-
-	void OnConnectSucceed()
-	{
-		bSessionClosed = false;
-	}
-	void OnClose(ErrorCodeEnum)
-	{
-		Dbg("session closed.");
-		bSessionClosed = true;
-	}
-	bool QuerySessionClosed()
-	{
-		return bSessionClosed;
-	}
-	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
-	{
-		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
-		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "TestDeamon", "validityVertifierSrv", spAsyncWait);
-		if (Error == Error_Succeed) {
-			m_bSysManaged = true;
-			bSessionClosed = false;
-		}
-		return Error;
-	}
-	ErrorCodeEnum Connect()
-	{
-		CSmartPointer<IAsynWaitSp> spAsyncWait;
-		ErrorCodeEnum Error = Connect(spAsyncWait);
-		if (Error == Error_Succeed) {
-			Error = spAsyncWait->WaitAnswer();
-		}
-		return Error;
-	}
-
-
-	bool SafeDelete()
-	{
-		if (!m_bSysManaged) {
-			delete this;
-		}
-		return m_bSysManaged;
-	}
-
-protected:
-	bool m_bSysManaged;
-	CEntityBase *m_pEntityBase;
-	linkContext m_context;
-	bool bSessionClosed;
-};
-
-///////////////////////////
-
-} // namespace TestDeamon
-#endif // __TESTDEAMON_CLIENT_G_H

+ 0 - 22
Module/mod_validityVertifier/TestDeamon_def_g.h

@@ -1,22 +0,0 @@
-#ifndef __TESTDEAMON_DEF_G_H
-#define __TESTDEAMON_DEF_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "SpHelper.h"
-
-namespace TestDeamon {
-//
-// const goes here
-//
-
-
-
-
-///////////////////////////
-
-} // namespace TestDeamon
-
-#endif // __TESTDEAMON_DEF_G_H

+ 0 - 30
Module/mod_validityVertifier/TestDeamon_msg_g.h

@@ -1,30 +0,0 @@
-
-#ifndef __TESTDEAMON_MSG_G_H
-#define __TESTDEAMON_MSG_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "SpHelper.h"
-
-namespace TestDeamon {
-#define eMsg_validityVertifierBroadcast 0
-
-#define eMsgSig_validityVertifierBroadcast 2005026688
-
-struct validityVertifierBroadcast
-{
-	CSimpleStringA broadcastJson;
-
-	void Serialize(SpBuffer &Buf)
-	{
-		auto & buf = Buf & broadcastJson;
-	}
-
-};
-
-///////////////////////////
-
-} // namespace TestDeamon
-#endif // __TESTDEAMON_MSG_G_H

+ 0 - 83
Module/mod_validityVertifier/TestDeamon_server_g.h

@@ -1,83 +0,0 @@
-
-#ifndef __TESTDEAMON_SERVER_G_H
-#define __TESTDEAMON_SERVER_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "TestDeamon_def_g.h"
-
-namespace TestDeamon {
-class validityVertifierSrv_ServerSessionBase : public CServerSessionBase
-{
-public:
-	validityVertifierSrv_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual ~validityVertifierSrv_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual bool IsExclusive() { return false; }
-
-	virtual bool IsSessionOverlap() { return true; }
-
-	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
-	{
-		CAutoBuffer Buf;
-		DWORD dwMessageID;
-		DWORD dwMessageSignature;
-		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
-		if (Error == Error_Succeed) {
-#ifdef DEBUG
-			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
-#else
-			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
-				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
-				return;
-			}
-#endif
-			switch (dwMessageID) {
-				default:
-					assert(0);
-					break;
-			}
-			
-		} else {
-			pTransactionContext->SendAnswer(Error);
-		}
-	}
-
-};
-
-
-///////////////////////////
-
-} // namespace TestDeamon
-#endif // __TESTDEAMON_SERVER_G_H

+ 0 - 354
Module/mod_validityVertifier/mod_validityVertifier.cpp

@@ -1,354 +0,0 @@
-#include "stdafx.h"
-#include "SpBase.h"
-#include "SpTest.h"
-#include "modVer.h"
-#include "validityVertifier_msg_g.h"
-#include "validityVertifier_server_g.h"
-#include "../../Other/libpublicFun/publicFunExport.h"
-//#pragma comment(lib, "libpublicFun.lib")
-
-/*Integrated test deamon*/
-
-#define OP_START  1
-#define OP_TEST     2
-#define OP_CHECK  3
-
-struct TestModeInfo {
-	TestModeInfo() :isTestMode(false), nLevel(0) {
-	}
-	bool isTestMode;
-	int nLevel;
-};
-
-class CTestDeamon;
-
-class CValidityVerifyierSession : public validityVertifier::validityVertifierSrv_ServerSessionBase
-{
-public:
-	CValidityVerifyierSession(CTestDeamon* pEntity) : m_pEntity(pEntity) {}
-	virtual ~CValidityVerifyierSession() {}
-
-
-private:
-	CTestDeamon* m_pEntity;
-};
-
-class CTestDeamon
-	: public CEntityBase
-	, public IEntityLifeListener
-	, public IEntityStateListener
-	, public ILogListener
-	, public ICallbackListener
-	, public ITerminalStateChangedListener
-	, public ITimerListener
-	, public ISysVarListener
-{
-public:
-	CTestDeamon() : _dwStartedTestEntities(0) { _arrTestEntities.Clear(); }
-	virtual ~CTestDeamon() {
-		GetFunction()->UnsubscribeLog(m_subUUID);
-		GetFunction()->GetPrivilegeFunction()->UnregistLiftEvent();
-		GetFunction()->GetPrivilegeFunction()->UnregistEntityStateEvent(NULL);
-	}
-	virtual const char *GetEntityName() const { return "TestDeamon"; }
-	const char* GetEntityVersion() const { return MODULE_VERSION_FULL; }
-	virtual bool IsService()const { return true; }
-	virtual CServerSessionBase* OnNewSession(const char*, const char*) { return new CValidityVerifyierSession(this); }
-
-	virtual void OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
-	{
-		LOG_FUNCTION();
-		for (int i = 0; i < strArgs.GetCount(); ++i) {
-			auto& strParam = strArgs[i];
-			if (strParam.IsStartWith("TestMode", true)) {
-				if (strParam.IsEndWith("=ON", true)) {
-					_testInfo.isTestMode = true;
-				}
-			}
-		}
-
-		IFFAILBREAK(GetFunction()->GetSystemRunInfo(_runInfo));
-
-		auto privilegeFunc = GetFunction()->GetPrivilegeFunction();
-		privilegeFunc->RegistEntityLifeEvent(this);
-		/*register all entity state*/
-		privilegeFunc->RegistEntityStateEvent(NULL, this);
-		Dbg("to subscribe Error_Failed type log.");
-		auto res = GetFunction()->SubscribeLog(m_subUUID, this, Log_Error, Severity_None, Error_Failed, -2, NULL, false);
-		if (IS_FAILURED(res)) {
-			LogError(Severity_High, res, 0, "subscribe Error_Failed type log failed!");
-		}
-
-		auto err = GetFunction()->RegistSysVarEvent("*", this);
-		Dbg("RegistSysVarEvent, ret:%d", err);
-
-		pTransactionContext->SendAnswer(Error_Succeed);
-	}
-
-	BOOL IsExcludeEntity(const CSimpleStringA& name)
-	{
-		if (name.Compare(GetEntityName()) == 0)
-			return TRUE;
-
-		for (int i = 0; i < _arrTestEntities.GetCount(); ++i) {
-			if (name.Compare(_arrTestEntities[i]) == 0)
-				return TRUE;
-		}
-		
-		return FALSE;
-	}
-
-	void TestAllRegistedEntity()
-	{
-		CAutoArray<CSimpleStringA> arrStartEntities;
-		CAutoArray< DWORD> arrEntitityID;
-		IFFAILBREAK(GetFunction()->GetAllStartedEntity(arrStartEntities, arrEntitityID));
-		for (int i = 0; i < arrStartEntities.GetCount(); ++i) {
-			if(!IsExcludeEntity(arrStartEntities[i]))
-				TestEntity(arrStartEntities[i]);
-		}
-	}
-
-	virtual void OnStarted()
-	{
-		LOG_FUNCTION();
-		IFFAILBREAK(GetFunction()->RegistTerminalStateChangeEvent(this));
-		//IFFAILBREAK(GetFunction()->SetTimer(1, this, 60 * 1000));
-	}
-
-	virtual void OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext) 
-	{ 
-		LOG_FUNCTION();
-		pTransactionContext->SendAnswer(Error_Succeed); 
-	}
-
-	//IEntityLifeListener
-	void OnCreated(const char* pszEntityName, ErrorCodeEnum eOnStartErrorCode, const char* pszCallerEntity)
-	{
-		LOG_TRACE("%s created by %s turns out %s",pszEntityName, pszCallerEntity, SpStrError(eOnStartErrorCode));
-	}
-
-	void OnClosed(const char* pszEntityName,
-		EntityCloseCauseEnum eCloseCause,
-		ErrorCodeEnum eOnCloseErrorCode,
-		const char* pszCallerEntity)
-	{
-		LOG_TRACE("%s closed by %s because reason: %s turns out: %s",pszEntityName, pszCallerEntity, SpStrCloseCause(eCloseCause), SpStrError(eOnCloseErrorCode));
-	}
-	void OnException(const char* pszEntityName, const char* pszFunctionName, EntityStateEnum eState, EntityStateEnum eLastState, ErrorCodeEnum eErrorCode)
-	{
-		THROW_FATAL("OnException: %s::%s, changed state from %s to %s: ec:%s", 
-			pszEntityName, pszFunctionName, SpStrEntityState(eLastState), SpStrEntityState(eState), SpStrError(eErrorCode));
-		if (eState == EntityState_Failed || eState == EntityState_Lost) {
-			RequireTerminalExit();
-		}
-	}
-
-	//IEntityStateListener
-	void OnEntityStateHook(const char* pszEntityName,
-		const char* pszTriggerEntity,
-		EntityStateEnum eState,
-		EntityStateEnum eLastState)
-	{
-		LOG_TRACE(">>>%s's entity state refreshed from %s to %s by %s",
-			pszEntityName, SpStrEntityState(eLastState), SpStrEntityState(eState), pszTriggerEntity);
-		if (eState == EntityState_Failed || eState == EntityState_Lost) {
-			RequireTerminalExit();
-		}
-		else if (eLastState == EntityState_Starting && eState == EntityState_Idle) {
-			/** if meet multi-entities at one mod, do test maybe failed beacause mod is busy at starting other brother entity.*/
-			//TestEntity(pszEntityName);
-		}
-	}
-
-	virtual void OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName) {
-		Dbg("OnSysVarEvent %s, old->new:%s->%s", pszKey, pszOldValue, pszValue);
-		CSmartPointer<IEntityFunction> spFunction = GetFunction();
-		std::map<std::string, std::string> srcData;
-		srcData.insert(std::make_pair("pszKey", pszKey));
-		srcData.insert(std::make_pair("oldValue", pszOldValue));
-		srcData.insert(std::make_pair("curValue", pszValue));
-		auto ret = generateJsonStr(srcData);
-		if (ret.first)
-		{
-			Dbg(ret.second.c_str());
-			validityVertifier::validityVertifierBroadcast cur = { ret.second.c_str() };
-			SpSendBroadcast(GetFunction(), eMsg_validityVertifierBroadcast, eMsgSig_validityVertifierBroadcast, cur);
-		}
-	}
-
-	void OnUserStateHook(const char* pszEntityName, DWORD dwState, DWORD dwLastState)
-	{
-		LOG_TRACE(">>>%s'user state refreshed to %d from %d", pszEntityName, dwState, dwLastState);
-	}
-
-	void OnCeateConnection(const char* pszCallerEntity, const char* pszServiceEntity)
-	{
-		LOG_TRACE(">>>OnCeateConnection: caller: %s, service: %s", pszCallerEntity, pszServiceEntity);
-	}
-
-	void OnCloseConnection(const char* pszCallerEntity, const char* pszServiceEntity)
-	{
-		LOG_TRACE(">>>OnCloseConnection: caller: %s, service: %s", pszCallerEntity, pszServiceEntity);
-	}
-
-	//ILogListener
-	void OnLog(const CAutoArray<CUUID>& SubIDs
-		, const CUUID nLogID
-		, const LogTypeEnum eLogType
-		, const SeverityLevelEnum eLevel
-		, const DWORD dwSysError, const DWORD dwUserCode
-		, const DWORD dwEntityInstanceID, const WORD wEntityDevelID
-		, const CAutoArray<DWORD>& Param
-		, const char* pszEntityName, const char* pszModuleName, const char* pszMessage, const linkContext& pLinkInfo)
-	{
-		LogEvent(eLevel, 0,
-			CSimpleStringA::Format("Catched Test Failed Message: [%s][0x%03X][%s] - %s", 
-				pszModuleName, wEntityDevelID, pszEntityName, pszMessage));
-		switch (eLevel) {
-		case Severity_High:
-			RequireTerminalExit();
-			break;
-		case Severity_Middle:
-			/** do nothings*/
-			break;
-		default:
-			break;
-		}
-	}
-
-	void OnStateChanged(FrameworkStateEnum oldState, FrameworkStateEnum curState, const char* triggerEntity)
-	{
-
-		Dbg("OnStateChanged:  from %s to %s trigged by %s",
-			SpStrFrameworkState(oldState), SpStrFrameworkState(curState), triggerEntity);
-
-		if (curState == FrameworkState_Running && _testInfo.isTestMode
-			// && !(_runInfo.dwBootOption & BootOption_Benchmark) /** when under benchmark, still need to test entity??*/
-			) 
-		{
-			TestAllRegistedEntity();
-		}
-	}
-
-	void OnTimeout(DWORD dwTimerID)
-	{
-		Dbg("timer out: %d, to shake hand", dwTimerID);
-		CAutoArray<CSimpleStringA> arrStartEntities;
-		CAutoArray< DWORD> arrEntitityID;
-		IFFAILBREAK(GetFunction()->GetAllStartedEntity(arrStartEntities, arrEntitityID));
-		for (int i = 0; i < arrStartEntities.GetCount(); ++i)
-		{
-			if (arrStartEntities[i].Compare(GetEntityName()) != 0) 
-			{
-				TestEntity(arrStartEntities[i], TRUE);
-			}
-		}
-	}
-
-	struct TestCallbackResult : public IReleasable
-	{
-		TestCallbackResult() :strEntityName(true), op(0) {}
-		virtual ~TestCallbackResult() {}
-		CSimpleStringA strEntityName;
-		int op;
-	};
-
-	/*ICallbackListener*/
-	void OnAnswer(CSmartPointer<IAsynWaitSp> pAsynWaitSp)
-	{
-		CSmartPointer<ICallbackListener> listener;
-		CSmartPointer<IReleasable> context;
-		CHECK(pAsynWaitSp->GetCallback(listener, context));
-		TestCallbackResult* result = static_cast<TestCallbackResult*>(context.GetRawPointer());
-		CHECK(result != NULL);
-		DWORD dwUserCode = 0;
-		const auto ec = pAsynWaitSp->AsyncGetAnswer(dwUserCode);
-		if (result->op == OP_START) 
-		{
-			if (IS_FAILURED(ec)) 
-			{
-				THROW_ERROR("Start %s failed return %s!", result->strEntityName.GetData(), SpStrError(ec));
-			}
-			else 
-			{
-				Dbg("Start entity %s succ.", result->strEntityName.GetData());
-				_arrTestEntities[_dwStartedTestEntities++] = result->strEntityName;
-			}
-		}
-		else if(result->op == OP_TEST) 
-		{ /** OnExam returned.*/
-			if (Error_IgnoreAll == ec || Error_NotImpl == ec) 
-			{
-				LogWarn(Severity_Middle, Error_NotImpl, 0, CSimpleStringA::Format(
-					"Test for entity [%s] is not OK: Detect no any TestCase!!", result->strEntityName.GetData()));
-			}
-			else if (Error_Accept == ec || Error_Succeed == ec)
-			{
-				LogEvent(Severity_High, 0, CSimpleStringA::Format("Test for entity[%s] succ.", result->strEntityName.GetData()));
-			}
-			else
-			{
-				TestCaseStatistics statistic;
-				statistic.ConvertFormUserCode(dwUserCode);
-				THROW_ERROR("Test for entity[%s] failed return %s: %.2lf percent tests failed, %u failed out of %u cases",
-					result->strEntityName.GetData(), SpStrError(ec), statistic.FailureRate(), statistic.Failures(), statistic.Total());
-			}
-			Dbg("return usercode: 0x%08X", dwUserCode);
-		}
-		else if (result->op == OP_CHECK) 
-		{
-			if (IS_FAILURED(ec))
-			{
-				THROW_ERROR("Check %s failed return %s!", result->strEntityName.GetData(), SpStrError(ec));
-			}
-		}
-	}
-
-private:
-
-	void RequireTerminalExit()
-	{
-		if (_testInfo.isTestMode) 
-		{
-			Dbg("Test Failed! shutdown the terminal program...");
-			auto pPriviFunc = GetFunction()->GetPrivilegeFunction();
-			pPriviFunc->Reboot(RebootTrigger_DeadForever, RebootWay_Framework);
-		}
-	}
-
-	void SetOPCallback(CSmartPointer<IAsynWaitSp>& spWait, const char* pcszName, int op)
-	{
-		TestCallbackResult* result = new TestCallbackResult();
-		result->strEntityName = pcszName;
-		result->op = op;
-		spWait->SetCallback(this, result);
-	}
-
-	ErrorCodeEnum TestEntity(const char* lcpszEntityName, bool bShake = false)
-	{
-		if(!bShake)
-			LogEvent(Severity_High, 0, CSimpleStringA::Format("Test specified entity: %s", lcpszEntityName));
-		auto pPriviFunc = GetFunction()->GetPrivilegeFunction();
-		CSmartPointer<IAsynWaitSp> waitSp;
-		auto ec = pPriviFunc->TestEntity(lcpszEntityName, bShake ? Test_ShakeHand : Test_Examine, waitSp);
-		if (IS_FAILURED(ec)) 
-		{
-			THROW_ERROR("Try to %s for %s failed return %s!", bShake ? "check" : "test", lcpszEntityName, SpStrError(ec));
-			return Error_Failed;
-		}
-		SetOPCallback(waitSp, lcpszEntityName,  bShake ? OP_CHECK : OP_TEST);
-		return Error_Succeed;
-	}
-
-private:
-	TestModeInfo _testInfo;
-	CUUID m_subUUID;
-	CAutoArray<CSimpleStringA> _arrTestEntities;
-	DWORD _dwStartedTestEntities;
-	CSystemRunInfo _runInfo;
-};
-
-SP_BEGIN_ENTITY_MAP()
-	SP_ENTITY(CTestDeamon)
-SP_END_ENTITY_MAP()

+ 0 - 59
Module/mod_validityVertifier/validityVertifier_client_g.h

@@ -1,59 +0,0 @@
-
-#ifndef __VALIDITYVERTIFIER_CLIENT_G_H
-#define __VALIDITYVERTIFIER_CLIENT_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "validityVertifier_def_g.h"
-
-namespace validityVertifier {
-class validityVertifierSrv_ClientBase : public CClientSessionBase {
-public:
-	explicit validityVertifierSrv_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
-
-protected:
-	virtual ~validityVertifierSrv_ClientBase()
-	{
-		/// override by user
-	}
-public:
-
-	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
-	{
-		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
-		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "validityVertifier", "validityVertifierSrv", spAsyncWait);
-		if (Error == Error_Succeed) {
-			m_bSysManaged = true;
-		}
-		return Error;
-	}
-	ErrorCodeEnum Connect()
-	{
-		CSmartPointer<IAsynWaitSp> spAsyncWait;
-		ErrorCodeEnum Error = Connect(spAsyncWait);
-		if (Error == Error_Succeed) {
-			Error = spAsyncWait->WaitAnswer();
-		}
-		return Error;
-	}
-
-
-	bool SafeDelete()
-	{
-		if (!m_bSysManaged) {
-			delete this;
-		}
-		return m_bSysManaged;
-	}
-
-private:
-	bool m_bSysManaged;
-	CEntityBase *m_pEntityBase;
-};
-
-///////////////////////////
-
-} // namespace validityVertifier
-#endif // __VALIDITYVERTIFIER_CLIENT_G_H

+ 0 - 22
Module/mod_validityVertifier/validityVertifier_def_g.h

@@ -1,22 +0,0 @@
-#ifndef __VALIDITYVERTIFIER_DEF_G_H
-#define __VALIDITYVERTIFIER_DEF_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "SpHelper.h"
-
-namespace validityVertifier {
-//
-// const goes here
-//
-
-
-
-
-///////////////////////////
-
-} // namespace validityVertifier
-
-#endif // __VALIDITYVERTIFIER_DEF_G_H

+ 0 - 30
Module/mod_validityVertifier/validityVertifier_msg_g.h

@@ -1,30 +0,0 @@
-
-#ifndef __VALIDITYVERTIFIER_MSG_G_H
-#define __VALIDITYVERTIFIER_MSG_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "SpHelper.h"
-
-namespace validityVertifier {
-#define eMsg_validityVertifierBroadcast 0
-
-#define eMsgSig_validityVertifierBroadcast 2005026688
-
-struct validityVertifierBroadcast
-{
-	CSimpleStringA broadcastJson;
-
-	void Serialize(SpBuffer &Buf)
-	{
-		auto & buf = Buf & broadcastJson;
-	}
-
-};
-
-///////////////////////////
-
-} // namespace validityVertifier
-#endif // __VALIDITYVERTIFIER_MSG_G_H

+ 0 - 83
Module/mod_validityVertifier/validityVertifier_server_g.h

@@ -1,83 +0,0 @@
-
-#ifndef __VALIDITYVERTIFIER_SERVER_G_H
-#define __VALIDITYVERTIFIER_SERVER_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "validityVertifier_def_g.h"
-
-namespace validityVertifier {
-class validityVertifierSrv_ServerSessionBase : public CServerSessionBase
-{
-public:
-	validityVertifierSrv_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual ~validityVertifierSrv_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual bool IsExclusive() { return false; }
-
-	virtual bool IsSessionOverlap() { return true; }
-
-	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
-	{
-		CAutoBuffer Buf;
-		DWORD dwMessageID;
-		DWORD dwMessageSignature;
-		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
-		if (Error == Error_Succeed) {
-#ifdef DEBUG
-			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
-#else
-			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
-				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
-				return;
-			}
-#endif
-			switch (dwMessageID) {
-				default:
-					assert(0);
-					break;
-			}
-			
-		} else {
-			pTransactionContext->SendAnswer(Error);
-		}
-	}
-
-};
-
-
-///////////////////////////
-
-} // namespace validityVertifier
-#endif // __VALIDITYVERTIFIER_SERVER_G_H

+ 68 - 68
ThirdParty/Include/SystemStatus/CSystemStatus.cpp

@@ -60,29 +60,29 @@ CSystemStatus::~CSystemStatus()
 }
  
 
-//初始化
+//鍒濆�鍖�
 void CSystemStatus::SystemInit(DWORD object)
 {
 	PDH_STATUS state;
 	state = PdhOpenQuery(NULL, NULL, &m_Query);
 
-	if (object&SYSSTATE_CPU_USAGE)	//CPU使用率
+	if (object&SYSSTATE_CPU_USAGE)	//CPU浣跨敤鐜�
 		state = PdhAddCounter(m_Query, _T("\\Processor(_Total)\\% Processor Time"), NULL, &m_CpuTotal);
-	if (object&SYSSTATE_DISK_READ)	//磁盘读速度
+	if (object&SYSSTATE_DISK_READ)	//纾佺洏璇婚€熷害
 		state = PdhAddCounter(m_Query, _T("\\PhysicalDisk(_Total)\\Disk Read Bytes/sec"), NULL, &m_DiskRead);
-	if (object&SYSSTATE_DISK_WRITE)	//磁盘写速度
+	if (object&SYSSTATE_DISK_WRITE)	//纾佺洏鍐欓€熷害
 		state = PdhAddCounter(m_Query, _T("\\PhysicalDisk(_Total)\\Disk Write Bytes/sec"), NULL, &m_DiskWrite);
-	if (object&SYSSTATE_NET_DOWNLOAD)//网络下载速度
+	if (object&SYSSTATE_NET_DOWNLOAD)//缃戠粶涓嬭浇閫熷害
 		state = PdhAddCounter(m_Query, _T("\\Network Interface(killer E2200 Gigabit Ethernet Controller)\\Bytes Received/sec"), NULL, &m_NetDownload);
-	if (object&SYSSTATE_NET_UPLOAD)	//网络上传速度
+	if (object&SYSSTATE_NET_UPLOAD)	//缃戠粶涓婁紶閫熷害
 		state = PdhAddCounter(m_Query, _T("\\Network Interface(killer E2200 Gigabit Ethernet Controller)\\Bytes Sent/sec"), NULL, &m_NetUpload);
 
 	state = PdhCollectQueryData(m_Query);
-	Sleep(500);             //这里要有延时不然结果相当不准确  
+	Sleep(500);             //杩欓噷瑕佹湁寤舵椂涓嶇劧缁撴灉鐩稿綋涓嶅噯纭�  
 	state =	PdhCollectQueryData(m_Query); 
 }
 
-//获取网络下载速度(K/s)
+//鑾峰彇缃戠粶涓嬭浇閫熷害锛圞/s锛�
 double CSystemStatus::GetSystemNetDownloadRate()
 {
 	PDH_FMT_COUNTERVALUE counterVal;
@@ -93,7 +93,7 @@ double CSystemStatus::GetSystemNetDownloadRate()
 	return NetDownload;
 }
 
-//获取网络上传速度
+//鑾峰彇缃戠粶涓婁紶閫熷害
 double CSystemStatus::GetSystemNetUploadRate()
 {
 	PDH_FMT_COUNTERVALUE counterVal;
@@ -104,7 +104,7 @@ double CSystemStatus::GetSystemNetUploadRate()
 	return NetUpload;
 }
 
-//获取系统当前磁盘读速率(K/s)
+//鑾峰彇绯荤粺褰撳墠纾佺洏璇婚€熺巼(K/s)
 double CSystemStatus::GetSystemDiskReadRate()
 {
 	PDH_FMT_COUNTERVALUE counterVal;
@@ -115,7 +115,7 @@ double CSystemStatus::GetSystemDiskReadRate()
 	return dbDiskRead;
 }
 
-//获取系统当前磁盘写速率
+//鑾峰彇绯荤粺褰撳墠纾佺洏鍐欓€熺巼
 double CSystemStatus::GetSystemDiskWriteRate()
 {
 	PDH_FMT_COUNTERVALUE counterVal;
@@ -126,17 +126,17 @@ double CSystemStatus::GetSystemDiskWriteRate()
 	return dbDiskWrite;
 }
 
-//获取CPU使用值
+//鑾峰彇CPU浣跨敤鍊�
 double CSystemStatus::GetSystemCpuCurrentUsage()
 {
 	PDH_FMT_COUNTERVALUE counterVal;
-	 // CPU时间,注意必须加上PDH_FMT_NOCAP100参数,否则多核CPU会有问题
+	 // CPU鏃堕棿锛屾敞鎰忓繀椤诲姞涓奝DH_FMT_NOCAP100鍙傛暟锛屽惁鍒欏�鏍窩PU浼氭湁闂��
 	PDH_STATUS lStatus = PdhGetFormattedCounterValue(m_CpuTotal, PDH_FMT_DOUBLE| PDH_FMT_NOCAP100, NULL, &counterVal);
 	if(ERROR_SUCCESS != lStatus)  return -1;
 	return counterVal.doubleValue;//PDH_INVALID_ARGUMENT PDH_INVALID_DATA 
 }
  
-//反初始化
+//鍙嶅垵濮嬪寲
 void CSystemStatus::SystemUnInit()
 {
 	if (m_CpuTotal){
@@ -167,7 +167,7 @@ void CSystemStatus::SystemUnInit()
 	}
 }
 
-// 获取系统所有硬盘使用情况		
+// 鑾峰彇绯荤粺鎵€鏈夌‖鐩樹娇鐢ㄦ儏鍐�		
 void CSystemStatus::GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllDiskFree)
 {
 	int DType = 0;
@@ -181,7 +181,7 @@ void CSystemStatus::GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllD
 	ULONGLONG i64TotalBytes;  
 	ULONGLONG i64FreeBytes;
 
-	//枚举磁盘数量
+	//鏋氫妇纾佺洏鏁伴噺
 	DWORD DiskInfo = GetLogicalDrives();
 	while (DiskInfo){
 		if (DiskInfo & 1){
@@ -201,7 +201,7 @@ void CSystemStatus::GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllD
 	}
 	int nRet = GetLogicalDriveStrings(DSLength, (LPTSTR)DStr);
 
-	//枚举磁盘名称
+	//鏋氫妇纾佺洏鍚嶇О
 	for (int i = 0;i < DSLength / 4; i++){
 		TCHAR strDisk[3] = {0};
 		_stprintf(strDisk, _T("%c:"), DStr[si]);
@@ -217,7 +217,7 @@ void CSystemStatus::GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllD
 			nTempFree += (ULONGLONG)i64FreeBytesToCaller / 1024 / 1024 / 1024;
 		}
 		else{
-			OutputDebugString(_T("设备未准备..."));
+			OutputDebugString(_T("璁惧�鏈�噯澶�..."));
 		}
 		si += 4;
 	}
@@ -227,7 +227,7 @@ void CSystemStatus::GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllD
 	delete[] DStr;
 }
 
-// 获取系统各个硬盘使用情况		
+// 鑾峰彇绯荤粺鍚勪釜纭�洏浣跨敤鎯呭喌		
 void CSystemStatus::GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk)
 {
 	int DType = 0;
@@ -241,7 +241,7 @@ void CSystemStatus::GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk)
 	ULONGLONG i64TotalBytes;  
 	ULONGLONG i64FreeBytes;
 
-	//枚举磁盘数量
+	//鏋氫妇纾佺洏鏁伴噺
 	DWORD DiskInfo = GetLogicalDrives();
 	while (DiskInfo){
 		if (DiskInfo & 1){
@@ -262,7 +262,7 @@ void CSystemStatus::GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk)
 	int nRet = GetLogicalDriveStrings(DSLength, (LPTSTR)DStr);
 
 	EACHDISKSTATUS diskstatus;
-	//枚举磁盘名称
+	//鏋氫妇纾佺洏鍚嶇О
 	for (int i = 0;i < DSLength / 4; i++){
 		TCHAR strDisk[3] = {0};
 		_stprintf(strDisk, _T("%c:"), DStr[si]);
@@ -284,7 +284,7 @@ void CSystemStatus::GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk)
 		}
 		else
 		{
-			OutputDebugString(_T("设备未准备..."));
+			OutputDebugString(_T("璁惧�鏈�噯澶�..."));
 		}
 		si += 4;
 	}
@@ -292,7 +292,7 @@ void CSystemStatus::GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk)
 	delete[] DStr;
 }
 
-//获取系统当前磁盘状态
+//鑾峰彇绯荤粺褰撳墠纾佺洏鐘舵€�
 void CSystemStatus::GetSystemCurrentDiskStatus(ULONGLONG& TatolMB, ULONGLONG& FreeCaller)
 {
 	BOOL bResult = FALSE;
@@ -316,9 +316,9 @@ void CSystemStatus::GetSystemCurrentDiskStatus(ULONGLONG& TatolMB, ULONGLONG& Fr
 	_stprintf(szDisk, _T("%c:"), strDirve[0]);
 	bResult = GetDiskFreeSpaceEx(
 		szDisk, 
-		(PULARGE_INTEGER)&ui64FreeBytesToCaller,	//用户可用的磁盘空间
-		(PULARGE_INTEGER)&ui64TotalBytes,			//磁盘总共的空间
-		(PULARGE_INTEGER)&ui64FreeBytes);			//磁盘空闲的空间.以上都是字节为单位。
+		(PULARGE_INTEGER)&ui64FreeBytesToCaller,	//鐢ㄦ埛鍙�敤鐨勭�鐩樼┖闂�
+		(PULARGE_INTEGER)&ui64TotalBytes,			//纾佺洏鎬诲叡鐨勭┖闂�
+		(PULARGE_INTEGER)&ui64FreeBytes);			//纾佺洏绌洪棽鐨勭┖闂�.浠ヤ笂閮芥槸瀛楄妭涓哄崟浣嶃€�
 	if (bResult){
 		nTempTotal = ui64TotalBytes / 1024 / 1024 / 1024;
 		nTempFree = ui64FreeBytesToCaller / 1024 / 1024 / 1024;
@@ -327,7 +327,7 @@ void CSystemStatus::GetSystemCurrentDiskStatus(ULONGLONG& TatolMB, ULONGLONG& Fr
 	}
 }
 
-//获取系统当前磁盘使用率
+//鑾峰彇绯荤粺褰撳墠纾佺洏浣跨敤鐜�
 double CSystemStatus::GetSystemCurrentDiskUsage()
 {
 	BOOL bResult = FALSE;
@@ -350,9 +350,9 @@ double CSystemStatus::GetSystemCurrentDiskUsage()
 	_stprintf(szDisk, _T("%c:"), strDirve[0]);
 	bResult = GetDiskFreeSpaceEx(
 		szDisk, 
-		(PULARGE_INTEGER)&ui64FreeBytesToCaller,	//用户可用的磁盘空间
-		(PULARGE_INTEGER)&ui64TotalBytes,			//磁盘总共的空间
-		(PULARGE_INTEGER)&ui64FreeBytes);			//磁盘空闲的空间.以上都是字节为单位。
+		(PULARGE_INTEGER)&ui64FreeBytesToCaller,	//鐢ㄦ埛鍙�敤鐨勭�鐩樼┖闂�
+		(PULARGE_INTEGER)&ui64TotalBytes,			//纾佺洏鎬诲叡鐨勭┖闂�
+		(PULARGE_INTEGER)&ui64FreeBytes);			//纾佺洏绌洪棽鐨勭┖闂�.浠ヤ笂閮芥槸瀛楄妭涓哄崟浣嶃€�
 	if (bResult){
 		double TempNum  = ((ui64TotalBytes / 1024 / 1024 / 1024)-(ui64FreeBytesToCaller/ 1024 / 1024 / 1024))* 100.0 / (ui64TotalBytes/ 1024 / 1024 / 1024);
 		return TempNum;
@@ -360,7 +360,7 @@ double CSystemStatus::GetSystemCurrentDiskUsage()
 	return 0;
 }
  
-//物理内存和使用
+//鐗╃悊鍐呭瓨鍜屼娇鐢�
 BOOL CSystemStatus::GetPhysicalMemoryState(ULONGLONG& totalPhysMem, ULONGLONG& physMemUsed)
 {
 	MEMORYSTATUSEX memInfo;
@@ -371,7 +371,7 @@ BOOL CSystemStatus::GetPhysicalMemoryState(ULONGLONG& totalPhysMem, ULONGLONG& p
 	return TRUE;
 }
  
-//机器物理内存容量(总可用内存)
+//鏈哄櫒鐗╃悊鍐呭瓨瀹归噺(鎬诲彲鐢ㄥ唴瀛�)
 double CSystemStatus::GetTotalPhysicalMemory()
 {
 	MEMORYSTATUSEX memInfo;
@@ -382,7 +382,7 @@ double CSystemStatus::GetTotalPhysicalMemory()
 	return fTemptotal;
 }
 
-//机器物理内存容量(空闲内存)
+//鏈哄櫒鐗╃悊鍐呭瓨瀹归噺(绌洪棽鍐呭瓨)
 double CSystemStatus::GetTotalPhysicalMemoryFree()
 {
 	MEMORYSTATUSEX memInfo;
@@ -393,7 +393,7 @@ double CSystemStatus::GetTotalPhysicalMemoryFree()
 	return fTemMemFree;
 }
  
-//机器物理内存使用(已使用内存)
+//鏈哄櫒鐗╃悊鍐呭瓨浣跨敤(宸蹭娇鐢ㄥ唴瀛�)
 double CSystemStatus::GetTotalPhysicalMemoryUsed()
 {
 	MEMORYSTATUSEX memInfo;
@@ -404,7 +404,7 @@ double CSystemStatus::GetTotalPhysicalMemoryUsed()
 	return fTemMemUsed;
 }
  
-//机器物理内存使用率 
+//鏈哄櫒鐗╃悊鍐呭瓨浣跨敤鐜� 
 double CSystemStatus::GetPhysicalMemoryUsage()
 {
 	MEMORYSTATUSEX memInfo;
@@ -414,45 +414,45 @@ double CSystemStatus::GetPhysicalMemoryUsage()
 	return MemUsage;
 }
 
-//获取网卡信息(在获取网速时需要用到网卡描述)
+//鑾峰彇缃戝崱淇℃伅锛堝湪鑾峰彇缃戦€熸椂闇€瑕佺敤鍒扮綉鍗℃弿杩帮級
 void CSystemStatus::GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard)
 {
 
 	NETCARDINFO NetCardInfo;
 
 	PIP_ADAPTER_INFO pIpAdapterInfo = new IP_ADAPTER_INFO();
-	//得到结构体大小,用于GetAdaptersInfo参数
+	//寰楀埌缁撴瀯浣撳ぇ灏�,鐢ㄤ簬GetAdaptersInfo鍙傛暟
 	unsigned long stSize = sizeof(IP_ADAPTER_INFO);
-	//调用GetAdaptersInfo函数,填充pIpAdapterInfo指针变量;其中stSize参数既是一个输入量也是一个输出量
+	//璋冪敤GetAdaptersInfo鍑芥暟,濉�厖pIpAdapterInfo鎸囬拡鍙橀噺;鍏朵腑stSize鍙傛暟鏃㈡槸涓€涓�緭鍏ラ噺涔熸槸涓€涓�緭鍑洪噺
 	int nRel = GetAdaptersInfo(pIpAdapterInfo,&stSize);
-	//记录网卡数量
+	//璁板綍缃戝崱鏁伴噺
 	int netCardNum = 0;
-	//记录每张网卡上的IP地址数量
+	//璁板綍姣忓紶缃戝崱涓婄殑IP鍦板潃鏁伴噺
 	int IPnumPerNetCard = 0;
 	if (ERROR_BUFFER_OVERFLOW == nRel)
 	{
-		//如果函数返回的是ERROR_BUFFER_OVERFLOW
-		//则说明GetAdaptersInfo参数传递的内存空间不够,同时其传出stSize,表示需要的空间大小
-		//这也是说明为什么stSize既是一个输入量也是一个输出量
-		//释放原来的内存空间
+		//濡傛灉鍑芥暟杩斿洖鐨勬槸ERROR_BUFFER_OVERFLOW
+		//鍒欒�鏄嶨etAdaptersInfo鍙傛暟浼犻€掔殑鍐呭瓨绌洪棿涓嶅�,鍚屾椂鍏朵紶鍑簊tSize,琛ㄧず闇€瑕佺殑绌洪棿澶у皬
+		//杩欎篃鏄��鏄庝负浠€涔坰tSize鏃㈡槸涓€涓�緭鍏ラ噺涔熸槸涓€涓�緭鍑洪噺
+		//閲婃斁鍘熸潵鐨勫唴瀛樼┖闂�
 		delete pIpAdapterInfo;
-		//重新申请内存空间用来存储所有网卡信息
+		//閲嶆柊鐢宠�鍐呭瓨绌洪棿鐢ㄦ潵瀛樺偍鎵€鏈夌綉鍗′俊鎭�
 		pIpAdapterInfo = (PIP_ADAPTER_INFO)new BYTE[stSize];
-		//再次调用GetAdaptersInfo函数,填充pIpAdapterInfo指针变量
+		//鍐嶆�璋冪敤GetAdaptersInfo鍑芥暟,濉�厖pIpAdapterInfo鎸囬拡鍙橀噺
 		nRel=GetAdaptersInfo(pIpAdapterInfo,&stSize);    
 	}
 	if (ERROR_SUCCESS == nRel)
 	{
-		//输出网卡信息
-		//可能有多网卡,因此通过循环去判断
+		//杈撳嚭缃戝崱淇℃伅
+		//鍙�兘鏈夊�缃戝崱,鍥犳�閫氳繃寰�幆鍘诲垽鏂�
 		while (pIpAdapterInfo)
 		{
-			++netCardNum;				//网卡数量
+			++netCardNum;				//缃戝崱鏁伴噺
 
-			NetCardInfo.Name=pIpAdapterInfo->AdapterName;		//网卡名称
-			NetCardInfo.Description=pIpAdapterInfo->Description;//网卡描述
+			NetCardInfo.Name=pIpAdapterInfo->AdapterName;		//缃戝崱鍚嶇О
+			NetCardInfo.Description=pIpAdapterInfo->Description;//缃戝崱鎻忚堪
 			
-			switch(pIpAdapterInfo->Type)//网卡类型
+			switch(pIpAdapterInfo->Type)//缃戝崱绫诲瀷
 			{
 			case MIB_IF_TYPE_OTHER:break;
 			case MIB_IF_TYPE_ETHERNET:break;
@@ -462,7 +462,7 @@ void CSystemStatus::GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard)
 			case MIB_IF_TYPE_LOOPBACK:break;
 			case MIB_IF_TYPE_SLIP:break;
 			}
-			//网卡MAC地址
+			//缃戝崱MAC鍦板潃
 			char tempchar[4];
 			for (DWORD i = 0; i < pIpAdapterInfo->AddressLength; i++)
 				if (i < pIpAdapterInfo->AddressLength-1)
@@ -483,15 +483,15 @@ void CSystemStatus::GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard)
 					
 				}
 			
-			//网卡IP地址
-			//可能网卡有多IP,因此通过循环去判断
+			//缃戝崱IP鍦板潃
+			//鍙�兘缃戝崱鏈夊�IP,鍥犳�閫氳繃寰�幆鍘诲垽鏂�
 			IP_ADDR_STRING *pIpAddrString =&(pIpAdapterInfo->IpAddressList);
 			do 
 			{
-				//cout<<"该网卡上的IP数量:"<<++IPnumPerNetCard<<endl;
-				//cout<<"IP 地址:"<<pIpAddrString->IpAddress.String<<endl;
-				//cout<<"子网地址:"<<pIpAddrString->IpMask.String<<endl;
-				//cout<<"网关地址:"<<pIpAdapterInfo->GatewayList.IpAddress.String<<endl;
+				//cout<<"璇ョ綉鍗′笂鐨処P鏁伴噺锛�"<<++IPnumPerNetCard<<endl;
+				//cout<<"IP 鍦板潃锛�"<<pIpAddrString->IpAddress.String<<endl;
+				//cout<<"瀛愮綉鍦板潃锛�"<<pIpAddrString->IpMask.String<<endl;
+				//cout<<"缃戝叧鍦板潃锛�"<<pIpAdapterInfo->GatewayList.IpAddress.String<<endl;
 
 				NetCardInfo.Local_IP=pIpAddrString->IpAddress.String;
 
@@ -512,7 +512,7 @@ void CSystemStatus::GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard)
 	}
 }
 
-//获取操作系统信息 
+//鑾峰彇鎿嶄綔绯荤粺淇℃伅 
 void CSystemStatus::GetOsInfo(std::string& strOSName, std::string& strOSArch)
 {
 	// get os name according to version number
@@ -520,7 +520,7 @@ void CSystemStatus::GetOsInfo(std::string& strOSName, std::string& strOSArch)
 	OSVERSIONINFOEX osvi;
 	SYSTEM_INFO si;
 
-	/** 因受系统限制,该接口获取的操作系统版本从8.1开始不对 Gifur@2023724]*/
+	/** 鍥犲彈绯荤粺闄愬埗锛岃�鎺ュ彛鑾峰彇鐨勬搷浣滅郴缁熺増鏈�粠8.1寮€濮嬩笉瀵� Gifur@2023724]*/
 	ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
 	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
 	GetVersionEx((LPOSVERSIONINFO)&osvi);
@@ -618,7 +618,7 @@ void CSystemStatus::GetOsInfo(std::string& strOSName, std::string& strOSArch)
 	}
 }
 
-//获取CPU硬件信息 
+//鑾峰彇CPU纭�欢淇℃伅 
 void CSystemStatus::GetCpuInfo(std::string &CPUinfo)
 {
 	int cpuInfo[4] = {-1};
@@ -635,13 +635,13 @@ void CSystemStatus::GetCpuInfo(std::string &CPUinfo)
 	__cpuid(cpuInfo, 0x80000004);
 	memcpy(cpu_freq, cpuInfo, sizeof(cpuInfo));
 
-	std::string manufacture=cpu_manufacture;//制造商
-	std::string type=cpu_type;				//型号
-	std::string freq=cpu_freq;				//频率
+	std::string manufacture=cpu_manufacture;//鍒堕€犲晢
+	std::string type=cpu_type;				//鍨嬪彿
+	std::string freq=cpu_freq;				//棰戠巼
 	CPUinfo=manufacture+type+freq;
 }
 
-//获取CPUid
+//鑾峰彇CPUid
 void CSystemStatus::GetCPUid(std::string &CPUid)
 {
 	unsigned long s1,s2,s3,s4; 
@@ -686,7 +686,7 @@ BOOL CSystemStatus::GetHDSerial(std::string &HDSerial)
 	ZeroMemory(&in  , sizeof(in)); 
 	ZeroMemory(&out , sizeof(out)); 
 
-	//搜索四个物理硬盘,取第一个有数据的物理硬盘 
+	//鎼滅储鍥涗釜鐗╃悊纭�洏锛屽彇绗�竴涓�湁鏁版嵁鐨勭墿鐞嗙‖鐩� 
 	for (int j=0; j<4; j++)
 	{
 		sprintf(szhd,	"\\\\.\\PhysicalDrive%d",j); 
@@ -727,7 +727,7 @@ BOOL CSystemStatus::GetHDSerial(std::string &HDSerial)
 		s[20] = 0; 
 		ChangeByteOrder(s, 20); 
 
-		//删除空格字符
+		//鍒犻櫎绌烘牸瀛楃�
 		int ix = 0;
 		for (ix=0; ix<20; ix++)
 		{

+ 42 - 42
ThirdParty/Include/SystemStatus/CSystemStatus.h

@@ -5,17 +5,17 @@
  
 typedef struct
 {
-	std::string _strdir;			//磁盘名称
-	float	_Total;					//磁盘总容量MB
-	float	_OfFree;				//磁盘剩余容量MB
+	std::string _strdir;			//纾佺洏鍚嶇О
+	float	_Total;					//纾佺洏鎬诲�閲廙B
+	float	_OfFree;				//纾佺洏鍓╀綑瀹归噺MB
 }EACHDISKSTATUS,*LPEACHDISKSTATUS;
 
 typedef struct
 {
-	std::string Name;				//网卡名称
-	std::string Description;		//网卡描述
-	std::string Local_IP;			//IP地址
-	std::string Local_Mac;			//MAC地址
+	std::string Name;				//缃戝崱鍚嶇О
+	std::string Description;		//缃戝崱鎻忚堪
+	std::string Local_IP;			//IP鍦板潃
+	std::string Local_Mac;			//MAC鍦板潃
 }NETCARDINFO,*LPNETCARDINFO;
 
 
@@ -83,51 +83,51 @@ public:
 	CSystemStatus();
 	~CSystemStatus();
 public:
-	void		SystemInit(DWORD object = SYSSTATE_CPU_USAGE);							//系统初始化(初始化多个项目时使用或运算连接)
-	void		SystemUnInit();															//释放资源
-	double		GetSystemNetDownloadRate();												//获取网络下载速度
-	double		GetSystemNetUploadRate();												//获取网络上传速度
-	double		GetSystemDiskReadRate();												//获取当前磁盘读速率
-	double		GetSystemDiskWriteRate();												//获取当前磁盘写速率
-	double		GetSystemCpuCurrentUsage();												//系统CPU使用率
+	void		SystemInit(DWORD object = SYSSTATE_CPU_USAGE);							//绯荤粺鍒濆�鍖�(鍒濆�鍖栧�涓�」鐩�椂浣跨敤鎴栬繍绠楄繛鎺�)
+	void		SystemUnInit();															//閲婃斁璧勬簮
+	double		GetSystemNetDownloadRate();												//鑾峰彇缃戠粶涓嬭浇閫熷害
+	double		GetSystemNetUploadRate();												//鑾峰彇缃戠粶涓婁紶閫熷害
+	double		GetSystemDiskReadRate();												//鑾峰彇褰撳墠纾佺洏璇婚€熺巼
+	double		GetSystemDiskWriteRate();												//鑾峰彇褰撳墠纾佺洏鍐欓€熺巼
+	double		GetSystemCpuCurrentUsage();												//绯荤粺CPU浣跨敤鐜�
 
-	void		GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk);           //获取各个磁盘使用状态
-	void		GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllDiskFree);	//获取系统总得磁盘使用状态
-	void		GetSystemCurrentDiskStatus(ULONGLONG& TatolMB, ULONGLONG& FreeCaller);	//获取当前磁盘使用状态
-	double		GetSystemCurrentDiskUsage();											//获取当前磁盘使用率
+	void		GetSystemDiskStatus(std::vector<EACHDISKSTATUS> &vectorDisk);           //鑾峰彇鍚勪釜纾佺洏浣跨敤鐘舵€�
+	void		GetSystemDiskStatus(ULONGLONG& AllDiskTotal, ULONGLONG& AllDiskFree);	//鑾峰彇绯荤粺鎬诲緱纾佺洏浣跨敤鐘舵€�
+	void		GetSystemCurrentDiskStatus(ULONGLONG& TatolMB, ULONGLONG& FreeCaller);	//鑾峰彇褰撳墠纾佺洏浣跨敤鐘舵€�
+	double		GetSystemCurrentDiskUsage();											//鑾峰彇褰撳墠纾佺洏浣跨敤鐜�
 
-	BOOL		GetPhysicalMemoryState(ULONGLONG& totalPhysMem, ULONGLONG& physMemUsed);//获取物理内存状态
-	double		GetTotalPhysicalMemory();												//获取可用内存大小
-	double		GetTotalPhysicalMemoryFree();											//获取空闲内存
-	double		GetTotalPhysicalMemoryUsed();											//获取已使用内存大小
-	double		GetPhysicalMemoryUsage();												//获取内存使用率
+	BOOL		GetPhysicalMemoryState(ULONGLONG& totalPhysMem, ULONGLONG& physMemUsed);//鑾峰彇鐗╃悊鍐呭瓨鐘舵€�
+	double		GetTotalPhysicalMemory();												//鑾峰彇鍙�敤鍐呭瓨澶у皬
+	double		GetTotalPhysicalMemoryFree();											//鑾峰彇绌洪棽鍐呭瓨
+	double		GetTotalPhysicalMemoryUsed();											//鑾峰彇宸蹭娇鐢ㄥ唴瀛樺ぇ灏�
+	double		GetPhysicalMemoryUsage();												//鑾峰彇鍐呭瓨浣跨敤鐜�
 
-	void		GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard);				//获取网卡信息
-	void		GetOsInfo(std::string& strOSName, std::string& strOSArch);                                         //获取操作系统信息 
-	void		GetCpuInfo(std::string &CPUinfo);										//获取CPU硬件信息 	
-	void		GetCPUid(std::string &CPUid);											//获取CPUid
+	void		GetNetCardInfo(std::vector<NETCARDINFO> &vectorNetCard);				//鑾峰彇缃戝崱淇℃伅
+	void		GetOsInfo(std::string& strOSName, std::string& strOSArch);                                         //鑾峰彇鎿嶄綔绯荤粺淇℃伅 
+	void		GetCpuInfo(std::string &CPUinfo);										//鑾峰彇CPU纭�欢淇℃伅 	
+	void		GetCPUid(std::string &CPUid);											//鑾峰彇CPUid
 
-	BOOL		GetHDSerial(std::string &HDSerial);										//获取硬盘物理序列号(需要管理员权限)
+	BOOL		GetHDSerial(std::string &HDSerial);										//鑾峰彇纭�洏鐗╃悊搴忓垪鍙凤紙闇€瑕佺�鐞嗗憳鏉冮檺锛�
 private:
 	PDH_HQUERY		m_Query; 
 	PDH_HCOUNTER	m_CpuTotal,m_DiskRead,m_DiskWrite,m_NetDownload,m_NetUpload;
 
 public:
 	/*
-	参数:const char *cmd
-	systeminfo:查看详细的系统信息
-	wmic logicaldisk:查看盘符
-	fsutil volume diskfree + 盘符名称:查看某个盘符的容量大小。
-	wmic path win32_physicalmedia get SerialNumber;查看硬盘系列号
-	wmic diskdrive get serialnumber;查看硬盘系列号(和上面效果一样)
-	wmic cpu:查看CPU运行信息
-	wmic cpu list brief:查看CPU硬件信息
-	wmic memorychip;查看系统内存信息
-	wmic bios:查看系统的bios信息
-	wmic memorychip list brief:查看内存条数
-	wmic memcache list brief:查看缓存内存
-	wmic diskdrive:查看磁盘详细信息
-	wmic diskdrive get Name, Model:查看硬盘名称,型号(使用get)
+	鍙傛暟:const char *cmd
+	systeminfo:鏌ョ湅璇︾粏鐨勭郴缁熶俊鎭�
+	wmic logicaldisk:鏌ョ湅鐩樼�
+	fsutil volume diskfree + 鐩樼�鍚嶇О:鏌ョ湅鏌愪釜鐩樼�鐨勫�閲忓ぇ灏忋€�
+	wmic path win32_physicalmedia get SerialNumber;鏌ョ湅纭�洏绯诲垪鍙�
+	wmic diskdrive get serialnumber;鏌ョ湅纭�洏绯诲垪鍙�(鍜屼笂闈㈡晥鏋滀竴鏍�)
+	wmic cpu:鏌ョ湅CPU杩愯�淇℃伅
+	wmic cpu list brief:鏌ョ湅CPU纭�欢淇℃伅
+	wmic memorychip;鏌ョ湅绯荤粺鍐呭瓨淇℃伅
+	wmic bios:鏌ョ湅绯荤粺鐨刡ios淇℃伅
+	wmic memorychip list brief:鏌ョ湅鍐呭瓨鏉℃暟
+	wmic memcache list brief:鏌ョ湅缂撳瓨鍐呭瓨
+	wmic diskdrive:鏌ョ湅纾佺洏璇︾粏淇℃伅
+	wmic diskdrive get Name, Model:鏌ョ湅纭�洏鍚嶇О锛屽瀷鍙凤紙浣跨敤get锛�
 	...
 	*/
 	std::string execCmd(const char *cmd)

+ 0 - 5
addin/cfg/shell.ini.in

@@ -78,11 +78,6 @@ ResourceWatcher=1,@LIB_PREFIX@mod_ResourceWatcher@LIB_SUFFIX@,0x50A
 
 ;BranchDevice=0,@LIB_PREFIX@mod_BranchDevice@LIB_SUFFIX@,0x601
 
-TestDeamon=1,@LIB_PREFIX@mod_validityVertifier@LIB_SUFFIX@,0xF00
-
-
-
-
 [Test]
 Number=1
 1=TestDeamon TestMode=OFF Level=3 Entity=BlackSheep -D