CORDET Framework - C2 Implementation
CrFwInRepExecProc.c
Go to the documentation of this file.
1 
19 #include <stdlib.h>
20 /* Configuration Files */
21 #include "CrFwCmpData.h"
22 /* Framework Files */
23 #include "CrFwInRepExecProc.h"
24 #include "CrFwInRep.h"
26 /* FW Profile Files */
27 #include "FwPrConstants.h"
28 #include "FwPrDCreate.h"
29 #include "FwPrConfig.h"
30 #include "FwPrCore.h"
31 
36 static void CwFwInRepExecAction(FwPrDesc_t prDesc);
37 
38 /*-----------------------------------------------------------------------------------------*/
39 FwPrDesc_t CrFwInRepExecProcMake() {
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 = 0; /* Number of guards */
45  const FwPrCounterS1_t N1 = 1; /* Identifier of first action node */
46  FwPrDesc_t execProc;
47 
48  /* Create the execution procedure */
49  execProc = FwPrCreate(nOfANodes, nOfDNodes, nOfFlows, nOfActions, nOfGuards);
50 
51  /* Configure the initialization procedure */
52  FwPrAddActionNode(execProc, N1, &CwFwInRepExecAction);
53  FwPrAddFlowIniToAct(execProc, N1, NULL);
54  FwPrAddFlowActToFin(execProc, N1, NULL);
55 
56  return execProc;
57 }
58 
59 /* ----------------------------------------------------------------------------------------------------------------- */
60 static void CwFwInRepExecAction(FwPrDesc_t prDesc) {
61  CrFwCmpData_t* cmpData = (CrFwCmpData_t*)FwPrGetData(prDesc);
62  CrFwInRepData_t* cmpSpecificData = (CrFwInRepData_t*)(cmpData->cmpSpecificData);
63 
64  cmpSpecificData->updateAction(prDesc);
65  return;
66 }
67 
68 
69 
70 
Type for the Framework Component Data (FCD).
Definition: CrFwCmpData.h:79
Execution Procedure for the InReport Component.
Definition of the Framework Component Data (FCD) Type.
Type for the data describing an InReport.
CrFwInRepUpdateAction_t updateAction
Function which implements the Update Action for the InReport.
Definition of the InReport Component of the framework.
void * cmpSpecificData
Derived data which are specific to each type of framework component.
Definition: CrFwCmpData.h:101
Definition of the utility functions for the CORDET Framework.
static void CwFwInRepExecAction(FwPrDesc_t prDesc)
Function implementing the action of the single node in the Report Execution Procedure.
FwPrDesc_t CrFwInRepExecProcMake()
Create a new instance of the InReport Execution Procedure.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved