RemoteRangeSens.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //
00003 // $Id$
00004 //
00005 // Copyright 2008, 2009, 2010, 2011, 2012  Antonio Franchi and Paolo Stegagno    
00006 //
00007 // This file is part of MIP.
00008 //
00009 // MIP is free software: you can redistribute it and/or modify
00010 // it under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation, either version 3 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // MIP is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>.
00021 //
00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it
00023 //
00024 // ----------------------------------------------------------------------------
00025 
00026 
00034 
00035 
00036 
00037 
00038 
00039 
00040 #ifndef __REMOTE_RANGE_SENSOR_H__
00041 #define __REMOTE_RANGE_SENSOR_H__
00042 
00043 #ifdef MIP_HOST_APPLE
00044 #include <applePatch.h>
00045 #endif
00046 
00047 #include <baselib.h>
00048 #include <RangeSens.h>
00049 #include <socketUDP.h>
00050 #include <SsUtils.h>
00051 
00052 
00053 using namespace std;
00054 
00055 namespace MipResources{
00056 
00058 /* @{ */
00059 
00065 class RemoteRangeSensPar : public RangeSensPar{
00066  private:
00067   SenderUDP*   _sender;
00068   ListenerUDP* _listener;
00069   
00070   
00071   bool parseRangeSensParMessage(stringstream &ss, string &msg);
00072   bool parseRangeSensmmParMessage(stringstream &ss, string &msg);
00073   
00074  public:
00075   
00076   RemoteRangeSensPar(SenderUDP* sender, ListenerUDP* listener);
00077 };
00078 
00079 
00083 class RemoteRangeSens : public RangeSens{
00084  private:
00085   static const ResourcePlate _plate = RS_REM_RES;
00086  
00087  protected:
00088   /* PROMEMO from abstract class */
00089   /* RangeSensPar *_par; */
00090   /* Scan         _scan; */
00091   RemoteRangeSensPar *_remPar; 
00092  
00093  public:
00095   ResourcePlate getPlate() const {
00096    return _plate;
00097   }
00099   RemoteRangeSens(SenderUDP* sender, ListenerUDP* listener, int argc, const char* argv[]);
00100   
00102   ~RemoteRangeSens(){
00103   }
00104   
00105   /*MANDATORY METHODS*/
00107   Scan _singleScan();
00108   
00111   void _startScan(unsigned int num){
00112 //    _scanThread.startWork();
00113   }
00116   void _stopScan(){
00117 //    _scanThread.stopWork();
00118   }
00119 };
00120 
00121 
00122  /* @} */
00123  
00124 };// end namespace MipResources{
00125 
00126 
00127 #endif
00128 
00129 
00130 

Generated on Mon Feb 20 07:01:07 2017 for MIP by  doxygen 1.5.6