CORDET Framework - C2 Implementation
CrPsCmd17s3StartCreate.c
Go to the documentation of this file.
1 
24 #include "CrPsCmd17s3StartCreate.h"
25 
27 #include "FwPrDCreate.h"
28 #include "FwPrConfig.h"
29 
31 #include <stdlib.h>
32 
33 /* ------------------------------------------------------------------------------------ */
40 FwPrBool_t CrPsTestOnBoardConnectionStartG1E(FwPrDesc_t prDesc)
41 {
42  CRFW_UNUSED(prDesc);
43 
44  return 1;
45 }
46 /* ------------------------------------------------------------------------------------ */
53 FwPrBool_t CrPsTestOnBoardConnectionStartG2E(FwPrDesc_t prDesc)
54 {
55  CRFW_UNUSED(prDesc);
56 
57  return 1;
58 }
59 /* ------------------------------------------------------------------------------------ */
66 FwPrBool_t CrPsTestOnBoardConnectionStartG3E(FwPrDesc_t prDesc)
67 {
68  CRFW_UNUSED(prDesc);
69 
70  return 1;
71 }
72 
73 /* ------------------------------------------------------------------------------------ */
74 FwPrDesc_t CrPsCmd17s3StartCreate(void* prData)
75 {
76  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsCmd17s3Start */
77  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsCmd17s3Start */
78  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsCmd17s3Start */
79  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsCmd17s3Start */
80  const FwPrCounterU2_t DECISION3 = 3; /* The identifier of decision node DECISION3 in procedure CrPsCmd17s3Start */
81  const FwPrCounterU2_t N_OUT_OF_DECISION3 = 2; /* The number of control flows out of decision node DECISION3 in procedure CrPsCmd17s3Start */
82 
84  FwPrDesc_t prDesc = FwPrCreate(
85  9, /* N_ANODES - The number of action nodes */
86  3, /* N_DNODES - The number of decision nodes */
87  16, /* N_FLOWS - The number of control flows */
88  9, /* N_ACTIONS - The number of actions */
89  6 /* N_GUARDS - The number of guards */
90  );
91 
93  FwPrSetData(prDesc, prData);
94  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N1, &CrPsTestOnBoardConnectionStartN1);
95  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N2, &CrPsTestOnBoardConnectionStartN2);
96  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
97  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N3, &CrPsTestOnBoardConnectionStartN3);
98  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N5, &CrPsTestOnBoardConnectionStartN5);
99  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N8, &CrPsTestOnBoardConnectionStartN8);
100  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N7, &CrPsTestOnBoardConnectionStartN7);
101  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
102  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N4, &CrPsTestOnBoardConnectionStartN4);
103  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N9, &CrPsTestOnBoardConnectionStartN9);
104  FwPrAddDecisionNode(prDesc, DECISION3, N_OUT_OF_DECISION3);
105  FwPrAddActionNode(prDesc, CrPsCmd17s3Start_N10, &CrPsTestOnBoardConnectionStartN10);
106  FwPrAddFlowIniToDec(prDesc, DECISION2, NULL);
107  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Start_N1, CrPsCmd17s3Start_N2, NULL);
108  FwPrAddFlowActToDec(prDesc, CrPsCmd17s3Start_N2, DECISION1, NULL);
109  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd17s3Start_N3, &CrPsTestOnBoardConnectionStartG2);
110  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd17s3Start_N9, &CrPsTestOnBoardConnectionStartG2E);
111  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Start_N3, CrPsCmd17s3Start_N8, NULL);
112  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Start_N5, CrPsCmd17s3Start_N7, NULL);
113  FwPrAddFlowActToFin(prDesc, CrPsCmd17s3Start_N8, NULL);
114  FwPrAddFlowActToFin(prDesc, CrPsCmd17s3Start_N7, NULL);
115  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmd17s3Start_N1, &CrPsTestOnBoardConnectionStartG1);
116  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmd17s3Start_N8, &CrPsTestOnBoardConnectionStartG1E);
117  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Start_N4, CrPsCmd17s3Start_N5, NULL);
118  FwPrAddFlowActToDec(prDesc, CrPsCmd17s3Start_N9, DECISION3, NULL);
119  FwPrAddFlowDecToAct(prDesc, DECISION3, CrPsCmd17s3Start_N4, &CrPsTestOnBoardConnectionStartG3);
120  FwPrAddFlowDecToAct(prDesc, DECISION3, CrPsCmd17s3Start_N10, &CrPsTestOnBoardConnectionStartG3E);
121  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Start_N10, CrPsCmd17s3Start_N3, NULL);
122 
123  return prDesc;
124 }
void CrPsTestOnBoardConnectionStartN10(FwPrDesc_t prDesc)
Action for node N10.
#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 CrPsTestOnBoardConnectionStartG2(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N3.
FwPrBool_t CrPsTestOnBoardConnectionStartG3E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to N10.
FwPrBool_t CrPsTestOnBoardConnectionStartG3(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION3 to N4.
void CrPsTestOnBoardConnectionStartN2(FwPrDesc_t prDesc)
Action for node N2.
Create one instance of the CrPsCmd17s3Start procedure.
void CrPsTestOnBoardConnectionStartN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrDesc_t CrPsCmd17s3StartCreate(void *prData)
Create a new procedure descriptor.
void CrPsTestOnBoardConnectionStartN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsTestOnBoardConnectionStartN5(FwPrDesc_t prDesc)
Action for node N5.
#define CrPsCmd17s3Start_N1
Make sure to include this header file only once.
void CrPsTestOnBoardConnectionStartN9(FwPrDesc_t prDesc)
Action for node N9.
void CrPsTestOnBoardConnectionStartN4(FwPrDesc_t prDesc)
Action for node N4.
void CrPsTestOnBoardConnectionStartN8(FwPrDesc_t prDesc)
Action for node N8.
FwPrBool_t CrPsTestOnBoardConnectionStartG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N1.
FwPrBool_t CrPsTestOnBoardConnectionStartG2E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N9.
void CrPsTestOnBoardConnectionStartN7(FwPrDesc_t prDesc)
Action for node N7.
FwPrBool_t CrPsTestOnBoardConnectionStartG1E(FwPrDesc_t prDesc)
FW Profile function definitions.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved