CORDET Framework - C2 Implementation
CrFwOutStreamStub.c
Go to the documentation of this file.
1 
19 #include <stdlib.h>
20 #include "CrFwOutStreamStub.h"
21 #include "CrFwRepErrStub.h"
22 /* Include configuration files */
23 #include "CrFwOutStreamUserPar.h"
24 #include "CrFwCmpData.h"
25 /* Include FW Profile files */
26 #include "FwSmConstants.h"
27 #include "FwSmConfig.h"
28 #include "FwSmCore.h"
29 #include "FwPrConfig.h"
30 #include "FwPrCore.h"
31 #include "FwPrConstants.h"
32 /* Include framework files */
34 #include "BaseCmp/CrFwBaseCmp.h"
36 #include "Pckt/CrFwPckt.h"
37 #include "CrFwTime.h"
38 #include "CrFwRepErr.h"
39 
42 
45 
47 static CrFwBool_t checkFlag = 1;
48 
51 
54 
55 /* ---------------------------------------------------------------------------------------------*/
57  (void)(pckt);
59  return pcktHandOverFlag;
60 }
61 
62 /* ---------------------------------------------------------------------------------------------*/
64  return pcktHandOverCnt;
65 }
66 
67 /* ---------------------------------------------------------------------------------------------*/
69  return shutdownCnt;
70 }
71 
72 /* ---------------------------------------------------------------------------------------------*/
74  pcktHandOverFlag = flag;
75 }
76 
77 /* ---------------------------------------------------------------------------------------------*/
78 void CrFwOutStreamStubDummyCheck(FwPrDesc_t prDesc) {
79  CrFwCmpData_t* outStreamData = (CrFwCmpData_t*)FwPrGetData(prDesc);
80  outStreamData->outcome = (CrFwOutcome_t)checkFlag;
81 }
82 
83 /* ---------------------------------------------------------------------------------------------*/
85  checkFlag = flag;
86 }
87 
88 /* ---------------------------------------------------------------------------------------------*/
89 void CrFwOutStreamStubInitAction(FwPrDesc_t prDesc) {
90  CrFwCmpData_t* outStreamBaseData = (CrFwCmpData_t*)FwPrGetData(prDesc);
91  CrFwOutStreamData_t* cmpSpecificData = (CrFwOutStreamData_t*)outStreamBaseData->cmpSpecificData;
92  if (cmpSpecificData->seqCnt == NULL)
94  outStreamBaseData->outcome = (CrFwOutcome_t)actionFlag;
95 }
96 
97 /* ---------------------------------------------------------------------------------------------*/
98 void CrFwOutStreamStubConfigAction(FwPrDesc_t prDesc) {
99  CrFwCmpData_t* outStreamData = (CrFwCmpData_t*)FwPrGetData(prDesc);
101  outStreamData->outcome = (CrFwOutcome_t)actionFlag;
102 }
103 
104 /* ---------------------------------------------------------------------------------------------*/
106  actionFlag = flag;
107 }
108 
109 /* ---------------------------------------------------------------------------------------------*/
110 void CrFwOutStreamStubShutdown(FwSmDesc_t smDesc) {
111  shutdownCnt++;
113 }
void CrFwOutStreamDefConfigAction(FwPrDesc_t prDesc)
Default configuration action for an OutStream.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
Type for the Framework Component Data (FCD).
Definition: CrFwCmpData.h:79
Interface through which framework components access the current time.
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
Type for the data describing an OutStream.
Definition of the Framework Component Data (FCD) Type.
Interface for the OutStream stub.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
CrFwSeqCnt_t * seqCnt
Array holding sequence counters for the groups associated to the OutStream.
Definition of the OutStream component.
CrFwCounterU1_t CrFwOutStreamStubGetHandoverCnt()
Return the value of the handover counter which is incremented by the packet handover function in CrFw...
Interface for creating and accessing a report or command packet.
void CrFwOutStreamStubConfigAction(FwPrDesc_t prDesc)
Dummy implementation of a configuration action for an OutStream.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition: CrFwConstants.h:32
CrFwBool_t CrFwOutStreamStubPcktHandover(CrFwPckt_t pckt)
Stub function implementing the hand-over operation for the OutStream.
unsigned char CrFwOutcome_t
Type used for the outcome of a check (see CrFwCmpData).
Interface for reporting an error detected by a framework component.
static CrFwCounterU1_t pcktHandOverCnt
Counter incremented every time the packet hand-over operation is called.
void CrFwOutStreamStubSetCheckFlag(CrFwBool_t flag)
Set the value of the check flag which determines the outcome of the dummy check of CrFwOutStreamStubD...
void * cmpSpecificData
Derived data which are specific to each type of framework component.
Definition: CrFwCmpData.h:101
static CrFwCounterU1_t shutdownCnt
Counter incremented by stub Shutdown Operation.
void CrFwOutStreamStubDummyCheck(FwPrDesc_t prDesc)
Dummy implementation of an initialization or configuration check for an OutStream.
Definition of the utility functions for the CORDET Framework.
void CrFwOutStreamDefShutdownAction(FwSmDesc_t smDesc)
Default shutdown action for an OutStream.
void CrFwOutStreamDefInitAction(FwPrDesc_t prDesc)
Default initialization action for an OutStream.
void CrFwOutStreamStubSetHandoverFlag(CrFwBool_t flag)
Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStre...
void CrFwOutStreamStubInitAction(FwPrDesc_t prDesc)
Dummy implementation of a configuration action for an OutStream.
Definition of Base Component.
static CrFwCmpData_t outStreamData[CR_FW_NOF_OUTSTREAM]
The base data structures for the OutStream State Machines and their Procedures.
Definition: CrFwOutStream.c:80
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
void CrFwOutStreamStubShutdown(FwSmDesc_t smDesc)
Stub function implementing the shutdown operation for an OutStream.
void CrFwOutStreamStubSetActionFlag(CrFwBool_t flag)
Set the value of the action flag which determines the outcome of the initialization of configuration ...
User-modifiable parameters for the OutStream components (see CrFwOutStream.h).
static CrFwBool_t pcktHandOverFlag
Return value of the packet hand-over operation.
static CrFwBool_t checkFlag
Outcome of dummy check.
CrFwCounterU1_t CrFwOutStreamStubGetShutdownCnt()
Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFw...
static CrFwBool_t actionFlag
Outcome of dummy action.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved