[2892] | 1 | ================================================================================ |
---|
[3502] | 2 | |
---|
| 3 | Copyright (C) 2004-2013 HUBzero Foundation, LLC |
---|
| 4 | |
---|
[2892] | 5 | ================================================================================ |
---|
| 6 | Protocol for nanovis render server. |
---|
| 7 | |
---|
[4818] | 8 | Commands take the general form of command and arguments using Tcl syntax and are |
---|
[2892] | 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 | ================================================================================ |
---|
[4818] | 40 | axis visible <bool> |
---|
[2892] | 41 | |
---|
[3362] | 42 | camera angle <xAngle> <yAngle> <zAngle> |
---|
[3478] | 43 | ** Deprecated, use camera orient ** |
---|
[2892] | 44 | camera orient <quatW> <quatX> <quatY> <quatZ> |
---|
| 45 | camera pan <x> <y> |
---|
[3362] | 46 | camera pos <x> <y> <z> |
---|
[3478] | 47 | camera reset <?all?> |
---|
[2892] | 48 | camera zoom <factor> |
---|
| 49 | |
---|
[4818] | 50 | clientinfo <list> |
---|
[3478] | 51 | |
---|
[4818] | 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 | cutplane visible <bool> <?names?> |
---|
| 60 | Set visibility of all (x,y, and z) cutplanes for |
---|
| 61 | named volume(s) |
---|
[2892] | 62 | |
---|
| 63 | flow add <name> <?option value...?> |
---|
| 64 | <name> is an object name to use in <flowObj> commands |
---|
| 65 | In addition, a volume is added with the same name |
---|
| 66 | which can be used in volume and cutplane commands |
---|
| 67 | see '<flowObj> configure' for switch options |
---|
| 68 | flow delete <names> |
---|
| 69 | flow exists <name> |
---|
[4818] | 70 | This doesn't currently produce a response, it only returns a boolean |
---|
| 71 | within the server's interpreter |
---|
[2892] | 72 | flow goto <nSteps> |
---|
[3567] | 73 | flow names |
---|
[4818] | 74 | This doesn't currently produce a response, it only returns a Tcl list |
---|
| 75 | within the server's interpreter |
---|
[2892] | 76 | flow next |
---|
| 77 | flow reset |
---|
| 78 | flow video <token> <?switches...?> |
---|
| 79 | -bitrate <val> |
---|
| 80 | -format <mpeg|theora|mov> |
---|
| 81 | -framerate <val> |
---|
| 82 | -height <val> |
---|
| 83 | -numframes <val> |
---|
| 84 | -width <val> |
---|
| 85 | |
---|
| 86 | <flowObj> box add <name> <?switches...?> |
---|
| 87 | See '<flowObj> box configure' for switches |
---|
| 88 | <flowObj> box configure <name> <?switches...?> |
---|
| 89 | -color <{r g b a}> |
---|
| 90 | -corner1 <{x y z}> |
---|
| 91 | -corner2 <{x y z}> |
---|
| 92 | -hide <bool> |
---|
| 93 | -linewidth <val> |
---|
[3567] | 94 | <flowObj> box delete <names> |
---|
| 95 | <flowObj> box names |
---|
[4818] | 96 | This doesn't currently produce a response, it only returns a Tcl list |
---|
| 97 | within the server's interpreter |
---|
[2892] | 98 | <flowObj> configure <?option value...?> |
---|
[3362] | 99 | -ambient <val> |
---|
[2892] | 100 | -arrows <bool> |
---|
| 101 | -axis <x|y|z> |
---|
| 102 | -diffuse <val> |
---|
| 103 | -hide <bool> |
---|
[4818] | 104 | -light2side <bool> |
---|
[2892] | 105 | -opacity <val> |
---|
| 106 | -outline <bool> |
---|
[4818] | 107 | -position <val|val%> |
---|
| 108 | val = [0,1], or val% = [0,100] |
---|
[2892] | 109 | -slice <bool> |
---|
[3362] | 110 | -specularExp <val> |
---|
| 111 | -specularLevel <val> |
---|
[2892] | 112 | -transferfunction <name> |
---|
| 113 | -volume <bool> |
---|
| 114 | <flowObj> data follows <nbytes> <numComponents> |
---|
| 115 | Send flow data. Data bytes follow the newline after the command |
---|
| 116 | <flowObj> legend <w> <h> |
---|
| 117 | <flowObj> particles add <name> <?switches?> |
---|
| 118 | see '<flowObj> particles configure' for switches |
---|
| 119 | <flowObj> particles configure <name> <?switches?> |
---|
| 120 | -axis <x|y|z> |
---|
| 121 | -color <{r g b a}> |
---|
| 122 | -hide <bool> |
---|
[4818] | 123 | -position <val|val%> |
---|
| 124 | val = [0,1], or val% = [0,100] |
---|
[2892] | 125 | -size <val> |
---|
[3567] | 126 | <flowObj> particles delete <names> |
---|
| 127 | <flowObj> particles names |
---|
[4818] | 128 | This doesn't currently produce a response, it only returns a Tcl list |
---|
| 129 | within the server's interpreter |
---|
[2892] | 130 | |
---|
[4818] | 131 | grid axiscolor <red> <green> <blue> <?alpha?> |
---|
| 132 | grid axisname <x|y|z> <name> <units> |
---|
| 133 | grid linecolor <red> <green> <blue> <?alpha?> |
---|
| 134 | grid visible <bool> |
---|
| 135 | |
---|
| 136 | heightmap create <heightmapName> <xMin> <yMin> <xMax> <yMax> <xNum> <yNum> <valueList> |
---|
| 137 | heightmap cull <none|back|front> |
---|
| 138 | heightmap data follows <nBytes> <heightmapName> |
---|
| 139 | After newline following command, nBytes of data are sent |
---|
| 140 | heightmap data visible <bool> <?heightmapNames?> |
---|
| 141 | heightmap legend <heightmapName> <width> <height> |
---|
| 142 | heightmap linecontour color <red> <green> <blue> <?heightmapNames?> |
---|
| 143 | heightmap linecontour visible <bool> <?heightmapNames?> |
---|
| 144 | heightmap opacity <value> <?heightmapNames?> |
---|
| 145 | heightmap polygon <wireframe|fill> |
---|
| 146 | **Warning: This is a global setting** |
---|
| 147 | heightmap shading <flat|smooth> |
---|
| 148 | **Warning: This is a global setting** |
---|
| 149 | heightmap transfunc <transferFunctionName> <?heightmapNames?> |
---|
| 150 | |
---|
| 151 | legend <transferfunc name> <width> <height> |
---|
| 152 | Request render of transfer function |
---|
| 153 | |
---|
| 154 | screen bgcolor <r> <g> <b> |
---|
| 155 | Set screen background color |
---|
| 156 | screen size <width> <height> |
---|
| 157 | Set size of rendered images |
---|
| 158 | |
---|
| 159 | snapshot |
---|
| 160 | Render a 2k x 2k image (offscreen buffer). Response image data is |
---|
| 161 | tagged as '-type print' |
---|
| 162 | |
---|
| 163 | transfunc define <name> {colors} {alpha} |
---|
| 164 | colors => 1 line each of "value r g b" |
---|
| 165 | alpha => 1 line each of "value alpha" |
---|
| 166 | value => [0,1] |
---|
| 167 | |
---|
| 168 | up <x|y|z|-x|-y|-z> |
---|
| 169 | Set orientation of volumes |
---|
| 170 | |
---|
| 171 | volume animation capture <numframes> <?filename?> |
---|
| 172 | This is not fully implemented. Rendered frames are not returned |
---|
| 173 | to the client. |
---|
| 174 | volume animation clear |
---|
| 175 | volume animation start |
---|
| 176 | volume animation stop |
---|
| 177 | volume animation volumes <?names?> |
---|
| 178 | |
---|
| 179 | volume data follows <nbytes> <name> |
---|
| 180 | volume data state <bool> <?names?> |
---|
| 181 | volume delete <names> |
---|
[2892] | 182 | volume exists <name> |
---|
[4818] | 183 | This doesn't currently produce a response, it only returns a boolean |
---|
| 184 | within the server's interpreter |
---|
| 185 | volume names |
---|
| 186 | This doesn't currently produce a response, it only returns a Tcl list |
---|
| 187 | within the server's interpreter |
---|
[2892] | 188 | volume outline color <r> <g> <b> <?names?> |
---|
[4818] | 189 | volume outline state <bool> <?names?> |
---|
| 190 | volume outline visible <bool> <?names?> |
---|
[3362] | 191 | volume shading ambient <value> <?names?> |
---|
[2892] | 192 | volume shading diffuse <value> <?names?> |
---|
| 193 | volume shading isosurface <bool> <?names?> |
---|
[4818] | 194 | volume shading light2side <bool> <?names?> |
---|
[2892] | 195 | volume shading opacity <value> <?names?> |
---|
[3362] | 196 | volume shading specularExp <value> <?names?> |
---|
| 197 | volume shading specularLevel <value> <?names?> |
---|
[2892] | 198 | volume shading transfunc <tfName> <?names?> |
---|
| 199 | volume state <bool> <?names?> |
---|
| 200 | |
---|
| 201 | ================================================================================ |
---|
| 202 | Replies: |
---|
| 203 | ================================================================================ |
---|
| 204 | nv>legend <volume> <min> <max> <nbytes> |
---|
[4877] | 205 | (followed by bytes) |
---|
[2892] | 206 | |
---|
| 207 | nv>image -type image -bytes <nbytes> |
---|
[4877] | 208 | (followed by bytes) |
---|
[2892] | 209 | |
---|
| 210 | nv>image -type print -bytes <nbytes> |
---|
[4877] | 211 | (followed by bytes) |
---|
[2892] | 212 | |
---|
| 213 | nv>image -type movie -token <token> -bytes <nbytes> |
---|
| 214 | (followed by bytes) |
---|
| 215 | |
---|
[2953] | 216 | nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val> |
---|
| 217 | The min,max data values for the data object and the cumulative volume data |
---|
| 218 | min,max over all volumes |
---|
| 219 | |
---|
[4818] | 220 | nv>data tag <flow-tag> min <val> max <val> |
---|
| 221 | Sent after a "<flowObj> data follows...". Min,max values are for the |
---|
| 222 | magnitude of the vector field. |
---|
| 223 | |
---|
[2892] | 224 | ================================================================================ |
---|
| 225 | Error Replies: |
---|
| 226 | ================================================================================ |
---|
[3478] | 227 | nv>viserror -bytes <nbytes> |
---|
| 228 | <multi-line error string of nbytes> |
---|
[2892] | 229 | ================================================================================ |
---|