gtpc2mi2 | C/C++ Language Support User's Guide |
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);
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