Include files:
The following header file is required in any file containing these library routines.
#include "../extern/global_extern_w.h"
And for windows, the following is referenced from within:
#include "global_extern_w_dispatch.h"
Global Define:
The following should be defined in your writer code.
#define USERD_WRITER_GLOBALS
USERD_writer_get_name
/*--------------------------------------------------------------------*/
/* */
/* Gets the name of the writer, so gui can list as a writer */
/* */
/* (OUT) writer_name = the name of the writer (data format) */
/* (max length is Z_MAX_USERD_NAME, which */
/* is 20) */
/* */
/* (OUT) *two_fields = FALSE if only one data field is */
/* required. */
/* TRUE if two data fields required */
/* */
/* returns: Z_OK if successful */
/* Z_ERR if not successful */
/* */
/* Notes: */
/* * Always called. Provide a name for your custom writer format */
/* */
/* * If you don't want a custom writer to show up in the data dialog */
/* choices, return a name of "No Custom" */
/*--------------------------------------------------------------------*/
int
USERD_writer_get_name(char writer_name[Z_MAX_USERD_NAME],
int *two_fields)
/*--------------------------------------------------------------------
USERD_writer_get_writer_version
*-------------------------------------------------------------------- * * Gets the release string for the writer. * * This release string is a free-format string. * It is used for version control and backwards compatibility. * It is useful to increment * the release number/letter to indicate a change in the writer. * The given string will simply be output by the EnSight server * when the writer is selected. * * (OUT) release_number = the release number of the writer * (max length is Z_MAX_USERD_NAME, which * is 20) * * returns: Z_OK if successful * Z_ERR if not successful * * Notes: * Called when the writer is selected for use. * called by USERD_writer routines *--------------------------------------------------------------------*/ int USERD_writer_get_writer_version(char version_number[Z_MAX_USERD_NAME]) /*-----------------------------------------------------------------------
USERD_writer_write_geom
*-----------------------------------------------------------------------
*
* Write user specified data for selected parts and active variables.
*
* (IN) char full_fname[Z_MAXFILENP] = file name requested by the user from the GUI
* (IN) int lis_parts[Z_MAXPART] = list of parts selected by the user in EnSight
* (IN) int num_parts = number of selected parts
* (IN) int do_binary = TRUE if writing binary file
* FALSE if writing ascii file
* (IN) float max_fsize_mb = maximum file size value for this machine
* (IN) int combined = TRUE if user requests single file output
* FALSE if user allows multiple file output
* (IN) float *timestep_vals = array of time step values
* (IN) int ntime_steps = number of time steps
* (IN) char text_input[UDW_STRSIZE] = string entered from GUI by user can be used to
* input commands to modify writer behavior
* (OUT) int *error_flag = Return from writer
* Z_ERR if a problem
* Z_EN_ERR_NONE if no problem
*-----------------------------------------------------------------------*/
void
USERD_writer_write_geom(char full_fname[Z_MAXFILENP],
int lis_parts[Z_MAXPART],
int num_parts,
int do_binary,
float max_fsize_mb,
int combined,
float *timestep_vals,
int ntime_steps,/
char text_input[ UDW_STRSIZE],
int *error_flag)