📄 cpusimple.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 + -