Application Monitor Definition

This MotoHawk™ block sets up the Continuous Built-In Tests (CBIT) in every MotoHawk application.

Block ID

motohawk_app_monitor

Library

MotoHawk_lib/System Debug Blocks

Description

This block is used to monitor the application's stack, heap, idle CPU usage, and OS errors for the 5xx processor modules. Upon discovery of a critical error, the application is stopped and certain actuators shut down safely. These currently include the Injector and Spark Sequence blocks. In the "System | Debug | Application Monitor" section, various display variables may be used to diagnose the problem.

At any time, the application is in one of five states: Init, Run, Prepare to Pause, Pause, or Stop, and may be manually set from Instrumentation.

Init pauses after it has started up and before it runs any application code.

Run has the program run until the application monitor is triggered for low stacks/heap, or high processor use.

Pause stops the application where it currently is in the application. I/O is still running. To enter pause using an instrumentation tool requires that the Prepare to Pause state first be entered. This is to ensure that stalling the application is a conscious decision. Operation is the same as Run while in the Prepare to Pause state.

The stop state stops the application where it is and puts all outputs in a safe state (this includes MPRD).

Block Parameters

Parameter Field Values Comments/Description
Foreground Stack Margin [bytes] Numeric Allot number of bytes for the foreground stack.
Foreground Angle Stack Margin [bytes] Numeric Allot number of bytes for the foreground angle stack.
Background Stack Margin [bytes] Numeric Allot number of bytes for the background stack.
Idle Stack Margin [bytes] Numeric Allot number of bytes for the idle stack.
Interrupt Stack Margin [bytes] Numeric Allot number of bytes for the interrupt stack.
Heap Margin [bytes] Numeric Allot number of bytes for the heap.
CPU Margin [%] Numeric (0-100) Set percentage of CPU usage allowed.
Enable Monitor Enabled/Disabled Enable/Disable this monitor.
On Startup Set Pause point, if any, for monitoring status.
Pause Before Model Initialization As listed.
Pause After Model Init - Before STARTUP Event As listed.
Pause After STARTUP Event - Before Run As listed.
Do Not Pause on Startup As listed.