================================================================================ Copyright (C) 2004-2013 HUBzero Foundation, LLC ================================================================================ Protocol for nanovis render server. Commands take the general form of command and arguments using Tcl syntax and are terminated by a newline. Some command arguments expect a Tcl list which can be sent by enclosing the list in curly braces to prevent the interpreter from splitting the list into multiple arguments. Likewise, strings with spaces should be quoted or enclosed in curly braces. In the documentation below, arguments are indicated by angle brackets and optional arguments are surrounded by question marks -- the brackets and question marks are not part of the protocol and should not be included in argument strings. The arguments shown in angle brackets should be replaced with a string (where there are fixed choices this document indicates valid values by separating them with pipe symbols), a list in Tcl syntax, or a numeric value. Boolean arguments can take the form of 0|1, true|false, or yes|no. Since the protocol commands are executed in a Tcl interpreter, Tcl code such as math expressions in expr commands enclosed in square brackets are also allowed. Since the interpreter is a "safe" interpreter, some Tcl commands that could cause security issues may not be available for use. Some commands such as the 'flowvis add' commands create Tcl objects within the server's interpreter. The name sent as an argument when adding the object can then be used as a protocol command. For example, the string sent as the argument to 'flowvis add' can then be used in place of in the commands documented below. The flow object name also creates a volume name that can be used in volume and cutplane commands, but in that case the name is used as an argument to the volume or cutplane commands rather than as the command itself. When binary data is to be sent, it should follow the newline after a command that indicates incoming data including a byte count argument. ================================================================================ ================================================================================ Requests: ================================================================================ axis visible camera angle ** Deprecated, use camera orient ** camera orient camera pan camera pos camera reset camera zoom clientinfo cutplane position Set the position of a volume cutplane. Names is an optional list of volume names. relval = [0,1] cutplane state Set the axis (normal) of a volume cutplane. Names is an optional list of volume names. cutplane visible Set visibility of all (x,y, and z) cutplanes for named volume(s) flow add is an object name to use in commands In addition, a volume is added with the same name which can be used in volume and cutplane commands see ' configure' for switch options flow delete flow exists This doesn't currently produce a response, it only returns a boolean within the server's interpreter flow goto flow names This doesn't currently produce a response, it only returns a Tcl list within the server's interpreter flow next flow reset flow video -bitrate -format -framerate -height -numframes -width box add See ' box configure' for switches box configure -color <{r g b a}> -corner1 <{x y z}> -corner2 <{x y z}> -hide -linewidth box delete box names This doesn't currently produce a response, it only returns a Tcl list within the server's interpreter configure -ambient -arrows -axis -diffuse -hide -light2side -opacity -outline -position val = world coordinate, or val% = [0,100] -slice -specularExp -specularLevel -transferfunction -volume data follows Send flow data. Data bytes follow the newline after the command legend particles add see ' particles configure' for switches particles configure -axis -color <{r g b a}> -hide -position val = world coordinate, or val% = [0,100] -size particles delete particles names This doesn't currently produce a response, it only returns a Tcl list within the server's interpreter grid axiscolor grid axisname grid linecolor grid visible heightmap create heightmap cull heightmap data follows After newline following command, nBytes of data are sent heightmap data visible heightmap legend heightmap linecontour color heightmap linecontour visible heightmap opacity heightmap polygon **Warning: This is a global setting** heightmap shading **Warning: This is a global setting** heightmap transfunc legend Request render of transfer function screen bgcolor Set screen background color screen size Set size of rendered images snapshot Render a 2k x 2k image (offscreen buffer). Response image data is tagged as '-type print' transfunc define {colors} {alpha} colors => 1 line each of "value r g b" alpha => 1 line each of "value alpha" value => [0,1] up Set orientation of volumes volume animation capture This is not fully implemented. Rendered frames are not returned to the client. volume animation clear volume animation start volume animation stop volume animation volumes volume data follows volume data state volume delete volume exists This doesn't currently produce a response, it only returns a boolean within the server's interpreter volume names This doesn't currently produce a response, it only returns a Tcl list within the server's interpreter volume outline color volume outline state volume outline visible volume shading ambient volume shading diffuse volume shading isosurface volume shading light2side volume shading opacity volume shading specularExp volume shading specularLevel volume shading transfunc volume state ================================================================================ Replies: ================================================================================ nv>legend (followed by bytes) nv>image -type image -bytes (followed by bytes) nv>image -type print -bytes (followed by bytes) nv>image -type movie -token -bytes (followed by bytes) nv>data tag min max vmin vmax The min,max data values for the data object and the cumulative volume data min,max over all volumes nv>data tag min max Sent after a " data follows...". Min,max values are for the magnitude of the vector field. ================================================================================ Error Replies: ================================================================================ nv>viserror -bytes ================================================================================