CORDET Framework - C2 Implementation
cordetfw/pustests/config/CrFwAppShutdownProc.c
1 
34 #include <stdlib.h>
35 /* Include FW Profile Files */
36 #include "FwPrDCreate.h"
37 #include "FwPrConfig.h"
38 #include "FwPrCore.h"
39 #include "FwPrConstants.h"
40 /* Include Framework Files */
41 #include "CrFwConstants.h"
44 
46 FwPrDesc_t shutdownPrDesc;
47 
48 /*-----------------------------------------------------------------------------------------*/
49 FwPrDesc_t CrFwAppSmGetAppShutdownProc() {
50  const FwPrCounterS1_t nOfANodes = 1; /* Number of action nodes */
51  const FwPrCounterS1_t nOfDNodes = 0; /* Number of decision nodes */
52  const FwPrCounterS1_t nOfFlows = 2; /* Number of control flows */
53  const FwPrCounterS1_t nOfActions = 1; /* Number of actions */
54  const FwPrCounterS1_t nOfGuards = 1; /* Number of guards */
55  const FwPrCounterS1_t N1 = 1; /* Identifier of first action node */
56 
57  if (shutdownPrDesc != NULL)
58  return shutdownPrDesc;
59 
60  /* Create the initialization procedure */
61  shutdownPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
62 
63  /* Configure the initialization procedure */
64  FwPrAddActionNode(shutdownPrDesc, N1, &CrFwPrEmptyAction);
65  FwPrAddFlowIniToAct(shutdownPrDesc, N1, NULL);
66  FwPrAddFlowActToFin(shutdownPrDesc, N1, &CrFwWaitOnePrCycle);
67 
68  return shutdownPrDesc;
69 }
Interface to the Application Reset Procedure.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
FwPrDesc_t CrFwAppSmGetAppShutdownProc()
Retrieve the singleton instance of the Application Shutdown Procedure.
Definition of the utility functions for the CORDET Framework.
void CrFwPrEmptyAction(FwPrDesc_t prDesc)
Convenience function to be used in a procedure as default implementation for an action which returns ...
FwPrDesc_t shutdownPrDesc
The singleton instance of the Application Shutdown Procedure.
FwPrBool_t CrFwWaitOnePrCycle(FwPrDesc_t prDesc)
Convenience function which returns true when a procedure has spent more than one cycle in the current...
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved