root/juggler/branches/2.2/modules/gadgeteer/cluster/Packets/ApplicationDataRequest.h

Revision 19729, 2.8 kB (checked in by patrick, 2 years ago)

Copyright update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*************** <auto-copyright.pl BEGIN do not edit this line> **************
2  *
3  * VR Juggler is (C) Copyright 1998-2007 by Iowa State University
4  *
5  * Original Authors:
6  *   Allen Bierbaum, Christopher Just,
7  *   Patrick Hartling, Kevin Meinert,
8  *   Carolina Cruz-Neira, Albert Baker
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  *
25  *************** <auto-copyright.pl END do not edit this line> ***************/
26
27 #ifndef _GADGET_USER_DATA_REQUEST_H
28 #define _GADGET_USER_DATA_REQUEST_H
29
30 #include <gadget/gadgetConfig.h>
31 #include <vpr/vprTypes.h>
32 #include <vpr/IO/BufferObjectReader.h>
33 #include <vpr/IO/BufferObjectWriter.h>
34 #include <vpr/IO/Socket/SocketStream.h>
35
36 #include <cluster/Packets/Header.h>
37 #include <cluster/Packets/Packet.h>
38
39 namespace cluster
40 {
41
42 /** \class ApplicationDataRequest ApplicationDataRequest.h cluster/Packets/ApplicationDataRequest.h
43  *
44  * Application-specific request packet.
45  */
46 class GADGET_CLASS_API ApplicationDataRequest : public Packet
47 {
48 public:
49    ApplicationDataRequest()
50    {;}
51
52    /**
53     * Create a ApplicationDataRequest packet to request a remote
54     * ApplicationData object.
55     *
56     * @param plugin_guid GUID of the ClusterPlugin that should handle this
57     *                    packet.
58     * @param id          GUID of the ApplicationData object that we are
59     *                    requesting.
60     */
61    ApplicationDataRequest(const vpr::GUID plugin_guid, const vpr::GUID& id);
62
63    /**
64     * Serializes member variables into a data stream.
65     */
66    void serialize();
67
68    /**
69     * Parses the data stream into the local member variables.
70     */
71    virtual void parse(vpr::BufferObjectReader* reader);
72
73    /**
74     * Print the data to the screen in a readable form.
75     */
76    virtual void printData(int debug_level);
77
78    /**
79     * Return the type of this packet.
80     */
81    static vpr::Uint16 getPacketFactoryType()
82    {
83        return(Header::RIM_APPDATA_REQ);
84    }
85
86    /**
87     * Return the GUID of the ApplicationData object being requested.
88     */
89    vpr::GUID getId()
90    {
91    return mId;
92    }
93
94 private:
95    vpr::GUID mId;  /**< GUID for the ApplicationData object being requested. */
96 };
97
98 }// end namespace cluster
99
100 #endif
Note: See TracBrowser for help on using the browser.