gtpc2mixC/C++ Language Support User's Guide

TPFxd_writeBlock-Write Core Block Images to the External Device

This function is used to write core block images to the external device.

Format

#include <c$tpxd.h>
long TPFxd_writeBlock (     TPFxd_extToken  *token,
                       enum t_lvl            level);

token
The returned token from the TPFxd_archiveStart or TPFxd_open request.

level
One of 16 possible values representing a valid data level from the enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This parameter identifies the data level where the block will be placed.

Normal Return

A return code of 1 indicates a normal return.

Error Return

An error return is indicated by a negative return code. For a list of error codes applicable to this function, see Error Codes.

Programming Considerations

Examples

The following example writes a core block to an external device.

#include <c$tpxd.h>
long example()
{
TPFxd_extToken    *token;
TPFxd_locationMap wherefirst;
enum              tpxd_mode mode;
enum              tpxd_opts access;
long              howbigitis;
long              howlongtowait;
char              *message;
long              returncode;
char              *stufftowrite;
 
howlongtowait = 60;
howbigitis = 32000;
message = NULL;
token = NULL;
mode = WT;
access = IMMEDIATE;
TPFxd_archiveStart (&token, mode, access);
TPFxd_open (&token,
            &wherefirst,
            howbigitis,
            howlongtowait,
            message,
            mode );
getcc(DF, GETCC_TYPE+GETCC_FILL, L4, 'A');
returncode = TPFxd_writeBlock(token,DF);
printf("write complete with return code %i\n",returncode);

  ·
  ·
  ·
}

Related Information