transmit.cpp

来自「用于仿真系统中多个仿真对象间的内存管理」· C++ 代码 · 共 60 行

CPP
60
字号
// Transmit.cpp: implementation of the Transmit class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Transmit.h"

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

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

Transmit::~Transmit()
{

}

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

void Transmit::Inital_OutPort()
{
	port_type = OUTPORT;
	data_type = PTCOMPLEX;
	IOPort* port = new IOPort(GetDataSize(),port_type,data_type);
	port->SetPortID(1);
	outport_list.push_back(port);	
}

void Transmit::InPutData()
{
	binarydata = GetBuf(0);
	
	cout << "The Transmit\t" << typeid(*this).name()  <<" info:" << endl;
	cout << "InPutBuffer is:" << binarydata << endl;
}

void Transmit::OutPutData()
{
	singal = GetBuf(1);

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


⌨️ 快捷键说明

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