MOOS 0.2375
/home/toby/moos-ivp/MOOS-2375-Oct0611/Essentials/pMOOSBridge/MOOSBridge.h
Go to the documentation of this file.
00001 
00002 //
00003 //   MOOS - Mission Oriented Operating Suite 
00004 //  
00005 //   A suit of Applications and Libraries for Mobile Robotics Research 
00006 //   Copyright (C) 2001-2005 Massachusetts Institute of Technology and 
00007 //   Oxford University. 
00008 //    
00009 //   This software was written by Paul Newman at MIT 2001-2002 and Oxford 
00010 //   University 2003-2005. email: pnewman@robots.ox.ac.uk. 
00011 //      
00012 //   This file is part of a  MOOS Core Component. 
00013 //        
00014 //   This program is free software; you can redistribute it and/or 
00015 //   modify it under the terms of the GNU General Public License as 
00016 //   published by the Free Software Foundation; either version 2 of the 
00017 //   License, or (at your option) any later version. 
00018 //          
00019 //   This program is distributed in the hope that it will be useful, 
00020 //   but WITHOUT ANY WARRANTY; without even the implied warranty of 
00021 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
00022 //   General Public License for more details. 
00023 //            
00024 //   You should have received a copy of the GNU General Public License 
00025 //   along with this program; if not, write to the Free Software 
00026 //   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
00027 //   02111-1307, USA. 
00028 //
00030 #ifndef MOOSBridgeh
00031 #define  MOOSBridgeh
00032 
00033 #include <MOOSLIB/MOOSLib.h>
00034 #include "MOOSCommunity.h"
00035 
00036 class CMOOSBridge
00037 {
00038 public:
00039 
00040     bool Configure();
00041     CMOOSBridge();
00042     virtual ~CMOOSBridge();
00043     bool Run(const std::string & sMissionFile,const std::string & sMOOSName);
00044 
00045 protected:
00046     CMOOSCommunity * GetOrMakeCommunity(const std::string & sCommunity);
00047     bool MarshallLoop();
00048     bool IsUDPShare(CMOOSCommunity::SP & Index);
00049     
00050     typedef std::map<std::string,CMOOSCommunity*> COMMUNITY_MAP;
00051     COMMUNITY_MAP m_Communities;
00052 
00053     CProcessConfigReader m_MissionReader;
00054 
00055     int m_nBridgeFrequency;
00056     std::string m_sLocalCommunity;
00057 
00058     CMOOSUDPLink m_UDPLink;
00059     
00060     std::set< CMOOSCommunity::SP > m_UDPShares;
00061 };
00062 
00063 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines