1 | ================================================================================ |
---|
2 | |
---|
3 | Copyright (C) 2004-2013 HUBzero Foundation, LLC |
---|
4 | |
---|
5 | ================================================================================ |
---|
6 | Protocol for nanovis render server. |
---|
7 | |
---|
8 | Commands take the general form of command and arguments using Tcl syntax and are |
---|
9 | terminated by a newline. Some command arguments expect a Tcl list which can be |
---|
10 | sent by enclosing the list in curly braces to prevent the interpreter from |
---|
11 | splitting the list into multiple arguments. Likewise, strings with spaces |
---|
12 | should be quoted or enclosed in curly braces. In the documentation below, |
---|
13 | arguments are indicated by angle brackets and optional arguments are surrounded |
---|
14 | by question marks -- the brackets and question marks are not part of the |
---|
15 | protocol and should not be included in argument strings. The arguments shown |
---|
16 | in angle brackets should be replaced with a string (where there are fixed |
---|
17 | choices this document indicates valid values by separating them with pipe |
---|
18 | symbols), a list in Tcl syntax, or a numeric value. Boolean arguments can take |
---|
19 | the form of 0|1, true|false, or yes|no. Since the protocol commands are |
---|
20 | executed in a Tcl interpreter, Tcl code such as math expressions in expr |
---|
21 | commands enclosed in square brackets are also allowed. Since the interpreter |
---|
22 | is a "safe" interpreter, some Tcl commands that could cause security issues may |
---|
23 | not be available for use. |
---|
24 | |
---|
25 | Some commands such as the 'flowvis add' commands create Tcl objects within the |
---|
26 | server's interpreter. The name sent as an argument when adding the object can |
---|
27 | then be used as a protocol command. For example, the string sent as the <name> |
---|
28 | argument to 'flowvis add' can then be used in place of <flowObj> in the commands |
---|
29 | documented below. The flow object name also creates a volume name that can |
---|
30 | be used in volume and cutplane commands, but in that case the name is used as |
---|
31 | an argument to the volume or cutplane commands rather than as the command |
---|
32 | itself. |
---|
33 | |
---|
34 | When binary data is to be sent, it should follow the newline after a command |
---|
35 | that indicates incoming data including a byte count argument. |
---|
36 | ================================================================================ |
---|
37 | ================================================================================ |
---|
38 | Requests: |
---|
39 | ================================================================================ |
---|
40 | axis visible <bool> |
---|
41 | |
---|
42 | camera angle <xAngle> <yAngle> <zAngle> |
---|
43 | ** Deprecated, use camera orient ** |
---|
44 | camera orient <quatW> <quatX> <quatY> <quatZ> |
---|
45 | camera pan <x> <y> |
---|
46 | camera pos <x> <y> <z> |
---|
47 | camera reset <?all?> |
---|
48 | camera zoom <factor> |
---|
49 | |
---|
50 | clientinfo <list> |
---|
51 | |
---|
52 | cutplane position <relval> <x|y|z> <?names?> |
---|
53 | Set the position of a volume cutplane. Names is |
---|
54 | an optional list of volume names. |
---|
55 | relval = [0,1] |
---|
56 | cutplane state <bool> <x|y|z> <?names?> |
---|
57 | Set the axis (normal) of a volume cutplane. Names is |
---|
58 | an optional list of volume names. |
---|
59 | |
---|
60 | flow add <name> <?option value...?> |
---|
61 | <name> is an object name to use in <flowObj> commands |
---|
62 | In addition, a volume is added with the same name |
---|
63 | which can be used in volume and cutplane commands |
---|
64 | see '<flowObj> configure' for switch options |
---|
65 | flow delete <names> |
---|
66 | flow exists <name> |
---|
67 | This doesn't currently produce a response, it only returns a boolean |
---|
68 | within the server's interpreter |
---|
69 | flow goto <nSteps> |
---|
70 | flow names |
---|
71 | This doesn't currently produce a response, it only returns a Tcl list |
---|
72 | within the server's interpreter |
---|
73 | flow next |
---|
74 | flow reset |
---|
75 | flow video <token> <?switches...?> |
---|
76 | -bitrate <val> |
---|
77 | -format <mpeg|theora|mov> |
---|
78 | -framerate <val> |
---|
79 | -height <val> |
---|
80 | -numframes <val> |
---|
81 | -width <val> |
---|
82 | |
---|
83 | <flowObj> box add <name> <?switches...?> |
---|
84 | See '<flowObj> box configure' for switches |
---|
85 | <flowObj> box configure <name> <?switches...?> |
---|
86 | -color <{r g b a}> |
---|
87 | -corner1 <{x y z}> |
---|
88 | -corner2 <{x y z}> |
---|
89 | -hide <bool> |
---|
90 | -linewidth <val> |
---|
91 | <flowObj> box delete <names> |
---|
92 | <flowObj> box names |
---|
93 | This doesn't currently produce a response, it only returns a Tcl list |
---|
94 | within the server's interpreter |
---|
95 | |
---|
96 | <flowObj> configure <?option value...?> |
---|
97 | -ambient <val> |
---|
98 | -arrows <bool> |
---|
99 | -axis <x|y|z> |
---|
100 | -diffuse <val> |
---|
101 | -hide <bool> |
---|
102 | -light2side <bool> |
---|
103 | -opacity <val> |
---|
104 | -outline <bool> |
---|
105 | -position <val|%val> |
---|
106 | val = world coordinate, or %val = [0,100] |
---|
107 | -slice <bool> |
---|
108 | -specularExp <val> |
---|
109 | -specularLevel <val> |
---|
110 | -transferfunction <name> |
---|
111 | -volume <bool> |
---|
112 | <flowObj> data file <fileName> <numComponents> |
---|
113 | Load a data file. fileName is path to file on server |
---|
114 | <flowObj> data follows <nbytes> <numComponents> |
---|
115 | Send flow data. Data bytes follow the newline after the command |
---|
116 | <flowObj> legend <w> <h> |
---|
117 | |
---|
118 | <flowObj> particles add <name> <?switches?> |
---|
119 | see '<flowObj> particles configure' for switches |
---|
120 | <flowObj> particles configure <name> <?switches?> |
---|
121 | -axis <x|y|z> |
---|
122 | -color <{r g b a}> |
---|
123 | -hide <bool> |
---|
124 | -position <val|%val> |
---|
125 | val = [0,100], or %val = [0,1] |
---|
126 | -size <val> |
---|
127 | <flowObj> particles delete <names> |
---|
128 | <flowObj> particles names |
---|
129 | This doesn't currently produce a response, it only returns a Tcl list |
---|
130 | within the server's interpreter |
---|
131 | |
---|
132 | grid axiscolor <red> <green> <blue> <?alpha?> |
---|
133 | grid axisname <x|y|z> <name> <units> |
---|
134 | grid linecolor <red> <green> <blue> <?alpha?> |
---|
135 | grid visible <bool> |
---|
136 | |
---|
137 | heightmap create <heightmapName> <xMin> <yMin> <xMax> <yMax> <xNum> <yNum> <valueList> |
---|
138 | heightmap cull <none|back|front> |
---|
139 | heightmap data follows <nBytes> <heightmapName> |
---|
140 | After newline following command, nBytes of data are sent |
---|
141 | heightmap data visible <bool> <?heightmapNames?> |
---|
142 | heightmap legend <heightmapName> <width> <height> |
---|
143 | heightmap linecontour color <red> <green> <blue> <?heightmapNames?> |
---|
144 | heightmap linecontour visible <bool> <?heightmapNames?> |
---|
145 | heightmap opacity <value> <?heightmapNames?> |
---|
146 | heightmap polygon <wireframe|fill> |
---|
147 | **Warning: This is a global setting** |
---|
148 | heightmap shading <flat|smooth> |
---|
149 | **Warning: This is a global setting** |
---|
150 | heightmap transfunc <transferFunctionName> <?heightmapNames?> |
---|
151 | |
---|
152 | legend <transferfunc name> <width> <height> |
---|
153 | Request render of transfer function |
---|
154 | |
---|
155 | screen bgcolor <r> <g> <b> |
---|
156 | Set screen background color |
---|
157 | screen size <width> <height> |
---|
158 | Set size of rendered images |
---|
159 | |
---|
160 | snapshot |
---|
161 | Render a 2k x 2k image (offscreen buffer). Response image data is tagged |
---|
162 | as '-type print' |
---|
163 | |
---|
164 | transfunc define <name> {colors} {alpha} |
---|
165 | colors => 1 line each of "value r g b" |
---|
166 | alpha => 1 line each of "value alpha" |
---|
167 | value => [0,1] |
---|
168 | |
---|
169 | up <x|y|z|-x|-y|-z> |
---|
170 | Set orientation of volumes |
---|
171 | |
---|
172 | volume animation capture <numframes> <?filename?> |
---|
173 | This is not fully implemented. Rendered frames are not returned |
---|
174 | to the client. |
---|
175 | volume animation clear |
---|
176 | volume animation start |
---|
177 | volume animation stop |
---|
178 | volume animation volumes <?names?> |
---|
179 | |
---|
180 | volume data follows <nbytes> <name> |
---|
181 | volume data state <bool> <?names?> |
---|
182 | volume delete <names> |
---|
183 | volume exists <name> |
---|
184 | This doesn't currently produce a response, it only returns a boolean |
---|
185 | within the server's interpreter |
---|
186 | volume names |
---|
187 | This doesn't currently produce a response, it only returns a Tcl list |
---|
188 | within the server's interpreter |
---|
189 | volume outline color <r> <g> <b> <?names?> |
---|
190 | volume outline state <bool> <?names?> |
---|
191 | volume outline visible <bool> <?names?> |
---|
192 | volume shading ambient <value> <?names?> |
---|
193 | volume shading diffuse <value> <?names?> |
---|
194 | volume shading isosurface <bool> <?names?> |
---|
195 | volume shading light2side <bool> <?names?> |
---|
196 | volume shading opacity <value> <?names?> |
---|
197 | volume shading specularExp <value> <?names?> |
---|
198 | volume shading specularLevel <value> <?names?> |
---|
199 | volume shading transfunc <tfName> <?names?> |
---|
200 | volume state <bool> <?names?> |
---|
201 | |
---|
202 | ================================================================================ |
---|
203 | Replies: |
---|
204 | ================================================================================ |
---|
205 | nv>legend <volume> <min> <max> <nbytes> |
---|
206 | (followed by bytes) |
---|
207 | |
---|
208 | nv>image -type image -bytes <nbytes> |
---|
209 | (followed by bytes) |
---|
210 | |
---|
211 | nv>image -type print -bytes <nbytes> |
---|
212 | (followed by bytes) |
---|
213 | |
---|
214 | nv>image -type movie -token <token> -bytes <nbytes> |
---|
215 | (followed by bytes) |
---|
216 | |
---|
217 | nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val> |
---|
218 | The min,max data values for the data object and the cumulative volume data |
---|
219 | min,max over all volumes |
---|
220 | |
---|
221 | nv>data tag <flow-tag> min <val> max <val> |
---|
222 | Sent after a "<flowObj> data follows...". Min,max values are for the |
---|
223 | magnitude of the vector field. |
---|
224 | |
---|
225 | ================================================================================ |
---|
226 | Error Replies: |
---|
227 | ================================================================================ |
---|
228 | nv>viserror -bytes <nbytes> |
---|
229 | <multi-line error string of nbytes> |
---|
230 | ================================================================================ |
---|