ApplicationDataServer.h

Go to the documentation of this file.
00001 /*************** <auto-copyright.pl BEGIN do not edit this line> **************
00002  *
00003  * VR Juggler is (C) Copyright 1998-2005 by Iowa State University
00004  *
00005  * Original Authors:
00006  *   Allen Bierbaum, Christopher Just,
00007  *   Patrick Hartling, Kevin Meinert,
00008  *   Carolina Cruz-Neira, Albert Baker
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Library General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Library General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Library General Public
00021  * License along with this library; if not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00023  * Boston, MA 02111-1307, USA.
00024  *
00025  * -----------------------------------------------------------------
00026  * File:          $RCSfile$
00027  * Date modified: $Date: 2005-01-01 14:59:16 -0600 (Sat, 01 Jan 2005) $
00028  * Version:       $Revision: 16524 $
00029  * -----------------------------------------------------------------
00030  *
00031  *************** <auto-copyright.pl END do not edit this line> ***************/
00032 
00033 #ifndef CLUSTER_APPLICATION_DATA_SERVER_H
00034 #define CLUSTER_APPLICATION_DATA_SERVER_H
00035 
00036 #include <cluster/PluginConfig.h>
00037 
00038 namespace vpr
00039 {
00040    class BufferObjectWriter;
00041 }
00042 
00043 namespace gadget
00044 {
00045    class Node;
00046 }
00047 
00048 namespace cluster
00049 {
00050    class ApplicationData;
00051    class DataPacket;
00052 
00053    class GADGET_CLUSTER_PLUGIN_CLASS_API ApplicationDataServer
00054    {
00055    public:
00065       ApplicationDataServer(const vpr::GUID& guid, ApplicationData* user_data, const vpr::GUID& plugin_id);
00066 
00070       ~ApplicationDataServer();
00071 
00076       //void updateLocalData();
00077       
00082       //void send();
00083 
00084       void serializeAndSend();
00085 
00092       void addClient(gadget::Node* new_client_node);
00093 
00101       void removeClient(const std::string& host_name);
00102 
00109       void debugDump(int debug_level);
00110 
00115       vpr::GUID getId();
00116    private:
00117       std::vector<gadget::Node*>           mClients;            
00118       vpr::Mutex                                   mClientsLock;        
00120       ApplicationData*                             mApplicationData;    
00121       DataPacket*                                  mDataPacket;         
00122       vpr::BufferObjectWriter*                     mBufferObjectWriter; 
00123       std::vector<vpr::Uint8>*                     mDeviceData;         
00124    };
00125 
00126 } // end namespace cluster
00127 
00128 #endif

Generated on Thu Jan 4 10:41:55 2007 for Gadgeteer by  doxygen 1.5.1