00001 #include <CommsManager.H> 00002 #include <MCPControl.H> 00003 00004 /* 00005 The MCP doesn't pay attention to shutdown messages over the normal 00006 channels, so we use SimpleControl instead. Probably should just rename 00007 SimpleControl to MCPControl or something, but whatever. 00008 */ 00009 using namespace WURDE; 00010 using namespace std; 00011 00012 int main(int argc, char *argv[]){ 00013 00014 CommsManager myManager("MCP Controller"); 00015 MCPControl myController("MCPControl"); 00016 00017 myManager.setNoHeartbeat(); 00018 myManager.setMcpRequestMode(false); 00019 myManager.registerSupplier(&myController); 00020 00021 printf("Turning off the MCP.\n"); 00022 00023 myController.data.state=STATE_QUIT; 00024 myController.publishData(); 00025 00026 myManager.runUpdate(); 00027 00028 myManager.cleanUp(); 00029 00030 return 0; 00031 }