CORDET Framework - C2 Implementation
CrPsCmd17s3PrgrCreate.c
Go to the documentation of this file.
1 
24 #include "CrPsCmd17s3PrgrCreate.h"
25 
27 #include "FwPrDCreate.h"
28 #include "FwPrConfig.h"
29 
31 #include <stdlib.h>
32 
33 /* ------------------------------------------------------------------------------------ */
34 FwPrDesc_t CrPsCmd17s3PrgrCreate(void* prData)
35 {
36  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsCmd17s3Prgr */
37  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 3; /* The number of control flows out of decision node DECISION1 in procedure CrPsCmd17s3Prgr */
38 
40  FwPrDesc_t prDesc = FwPrCreate(
41  4, /* N_ANODES - The number of action nodes */
42  1, /* N_DNODES - The number of decision nodes */
43  8, /* N_FLOWS - The number of control flows */
44  4, /* N_ACTIONS - The number of actions */
45  3 /* N_GUARDS - The number of guards */
46  );
47 
49  FwPrSetData(prDesc, prData);
50  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
51  FwPrAddActionNode(prDesc, CrPsCmd17s3Prgr_N1, &CrPsTestOnBoardConnectionPrgrN1);
52  FwPrAddActionNode(prDesc, CrPsCmd17s3Prgr_N2, &CrPsTestOnBoardConnectionPrgrN2);
53  FwPrAddActionNode(prDesc, CrPsCmd17s3Prgr_N3, &CrPsTestOnBoardConnectionPrgrN3);
54  FwPrAddActionNode(prDesc, CrPsCmd17s3Prgr_N4, &CrPsTestOnBoardConnectionPrgrN4);
55  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd17s3Prgr_N1, &CrPsTestOnBoardConnectionPrgrG11);
56  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd17s3Prgr_N2, &CrPsTestOnBoardConnectionPrgrG12);
57  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsCmd17s3Prgr_N3, &CrPsTestOnBoardConnectionPrgrG13);
58  FwPrAddFlowActToFin(prDesc, CrPsCmd17s3Prgr_N1, NULL);
59  FwPrAddFlowActToFin(prDesc, CrPsCmd17s3Prgr_N2, NULL);
60  FwPrAddFlowActToAct(prDesc, CrPsCmd17s3Prgr_N3, CrPsCmd17s3Prgr_N4, NULL);
61  FwPrAddFlowIniToDec(prDesc, DECISION1, NULL);
62  FwPrAddFlowActToFin(prDesc, CrPsCmd17s3Prgr_N4, NULL);
63 
64  return prDesc;
65 }
FwPrBool_t CrPsTestOnBoardConnectionPrgrG12(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N2.
FwPrBool_t CrPsTestOnBoardConnectionPrgrG11(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N1.
Create one instance of the CrPsCmd17s3Prgr procedure.
void CrPsTestOnBoardConnectionPrgrN4(FwPrDesc_t prDesc)
Action for node N4.
void CrPsTestOnBoardConnectionPrgrN2(FwPrDesc_t prDesc)
Action for node N2.
#define CrPsCmd17s3Prgr_N1
Make sure to include this header file only once.
FwPrDesc_t CrPsCmd17s3PrgrCreate(void *prData)
FW Profile function definitions.
void CrPsTestOnBoardConnectionPrgrN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsTestOnBoardConnectionPrgrN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrBool_t CrPsTestOnBoardConnectionPrgrG13(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N3.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved