CORDET Framework - C2 Implementation
CrFwAppSmTestCases.c File Reference

Implementation of test cases for the Application State Machine. More...

Go to the source code of this file.

Functions

CrFwBool_t CrFwAppSmTestCase1 ()
 Check the creation and configuration of the Application State Machine. More...
 
FwSmDesc_t CrFwAppSmTestCasesGetStartUpEsm ()
 Return the dummy state machine to be embedded in state START-UP of the Application State Machine. More...
 
FwSmDesc_t CrFwAppSmTestCasesGetNormalEsm ()
 Return the dummy state machine to be embedded in state NORMAL of the Application State Machine. More...
 
FwSmDesc_t CrFwAppSmTestCasesGetResetEsm ()
 Return the dummy state machine to be embedded in state RESET of the Application State Machine. More...
 

Detailed Description

Implementation of test cases for the Application State Machine.

Author
Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m

This file is part of the CORDET Framework.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

For information on alternative licensing, please contact P&P Software GmbH.

Definition in file CrFwAppSmTestCases.c.

Function Documentation

CrFwBool_t CrFwAppSmTestCase1 ( )

Check the creation and configuration of the Application State Machine.

The following actions are performed in this test:

  • The Application State Machine (ASM) is created and it is checked that it is in correctly configured and that it has not yet been started.
  • An attempt is made to create the ASM a second time and it is checked that the same instance as the first time is returned.
  • It is checked that the state machines embedded in the states of the Application State Machine are correct.
  • The ASM is started and it is checked that state START_UP is entered and that the Application Start-Up Procedure has been started.
  • The ASM is executed and it is checked that it remains in state START_UP.
  • The Application Start-Up Procedure is executed until it terminates; the ASM is executed again and it is checked that it makes a transition to state NORMAL.
  • The ASM is sent command Reset and it is checked that state RESET is entered and that the Application Reset Procedure has been started.
  • The ASM is executed and it is checked that it remains in state RESET.
  • The Application Reset Procedure is executed until it terminates; the ASM is executed again and it is checked that it makes a transition to state NORMAL.
  • The ASM is sent command Shutdown and it is checked that state SHUTDOWN is entered and that the Application Shutdown Procedure has been started.
  • The ASM is executed and it is checked that it remains in state SHUTDOWN.
  • The Application Shutdown Procedure is executed until it terminates; the ASM is executed again and it is checked that it terminates.
Verifies:

Application SM Transition: IPS->START_UP

Application SM Transition: START_UP->NORMAL (with transition guard evaluating TRUE)

Application SM Transition: START_UP->NORMAL (with transition guard evaluating FALSE)

Application SM Transition: NORMAL->RESET

Application SM Transition: RESET->NORMAL (with transition guard evaluating TRUE)

Application SM Transition: RESET->NORMAL (with transition guard evaluating FALSE)

Application SM Transition: NORMAL->SHUTDOWN

Application SM Transition: SHUTDOWN->FPS (with transition guard evaluating TRUE)

Application SM Transition: SHUTDOWN->FPS (with transition guard evaluating FALSE)

Returns
true if the test was successful, false otherwise.

Definition at line 49 of file CrFwAppSmTestCases.c.

FwSmDesc_t CrFwAppSmTestCasesGetNormalEsm ( )

Return the dummy state machine to be embedded in state NORMAL of the Application State Machine.

Returns
the dummy state machine to be embedded in state NORMAL of the Application State Machine.

Definition at line 157 of file CrFwAppSmTestCases.c.

FwSmDesc_t CrFwAppSmTestCasesGetResetEsm ( )

Return the dummy state machine to be embedded in state RESET of the Application State Machine.

Returns
the dummy state machine to be embedded in state RESET of the Application State Machine.

Definition at line 161 of file CrFwAppSmTestCases.c.

FwSmDesc_t CrFwAppSmTestCasesGetStartUpEsm ( )

Return the dummy state machine to be embedded in state START-UP of the Application State Machine.

Returns
the dummy state machine to be embedded in state START-UP of the Application State Machine.

Definition at line 153 of file CrFwAppSmTestCases.c.

P&P Software GmbH, Copyright 2012-2013, All Rights Reserved