TReK ANSI-C
5.3.3
All ANSI-C APIs
|
The IONizer API provides ANSI C function calls to monitor the Interplanetary Overlay Network (ION). The API allows users to receive notifications via callbacks for log messages and missing processes. This link will go to the header file containing all of the functions available: trek_ionizer_api.h
Monitoring the ION Log File
The ION log file contains several message types that can be monitored by external programs such as TReK IONizer. These messages are grouped into the following categories:
To monitor messages in the ION log file you must start the monitoring thread with WatchIonLog() and register for one or more callbacks associated with the above messages. Messages that do not have an associated callback are ignored. Monitoring of messages will continue until StopIonLogWatch() is called.
Monitoring the ION Processes
If the ION configuration files are generated by TReK IONconfig, you can monitor if any of the expected ION processes are missing. A missing process is an indication that ION may not be properly working and should be investigated. You must register for the missing processes callback (RegisterMissingProcessCallback()) and start the monitoring thread by calling WatchIonProcesses(). Monitoring of processes will occur until you stop the monitor thread by calling StopIonProcessWatch().
Examples
The following examples are provided to show how to use IONizer functions:
User IONizer Application
Simple program that registers for all callbacks and prints messages of the contents when the callback occurs. Can be used as a starting point for a user program to monitor ION.
Source File:
user_ionizer_app/user_ionizer_app.cpp
Additional Dependencies
The TReK IONizer API is also dependent on the following library. See the Libraries main help page for more information.
trek_toolkit_common_api