CORDET Framework - C2 Implementation
CrPsCmd3s1StartCreate.c
Go to the documentation of this file.
1 
24 #include "CrPsCmd3s1StartCreate.h"
25 
27 #include "CrFwConstants.h"
28 
30 #include "FwPrDCreate.h"
31 #include "FwPrConfig.h"
32 
34 #include <stdlib.h>
35 
37 FwPrBool_t CrPsCmd3s1StartG1E(FwPrDesc_t prDesc)
38 {
39  CRFW_UNUSED(prDesc);
40  return 1;
41 }
42 
44 FwPrBool_t CrPsCmd3s1StartG2E(FwPrDesc_t prDesc)
45 {
46  CRFW_UNUSED(prDesc);
47  return 1;
48 }
49 
51 FwPrBool_t CrPsCmd3s1StartG3E(FwPrDesc_t prDesc)
52 {
53  CRFW_UNUSED(prDesc);
54  return 1;
55 }
56 
58 FwPrBool_t CrPsCmd3s1StartG4E(FwPrDesc_t prDesc)
59 {
60  CRFW_UNUSED(prDesc);
61  return 1;
62 }
63 
65 FwPrBool_t CrPsCmd3s1StartG5E(FwPrDesc_t prDesc)
66 {
67  CRFW_UNUSED(prDesc);
68  return 1;
69 }
70  /*TODO (01.02.2018) never reached in Testsuite*/
72 FwPrBool_t CrPsCmd3s1StartG6E(FwPrDesc_t prDesc)
73 {
74  CRFW_UNUSED(prDesc);
75  return 1;
76 }
77 
78 /* ----------------------------------------------------------------------------------------------------------------- */
79 FwPrDesc_t CrPsCmd3s1StartCreate(void* prData)
80 {
81  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsCmd3s1Start */
82  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsCmd3s1Start */
83  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsCmd3s1Start */
84  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsCmd3s1Start */
85  const FwPrCounterU2_t DECISION3 = 3; /* The identifier of decision node DECISION3 in procedure CrPsCmd3s1Start */
86  const FwPrCounterU2_t N_OUT_OF_DECISION3 = 2; /* The number of control flows out of decision node DECISION3 in procedure CrPsCmd3s1Start */
87  const FwPrCounterU2_t DECISION4 = 4; /* The identifier of decision node DECISION4 in procedure CrPsCmd3s1Start */
88  const FwPrCounterU2_t N_OUT_OF_DECISION4 = 2; /* The number of control flows out of decision node DECISION4 in procedure CrPsCmd3s1Start */
89  const FwPrCounterU2_t DECISION5 = 5; /* The identifier of decision node DECISION5 in procedure CrPsCmd3s1Start */
90  const FwPrCounterU2_t N_OUT_OF_DECISION5 = 2; /* The number of control flows out of decision node DECISION5 in procedure CrPsCmd3s1Start */
91  const FwPrCounterU2_t DECISION6 = 6; /* The identifier of decision node DECISION6 in procedure CrPsCmd3s1Start */
92  const FwPrCounterU2_t N_OUT_OF_DECISION6 = 2; /* The number of control flows out of decision node DECISION6 in procedure CrPsCmd3s1Start */
93 
95  FwPrDesc_t prDesc = FwPrCreate(
96  10, /* N_ANODES - The number of action nodes */
97  6, /* N_DNODES - The number of decision nodes */
98  23, /* N_FLOWS - The number of control flows */
99  10, /* N_ACTIONS - The number of actions */
100  12 /* N_GUARDS - The number of guards */
101  );
102 
104  FwPrSetData(prDesc, prData);
105  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
106  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N1, &CrPsCmd3s1StartN1);
107  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
108  FwPrAddDecisionNode(prDesc, DECISION3, N_OUT_OF_DECISION3);
109  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N4, &CrPsCmd3s1StartN4);
110  FwPrAddDecisionNode(prDesc, DECISION4, N_OUT_OF_DECISION4);
111  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N2, &CrPsCmd3s1StartN2);
112  FwPrAddDecisionNode(prDesc, DECISION5, N_OUT_OF_DECISION5);
113  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N3, &CrPsCmd3s1StartN3);
114  FwPrAddDecisionNode(prDesc, DECISION6, N_OUT_OF_DECISION6);
115  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N6, &CrPsCmd3s1StartN6);
116  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N7, &CrPsCmd3s1StartN7);
117  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N8, &CrPsCmd3s1StartN8);
118  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N9, &CrPsCmd3s1StartN9);
119  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N10, &CrPsCmd3s1StartN10);
120  FwPrAddActionNode(prDesc, CrPsCmd3s1Start_N11, &CrPsCmd3s1StartN11);
121  FwPrAddFlowIniToDec(prDesc, DECISION1, NULL);
122  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd3s1Start_N1, &CrPsCmd3s1StartG1);
123  FwPrAddFlowDecToDec(prDesc, DECISION1, DECISION2, &CrPsCmd3s1StartG1E);
124  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N1, NULL);
125  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmd3s1Start_N8, &CrPsCmd3s1StartG2);
126  FwPrAddFlowDecToDec(prDesc, DECISION2, DECISION3, &CrPsCmd3s1StartG2E);
127  FwPrAddFlowDecToAct(prDesc, DECISION3, CrPsCmd3s1Start_N7, &CrPsCmd3s1StartG3);
128  FwPrAddFlowDecToDec(prDesc, DECISION3, DECISION4, &CrPsCmd3s1StartG3E);
129  FwPrAddFlowActToDec(prDesc, CrPsCmd3s1Start_N4, DECISION6, NULL);
130  FwPrAddFlowDecToAct(prDesc, DECISION4, CrPsCmd3s1Start_N9, &CrPsCmd3s1StartG4);
131  FwPrAddFlowDecToAct(prDesc, DECISION4, CrPsCmd3s1Start_N2, &CrPsCmd3s1StartG4E);
132  FwPrAddFlowActToDec(prDesc, CrPsCmd3s1Start_N2, DECISION5, NULL);
133  FwPrAddFlowDecToAct(prDesc, DECISION5, CrPsCmd3s1Start_N3, &CrPsCmd3s1StartG5);
134  FwPrAddFlowDecToAct(prDesc, DECISION5, CrPsCmd3s1Start_N4, &CrPsCmd3s1StartG5E);
135  FwPrAddFlowActToAct(prDesc, CrPsCmd3s1Start_N3, CrPsCmd3s1Start_N10, NULL);
136  FwPrAddFlowDecToAct(prDesc, DECISION6, CrPsCmd3s1Start_N6, &CrPsCmd3s1StartG6);
137  FwPrAddFlowDecToAct(prDesc, DECISION6, CrPsCmd3s1Start_N11, &CrPsCmd3s1StartG6E);
138  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N6, NULL);
139  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N7, NULL);
140  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N8, NULL);
141  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N9, NULL);
142  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N10, NULL);
143  FwPrAddFlowActToFin(prDesc, CrPsCmd3s1Start_N11, NULL);
144 
145  return prDesc;
146 }
FwPrBool_t CrPsCmd3s1StartG3(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to N7.
void CrPsCmd3s1StartN4(FwPrDesc_t prDesc)
Action for node N4.
FwPrBool_t CrPsCmd3s1StartG2(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N8.
FwPrBool_t CrPsCmd3s1StartG6E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION6 to N11.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
FwPrBool_t CrPsCmd3s1StartG6(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION6 to N6.
FwPrBool_t CrPsCmd3s1StartG2E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to DECISION3.
#define CrPsCmd3s1Start_N1
Make sure to include this header file only once.
void CrPsCmd3s1StartN7(FwPrDesc_t prDesc)
Action for node N7.
FwPrBool_t CrPsCmd3s1StartG5(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION5 to N3.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
void CrPsCmd3s1StartN2(FwPrDesc_t prDesc)
Action for node N2.
FwPrBool_t CrPsCmd3s1StartG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N1.
void CrPsCmd3s1StartN10(FwPrDesc_t prDesc)
Action for node N10.
void CrPsCmd3s1StartN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsCmd3s1StartN11(FwPrDesc_t prDesc)
Action for node N11.
void CrPsCmd3s1StartN6(FwPrDesc_t prDesc)
Action for node N6.
FwPrBool_t CrPsCmd3s1StartG4(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION4 to N9.
void CrPsCmd3s1StartN8(FwPrDesc_t prDesc)
Action for node N8.
Create one instance of the CrPsCmd3s1Start procedure.
FwPrDesc_t CrPsCmd3s1StartCreate(void *prData)
Create a new procedure descriptor.
FwPrBool_t CrPsCmd3s1StartG3E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to DECISION4.
void CrPsCmd3s1StartN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrBool_t CrPsCmd3s1StartG5E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION5 to N4.
FwPrBool_t CrPsCmd3s1StartG1E(FwPrDesc_t prDesc)
CR Framework function definitions.
void CrPsCmd3s1StartN9(FwPrDesc_t prDesc)
Action for node N9.
FwPrBool_t CrPsCmd3s1StartG4E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION4 to N2.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved