CORDET Framework - C2 Implementation
CrFwRepInCmdOutcome.c
Go to the documentation of this file.
1 
42 #include <stdlib.h>
43 /* Include Framework Files */
44 #include "CrFwConstants.h"
45 #include "CrFwRepInCmdOutcome.h"
46 #include "Pckt/CrFwPckt.h"
47 /* Include Configuration Files */
49 
51 #define CR_FW_INCMD_OUTCOME_REP_ARRAY_SIZE 10
52 
54 typedef struct {
68  FwSmDesc_t inCmd;
70 
73 
77 
78 /*-----------------------------------------------------------------------------------------*/
80  return inCmdOutcomeRepPos;
81 }
82 
83 /*-----------------------------------------------------------------------------------------*/
86 }
87 
88 /*-----------------------------------------------------------------------------------------*/
91 
99 
101 }
102 
103 /*-----------------------------------------------------------------------------------------*/
105 
113 
115 }
116 
117 
118 
119 /*-----------------------------------------------------------------------------------------*/
121  return inCmdOutcomeRepArray[repPos].outcome;
122 }
123 
124 /*-----------------------------------------------------------------------------------------*/
126  return inCmdOutcomeRepArray[repPos].failCode;
127 }
128 
129 /*-----------------------------------------------------------------------------------------*/
131  return inCmdOutcomeRepArray[repPos].instanceId;
132 }
133 
134 /*-----------------------------------------------------------------------------------------*/
136  return inCmdOutcomeRepArray[repPos].servType;
137 }
138 
139 /*-----------------------------------------------------------------------------------------*/
141  return inCmdOutcomeRepArray[repPos].servSubType;
142 }
143 
144 /*-----------------------------------------------------------------------------------------*/
146  return inCmdOutcomeRepArray[repPos].discriminant;
147 }
148 
Header file to define all invariant publicly available constants and types for the CORDET Framework.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
static CrFwServType_t servType
The InCommand type as computed in the Validity Check.
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
Definition: CrFwInFactory.c:58
static CrFwDiscriminant_t disc
Discriminant.
static CrFwServSubType_t servSubType
Service sub-type.
Interface for creating and accessing a report or command packet.
CrFwServSubType_t CrFwPcktGetServSubType(CrFwPckt_t pckt)
Return the service sub-type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:333
CrFwInstanceId_t CrFwPcktGetCmdRepId(CrFwPckt_t pckt)
Return the command or report identifier of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:369
CrFwDiscriminant_t CrFwPcktGetDiscriminant(CrFwPckt_t pckt)
Return the discriminant of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:303
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:321
static CrFwCounterU2_t inCmdOutcomeRepPos
The position in the InCommand Outcome Report array at which the next InCommand Outcome Report will be...
CrFwRepInCmdOutcome_t CrFwRepInCmdOutcomeStubGetOutcome(CrFwCounterU2_t repPos)
Return the outcome of the InCommand Outcome Report at position repPos.
void CrFwRepInCmdOutcomeStubReset()
Reset the InCommand Outcome Reporting interface.
CrFwOutcome_t CrFwRepInCmdOutcomeStubGetFailCode(CrFwCounterU2_t repPos)
Return the failure code of the InCommand Outcome Report at position repPos.
void CrFwRepInCmdOutcome(CrFwRepInCmdOutcome_t outcome, CrFwInstanceId_t instanceId, CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t disc, CrFwOutcome_t failCode, FwSmDesc_t inCmd)
Report the outcome of the processing of an InCommand.
CrFwServSubType_t CrFwRepInCmdOutcomeStubGetServSubType(CrFwCounterU2_t repPos)
Return the service sub-type of the InCommand Outcome Report at position repPos.
void CrFwRepInCmdOutcomeCreFail(CrFwRepInCmdOutcome_t outcome, CrFwOutcome_t failCode, CrFwPckt_t pckt)
Report the a "creation failure" outcome for the processing of a packet carrying an InCommand.
CrFwDiscriminant_t CrFwRepInCmdOutcomeStubGetDiscriminant(CrFwCounterU2_t repPos)
Return the discriminant of the InCommand Outcome Report at position repPos.
#define CR_FW_INCMD_OUTCOME_REP_ARRAY_SIZE
The size of the InCommand Outcome Report array.
static CrFwInCmdOutcomeRep_t inCmdOutcomeRepArray[CR_FW_INCMD_OUTCOME_REP_ARRAY_SIZE]
The InCommand Outcome Report array.
CrFwInstanceId_t CrFwRepInCmdOutcomeStubGetInstanceId(CrFwCounterU2_t repPos)
Return the instance identifier of the InCommand Outcome Report at position repPos.
CrFwCounterU2_t CrFwRepInCmdOutcomeStubGetPos()
Return the position in the InCommand Outcome Report array at which the next outcome report will be wr...
CrFwServType_t CrFwRepInCmdOutcomeStubGetServType(CrFwCounterU2_t repPos)
Return the service type of the InCommand Outcome Report at position repPos.
Interface for reporting the outcome of the processing of an InCommand.
CrFwRepInCmdOutcome_t
Enumerated type for the outcome of the processing of an incoming command.
The CORDET Framework defines an interface for reporting the outcome of an InCommand (see CrFwRepInCmd...
unsigned char CrFwOutcome_t
Type used for the outcome of a check (see CrFwCmpData).
unsigned char CrFwServType_t
Type used for the service type of a command or report.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
unsigned short CrFwDiscriminant_t
Type used for the discriminant of a command or report.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
unsigned char CrFwServSubType_t
Type used for the command or report sub-type.
The structure for an InCommand Outcome Report.
CrFwRepInCmdOutcome_t outcome
The outcome of the InCommand.
CrFwDiscriminant_t discriminant
The discriminant of the InCommand whose outcome is being reported.
CrFwInstanceId_t instanceId
The instance identifier of the InCommand whose outcome is being reported.
FwSmDesc_t inCmd
The inCmd where the error occurred (NB: this is a pointer!)
CrFwOutcome_t failCode
The failure code (only meaningful for failure outcomes)
CrFwServType_t servType
The service type of the InCommand whose outcome is being reported.
CrFwServSubType_t servSubType
The service sub-type of the InCommand whose outcome is being reported.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved