CORDET Framework - C2 Implementation
CrPsCmdVerFailCreate.c
Go to the documentation of this file.
1 
24 #include "CrPsCmdVerFailCreate.h"
25 
27 #include "FwPrDCreate.h"
28 #include "FwPrConfig.h"
29 
30 #include <CrFwConstants.h>
32 #include <stdlib.h>
33 
34 
35 /* ----------------------------------------------------------------------------------------------------------------- */
37 FwPrBool_t CrPsCmdVerFailG1E(FwPrDesc_t prDesc)
38 {
39  CRFW_UNUSED(prDesc);
40  /* [ Else ] */
41  return 1;
42 }
43 
44 /* ----------------------------------------------------------------------------------------------------------------- */
45 FwPrDesc_t CrPsCmdVerFailCreate(void* prData)
46 {
47  const FwPrCounterU2_t DECISION2 = 1; /* The identifier of decision node DECISION2 in procedure CrPsCmdVerFail */
48  const FwPrCounterU2_t N_OUT_OF_DECISION2 = 2; /* The number of control flows out of decision node DECISION2 in procedure CrPsCmdVerFail */
49 
51  FwPrDesc_t prDesc = FwPrCreate(
52  5, /* N_ANODES - The number of action nodes */
53  1, /* N_DNODES - The number of decision nodes */
54  8, /* N_FLOWS - The number of control flows */
55  5, /* N_ACTIONS - The number of actions */
56  2 /* N_GUARDS - The number of guards */
57  );
58 
60  FwPrSetData(prDesc, prData);
61  FwPrAddActionNode(prDesc, CrPsCmdVerFail_N2, &CrPsCmdVerFailN2);
62  FwPrAddDecisionNode(prDesc, DECISION2, N_OUT_OF_DECISION2);
63  FwPrAddActionNode(prDesc, CrPsCmdVerFail_N3, &CrPsCmdVerFailN3);
64  FwPrAddActionNode(prDesc, CrPsCmdVerFail_N4, &CrPsCmdVerFailN4);
65  FwPrAddActionNode(prDesc, CrPsCmdVerFail_N5, &CrPsCmdVerFailN5);
66  FwPrAddActionNode(prDesc, CrPsCmdVerFail_N6, &CrPsCmdVerFailN6);
67  FwPrAddFlowIniToAct(prDesc, CrPsCmdVerFail_N2, NULL);
68  FwPrAddFlowActToDec(prDesc, CrPsCmdVerFail_N2, DECISION2, NULL);
69  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmdVerFail_N3, &CrPsCmdVerFailG1);
70  FwPrAddFlowDecToAct(prDesc, DECISION2, CrPsCmdVerFail_N4, &CrPsCmdVerFailG1E);
71  FwPrAddFlowActToFin(prDesc, CrPsCmdVerFail_N3, NULL);
72  FwPrAddFlowActToAct(prDesc, CrPsCmdVerFail_N4, CrPsCmdVerFail_N5, NULL);
73  FwPrAddFlowActToAct(prDesc, CrPsCmdVerFail_N5, CrPsCmdVerFail_N6, NULL);
74  FwPrAddFlowActToFin(prDesc, CrPsCmdVerFail_N6, NULL);
75 
76  return prDesc;
77 }
FwPrBool_t CrPsCmdVerFailG1E(FwPrDesc_t prDesc)
FW Profile function definitions.
void CrPsCmdVerFailN4(FwPrDesc_t prDesc)
Action for node N4.
#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 CrPsCmdVerFailCreate(void *prData)
Create a new procedure descriptor.
void CrPsCmdVerFailN5(FwPrDesc_t prDesc)
Action for node N5.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
void CrPsCmdVerFailN2(FwPrDesc_t prDesc)
Action for node N2.
void CrPsCmdVerFailN6(FwPrDesc_t prDesc)
Action for node N6.
void CrPsCmdVerFailN3(FwPrDesc_t prDesc)
Action for node N3.
FwPrBool_t CrPsCmdVerFailG1(FwPrDesc_t prDesc)
Guard on the Control Flow from DECISION2 to N3.
#define CrPsCmdVerFail_N2
Make sure to include this header file only once.
Create one instance of the CrPsCmdVerFail procedure.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved