source: nanovis/branches/1.2/Command.h @ 6619

Last change on this file since 6619 was 6619, checked in by ldelgass, 3 years ago

merge r6576:6577 from nanovis trunk (timeout option)

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Authors:
6 *   Wei Qiao <qiaow@purdue.edu>
7 *   Insoo Woo <iwoo@purdue.edu>
8 *   George A. Howlett <gah@purdue.edu>
9 *   Leif Delgass <ldelgass@purdue.edu>
10 */
11#ifndef NV_COMMAND_H
12#define NV_COMMAND_H
13
14#include <unistd.h>
15#include <sys/time.h>
16
17#include <tcl.h>
18
19#include "ResponseQueue.h"
20
21namespace Rappture {
22class Buffer;
23}
24
25namespace nv {
26
27class ReadBuffer;
28class Volume;
29
30#ifdef USE_THREADS
31extern void queueResponse(const void *bytes, size_t len,
32                          Response::AllocationType allocType,
33                          Response::ResponseType type = Response::DATA);
34#else
35extern ssize_t SocketWrite(const void *bytes, size_t len);
36#endif
37
38extern bool SocketRead(char *bytes, size_t len);
39
40#if !defined(USE_NEW_EVENT_LOOP) && !defined(USE_THREADS)
41extern int processCommands(Tcl_Interp *interp,
42                           FILE *inBufPtr,
43                           int fdOut);
44#endif
45extern int processCommands(Tcl_Interp *interp,
46                           ReadBuffer *inBufPtr,
47                           int fdOut,
48                           struct timeval *timeout);
49
50extern int handleError(Tcl_Interp *interp,
51                       int status,
52                       int fdOut);
53
54extern void initTcl(Tcl_Interp *interp, ClientData clientData);
55
56extern int GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
57                          int *axisVal);
58
59extern int GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
60                             bool *boolVal);
61
62extern int GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes);
63
64extern int GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
65                           float *floatVal);
66
67}
68
69#endif
Note: See TracBrowser for help on using the repository browser.