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