CORDET Framework - C2 Implementation
CrFwInCmdSample1.c
Go to the documentation of this file.
1 
19 #include <stdlib.h>
20 /* Include configuration files */
21 #include "CrFwCmpData.h"
22 /* Include framework files */
23 #include "CrFwConstants.h"
24 #include "InCmd/CrFwInCmd.h"
25 #include "BaseCmp/CrFwBaseCmp.h"
26 #include "BaseCmp/CrFwInitProc.h"
27 #include "BaseCmp/CrFwResetProc.h"
30 #include "Pckt/CrFwPckt.h"
32 /* Include FW Profile files */
33 #include "FwPrConfig.h"
34 #include "FwPrDCreate.h"
35 #include "FwSmConfig.h"
36 #include "FwSmDCreate.h"
37 #include "FwPrCore.h"
38 
41 
44 
47 
50 
53 
56 
59 
62 
65 
68 
71 
74 
77 
78 /*-----------------------------------------------------------------------------------------*/
80  CrFwPckt_t pckt;
81  pckt = CrFwInCmdGetPcktFromPrDesc(prDesc);
83  return validityFlag;
84 }
85 
86 /*-----------------------------------------------------------------------------------------*/
88  return servType;
89 }
90 
91 /*-----------------------------------------------------------------------------------------*/
93  progressStepFlag = flag;
94 }
95 
96 /*-----------------------------------------------------------------------------------------*/
98  validityFlag = flag;
99 }
100 
101 /*-----------------------------------------------------------------------------------------*/
103  (void)(smDesc);
104  return readyFlag;
105 }
106 
107 /*-----------------------------------------------------------------------------------------*/
109  readyFlag = flag;
110 }
111 
112 /*-----------------------------------------------------------------------------------------*/
113 void CrFwInCmdSample1StartAction(FwSmDesc_t smDesc) {
115  startCounter++;
116 }
117 
118 /*-----------------------------------------------------------------------------------------*/
120  startOutcome = outcome;
121 }
122 
123 /*-----------------------------------------------------------------------------------------*/
125  return startCounter;
126 }
127 
128 /*-----------------------------------------------------------------------------------------*/
129 void CrFwInCmdSample1ProgressAction(FwSmDesc_t smDesc) {
130  CrFwProgressStepId_t progressStepId;
132  progressStepId = CrFwInCmdGetProgressStepId(smDesc);
133  if (progressStepFlag)
134  CrFwInCmdSetProgressStepId(smDesc,progressStepId+1);
135 
136  progressCounter++;
138 }
139 
140 /*-----------------------------------------------------------------------------------------*/
142  progressOutcome = outcome;
143 }
144 
145 /*-----------------------------------------------------------------------------------------*/
147  progressCompletionOutcome = outcome;
148 }
149 
150 /*-----------------------------------------------------------------------------------------*/
152  return progressCounter;
153 }
154 
155 /*-----------------------------------------------------------------------------------------*/
156 void CrFwInCmdSample1AbortAction(FwSmDesc_t smDesc) {
158  abortCounter++;
159 }
160 
161 /*-----------------------------------------------------------------------------------------*/
163  abortOutcome = outcome;
164 }
165 
166 /*-----------------------------------------------------------------------------------------*/
168  return abortCounter;
169 }
170 
171 /*-----------------------------------------------------------------------------------------*/
172 void CrFwInCmdSample1TerminationAction(FwSmDesc_t smDesc) {
175 }
176 
177 /*-----------------------------------------------------------------------------------------*/
179  terminationOutcome = outcome;
180 }
181 
182 /*-----------------------------------------------------------------------------------------*/
184  return terminationCounter;
185 
186 }
187 
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
static CrFwBool_t validityFlag
The Validity Flag.
Definition of the Framework Component Data (FCD) Type.
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
void CrFwInCmdSample1SetProgressActionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSetProgressStepId(FwSmDesc_t smDesc, CrFwProgressStepId_t stepId)
Set the progress step identifier of the InCommand.
Definition: CrFwInCmd.c:193
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
void CrFwInCmdSample1TerminationAction(FwSmDesc_t smDesc)
Implementation of the Termination Action Operation for the Sample 1 InCommand.
CrFwBool_t CrFwInCmdSample1ValidityCheck(FwPrDesc_t prDesc)
Implementation of the Validity Check Operation for the Sample 1 InCommand.
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:291
static CrFwOutcome_t abortOutcome
The Abort Action Outcome.
CrFwPckt_t CrFwInCmdGetPcktFromPrDesc(FwPrDesc_t prDesc)
Convenience function to extract the InCommand&#39;s packet from the descriptor of the InCommand&#39;s reset p...
Definition: CrFwInCmd.c:200
Definition of the OutFactory component.
static CrFwCounterU1_t progressCounter
The Progress Action Counter.
static CrFwCounterU1_t abortCounter
The abort Action Counter.
static CrFwOutcome_t terminationOutcome
The Termination Action Outcome.
Interface for creating and accessing a report or command packet.
CrFwCounterU1_t CrFwInCmdSample1GetStartActionCounter()
Get the value of the Start Action Counter (see CrFwInCmdSample1StartAction).
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition: CrFwConstants.h:32
Dummy Component Execution Procedure (CEP) for the Base Component.
void CrFwInCmdSample1SetTerminationActionOutcome(CrFwOutcome_t outcome)
Set the value of the Termination Action Outcome Counter (see CrFwInCmdSample1TerminationAction).
unsigned char CrFwOutcome_t
Type used for the outcome of a check (see CrFwCmpData).
Header file to define all invariant publicly available constants and types for the CORDET Framework...
CrFwCounterU1_t CrFwInCmdSample1GetTerminationActionCounter()
Get the value of the Termination Action Counter (see CrFwInCmdSample1TerminationAction).
static CrFwOutcome_t startOutcome
The Start Action Outcome.
CrFwCounterU1_t CrFwInCmdSample1GetProgressActionCounter()
Get the value of the Progress Action Counter (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetAbortActionOutcome(CrFwOutcome_t outcome)
Set the value of the Abort Action Outcome Counter (see CrFwInCmdSample1AbortAction).
static CrFwBool_t progressStepFlag
The Progress Step Flag.
void CrFwInCmdSample1SetStartActionOutcome(CrFwOutcome_t outcome)
Set the value of the Start Action Outcome Counter (see CrFwInCmdSample1StartAction).
Definition of the utility functions for the CORDET Framework.
void CrFwInCmdSample1AbortAction(FwSmDesc_t smDesc)
Implementation of the Abort Action Operation for the Sample 1 InCommand.
unsigned short CrFwProgressStepId_t
Type for the Progress Step Identifier of an InCommand.
CrFwCounterU1_t CrFwInCmdSample1GetAbortActionCounter()
Get the value of the Abort Action Counter (see CrFwInCmdSample1AbortAction).
void CrFwSetSmOutcome(FwSmDesc_t smDesc, CrFwOutcome_t outcome)
Convenience function to set the outcome of the last check or action of a state machine.
Definition of Base Component.
static CrFwServType_t servType
The InCommand type as computed in the Validity Check.
CrFwBool_t CrFwInCmdSample1ReadyCheck(FwSmDesc_t smDesc)
Implementation of the Ready Check Operation for the Sample 1 InCommand.
static CrFwBool_t readyFlag
The Ready Flag.
static CrFwOutcome_t progressCompletionOutcome
The Progress Action Completion Outcome.
Component Initialization Procedure (CIP) for the Base Component.
CrFwProgressStepId_t CrFwInCmdGetProgressStepId(FwSmDesc_t smDesc)
Return the progress step identifier of the InCommand.
Definition: CrFwInCmd.c:186
static CrFwCounterU1_t startCounter
The Start Action Counter.
static CrFwCounterU1_t terminationCounter
The Termination Action Counter.
void CrFwInCmdSample1SetReadyFlag(CrFwBool_t flag)
Set the value of the Ready Flag (see CrFwInCmdSample1ReadyCheck).
void CrFwInCmdSample1ProgressAction(FwSmDesc_t smDesc)
Implementation of the Progress Action Operation for the Sample 1 InCommand.
void CrFwInCmdSample1StartAction(FwSmDesc_t smDesc)
Implementation of the Start Action Operation for the Sample 1 InCommand.
static CrFwOutcome_t progressOutcome
The Progress Action Outcome.
CrFwServType_t CrFwInCmdSample1GetType()
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
unsigned char CrFwServType_t
Type used for the service type of a command or report.
Component Reset Procedure (CRP) for the Base Component.
Definition of the InCommand Component of the framework.
void CrFwInCmdSample1SetProgressActionCompletionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Completion Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetProgressStepFlag(CrFwBool_t flag)
Sets the progress step flag used by the progress action of the sample InCommand (if the flag is set...
void CrFwInCmdSetProgressActionCompleted(FwSmDesc_t smDesc, CrFwBool_t progressActionCompleted)
Set the Completion Outcome of the progress action.
Definition: CrFwInCmd.c:422
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved