TReK ANSI-C  5.3.3
All ANSI-C APIs
IONizer API

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

Note
The documentation for the IONizer API borrows heavily on the documentation delivered with ION.

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:

  • Information: Generated for events that are nominal, but significant.
  • Warning: Generated for events that are off-nominal and likely caused by configuration or operational errors rather than ION software failure.
  • Diagnostic: Generated for events that are off-nominal and might be caused by errors in the ION software.
  • Bundle Status Report: Generated upon arrival of a bundle status report.
  • Communication Statistics: Generated by start of a contact or a call to bpstats.
  • Free Form: General messages that are not of any of the above types.
  • Read Error: Messages that are not formatted properly. These message can generally be ignored.


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().

Note
The callback notification for missing processes will continue to be called until the probem is resolved, the callback is unregistered, or the StopIonProcessWatch() function is called.

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