CORDET Framework - C2 Implementation
CrPsCmd3s3StartCreate.c
Go to the documentation of this file.
1 
24 #include "CrPsCmd3s3StartCreate.h"
25 
27 #include "CrFwConstants.h"
28 
30 #include "FwPrDCreate.h"
31 #include "FwPrConfig.h"
32 
34 #include <stdlib.h>
35 
37 FwPrBool_t CrPsCmd3s3StartG1E(FwPrDesc_t prDesc)
38 {
39  CRFW_UNUSED(prDesc);
40  return 1;
41 }
42 
44 FwPrBool_t CrPsCmd3s3StartG2E(FwPrDesc_t prDesc)
45 {
46  CRFW_UNUSED(prDesc);
47  return 1;
48 }
49 
51 FwPrBool_t CrPsCmd3s3StartG3E(FwPrDesc_t prDesc)
52 {
53  CRFW_UNUSED(prDesc);
54  return 1;
55 }
56 
58 FwPrBool_t CrPsCmd3s3StartG4E(FwPrDesc_t prDesc)
59 {
60  CRFW_UNUSED(prDesc);
61  return 1;
62 }
63 
64 /* ----------------------------------------------------------------------------------------------------------------- */
65 FwPrDesc_t CrPsCmd3s3StartCreate(void* prData)
66 {
67  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsCmd3s3Start */
68  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsCmd3s3Start */
69  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsCmd3s3Start */
70  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsCmd3s3Start */
71  const FwPrCounterU2_t DECISION3 = 3; /* The identifier of decision node DECISION3 in procedure CrPsCmd3s3Start */
72  const FwPrCounterU2_t N_OUT_OF_DECISION3 = 2; /* The number of control flows out of decision node DECISION3 in procedure CrPsCmd3s3Start */
73  const FwPrCounterU2_t DECISION4 = 4; /* The identifier of decision node DECISION4 in procedure CrPsCmd3s3Start */
74  const FwPrCounterU2_t N_OUT_OF_DECISION4 = 2; /* The number of control flows out of decision node DECISION4 in procedure CrPsCmd3s3Start */
75 
77  FwPrDesc_t prDesc = FwPrCreate(
78  8, /* N_ANODES - The number of action nodes */
79  4, /* N_DNODES - The number of decision nodes */
80  17, /* N_FLOWS - The number of control flows */
81  8, /* N_ACTIONS - The number of actions */
82  8 /* N_GUARDS - The number of guards */
83  );
84 
86  FwPrSetData(prDesc, prData);
87  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N4, &CrPsCmd3s3StartN4);
88  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N1, &CrPsCmd3s3StartN1);
89  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
90  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N2, &CrPsCmd3s3StartN2);
91  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N3, &CrPsCmd3s3StartN3);
92  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
93  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N5, &CrPsCmd3s3StartN5);
94  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N6, &CrPsCmd3s3StartN6);
95  FwPrAddDecisionNode(prDesc, DECISION3, N_OUT_OF_DECISION3);
96  FwPrAddDecisionNode(prDesc, DECISION4, N_OUT_OF_DECISION4);
97  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N7, &CrPsCmd3s3StartN7);
98  FwPrAddActionNode(prDesc, CrPsCmd3s3Start_N8, &CrPsCmd3s3StartN8);
99  FwPrAddFlowIniToAct(prDesc, CrPsCmd3s3Start_N1, NULL);
100  FwPrAddFlowActToDec(prDesc, CrPsCmd3s3Start_N4, DECISION1, NULL);
101  FwPrAddFlowActToDec(prDesc, CrPsCmd3s3Start_N1, DECISION1, NULL);
102  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd3s3Start_N2, &CrPsCmd3s3StartG1);
103  FwPrAddFlowDecToDec(prDesc, DECISION1, DECISION2, &CrPsCmd3s3StartG1E);
104  FwPrAddFlowActToAct(prDesc, CrPsCmd3s3Start_N2, CrPsCmd3s3Start_N3, NULL);
105  FwPrAddFlowActToDec(prDesc, CrPsCmd3s3Start_N3, DECISION2, NULL);
106  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmd3s3Start_N5, &CrPsCmd3s3StartG2);
107  FwPrAddFlowDecToDec(prDesc, DECISION2, DECISION3, &CrPsCmd3s3StartG2E);
108  FwPrAddFlowActToAct(prDesc, CrPsCmd3s3Start_N5, CrPsCmd3s3Start_N6, NULL);
109  FwPrAddFlowActToDec(prDesc, CrPsCmd3s3Start_N6, DECISION3, NULL);
110  FwPrAddFlowDecToDec(prDesc, DECISION3, DECISION4, &CrPsCmd3s3StartG3);
111  FwPrAddFlowDecToAct(prDesc, DECISION3, CrPsCmd3s3Start_N4, &CrPsCmd3s3StartG3E);
112  FwPrAddFlowDecToAct(prDesc, DECISION4, CrPsCmd3s3Start_N8, &CrPsCmd3s3StartG4);
113  FwPrAddFlowDecToAct(prDesc, DECISION4, CrPsCmd3s3Start_N7, &CrPsCmd3s3StartG4E);
114  FwPrAddFlowActToFin(prDesc, CrPsCmd3s3Start_N7, NULL);
115  FwPrAddFlowActToFin(prDesc, CrPsCmd3s3Start_N8, NULL);
116 
117  return prDesc;
118 }
void CrPsCmd3s3StartN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsCmd3s3StartN7(FwPrDesc_t prDesc)
Action for node N7.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
Create one instance of the CrPsCmd3s3Start procedure.
FwPrBool_t CrPsCmd3s3StartG3(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to DECISION4.
void CrPsCmd3s3StartN4(FwPrDesc_t prDesc)
Action for node N4.
void CrPsCmd3s3StartN2(FwPrDesc_t prDesc)
Action for node N2.
void CrPsCmd3s3StartN6(FwPrDesc_t prDesc)
Action for node N6.
FwPrBool_t CrPsCmd3s3StartG2(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N5.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
FwPrBool_t CrPsCmd3s3StartG4E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION4 to N7.
#define CrPsCmd3s3Start_N1
Make sure to include this header file only once.
void CrPsCmd3s3StartN8(FwPrDesc_t prDesc)
Action for node N8.
FwPrBool_t CrPsCmd3s3StartG3E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to N4.
void CrPsCmd3s3StartN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrDesc_t CrPsCmd3s3StartCreate(void *prData)
Create a new procedure descriptor.
FwPrBool_t CrPsCmd3s3StartG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N2.
FwPrBool_t CrPsCmd3s3StartG2E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to DECISION3.
FwPrBool_t CrPsCmd3s3StartG1E(FwPrDesc_t prDesc)
CR Framework function definitions.
FwPrBool_t CrPsCmd3s3StartG4(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION4 to N8.
void CrPsCmd3s3StartN5(FwPrDesc_t prDesc)
Action for node N5.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved