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

📄 cpusimple.cc

📁 基于Oment++的无线传感器网络仿真
💻 CC
字号:
#include "CommonIncludes.h"#include "CPUSimple.h"Define_Module_Like( CPUSimple, CPUModule );CPUSimple::CPUSimple(const char *name, cModule *parentModule, unsigned stacksize) :	CPUBase(name, parentModule, stacksize){//	printf("\n\t  CPUSimple");}void CPUSimple::initialize(){	//printf("\n\t In CPUSimple:initialize.");//	ev << "\n\t In CPUSimple:initialize.";	cModule *pNode = parentModule();	pCoOrdinator = pNode->submodule("CoOrdinator");	if (NULL == pCoOrdinator) {		printf("\n\t In CPUSimple: CoOrdinatorModule not found.");	}	// Fill the PowerRating Table according to the State	double dPowerRating = par("PowerRating");	SetPowerRating(INITIALIZED, dPowerRating);	// Register the current state with the Battery	bool bSuccess = RegisterWithBattery();	if(true == bSuccess)		SetState(INITIALIZED);}void CPUSimple::handleMessage(cMessage *cMsg){	//printf("\n\t In CPUSimple::handleMessage");	ev << "\n\t In CPUSimple::handleMessage";}

⌨️ 快捷键说明

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