Note: Goby version 1 (shown here) is now considered obsolete. Please use version 2 for new projects, and consider upgrading old projects.

Goby Underwater Autonomy Project  Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
moos/iCommander/iCommander.h
00001 // t. schneider tes@mit.edu 02.19.09
00002 // ocean engineering graduate student - mit / whoi joint program
00003 // massachusetts institute of technology (mit)
00004 // laboratory for autonomous marine sensing systems (lamss)
00005 // 
00006 // this is iCommander.h 
00007 //
00008 // see the readme file within this directory for information
00009 // pertaining to usage and purpose of this script.
00010 //
00011 // This program is free software: you can redistribute it and/or modify
00012 // it under the terms of the GNU General Public License as published by
00013 // the Free Software Foundation, either version 3 of the License, or
00014 // (at your option) any later version.
00015 //
00016 // This software is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU General Public License
00022 // along with this software.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 #ifndef iCommanderH
00025 #define iCommanderH
00026 
00027 #include <cctype>
00028 #include <cmath>
00029 #include <fstream>
00030 
00031 #include <boost/thread.hpp>
00032 #include <boost/date_time/posix_time/posix_time.hpp>
00033 #include <boost/date_time/gregorian/gregorian.hpp>
00034 #include <boost/bind.hpp>
00035 
00036 #include "MOOSLIB/MOOSLib.h"
00037 #include "MOOSUtilityLib/MOOSGeodesy.h"
00038 #include "goby/acomms/dccl.h"
00039 #include "command_gui.h"
00040 #include "iCommander_config.pb.h"
00041 
00042 #include "goby/moos/libmoos_util/tes_moos_app.h"
00043 
00044 class CiCommander : public TesMoosApp
00045 {
00046   public:
00047     static CiCommander* get_instance();
00048     
00049   private:
00050     CiCommander();
00051     virtual ~CiCommander();
00052 
00053     friend class CommandGui;
00054 
00055     void loop(); // from TesMoosApp
00056     void inbox(const CMOOSMsg& msg);
00057 
00058     static CommanderCdk gui_;
00059     static CMOOSGeodesy geodesy_;
00060     static tes::ModemIdConvert modem_lookup_;
00061     static goby::acomms::DCCLCodec dccl_;
00062 
00063     CommandGui command_gui_;
00064     boost::thread command_gui_thread_;
00065     static boost::mutex gui_mutex_;
00066     
00067     double start_time_;
00068     std::map<std::string, std::string> show_vars_;
00069 
00070     bool is_started_up_;
00071     
00072     static iCommanderConfig cfg_;
00073     static CiCommander* inst_;
00074 };
00075 
00076 
00077 
00078 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends