gtpc2mi2C/C++ Language Support User's Guide

TO2_restart-Restart TPF Collection Support at Cycle-Up

This function is used by the cycle-up program CJ04 to request a TPFCS restart.

Format

#include <c$to2.h>
long  TO2_restart (TO2_ENV_PTR  env_ptr,
                   long        *cycleType);

env_ptr
The pointer to the environment as returned by the TO2_createEnv function.

cycleType
This parameter is reserved for future use; code a 0 for now.

Normal Return

The normal return is a positive value.

Error Return

An error return is indicated by a zero. When zero is returned, use the TO2_getErrorCode function to determine the specific error code. For more information, see Error Handling.

The following error code is common for this function:

TO2_ERROR_NOT_INIT

Programming Considerations

None.

Examples

The following example restarts TPFCS services.

#include <c$to2.h>             /* Needed for TO2 API functions    */
#include <stdio.h>             /* APIs for standard I/O functions */
 
long         err_code;
TO2_ENV_PTR  env_ptr;          /* Pointer to TO2 environment      */
long         cycletype;

  ·
  ·
  ·
if (TO2_restart(env_ptr, &cycleType)== TO2_ERROR) { err_code = TO2_getErrorCode(env_ptr); { printf("TO2_restart failed!\n"); process_error(env_ptr); } else { printf("TO2_restart successful!\n"); } }

Related Information

None.