COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
VRBClient.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef _VRB_CLIENT_H
9 #define _VRB_CLIENT_H
10 #include <stdio.h>
11 
12 #include <util/DLinkList.h>
13 #include <util/coTypes.h>
14 namespace covise
15 {
16 
17 class Host;
18 class CoviseConfig;
19 class ClientConnection;
20 class Message;
21 
22 //
23 //
24 //
26 {
27 
28 public:
29  VRBClient(const char *name, const char *collaborativeConfigurationFile = NULL, bool isSlave = false);
30  VRBClient(const char *name, const char *host, int pPort, bool isSlave = false);
31  ~VRBClient();
32  int connectToServer(); // returns -1, if Connection to Server fails
33  void connectToCOVISE(int argc, const char **argv);
34  int isCOVERRunning();
35  int isConnected();
36  int poll(Message *m);
37  int wait(Message *m);
38  int wait(Message *m, int messageType);
39  int setUserInfo(const char *userInfo);
40  int sendMessage(const Message *m);
41  int getID();
42  void setID(int ID);
44  float getSendDelay();
45 
46 private:
47  ClientConnection *sConn; // connection to Server
48  char *name;
49  int port;
50  int ID;
52  bool isSlave; // it true, we are a slave in a multiPC config, so do not actually connect to server
53  float sendDelay; // low-pass filtered time for sending one packet of 1000 bytes
54 };
55 }
56 #endif
Definition: covise_host.h:17
float sendDelay
Definition: VRBClient.h:53
GLuint const GLchar * name
Definition: khronos-glext.h:6722
int ID
Definition: VRBClient.h:50
Definition: VRBClient.h:25
ClientConnection * sConn
Definition: VRBClient.h:47
#define VRBEXPORT
Definition: coExport.h:81
#define NULL
Definition: covise_list.h:22
Definition: message.h:111
Definition: DLinkList.h:59
Host * serverHost
Definition: VRBClient.h:51
Definition: covise_connect.h:241
char * name
Definition: VRBClient.h:48
const GLfloat * m
Definition: khronos-glext.h:12117
DLinkList< Message * > messageQueue
Definition: VRBClient.h:43
int port
Definition: VRBClient.h:49
bool isSlave
Definition: VRBClient.h:52
#define ID(x)
Definition: coObjID.cpp:18