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

📄 sbinary.cpp

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

#include "stdafx.h"
#include "SBinary.h"

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

SBinary::SBinary()
{
	inportnum = 0;
	outportnum = 1;
	nblock = 4;
	nsamp = 8;
	port_type = OUTPORT;
	data_type = PTREAL;
}

SBinary::~SBinary()
{
	
}

void SBinary::Inital_OutPort()
{
	IOPort* port = new IOPort(nblock,port_type,data_type);
	port->SetPortID(0);
	outport_list.push_back(port);
}


void SBinary::OutPutData()
{
	binarydata = GetBuf(0);

	cout << "Source\t" << typeid(*this).name() << " info:" << endl;
	cout << "OutPutBuffer is: " << binarydata <<endl;
	cout << endl;
}

void SBinary::GenerateData()
{
	for(int i=0;i<nblock;i++)
		binarydata[i] = 1;
}


⌨️ 快捷键说明

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