//## begin module%1.4%.codegen_version preserve=yes // Read the documentation to learn more about C++ code generator // versioning. //## end module%1.4%.codegen_version //## begin module%3D86D43B008C.cm preserve=no // %X% %Q% %Z% %W% //## end module%3D86D43B008C.cm //## begin module%3D86D43B008C.cp preserve=no //## end module%3D86D43B008C.cp //## Module: Radio%3D86D43B008C; Pseudo Package body //## Source file: C:\Program Files\Rational\Rose\C++\source\Radio.cpp //## begin module%3D86D43B008C.additionalIncludes preserve=no //## end module%3D86D43B008C.additionalIncludes //## begin module%3D86D43B008C.includes preserve=yes //## end module%3D86D43B008C.includes // Radio #include "Radio.h" //## begin module%3D86D43B008C.additionalDeclarations preserve=yes //## end module%3D86D43B008C.additionalDeclarations // Class Radio //## begin Radio::aRadio%3D9AA2BD0154.attr preserve=no private: static Radio {U} Radio Radio::radios[NUMBER_OF_ROBOTS]; //## end Radio::aRadio%3D9AA2BD0154.attr Radio::Radio() //## begin Radio::Radio%3D86D43B008C_const.hasinit preserve=no //## end Radio::Radio%3D86D43B008C_const.hasinit //## begin Radio::Radio%3D86D43B008C_const.initialization preserve=yes //## end Radio::Radio%3D86D43B008C_const.initialization { //## begin Radio::Radio%3D86D43B008C_const.body preserve=yes //## end Radio::Radio%3D86D43B008C_const.body } Radio::~Radio() { //## begin Radio::~Radio%3D86D43B008C_dest.body preserve=yes terminate(); //## end Radio::~Radio%3D86D43B008C_dest.body } //## Other Operations (implementation) Radio* Radio::getRadio () { //## begin Radio::getRadio%3D9AA29D0032.body preserve=yes return &radios[OSMachineID()]; //## end Radio::getRadio%3D9AA29D0032.body } bool Radio::send (BYTE id, int byteCount, BYTE* message) { //## begin Radio::send%3D9025140078.body preserve=yes if (RADIOSend(id, byteCount, message) == 0) return true; //ok else return false; //## end Radio::send%3D9025140078.body } int Radio::checkForMessages () { //## begin Radio::checkForMessages%3D9025560212.body preserve=yes return RADIOCheck(); //## end Radio::checkForMessages%3D9025560212.body } void Radio::receive (BYTE* id, int* receivedBytes, BYTE* message) { //## begin Radio::receive%3D9025690280.body preserve=yes RADIORecv(id, receivedBytes, message); //## end Radio::receive%3D9025690280.body } void Radio::getActiveRobots (bool active[]) { //## begin Radio::getActiveRobots%3D90256F0050.body preserve=yes RadioStatus radioStatus; RADIOGetStatus(&radioStatus); for (int i=0; i