command.cpp

来自「北京航空航天大学指纹识别系统源码」· C++ 代码 · 共 90 行

CPP
90
字号
// Command.cpp: implementation of the CCommand class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "cos.h"
#include "Command.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CCommand::CCommand()
{

}

CCommand::~CCommand()
{

}

void CCommand::CosCommand(BYTE bCid,CInfBuf *pCommandInf)
{
	int i;//,j;
//	BYTE cla,ins;

	m_InfBuf.ClearBuffer();
	
	for(i=0;i<pCommandInf->GetBufferCount();i++)
	{
		m_InfBuf.AddBufferValue(pCommandInf->GetBufferValue(i));
	}
	
/*	cla = m_InfBuf.GetBufferValue(0);
	ins = m_InfBuf.GetBufferValue(1);

	if (cla==0x04) //read binary and update binary
	{
	    keya_buf[0] = 0x11;
	    keya_buf[0] = 0x22;
	    keya_buf[0] = 0x33;
	    keya_buf[0] = 0x44;
	    keya_buf[0] = 0x55;
	    keya_buf[0] = 0x66;
	    keya_buf[0] = 0x77;
	    keya_buf[0] = 0x88;
		if (pCommandInf->m_KeyType==1) //single DES
			GenerateMac(MAC_SINGLEDES);
		else
		{
			keyb_buf[0] = 0x01;
			keyb_buf[0] = 0x02;
			keyb_buf[0] = 0x03;
			keyb_buf[0] = 0x04;
			keyb_buf[0] = 0x05;
			keyb_buf[0] = 0x06;
			keyb_buf[0] = 0x07;
			keyb_buf[0] = 0x08;

			GenerateMac(MAC_TRIPLEDES);
		}

	    for(i=0;i<4;i++)
		{
		  m_InfBuf.AddBufferValue(m_MacValue[i]);
		}
	}
*/
	if (m_CDataLinker.ImplementLinker(bCid,SEND_I,&m_InfBuf))
	{
		m_ResBuf.ClearBuffer();
	    for(i=0;i<m_InfBuf.GetBufferCount();i++)
		{
			m_ResBuf.AddBufferValue(m_InfBuf.GetBufferValue(i));
		}
	}
	else
	{
		m_ResBuf.ClearBuffer();
	}
}

⌨️ 快捷键说明

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