CORDET Framework - C2 Implementation
CrPsRep3s25ReadyCreate.c
Go to the documentation of this file.
1 
24 #include "CrFwConstants.h"
25 
26 #include "CrPsRep3s25ReadyCreate.h"
27 
29 #include "FwPrDCreate.h"
30 #include "FwPrConfig.h"
31 
33 #include <stdlib.h>
34 
36 FwPrBool_t CrPsRep3s25ReadyG1E(FwPrDesc_t prDesc)
37 {
38  CRFW_UNUSED(prDesc);
39  return 1;
40 }
41 
43 FwPrBool_t CrIaReadyChk3s25ReadyGoToDec(FwPrDesc_t prDesc)
44 {
45  CRFW_UNUSED(prDesc);
46  return 1;
47 }
48 
49 /* ----------------------------------------------------------------------------------------------------------------- */
50 FwPrDesc_t CrPsRep3s25ReadyCreate(void* prData)
51 {
52  const FwPrCounterU2_t DECISION1 = 1; /* The identifier of decision node DECISION1 in procedure CrPsRep3s25Ready */
53  const FwPrCounterU2_t N_OUT_OF_DECISION1 = 2; /* The number of control flows out of decision node DECISION1 in procedure CrPsRep3s25Ready */
54  const FwPrCounterU2_t DECISION2 = 2; /* The identifier of decision node DECISION2 in procedure CrPsRep3s25Ready */
55  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 3; /* The number of control flows out of decision node DECISION2 in procedure CrPsRep3s25Ready */
56 
58  FwPrDesc_t prDesc = FwPrCreate(
59  4, /* N_ANODES - The number of action nodes */
60  2, /* N_DNODES - The number of decision nodes */
61  10, /* N_FLOWS - The number of control flows */
62  4, /* N_ACTIONS - The number of actions */
63  6 /* N_GUARDS - The number of guards */
64  );
65 
67  FwPrSetData(prDesc, prData);
68  FwPrAddActionNode(prDesc, CrPsRep3s25Ready_N1, &CrPsRep3s25ReadyN1);
69  FwPrAddDecisionNode(prDesc, DECISION1, N_OUT_OF_DECISION1);
70  FwPrAddActionNode(prDesc, CrPsRep3s25Ready_N2, &CrPsRep3s25ReadyN2);
71  FwPrAddActionNode(prDesc, CrPsRep3s25Ready_N3, &CrPsRep3s25ReadyN3);
72  FwPrAddActionNode(prDesc, CrPsRep3s25Ready_N4, &CrPsRep3s25ReadyN4);
73  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
74  FwPrAddFlowActToDec(prDesc, CrPsRep3s25Ready_N1, DECISION1, NULL);
75  FwPrAddFlowIniToAct(prDesc, CrPsRep3s25Ready_N1, NULL);
76  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsRep3s25Ready_N3, &CrPsRep3s25ReadyG1);
77  FwPrAddFlowDecToAct(prDesc, DECISION1, CrPsRep3s25Ready_N2, &CrPsRep3s25ReadyG1E);
78  FwPrAddFlowActToAct(prDesc, CrPsRep3s25Ready_N2, CrPsRep3s25Ready_N4, NULL);
79  FwPrAddFlowActToAct(prDesc, CrPsRep3s25Ready_N3, CrPsRep3s25Ready_N4, NULL);
80  FwPrAddFlowActToDec(prDesc, CrPsRep3s25Ready_N4, DECISION2, &CrPsRep3s25ReadyG2);
81  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsRep3s25Ready_N1, &CrIaReadyChk3s25ReadyGoToRst);
82  FwPrAddFlowDecToFin(prDesc, DECISION2, &CrPsRep3s25ReadyGoToFin);
83  FwPrAddFlowDecToDec(prDesc, DECISION2, DECISION1, &CrIaReadyChk3s25ReadyGoToDec);
84 
85  return prDesc;
86 }
FwPrBool_t CrPsRep3s25ReadyG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION1 to N3.
FwPrBool_t CrIaReadyChk3s25ReadyGoToDec(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to DECISION1.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
FwPrDesc_t CrPsRep3s25ReadyCreate(void *prData)
Create a new procedure descriptor.
FwPrBool_t CrIaReadyChk3s25ReadyGoToRst(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N1.
void CrPsRep3s25ReadyN2(FwPrDesc_t prDesc)
Action for node N2.
void CrPsRep3s25ReadyN3(FwPrDesc_t prDesc)
Action for node N3.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
void CrPsRep3s25ReadyN1(FwPrDesc_t prDesc)
Action for node N1.
void CrPsRep3s25ReadyN4(FwPrDesc_t prDesc)
Action for node N4.
FwPrBool_t CrPsRep3s25ReadyG1E(FwPrDesc_t prDesc)
FW Profile function definitions.
Create one instance of the CrPsRep3s25Ready procedure.
FwPrBool_t CrPsRep3s25ReadyG2(FwPrDesc_t prDesc)
Guard on the Control Flow from N4 to DECISION2.
#define CrPsRep3s25Ready_N1
Make sure to include this header file only once.
FwPrBool_t CrPsRep3s25ReadyGoToFin(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to Final Node.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved