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

📄 receive.cpp

📁 用于仿真系统中多个仿真对象间的内存管理
💻 CPP
字号:
// Receive.cpp: implementation of the Receive class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Receive.h"

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

Receive::Receive()
{
	inportnum = 1;
	outportnum = 1;
	nblock = 4;
	nsamp = 8;
}

Receive::~Receive()
{

}

void Receive::Inital_InPort()
{
	port_type = INPORT;
	data_type = PTCOMPLEX;
	IOPort* port = new IOPort(GetDataSize(),port_type,data_type);
	port->SetPortID(0);
	inport_list.push_back(port);	
}

void Receive::Inital_OutPort()
{
	port_type = INPORT;
	data_type = PTREAL;
	IOPort* port = new IOPort(nblock,port_type,data_type);
	port->SetPortID(1);
	outport_list.push_back(port);	
}

void Receive::InPutData()
{
	singal = GetBuf(0);
	
	cout << "The Receive\t" << typeid(*this).name()  <<" info:" << endl;

	cout << "InPutBuffer is:" << singal << endl;
}

void Receive::OutPutData()
{
	binarydata = GetBuf(1);
	
	cout << "OutPutBuffer is:" << binarydata << endl;
	cout << endl;
}

⌨️ 快捷键说明

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