Raptor:Application Monitor

From NewEagleWiki
Jump to navigation Jump to search

Return to the main Raptor page

Return to Application Monitor page

Raptor Application Monitoring

Description

The application monitor provides a mechanism for monitoring and controlling the execution of a model on a Raptor™ target. The application monitor can monitor thread execution time and pause the application if a single thread's processor usage is over the defined limit or if the processor idle time is below a minimum. Adding the application monitor block to the model allows enabling additional code generation which will provide this functionality. Note: Not all Raptor targets use a pre-emptive operating system. This means that an infinite loop in a task may cause the module to reset rather than stop the application through the application monitor.

The application monitor is controlled through a series of adjustments and measurements made available in the calibration tool. The AppMonitorState adjustment allows the user to control the state of the application monitor. See the table below for a description of the various states of the application monitor. The AppMonitorLastError measurement will display the cause that triggered the application monitor to pause the programs execution. The AppMonitorIdleTime measurement displays an approximation of the idle time of the CPU. If the processor does not have adequate idle time some tasks may not be triggered at the proper rate. Finally, for each timed trigger an adjustment, Timer_<trigger name>_Steps, will be created. This allows can allow the user to step each execution loop individually. When a non-zero value is set for steps adjustment of a trigger and the application monitor is in the Step state, the timed trigger will execute for the specified number of iterations before execution is again paused. Using this method it is possible to step through the execution of a model.

Application Monitor States

State Description
Always Running This state disables pausing the application and allows it to run continuously. The application monitor will still continue to monitor the execution time of threads.
Running In this state the model will run until a pause condition (appmonitor stop, thread time > maximum, idle time < minimum) is asserted.
Pause In this state all the timed triggers in the model are disabled. CAN triggers and communication will continue to be active.
Step Entering this state causes all the timed triggers to execute their steps. Once all timed triggers have executed their steps the AppMonitorState will return to pause.
Reboot Entering this state forces the module to reboot.

Parameters

Parameter Type Description
Enable AppMonitor Checkbox This enables generation of the application monitor code. This allows the application monitor to be completely removed from the generated code without removing all the blocks which depend on the application monitor.
Startup Action Select This sets the default state of the application monitor when the controller first boots.
Min Idle Time Number 0-100 This specifies the threshold of processor idle time below which the application monitor will pause the application.
Max Thread Time Number 0-100 This specifies the threshold of thread execution time above which the application monitor will pause the application.
Access Level Select Sets the access level of this item in the calibration tool.
Pause On Software Reset Checkbox This will pause the application software when a sporadic reset caused by the application occurs. *GCM-196 ONLY
Disable CAN Triggers Checkbox Disable CAN triggers when application paused. Does not effect UDS or XCP.