FW Profile - C1 Implementation
FwDaMain.c File Reference

Demo application for the C1 Implementation of the FW Profile. More...

Go to the source code of this file.

Macros

#define N_CYCLE   400
 Number of cycles executed by the Demo Application.
 

Functions

int main ()
 Main program for the demo application. More...
 

Detailed Description

Demo application for the C1 Implementation of the FW Profile.

This file defines the main program for the demo application. The demo application shows how state machines can be used to implement a set of Failure Detection (FD) Checks for a Hardware Device and how procedures can be used to implement the Recovery Actions handling failures in the hardware device.

Author
Vaclav Cechticky, Alessandro Pasetti

Definition in file FwDaMain.c.

Function Documentation

int main ( )

Main program for the demo application.

The demo application consists of two parts: an initialization part and a cyclical part. In the initialization part, the following is done:

  • The Hardware Device State Machine is created and started
  • The FD Check State Machines are created and started
  • The Recovery Action Procedures are created
  • The configuration of all state machine is checked and the program exits with a failure code if configuration errors are found
  • The configuration of all procedures is checked and the program exits with a failure code if configuration errors are found
  • The Hardware Device State Machine is commanded into its operational state
  • The FD Checks are enabled

In the cyclical part, the following is done:

  • The Hardware Device state machine is executed,
  • The FD Checks state machines are executed,
  • If an FD Check detects a failure and commands the Hardware Device into STANDBY or switches it off, then the FD Checks are reset and the Hardware Device is switched back on.

The cycle is executed N_CYCLE times.

Returns
returns EXIT_SUCCESS if successful, EXIT_FAILURE otherwise

Definition at line 59 of file FwDaMain.c.

P&P Software GmbH, Copyright 2011, All Rights Reserved