CORDET Framework - C2 Implementation
CrFwDummyExecProc.c
Go to the documentation of this file.
1 
19 #include <stdlib.h>
20 #include "CrFwInitProc.h"
21 #include "CrFwBaseCmp.h"
23 /* FW Profile Files */
24 #include "FwPrConstants.h"
25 #include "FwPrDCreate.h"
26 #include "FwPrConfig.h"
27 #include "FwPrCore.h"
28 
30 static FwPrDesc_t dummyExecPrDesc = NULL;
31 
32 /* ----------------------------------------------------------------------------------------------------------------- */
33 void CwFwBaseCmpDummyExecAction(FwPrDesc_t prDesc) {
34  CRFW_UNUSED(prDesc);
35  return;
36 }
37 
38 /*-----------------------------------------------------------------------------------------*/
40  const FwPrCounterS1_t nOfANodes = 1; /* Number of action nodes */
41  const FwPrCounterS1_t nOfDNodes = 0; /* Number of decision nodes */
42  const FwPrCounterS1_t nOfFlows = 2; /* Number of control flows */
43  const FwPrCounterS1_t nOfActions = 1; /* Number of actions */
44  const FwPrCounterS1_t nOfGuards = 1; /* Number of guards */
45  const FwPrCounterS1_t N1 = 1; /* Identifier of first action node */
46 
47  if (dummyExecPrDesc != NULL)
48  return dummyExecPrDesc;
49 
50  /* Create the execution procedure */
51  dummyExecPrDesc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
52 
53  /* Configure the initialization procedure */
54  FwPrAddActionNode(dummyExecPrDesc, N1, &CwFwBaseCmpDummyExecAction);
55  FwPrAddFlowIniToAct(dummyExecPrDesc, N1, NULL);
56  FwPrAddFlowActToAct(dummyExecPrDesc, N1, N1, &CrFwWaitOnePrCycle);
57 
58  return dummyExecPrDesc;
59 }
60 
61 
62 
63 
64 
Definition of Base Component.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:29
FwPrDesc_t CrFwBaseCmpGetDummyExecProc()
Retrieve the singleton instance of the Dummy CEP.
void CwFwBaseCmpDummyExecAction(FwPrDesc_t prDesc)
Dummy action executed in the single node of the Dummy Execution Procedure.
static FwPrDesc_t dummyExecPrDesc
The singleton instance of the CIP.
Component Initialization Procedure (CIP) for the Base Component.
FwPrBool_t CrFwWaitOnePrCycle(FwPrDesc_t prDesc)
Convenience function which returns true when a procedure has spent more than one cycle in the current...
Definition of the utility functions for the CORDET Framework.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved