Status, statistics, and control requests are comprised of messages exchanged between the calling application and the HMI. These functions require a separate connection to the HMI and operate in a blocking fashion, similar to remote procedure calls. The function sends a request to the HMI and waits for the response message (up to 15 seconds), blocking the calling process or thread.
The application calls ctaOpenServices to establish a connection to the HMI. Once the connection is opened, the application can call any of the other Health Management functions. Each function request generates a message to the HMI and waits for the response message - either a confirm response for a successful operation or a refuse response for an unsuccessful operation. The application terminates the connection to the HMI by calling ctaCloseServices.
For some request functions, it may take several seconds to receive a response message. For some applications, blocking for this length of time is not appropriate. These applications must spawn a separate thread to perform the function call, ensuring that the main or worker threads are not blocked for an extended period of time.
Sharing the handle returned from ctaOpenServices among several threads, each of which might generate independent requests, is not recommended, as the response messages can get mixed in among the requesting threads. In this case, each thread must perform its own ctaOpenServices and use its own handle.
Status and statistics requests are acceptable in any state. The appropriate response message is returned on the connection between the HMI and the application.
Reset requests instruct the HMI to re-read its configuration file. The request is primarily intended to provide an operational means to address unplanned conditions or configuration updates. The primary or backup state information is not reset at this point.