CORDET Framework - C2 Implementation
CrPsPcktReroutingFailCreate.c
Go to the documentation of this file.
1 
25 
27 #include "FwPrDCreate.h"
28 #include "FwPrConfig.h"
29 #include <CrFwConstants.h>
31 #include <stdlib.h>
32 
33 
34 /* ----------------------------------------------------------------------------------------------------------------- */
36 FwPrBool_t CrPsPcktReroutingFailG2E(FwPrDesc_t prDesc)
37 {
38  CRFW_UNUSED(prDesc);
39  /* [ Else ] */
40  return 1;
41 }
42 
43 /* ----------------------------------------------------------------------------------------------------------------- */
44 FwPrDesc_t CrPsPcktReroutingFailCreate(void* prData)
45 {
46  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsPcktReroutingFail */
47  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsPcktReroutingFail */
48  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsPcktReroutingFail */
49  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsPcktReroutingFail */
50 
52  FwPrDesc_t prDesc = FwPrCreate(
53  6, /* N_ANODES - The number of action nodes */
54  2, /* N_DNODES - The number of decision nodes */
55  11, /* N_FLOWS - The number of control flows */
56  6, /* N_ACTIONS - The number of actions */
57  4 /* N_GUARDS - The number of guards */
58  );
59 
61  FwPrSetData(prDesc, prData);
62  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N1, &CrPsPcktReroutingFailN1);
63  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
64  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N2, &CrPsPcktReroutingFailN2);
65  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
66  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N3, &CrPsPcktReroutingFailN3);
67  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N4, &CrPsPcktReroutingFailN4);
68  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N5, &CrPsPcktReroutingFailN5);
69  FwPrAddActionNode(prDesc, CrPsPcktReroutingFail_N6, &CrPsPcktReroutingFailN6);
70  FwPrAddFlowIniToDec(prDesc, DECISION1, NULL);
71  FwPrAddFlowActToFin(prDesc, CrPsPcktReroutingFail_N1, NULL);
72  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsPcktReroutingFail_N1, &CrPsPcktReroutingFailG1);
73  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsPcktReroutingFail_N2, &CrPsPcktReroutingFailG1E);
74  FwPrAddFlowActToDec(prDesc, CrPsPcktReroutingFail_N2, DECISION2, NULL);
75  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsPcktReroutingFail_N3, &CrPsPcktReroutingFailG2);
76  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsPcktReroutingFail_N4, &CrPsPcktReroutingFailG2E);
77  FwPrAddFlowActToFin(prDesc, CrPsPcktReroutingFail_N3, NULL);
78  FwPrAddFlowActToAct(prDesc, CrPsPcktReroutingFail_N4, CrPsPcktReroutingFail_N5, NULL);
79  FwPrAddFlowActToAct(prDesc, CrPsPcktReroutingFail_N5, CrPsPcktReroutingFail_N6, NULL);
80  FwPrAddFlowActToFin(prDesc, CrPsPcktReroutingFail_N6, NULL);
81 
82  return prDesc;
83 }
#define CrPsPcktReroutingFail_N1
Make sure to include this header file only once.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
void CrPsPcktReroutingFailN6(FwPrDesc_t prDesc)
Action for node N6.
FwPrBool_t CrPsPcktReroutingFailG1E(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N2.
void CrPsPcktReroutingFailN4(FwPrDesc_t prDesc)
Action for node N4.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
FwPrDesc_t CrPsPcktReroutingFailCreate(void *prData)
Create a new procedure descriptor.
FwPrBool_t CrPsPcktReroutingFailG2(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N3.
FwPrBool_t CrPsPcktReroutingFailG2E(FwPrDesc_t prDesc)
FW Profile function definitions.
void CrPsPcktReroutingFailN1(FwPrDesc_t prDesc)
Action for node N1.
FwPrBool_t CrPsPcktReroutingFailG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N1.
void CrPsPcktReroutingFailN5(FwPrDesc_t prDesc)
Action for node N5.
void CrPsPcktReroutingFailN3(FwPrDesc_t prDesc)
Action for node N3.
void CrPsPcktReroutingFailN2(FwPrDesc_t prDesc)
Action for node N2.
Create one instance of the CrPsPcktReroutingFail procedure.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved