📄 theinterfacetoboard.cpp
字号:
// TheInterfaceToBoard.cpp: implementation of the CTheInterfaceToBoard class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "InterfaceToBoard.h"
#include <afxmt.h>
#include "CPacker.h"
#include <afxtempl.h>
#include "CChannel.h"
#include "CMultiplex.h"
#include "CDemultiplex.h"
#include "CByteBuffer.h"
#include "TheInterfaceToBoard.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTheInterfaceToBoard::CTheInterfaceToBoard(CMultiplex * pMultiplex,CDemultiplex * pDemultiplex)
{
m_pMultiplex=pMultiplex;
m_pDemultiplex=pDemultiplex;
}
CTheInterfaceToBoard::~CTheInterfaceToBoard()
{
}
int CTheInterfaceToBoard::Input(BYTE * pbyBuffer,int nBufferLength)
{
int a;
a = m_pMultiplex->DetachStream(pbyBuffer,nBufferLength);
if(!a)
{
TRACE("DATA = %d ",a);
return FALSE;
}
else
return a;
}
extern int gnReceivedBytes;
void CTheInterfaceToBoard::Output(BYTE * pbyBlock,int nBlockLength)
{
gnReceivedBytes+=nBlockLength;
m_pDemultiplex->InputStream(pbyBlock,nBlockLength);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -