CORDET Framework - C2 Implementation
CrFwInRepSample1.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 "InRep/CrFwInRep.h"
25 #include "BaseCmp/CrFwBaseCmp.h"
26 #include "BaseCmp/CrFwInitProc.h"
27 #include "BaseCmp/CrFwResetProc.h"
30 #include "Pckt/CrFwPckt.h"
31 /* Include FW Profile files */
32 #include "FwPrConfig.h"
33 #include "FwPrDCreate.h"
34 #include "FwSmConfig.h"
35 #include "FwSmDCreate.h"
36 #include "FwPrCore.h"
37 
40 
43 
46 
49 
50 /*-----------------------------------------------------------------------------------------*/
52  CrFwPckt_t inRepPckt;
53  inRepPckt = CrFwInRepGetPcktFromPrDesc(prDesc);
54  servType = CrFwPcktGetServType(inRepPckt);
55  return validityFlag;
56 }
57 
58 /*-----------------------------------------------------------------------------------------*/
60  validityFlag = flag;
61 }
62 
63 /*-----------------------------------------------------------------------------------------*/
64 void CrFwInRepSample1UpdateAction(FwPrDesc_t prDesc) {
65  CrFwCmpData_t* cmpData = (CrFwCmpData_t*)FwPrGetData(prDesc);
66  cmpData->outcome = updateOutcome;
67  updateCounter++;
68 }
69 
70 /*-----------------------------------------------------------------------------------------*/
72  updateOutcome = outcome;
73 }
74 
75 /*-----------------------------------------------------------------------------------------*/
77  return updateCounter;
78 }
79 
80 /*-----------------------------------------------------------------------------------------*/
82  return servType;
83 }
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
Type for the Framework Component Data (FCD).
Definition: CrFwCmpData.h:79
CrFwCounterU1_t CrFwInRepSample1GetUpdateActionCounter()
Get the value of the Update Action Counter (see CrFwInRepSample1UpdateAction).
CrFwOutcome_t outcome
The outcome of an action or check executed by a state machine or by one of its procedures.
Definition: CrFwCmpData.h:93
Definition of the Framework Component Data (FCD) Type.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:291
Definition of the OutFactory component.
Interface for creating and accessing a report or command packet.
static CrFwServType_t servType
The InReport&#39;s type computed by the Validity Check.
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.
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...
static CrFwCounterU1_t updateCounter
The Update Action Counter.
Definition of the InReport Component of the framework.
void CrFwInRepSample1SetUpdateActionOutcome(CrFwOutcome_t outcome)
Set the value of the Update Action Outcome (see CrFwInRepSample1UpdateAction).
static CrFwOutcome_t updateOutcome
The Update Action Outcome.
CrFwBool_t CrFwInRepSample1ValidityCheck(FwPrDesc_t prDesc)
Implementation of the Validity Check Operation for the Sample 1 InReport.
void CrFwInRepSample1UpdateAction(FwPrDesc_t prDesc)
Implementation of the Update Action Operation for the Sample 1 InReport.
Definition of Base Component.
static CrFwBool_t validityFlag
The Validity Flag.
Component Initialization Procedure (CIP) for the Base Component.
CrFwServType_t CrFwInRepSample1GetType()
Get the value of the InReport&#39;s type as it is computed by the Validity Check (see CrFwInRepSample1Val...
void CrFwInRepSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInRepSample1ValidityCheck).
unsigned char CrFwServType_t
Type used for the service type of a command or report.
Component Reset Procedure (CRP) for the Base Component.
CrFwPckt_t CrFwInRepGetPcktFromPrDesc(FwPrDesc_t prDesc)
Convenience function to extract the InReport&#39;s packet from the descriptor of the InReport&#39;s execution...
Definition: CrFwInRep.c:121
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved