Monitor Supervised Entity (Process)

Health Monitoring of a Supervised Entity with DaVinci Developer Adaptive is set up by creating interfaces for the processes to be supervised as well as for the notification process, mapping them to a machine (ECU) and configuring the supervision and notification parameters.

Create Supervised Entity Interface

To supervise a process of your application, you need to create a supervised-entity Supervised Entity Interface for it.

  1. Open the Platform Health Management Editor.

  2. Right-click on interface Interfaces.

  3. Select Create PHM Supervised Entity Interface.

    The Create PHM Supervised Entity Interface wizard opens.

  4. Choose a name for your Supervised Entity.

  5. Choose the Package and the ARXML file where the Supervised Entity Interface should be stored.

  6. Click Finish.

    You have created a supervised-entity Supervised Entity Interface. It is now listed under Interfaces.

  7. Create the Checkpoints for Supervision.

    The supervised-entity Supervised Entity Interface can now be used to create an application port in the Executable.

Create Recovery Notification Interface

To be able to notify state management or the watchdog you need to create a supervised-entity-recovery Recovery Notification Interface for the corresponding daemon process.

  1. Right-click on interface Interfaces.

  2. Select Create PHM Supervision Recovery Notification Interface.

    The Create PHM Supervision Recovery Notification Interface wizard opens.

  3. Choose a name for your Notification Interface.

  4. Choose the Package and the ARXML file where the Notification Interface should be stored.

  5. Click Finish.

    You have created a supervised-entity-recovery Recovery Notification Interface. It is now listed under Interfaces. The supervised-entity-recovery Recovery Notification Interface can now be used to create a state manager port in the Executable.

Create ports in the Executable

To get the input of a process and to send output to State Management, we need to create ports for those processes in the Executable.

  1. Open the Executable Editor.

  2. Select the SWComponent for the application.

  3. Select the tab Others.

  4. add Add Port Prototype and check Required for your Supervised Entity Interface.

  5. Click Finish.

    The port for your Supervised Entity Interface is listed under Ports.

  6. Select the SWComponent for your state manager application.

  7. Select the tab Others.

  8. add Create Port Prototype and check Provided for your Recovery Notification Interface.

  9. Click Finish.

    The port for your Recovery Notification Interface is listed under Ports.

  10. Go back to the PHM Editor.

    You now have set up the input and output ports for Platform Health Management. You can now add them to your Supervisions.

Create a Contribution

A phm-contribution Contribution indicates that the current PHM configuration is part of a broader configuration scheme. At the phm-contribution Contribution level we configure the PHM daemon.

  • We select the Checkpoints that we want to supervise,

  • map the related Supervisions to a machine, and can

  • disable the Watchdog for all Global Supervisions related to that Contribution.

  • You are in the PHM Editor.

  1. Right-click on phm-contribution Contributions.

  2. Select Create Platform Health Management Contribution.

    The Create Platform Health Management Contribution wizard opens.

  3. Choose a name for your phm-contribution Contribution.

  4. Choose the Package and the ARXML file where the phm-contribution Contribution should be stored.

  5. Click Finish.

    The wizard closes.

  6. Go to the section Checkpoints and add Create and Map the Supervision Checkpoints that you want to supervise in this phm-contribution Contribution.

  7. Go to the section Machine and add Map a Machine that was defined in the Machine Editor.

    You have created a phm-contribution Contribution. It now is listed under phm-contribution Contributions. Now, you are able to create global-supervision Global Supervisions for this phm-contribution Contribution.

Disable Watchdog for a Contribution

At the Contribution level you have two settings concerning the Watchdog in the MICROSAR Adaptive Parameters:

Parameter Description

Watchdog Alive Notification Cycle Time

The watchdog alive notification cycle time used for alive notifications to the Watchdog Client.

Disable Watchdog Client

Deactivate watchdog for all Global Supervisions in that Contribution.

Create Global Supervision for reporting to State Management

A Global Supervision combines the results of all related Supervisions into a single "worst-of" result. That means that if one Supervision reports a FAILED, EXPIRED or STOPPED status, the result of the Global Supervision takes on that status and reports it to the State Manager.

  1. Right-click on your phm-contribution Contribution.

  2. Select add Create Global Supervision.

    A new global-supervision Global Supervision was added. If you expand the global-supervision Global Supervision you will see two new items: supervision Supervisions and checkpoint-transition Transitions.

  3. Select the new global-supervision Global Supervision, name it and fill out the necessary parameters.

  4. To send a Recovery Notification to State Management in case of failure, in the section Recovery Notification add the fitting ports for the Recovery Notification Interface as Health Channels.

Parameters Global Supervision

Parameter Description

Name

Unique name of the Global Supervision

Description

Choose a good description that explains the Global Supervision to your future self and your colleagues.

Create Alive, Deadline or Logical Supervision

  1. Expand your global-supervision Global Supervision.

  2. Right click on supervision Supervisions.

  3. Select the required Supervision type.

    Your Supervision type was added.

  4. Select the Supervision and fill out the necessary parameters.

Supervision Types

For Health Monitoring there are three different Supervision types that can be chosen in the PHM Editor.

Supervision Type Description

alive-supervision Alive Supervision

Monitors a cyclic checkpoint to ensure it reports at the correct interval. If a monitored application signals its "alive" status too frequently or too infrequently, a violation is identified.

deadline-supervision Deadline Supervision

Monitors the transition time between two checkpoints of a Supervised Entity to find out if a process is early, timely or late.

logical-supervision Logical Supervision

Defines the checkpoints and transitions that indicate if the process flow is executed as expected or not.

Parameters Alive Supervision

Parameter Required/
Optional
Data type Description

Name

Required

String

Unique name of the Supervision.

Description

Optional

String

Choose a good description that explains the Alive Supervision to your future self and your colleagues.

Alive Reference Cycle

Required

Integer

Time period at which the Alive Supervision mechanism compares the amount of received Alive Indications for the SupervisionCheckpoint against the expectedAliveIndications.

Expected Alive Indications

Required

Integer

Defines the amount of expected Alive Indications of the SupervisionCheckpoint within the aliveReferenceCycle.

Max Margin

Required

Integer

Defines the amount of expected Alive Indications of the SupervisionCheckpoint that are acceptable to be additional to the expectedAliveIndications within the aliveReferenceCycle.

Min Margin

Required

Integer

Defines the amount of expected Alive Indications of the SupervisionCheckpoint that are acceptable to be missing to the expectedAliveIndications within the aliveReferenceCycle.

Supervision Checkpoint

Required

Reference

Reference to a checkpoint in the context of Alive Supervision.

References a Checkpoint related to the current phm-contribution Contribution.

Max Startup Delay

Optional

Integer

Defines the maximum startup delay time of the Alive Supervision in seconds.

Must be an integer multiple of watchdogAliveNotificationCycleTime within the interval [0, UINT32_MAX-1].

Parameters Deadline Supervision

Parameter Required/
Optional
Data type Description

Name

Required

String

Unique name of the Supervision.

Description

Optional

String

Choose a good description that explains the Deadline Supervision to your future self and your colleagues.

Max Deadline

Required

Integer

The longest time span allowed for a transition between two checkpoints.

Min Deadline

Required

Integer

The shortest time span allowed for the transition between two checkpoints.

Checkpoint Transition

Required

Reference

Checkpoint Transition to be monitored. Defined under checkpoint-transition Transitions.

Source

Required

Reference

Source Checkpoint for this transition.

Field is connected to the selected checkpoint-transition Transition. You can fill it out in the Deadline Supervision form or in the respective checkpoint-transition Transition.

References Checkpoints related to the current phm-contribution Contribution.

Target

Required

Reference

Target Checkpoint for this transition.

Field is connected to the selected checkpoint-transition Transition. You can fill it out in the Deadline Supervision form or in the respective checkpoint-transition Transition.

References Checkpoints related to the current phm-contribution Contribution.

Parameters Logical Supervision

Parameter Required/
Optional
Data type Description

Name

Required

String

Unique name of the Supervision.

Description

Optional

String

Choose a good description that explains the Logical Supervision to your future self and your colleagues.

Initial Checkpoints

Required

References

Starting points within the logical sequence of a Supervised Entity. Initial Checkpoints define where a particular logical flow begins.

References Checkpoints related to the current phm-contribution Contribution.

Transitions

Required

References

Defines how a process is supposed to flow from the Initial Checkpoint to the Final Checkpoint.

References checkpoint-transition Transitions.

Final Checkpoints

Required

References

The Final Checkpoint is the endpoint within the logical sequence of a Supervised Entity.

References Checkpoints related to the current phm-contribution Contribution.

Transitions for Global Supervisions

Under global-supervision Global Supervision > checkpoint-transition Transitions you can define transition paths between a Source Checkpoint and a Target Checkpoint. Transitions are then referenced in deadline-supervisionDeadline and logical-supervision Logical Supervisions.