CORDET Framework - C2 Implementation
cordetfw/pustests/config/CrFwAppStartUpProc.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 startUpPrDesc;
47 
48 /*-----------------------------------------------------------------------------------------*/
49 FwPrDesc_t CrFwAppSmGetAppStartUpProc() {
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 (startUpPrDesc != NULL)
58  return startUpPrDesc;
59 
60  /* Create the initialization procedure */
61  startUpPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
62 
63  /* Configure the initialization procedure */
64  FwPrAddActionNode(startUpPrDesc, N1, &CrFwPrEmptyAction);
65  FwPrAddFlowIniToAct(startUpPrDesc, N1, NULL);
66  FwPrAddFlowActToFin(startUpPrDesc, N1, &CrFwWaitOnePrCycle);
67 
68  return startUpPrDesc;
69 }
Interface to the Application Reset 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 startUpPrDesc
The singleton instance of the Application Start-Up Procedure.
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