CORDET Framework - C2 Implementation
cordetfw/tests/config/CrFwAppStartUpProc.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 startUpPrDesc;
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 (startUpPrDesc != NULL)
53  return startUpPrDesc;
54 
55  /* Create the initialization procedure */
56  startUpPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
57 
58  /* Configure the initialization procedure */
59  FwPrAddActionNode(startUpPrDesc, N1, &CrFwPrEmptyAction);
60  FwPrAddFlowIniToAct(startUpPrDesc, N1, NULL);
61  FwPrAddFlowActToFin(startUpPrDesc, N1, &CrFwWaitOnePrCycle);
62 
63  return startUpPrDesc;
64 }
Interface to the Application Reset Procedure.
FwPrDesc_t startUpPrDesc
The singleton instance of the Application Start-Up Procedure.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
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 CrFwAppSmGetAppStartUpProc()
Retrieve the singleton instance of the Application Start-Up 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