CORDET Framework - C2 Implementation
CrPsLptUpCmdStartCreate.c
Go to the documentation of this file.
1 
25 
27 #include "CrFwConstants.h"
28 
30 #include "FwPrDCreate.h"
31 #include "FwPrConfig.h"
32 
34 #include <stdlib.h>
35 
36 
43 static FwPrBool_t code90177(FwPrDesc_t prDesc) /*TODO change the name */
44 {
45  CRFW_UNUSED(prDesc);
46  return 1;
47 }
48 
55 static FwPrBool_t code70152(FwPrDesc_t prDesc) /*TODO change the name */
56 {
57  CRFW_UNUSED(prDesc);
58  return 1;
59 }
60 
61 /* ----------------------------------------------------------------------------------------------------------------- */
62 FwPrDesc_t CrPsLptUpCmdStartCreate(void* prData)
63 {
64  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsLptUpCmdStart */
65  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsLptUpCmdStart */
66  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsLptUpCmdStart */
67  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsLptUpCmdStart */
68 
70  FwPrDesc_t prDesc = FwPrCreate(
71  4, /* N_ANODES - The number of action nodes */
72  2, /* N_DNODES - The number of decision nodes */
73  9, /* N_FLOWS - The number of control flows */
74  4, /* N_ACTIONS - The number of actions */
75  4 /* N_GUARDS - The number of guards */
76  );
77 
79  FwPrSetData(prDesc, prData);
80  FwPrAddActionNode(prDesc, CrPsLptUpCmdStart_N1, &CrPsLptUpCmdStartN1);
81  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
82  FwPrAddActionNode(prDesc, CrPsLptUpCmdStart_N2, &CrPsLptUpCmdStartN2);
83  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
84  FwPrAddActionNode(prDesc, CrPsLptUpCmdStart_N3, &CrPsLptUpCmdStartN3);
85  FwPrAddActionNode(prDesc, CrPsLptUpCmdStart_N4, &CrPsLptUpCmdStartN4);
86  FwPrAddFlowIniToAct(prDesc, CrPsLptUpCmdStart_N1, NULL);
87  FwPrAddFlowActToDec(prDesc, CrPsLptUpCmdStart_N1, DECISION1, NULL);
88  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsLptUpCmdStart_N2, &CrPsLptUpCmdStartG1);
89  FwPrAddFlowDecToDec(prDesc, DECISION1, DECISION2, &code90177);
90  FwPrAddFlowActToFin(prDesc, CrPsLptUpCmdStart_N2, NULL);
91  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsLptUpCmdStart_N3, &CrPsLptUpCmdStartNG2);
92  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsLptUpCmdStart_N4, &code70152);
93  FwPrAddFlowActToAct(prDesc, CrPsLptUpCmdStart_N3, CrPsLptUpCmdStart_N2, NULL);
94  FwPrAddFlowActToFin(prDesc, CrPsLptUpCmdStart_N4, NULL);
95 
96  return prDesc;
97 }
Create one instance of the CrPsLptUpCmdStart procedure.
static FwPrBool_t code70152(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N4.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
Header file to define all invariant publicly available constants and types for the CORDET Framework...
static FwPrBool_t code90177(FwPrDesc_t prDesc)
CR Framework function definitions.
void CrPsLptUpCmdStartN2(FwPrDesc_t prDesc)
Action for node N2.
FwPrBool_t CrPsLptUpCmdStartG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N2.
void CrPsLptUpCmdStartN4(FwPrDesc_t prDesc)
Action for node N4.
void CrPsLptUpCmdStartN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsLptUpCmdStartN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrDesc_t CrPsLptUpCmdStartCreate(void *prData)
Create a new procedure descriptor.
#define CrPsLptUpCmdStart_N1
Make sure to include this header file only once.
FwPrBool_t CrPsLptUpCmdStartNG2(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N3.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved