⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 djtest.cpp

📁 东进语音板卡开发
💻 CPP
字号:
// DjTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "DjTest.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#include "DjSS1Board.h"
#include "DjIsdnBoard.h"

/////////////////////////////////////////////////////////////////////////////
// The one and only application object

CWinApp theApp;

using namespace std;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
	int nRetCode = 0;

	// initialize MFC and print and error on failure
	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
	{
		// TODO: change error code to suit your needs
		cerr << _T("Fatal Error: MFC initialization failed") << endl;
		nRetCode = 1;
	}
	else
	{
		// TODO: code your application's behavior here.
//		CString strHello;
//		strHello.LoadString(IDS_HELLO);
//		cout << (LPCTSTR)strHello << endl;
	}

	CShowMsg::ShowMsg("开始启动板卡",true);
	CBoard * pBoard = NULL;
	CDjSS1Board * pDjSS1Board = new CDjSS1Board();
	CDjIsdnBoard * pIsdnBoard = new CDjIsdnBoard();
	pBoard = pIsdnBoard;

	pBoard->Init();
    
	CString csTemp;
	char szChar[1024] = {0};
	for(;;)
	{
		cin>>szChar;
		csTemp.Format("%s",szChar);
		csTemp.MakeUpper();
		csTemp.TrimLeft();
		csTemp.TrimRight();
		if (csTemp == "RUN")
		{
			pBoard->Dial();
		}
		else if (csTemp == "STOP")
		{
			pBoard->HangUp();
		}else if (csTemp == "LOGSTART")
		{
			pIsdnBoard->ShowMsg("启动日志",true);
			pIsdnBoard->m_bShow = true;
		}else if (csTemp == "LOGSTOP")
		{
			pIsdnBoard->ShowMsg("关闭日志",true);
			pIsdnBoard->m_bShow = false;
		}
		else if (csTemp == "QUIT")
		{
			break;
		}
	}
	return nRetCode;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -