CORDET Framework - C2 Implementation
CrFwAppStartUpProc.c
Go to the documentation of this file.
1 
33 #include <stdlib.h>
34 /* Include FW Profile Files */
35 #include "FwPrDCreate.h"
36 #include "FwPrConfig.h"
37 #include "FwPrCore.h"
38 #include "FwPrConstants.h"
39 /* Include Framework Files */
40 #include "CrFwConstants.h"
43 
45 FwPrDesc_t startUpPrDesc;
46 
47 /*-----------------------------------------------------------------------------------------*/
49  const FwPrCounterS1_t nOfANodes = 1; /* Number of action nodes */
50  const FwPrCounterS1_t nOfDNodes = 0; /* Number of decision nodes */
51  const FwPrCounterS1_t nOfFlows = 2; /* Number of control flows */
52  const FwPrCounterS1_t nOfActions = 1; /* Number of actions */
53  const FwPrCounterS1_t nOfGuards = 1; /* Number of guards */
54  const FwPrCounterS1_t N1 = 1; /* Identifier of first action node */
55 
56  if (startUpPrDesc != NULL)
57  return startUpPrDesc;
58 
59  /* Create the initialization procedure */
60  startUpPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
61 
62  /* Configure the initialization procedure */
63  FwPrAddActionNode(startUpPrDesc, N1, &CrFwPrEmptyAction);
64  FwPrAddFlowIniToAct(startUpPrDesc, N1, NULL);
65  FwPrAddFlowActToFin(startUpPrDesc, N1, &CrFwWaitOnePrCycle);
66 
67  return startUpPrDesc;
68 }
Interface to the Application Reset Procedure.
FwPrDesc_t startUpPrDesc
The singleton instance of the Application Start-Up Procedure.
FwPrDesc_t CrFwAppSmGetAppStartUpProc()
Retrieve the singleton instance of the Application Start-Up 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