当前位置: 首页>>代码示例>>C++>>正文


C++ MYTRACE函数代码示例

本文整理汇总了C++中MYTRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ MYTRACE函数的具体用法?C++ MYTRACE怎么用?C++ MYTRACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MYTRACE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: s35392a_attach

static int
s35392a_attach(struct i2c_adapter* adapter, int address, int kind)
{
	int ret;
	struct rtc_device *rtc = NULL;

	if (i2c_adapter_id(adapter) != 1)	/* rtc is on i2c-1 */
	{
		return -ENODEV;
	}

	gClient.addr = address;
	gClient.adapter = adapter;
	gClient.driver = &s35392a_driver;
	gClient.flags = 0;
	strlcpy(gClient.name, S35392A_DEV_NAME, I2C_NAME_SIZE);

	MYTRACE(("%s\n", __func__));
	MYTRACE(("Adapter : %d\n", i2c_adapter_id(adapter)));
	MYTRACE(("ADDR : %x\n", gClient.addr));

	ret = i2c_attach_client(&gClient);
	if (ret < 0)
	{
		MYTRACE(("i2c attach failed : %s\n", __func__));
	}

	rtc = rtc_device_register(gClient.name, &gClient.dev, &s35392a_rtc_ops, THIS_MODULE);
	if (IS_ERR(rtc))
	{
		MYTRACE(("RTC driver regist failed!\n"));
	}

	return ret;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:35,代码来源:rtc-s35392a.c

示例2: MYTRACE

UINT WINAPI CPlayer::WaitNetworkPlayer(LPVOID pVoid)
{	
	CPlayer *player=(CPlayer*)pVoid;
	PSInstance *psInstance=player->getPSInstance();	
	MYTRACE("[%d]thread start",player->playerNum);
	
//	MYTRACE("isAlive:%d",player->isAlive?1:0);
	while(player->isAlive)
	{
//		EnterCriticalSection(&player->getCriticalSection());
		if(player->isMessageWait && !player->isMessageReceived)
		{
			MYTRACE("[%d]recvData-start",player->playerNum);
			int ret=psInstance->recvData((char*)&(player->decisionInfo),sizeof(DECISION_INFO));
			MYTRACE("[%d]recvData-end(ret:%d)",player->playerNum,ret);
			if(ret==0)
			{
				player->setDead();
				break;
			}
			player->isMessageReceived=true;
			player->messageReceivedTime=DXUTGetTime();
		}		
		//LeaveCriticalSection(&player->getCriticalSection());
		Sleep(10);
	}
	MYTRACE("[%d]thread end",player->playerNum);
	return 1;
}
开发者ID:gigony,项目名称:AI-Battle-Tetris,代码行数:29,代码来源:Player.cpp

示例3: MYTRACE

BOOL CUrlPool::Get( CString &strMirrorUrl )
{
#if 1

	strMirrorUrl = m_strMainUrl;
	++m_nThreadFromOrig;
	return TRUE;

#else

	if(m_nThreadFromOrig<m_nThreadFromOrigLimit && m_nMainError<DOWNLOAD_MAINURL_MAXRETYR)
	{
		++m_nThreadFromOrig;
		strMirrorUrl = m_strMainUrl;
		MYTRACE(_T("CLocationPool :Get [Main %d/%d]%s\r\n"), m_nThreadFromOrig, m_nThreadFromOrigLimit, strMirrorUrl);
		return TRUE;
	}

	if(m_arrMirrors.empty())
	{
		MYTRACE(_T("CLocationPool :Get None(MainRetry:%d)\r\n"), m_nMainError);
		return FALSE;
	}
	strMirrorUrl = m_arrMirrors[m_arrMirrors.size()-1];
	m_arrMirrors.pop_back();
	m_arrRunning.push_back(strMirrorUrl);
	MYTRACE(_T("CLocationPool :Get [Pool %d/%d]%s\r\n"), m_arrMirrors.size(), m_arrRunning.size(), strMirrorUrl);
	return TRUE;
#endif 
}
开发者ID:dreamsxin,项目名称:PcManager,代码行数:30,代码来源:UrlPool.cpp

示例4: s35392a_set_time

static int
s35392a_set_time(struct device* pDev, struct rtc_time* pTm)
{
	unsigned char rtc_reg[7];
	int ret;

	MYTRACE(("%s : \n", __func__));
	MYTRACE(("YY:MM:DD:HH:MM:SS(%d:%2d:%2d:%2d:%2d:%2d)\n", pTm->tm_year, pTm->tm_mon, pTm->tm_mday, pTm->tm_hour, pTm->tm_min, pTm->tm_sec));

	rtc_reg[6] = BIN2BCD(pTm->tm_sec);
	rtc_reg[5] = BIN2BCD(pTm->tm_min);
	rtc_reg[4] = BIN2BCD(pTm->tm_hour);
	rtc_reg[3] = BIN2BCD(pTm->tm_wday);
	rtc_reg[2] = BIN2BCD(pTm->tm_mday);
	rtc_reg[1] = BIN2BCD(pTm->tm_mon + 1);		/*0~11 for linux appl, 1~12 for rtc */
	rtc_reg[0] = BIN2BCD(pTm->tm_year - 100);	/* 1900 for linux appl, 2000 for rtc */
	/* don't use tm_yday and tm_dst */

	ret = s35392a_write_reg(S35392A_REALTIME_DATA1, rtc_reg, sizeof(rtc_reg));

	if (ret < 0)
	{
		return ret;
	}

	return 0;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:27,代码来源:rtc-s35392a.c

示例5: s35392a_read_time

static int
s35392a_read_time(struct device* pDev, struct rtc_time* pTm)
{
	unsigned char rtc_reg[7];
	int ret;

	ret = s35392a_read_reg(S35392A_REALTIME_DATA1, rtc_reg, sizeof(rtc_reg));

	if (ret < 0)
	{
		return ret;
	}

	pTm->tm_sec = BCD2BIN(rtc_reg[6] & S35392A_SEC_MASK);
	pTm->tm_min = BCD2BIN(rtc_reg[5] & S35392A_MIN_MASK);
	pTm->tm_hour = BCD2BIN(rtc_reg[4] & S35392A_HOUR_MASK);
	pTm->tm_wday = BCD2BIN(rtc_reg[3] & S35392A_WDAY_MASK);
	pTm->tm_mday = BCD2BIN(rtc_reg[2] & S35392A_DAY_MASK);
	pTm->tm_mon = BCD2BIN(rtc_reg[1]  & S35392A_MON_MASK) - 1;		/* 0~11 for linux appl, 1~12 for rtc */
	pTm->tm_year = BCD2BIN(rtc_reg[0] & S35392A_YEAR_MASK) + 100;	/* 1900 for linux appl, 2000 for rtc */
	/* don't use tm_yday and tm_dst */

	MYTRACE(("%s : \n", __func__));
	MYTRACE(("YY:MM:DD:HH:MM:SS(%d:%2d:%2d:%2d:%2d:%2d)\n", pTm->tm_year, pTm->tm_mon, pTm->tm_mday, pTm->tm_hour, pTm->tm_min, pTm->tm_sec));

	return 0;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:27,代码来源:rtc-s35392a.c

示例6: WindowsFirewallTurnOff

HRESULT WindowsFirewallTurnOff(IN INetFwProfile* fwProfile)
{
    HRESULT hr = S_OK;
    BOOL fwOn;

    assert(fwProfile != NULL);

    // Check to see if the firewall is on.
    hr = WindowsFirewallIsOn(fwProfile, &fwOn);
    if (FAILED(hr))
    {
        MYTRACE(ACE_TEXT("WindowsFirewallIsOn failed: 0x%08lx\n"), hr);
        goto error;
    }

    // If it is, turn it off.
    if (fwOn)
    {
        // Turn the firewall off.
        hr = fwProfile->put_FirewallEnabled(VARIANT_FALSE);
        if (FAILED(hr))
        {
            MYTRACE(ACE_TEXT("put_FirewallEnabled failed: 0x%08lx\n"), hr);
            goto error;
        }

        MYTRACE(ACE_TEXT("The firewall is now off.\n"));
    }

error:

    return hr;
}
开发者ID:BearWare,项目名称:TeamTalk5,代码行数:33,代码来源:WinFirewall.cpp

示例7: MYTRACE

LRESULT CMainFrame::ShowCombatView(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
    MYTRACE("general")(MT::LEVEL_INFO, "Getting Message to Show CombatView...");

    CBotEDoc* pDoc = resources::pDoc;
    AssertBotE(pDoc);

    // Combat View anzeigen
    FullScreenMainView(true);
    SelectMainView(VIEWS::COMBAT_VIEW, pDoc->GetPlayersRaceID());
    // wurde Rundenende geklickt zurücksetzen
    resources::pClientWorker->SetToEmpireViewFor(*pDoc->GetPlayersRace());
    pDoc->m_bRoundEndPressed = false;
    pDoc->m_bDataReceived = true;

    // Zuletzt gedrückten Button zurücksetzen
    CCombatMenuView* pView = ((CCombatMenuView*)GetView(RUNTIME_CLASS(CCombatMenuView)));
    pView->OnNewRound();

    pDoc->UpdateAllViews(NULL);

    MYTRACE("general")(MT::LEVEL_INFO, "Showing CombatView\n");

    return TRUE;
}
开发者ID:bote-team,项目名称:bote,代码行数:25,代码来源:MainFrm.cpp

示例8: WindowsFirewallIsOn

HRESULT WindowsFirewallIsOn(IN INetFwProfile* fwProfile, OUT BOOL* fwOn)
{
    HRESULT hr = S_OK;
    VARIANT_BOOL fwEnabled;

    assert(fwProfile != NULL);
    assert(fwOn != NULL);

    *fwOn = FALSE;

    // Get the current state of the firewall.
    hr = fwProfile->get_FirewallEnabled(&fwEnabled);
    if (FAILED(hr))
    {
        MYTRACE(ACE_TEXT("get_FirewallEnabled failed: 0x%08lx\n"), hr);
        goto error;
    }

    // Check to see if the firewall is on.
    if (fwEnabled != VARIANT_FALSE)
    {
        *fwOn = TRUE;
        MYTRACE(ACE_TEXT("The firewall is on.\n"));
    }
    else
    {
        MYTRACE(ACE_TEXT("The firewall is off.\n"));
    }

error:

    return hr;
}
开发者ID:BearWare,项目名称:TeamTalk5,代码行数:33,代码来源:WinFirewall.cpp

示例9: MYTRACE

/* アンドゥ・リドゥバッファのダンプ */
void COpeBuf::DUMP()
{
#ifdef _DEBUG
	int i;
	MYTRACE( _T("COpeBuf.m_nCurrentPointer=[%d]----\n"), m_nCurrentPointer );
	int size = (int)m_vCOpeBlkArr.size();
	for( i = 0; i < size; ++i ){
		MYTRACE( _T("COpeBuf.m_vCOpeBlkArr[%d]----\n"), i );
		m_vCOpeBlkArr[i]->DUMP();
	}
	MYTRACE( _T("COpeBuf.m_nCurrentPointer=[%d]----\n"), m_nCurrentPointer );
#endif
}
开发者ID:beru,项目名称:sakura,代码行数:14,代码来源:COpeBuf.cpp

示例10: s35392a_probe

static int
s35392a_probe(struct i2c_adapter* adapter)
{
	int ret;

	MYTRACE(("ADAPTER id : %d\n", i2c_adapter_id(adapter)));

	ret = i2c_probe(adapter, &addr_data, &s35392a_attach);

	MYTRACE(("%s : %d\n", __func__, ret));

	return ret;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:13,代码来源:rtc-s35392a.c

示例11: CPoint

/// Funkion berechnet einen möglichen Angriffssektor, welcher später gesammelt angegriffen werden kann.
void CShipAI::CalcAttackSector(void)
{
	// für alle Majors den Angriffssektor berechnen
	map<CString, CMajor*>* pmMajors = m_pDoc->GetRaceCtrl()->GetMajors();

	for (map<CString, CMajor*>::const_iterator it = pmMajors->begin(); it != pmMajors->end(); ++it)
	{
		int nearestSector = MAXSHORT;
		// beinhaltet die Sektorkoordinate mit unserem Angriffsziel
		CPoint sector = CPoint(-1,-1);
		for (UINT j = 0; j < m_pSectorAI->GetOffensiveTargets(it->first)->size(); j++)
		{
			int space = max(abs(m_pSectorAI->GetHighestShipDanger(it->first).x - m_pSectorAI->GetOffensiveTargets(it->first)->at(j).x),
				abs(m_pSectorAI->GetHighestShipDanger(it->first).y - m_pSectorAI->GetOffensiveTargets(it->first)->at(j).y));
			if (space < nearestSector)
			{
				// Wenn dieses Ziel eine kleinere Gefahr darstellt als unsere größte Flottenansammlung oder wir
				// in schon mindst 50% unserer Flotte hier versammelt haben, so wird es als Ziel aufgenommen
				if ((m_pSectorAI->GetDangerOnlyFromCombatShips(it->first, m_pSectorAI->GetHighestShipDanger(it->first)) > m_pSectorAI->GetCompleteDanger(it->first, m_pSectorAI->GetOffensiveTargets(it->first)->at(j)))
					|| (m_pSectorAI->GetDangerOnlyFromCombatShips(it->first, m_pSectorAI->GetHighestShipDanger(it->first)) > (m_pSectorAI->GetCompleteDanger(it->first) * 50 / 100)))
				{
					nearestSector = space;
					sector = m_pSectorAI->GetOffensiveTargets(it->first)->at(j);

				}
			}
		}
		m_AttackSector[it->first] = sector;
		MYTRACE("shipai")(MT::LEVEL_DEBUG, "Race %s: global attack sector is %d/%d\n",it->first, m_AttackSector[it->first].x, m_AttackSector[it->first].y);
	}
}
开发者ID:bote-reginald,项目名称:BotE-Rainer,代码行数:32,代码来源:ShipAI.cpp

示例12: MYTRACE

CStudentInfoDoc::CStudentInfoDoc()
{
    MYTRACE("Enter");
#ifdef _DEBUG
    afxDump.SetDepth(1);
#endif
}
开发者ID:7zhang,项目名称:studies,代码行数:7,代码来源:StudentInfoDoc.cpp

示例13: MYTRACE

///////////////////////////////////////////////////////////////////////
// Speichern / Laden
///////////////////////////////////////////////////////////////////////
void CHull::Serialize(CArchive &ar)
{
	CObject::Serialize(ar);
	// wenn gespeichert wird
	if (ar.IsStoring())
	{
		MYTRACE("shipdetails")(MT::LEVEL_DEBUG, "HULL.CPP: BaseHull:%d, CurrentHull:%d, HullMaterial:%d, MaxHull:%d, DblHull:%s, Ablative:%s, Pola:%s\n", 
			m_iBaseHull, m_iCurrentHull, m_iHullMaterial, m_iMaxHull, 
			m_bDoubleHull ? "true" : "false",
			m_bAblative ? "true" : "false",
			m_bPolarisation ? "true" : "false");
		//HULL.CPP: BaseHull:600, CurrentHull:600, HullMaterial:0, MaxHull:600
		ar << m_bDoubleHull;
		ar << m_bAblative;
		ar << m_bPolarisation;
		ar << m_iBaseHull;
		ar << m_iCurrentHull;
		ar << m_iHullMaterial;
		ar << m_iMaxHull;
	}
	// wenn geladen wird
	if (ar.IsLoading())
	{
		ar >> m_bDoubleHull;
		ar >> m_bAblative;
		ar >> m_bPolarisation;
		ar >> m_iBaseHull;
		ar >> m_iCurrentHull;
		ar >> m_iHullMaterial;
		ar >> m_iMaxHull;
	}
开发者ID:bote-reginald,项目名称:BotE-Rainer,代码行数:34,代码来源:Hull.cpp

示例14: main

/*******************************************************************************
* 函数名称  : main
* 函数描述  : N/A
* 参数      : int argc
* 参数      : char * argv[]
* 返回值    : int
* 备注      : N/A
* 修改日期     修改人   修改内容
* -----------------------------------------------
* 2015/9/11   王全宝   新建
*******************************************************************************/
int main(int argc, char *argv [])
{   
	int ret = 0;

    //取程序路径
    string strFilePath;
    CCommFunc::GetProgrammeDir(strFilePath);

    string strConfigFile = strFilePath + "Config.ini";
    string strLogFile = strFilePath + "LiveStore.log";

    g_pConfig = new CIniFile(strConfigFile); //只读的形式建配置文件对象
    if (NULL == g_pConfig)
    {
        return -1;
    }
    //从配置文件中获取日志级别
    int iLogLevel = g_pConfig->ReadInt(GLOABL_SECTION, KEY_LOGLEVEL, 1);

    //打开日志
    g_ClientLog.Open(strLogFile.c_str(), iLogLevel);

    //测试日志
    MYTRACE(LOG_LEVEL_INFO, "livestore version<%s>", DISKMGR_VERSION);
    
	CDiskinfoApp::GetInstance()->Init(argc, argv);

    CDiskinfoApp::GetInstance()->Run();
    
    CDiskinfoApp::ReleaseInstance();
    return 0;
}
开发者ID:goojiayong,项目名称:diskmgr,代码行数:43,代码来源:diskinfomgr.cpp

示例15: MYTRACE

void CStudentInfoView::OnInitialUpdate()
{
    MYTRACE("Enter");
    m_StudentList = GetDocument()->GetStudentList();    // CAUTION: 这句要放在 OnInitialUpdate 之前调用, 因为 OnInitialUpdate->OnUpdate
    CFormView::OnInitialUpdate();
    ResizeParentToFit();
}
开发者ID:7zhang,项目名称:studies,代码行数:7,代码来源:StudentInfoView.cpp


注:本文中的MYTRACE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。