Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IQueue_manager_connection Class Referenceabstract

Represents a connection to a queue manager server. More...

#include <iqueue_manager_api.h>

Inheritance diagram for mi::neuraylib::IQueue_manager_connection:

Public Member Functions

virtual Sint32 submit_job (const char *project, const IArray *snapshots, const IArray *render_target, Uint32 resolution_x, Uint32 resolution_y, Uint32 max_samples, Uint32 max_time, Float32 quality, const char *image_format, Uint32 priority, const char *render_mode="iray", Stereo_pairing_mode stereo_pairing_mode=STEREO_PAIRING_NONE, Float32 stereo_eye_separation_distance=0)=0
 Submits a job to the queue manager server. More...
 
virtual const char * get_compatible_snapshot_bridge_url ()=0
 Looks for a compatible bridge application on the server-side which can be used to upload snapshots. More...
 
virtual const char * get_authentication_token ()=0
 Returns an authentication token which has to be provided to the Bridge client to upload snapshots. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x5b40bd6e, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x5b40bd6e, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed Description

Represents a connection to a queue manager server.

See also
mi::neuraylib::IQueue_manager_api::connect()

Member Function Documentation

 get_authentication_token()

virtual const char * mi::neuraylib::IQueue_manager_connection::get_authentication_token ( )
pure virtual

Returns an authentication token which has to be provided to the Bridge client to upload snapshots.

Returns
- Authentication token

 get_compatible_snapshot_bridge_url()

virtual const char * mi::neuraylib::IQueue_manager_connection::get_compatible_snapshot_bridge_url ( )
pure virtual

Looks for a compatible bridge application on the server-side which can be used to upload snapshots.

Returns
- Bridge URL or NULL if no compatible bridge is running

 submit_job()

virtual Sint32 mi::neuraylib::IQueue_manager_connection::submit_job ( const char *  project,
const IArray snapshots,
const IArray render_target,
Uint32  resolution_x,
Uint32  resolution_y,
Uint32  max_samples,
Uint32  max_time,
Float32  quality,
const char *  image_format,
Uint32  priority,
const char *  render_mode = "iray",
Stereo_pairing_mode  stereo_pairing_mode = STEREO_PAIRING_NONE,
Float32  stereo_eye_separation_distance = 0 
)
pure virtual

Submits a job to the queue manager server.

In order to submit a job to the queue manager server the snapshot names specified in the snapshots parameter must have been uploaded to the server first. See the mi::bridge::IIray_bridge_snapshot_context for details.

Parameters
projectThe name of the project this job belongs to. Rendering results are aggregated per project name. Later jobs of the same project might overwrite rendering results of earlier jobs of that project.
snapshotsA static or dynamic array of structures describing the snapshots of the job. These structures of type Snapshot_data have two string members, "snapshot_name" and "result_name", and an optional third boolean member "full_snapshot" that defaults to false. The "snapshot_name" describes the name of the snapshot file which has been uploaded to the server before with the mi::bridge::IIray_bridge_snapshot_context. The "result_name" member defines the name of the result file on the server. It must contain a placeholder "%B" which will be replaced by the buffer output name on the server. The buffer output name is defined in the render_target parameter. The "full_snapshot" member should normally not be set which means the snapshot is incremental. This is the preferred way of creating snapshots where only the first snapshot is full and the rest are incremental, i.e. contains only what has actually changed since the last snapshot. Setting this member to true means that the snapshot is full, and the server will make sure to clear any scene already loaded and load the snapshot as a new scene. Use this feature only if a snapshot contains changes that are not compatible with the previously created snapshots. The first snapshot must always be full and will be assumed to be full even if "full_snapshot" is left at it's default value of false.
render_targetA static or dynamic array of structures describing the render target to be used for rendering. These structures of type Canvas_type have three members that describe the type of the canvas, "pixel_type" of type String, "type" of type Uint32, and "params" of type Canvas_params. The first specify the pixel type of a canvas in the render target. The second maps to the Canvas_type enum, and the third in turn contains the parameters "color_lpe" of type String, "alpha_lpe" of type String, "index" of type Sint32, "edge_color" of type Float32<3>, and "scale" of type Float32<3>. See mi::neuraylib::IRender_target for details. The final member of Canvas_type is "output_name" which one is used to construct the name of the result file on the server.
resolution_xThe resolution of the camera in X direction.
resolution_yThe resolution of the camera in Y direction.
max_samplesThe value of the attribute progressive_rendering_max_samples.
max_timeThe value of the attribute progressive_rendering_max_time.
qualityThe value of the attribute progressive_rendering_quality.
image_formatThe image format to be used for saving the rendered images, e.g., "jpg". Note that support for a given image format requires an image plugin capable of handling that format.
priorityThe priority of the job. The smaller the value the higher the priority. The highest priority is 0.
render_modeThe render mode to be used, for example, "iray". Possible values are documented in Section "Render mode selection" of the Iray Programmer's Manual. Currently only Iray Photoreal and Iray Interactive are supported. The default value is to use Iray Photoreal.
stereo_pairing_modePairing mode for the images of the left and right eye (see mi::neuraylib::Stereo_pairing_mode). Stereo rendering is disabled by default.
stereo_eye_separation_distanceSpecifies the eye separation distance in scene units. This value should be set to the same value as the camera attribute "mip_lens_stereo_offset" (see "Lens"). The camera attribute will be overwritten by this value.
Returns
  • 0: Success.
  • -1: Invalid arguments (NULL pointer).
  • -2: Invalid element type or NULL pointer in snapshots.
  • -3: Invalid element type or NULL pointer in render_target.
  • -4: Connection error.
  • -5: Invalid server response.
  • -6: The job was rejected by the server.
  • -7: An invalid render mode was selected.