MOOS 0.2375
/home/toby/moos-ivp/MOOS-2375-Oct0611/Docs/Essentials/Antler/code/main.cpp
Go to the documentation of this file.
00001 
00002  #include "SimpleApp.h"
00003 
00004  //simple "main" file which serves to build and run a CMOOSApp-derived application
00005 
00006 
00007 int main(int argc ,char * argv[])
00008 {
00009     //set up some default application parameters
00010 
00011     //whats the name of the configuration file that the application
00012     //should look in if it needs to read parameters?
00013     const char * sMissionFile = "Mission.moos";
00014 
00015     //under what name should the application register with the MOOSDB?
00016     const char * sMOOSName = "MyMOOSApp";
00017 
00018     switch(argc)
00019     {
00020     case 3:
00021         //command line says don't register with default name
00022         sMOOSName = argv[2];
00023     case 2:
00024         //command line says don't use default "mission.moos" config file
00025         sMissionFile = argv[1];
00026     }
00027 
00028     //make an application
00029     CSimpleApp TheApp;
00030 
00031     //run forever passing registration name and mission file parameters
00032     TheApp.Run(sMOOSName,sMissionFile);
00033 
00034     //probably will never get here..
00035     return 0;
00036 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines