CORDET Framework - C2 Implementation
cordetfw-examples/src/CrConfigDemoMaster/CrFwAppShutdownProc.c
Go to the documentation of this file.
1 
29 #include <stdlib.h>
30 /* Include FW Profile Files */
31 #include "FwPrDCreate.h"
32 #include "FwPrConfig.h"
33 #include "FwPrCore.h"
34 #include "FwPrConstants.h"
35 /* Include Framework Files */
36 #include "CrFwConstants.h"
39 
41 FwPrDesc_t shutdownPrDesc;
42 
43 /*-----------------------------------------------------------------------------------------*/
45  const FwPrCounterS1_t nOfANodes = 1; /* Number of action nodes */
46  const FwPrCounterS1_t nOfDNodes = 0; /* Number of decision nodes */
47  const FwPrCounterS1_t nOfFlows = 2; /* Number of control flows */
48  const FwPrCounterS1_t nOfActions = 1; /* Number of actions */
49  const FwPrCounterS1_t nOfGuards = 1; /* Number of guards */
50  const FwPrCounterS1_t N1 = 1; /* Identifier of first action node */
51 
52  if (shutdownPrDesc != NULL)
53  return shutdownPrDesc;
54 
55  /* Create the initialization procedure */
56  shutdownPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
57 
58  /* Configure the initialization procedure */
59  FwPrAddActionNode(shutdownPrDesc, N1, &CrFwPrEmptyAction);
60  FwPrAddFlowIniToAct(shutdownPrDesc, N1, NULL);
61  FwPrAddFlowActToFin(shutdownPrDesc, N1, &CrFwWaitOnePrCycle);
62 
63  return shutdownPrDesc;
64 }
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