10.4 hamon_patrolstop (terminates UAP monitoring)
Format
#include <HA_mon_uap.h> long hamon_patrolstop(int *inf, void *opt);
Description
The hamon_patrolstop function issues a request to HA Monitor to terminate monitoring of the UAP. If the UAP is terminated while it is being monitored, HA Monitor detects a UAP error. For this reason, you must issue this function before you terminate the UAP.
For a UAP to be started, the program name specified in the name operand in the monitor-mode program environment definition must be set in the HAMON_UAPNAME environment variable.
If nouse is set in the HAMON_API_PATROL environment variable, the function returns with return code 0 without issuing a request to HA Monitor.
For details about the UAP environment variables, see 6.16.2 Specifying UAP environment variables.
Arguments whose values are to be set by the UAP
-
opt
This is a reserved area. Specify NULL.
Arguments whose values are returned by HA Monitor
-
inf
This area is used for returning a detail code in the event of an error. For details about the detail codes, see 10.5 List of detail codes below.
Return codes
Value |
Meaning |
---|---|
0 |
HA Monitor will stop monitoring the UAP that issued this function. |
-1 |
An error occurred. For details, see 10.5 List of detail codes below. |
Notes
-
Issue this function from the process (thread) that issued the hamon_patrolstart function.
-
Do not issue this function multiple times consecutively from the same process.
-
Only a single thread can issue the API per process.