CORDET Framework - C2 Implementation
CrFwAppResetProc.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 resetPrDesc;
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 (resetPrDesc != NULL)
53  return resetPrDesc;
54 
55  /* Create the initialization procedure */
56  resetPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
57 
58  /* Configure the initialization procedure */
59  FwPrAddActionNode(resetPrDesc, N1, &CrFwPrEmptyAction);
60  FwPrAddFlowIniToAct(resetPrDesc, N1, NULL);
61  FwPrAddFlowActToFin(resetPrDesc, N1, &CrFwWaitOnePrCycle);
62 
63  return resetPrDesc;
64 }
FwPrDesc_t CrFwAppSmGetAppResetProc()
Retrieve the singleton instance of the Application Reset Procedure.
FwPrDesc_t resetPrDesc
The singleton instance of the Application Reset Procedure.
Interface to the Application Reset Procedure.
Header file to define all invariant publicly available constants and types for the CORDET Framework.
FwPrBool_t CrFwWaitOnePrCycle(FwPrDesc_t prDesc)
Convenience function which returns true when a procedure has spent more than one cycle in the current...
void CrFwPrEmptyAction(FwPrDesc_t prDesc)
Convenience function to be used in a procedure as default implementation for an action which returns ...
Definition of the utility functions for the CORDET Framework.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved