23 #include "FwSmConstants.h"
24 #include "FwSmConfig.h"
26 #include "FwPrConfig.h"
28 #include "FwPrConstants.h"
45 FwSmDesc_t inFactory1, inFactory2;
49 if (inFactory1 == NULL)
54 if (inFactory1 != inFactory2)
58 if (FwSmCheckRec(inFactory1) != smSuccess)
156 if (inCmdArray[i]==NULL)
190 FwSmDesc_t inCmd1, inCmd2, inCmd3;
287 FwSmDesc_t inCmd1, inCmd2, inCmd3;
419 if (inRepArray[i]==NULL)
453 FwSmDesc_t inRep1, inRep2, inRep3;
549 FwSmDesc_t inRep1, inRep2, inRep3;
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
#define CR_FW_INFACTORY_TYPE
Type identifier for the InFactory component.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetNOfAllocatedInCmd()
Return the number of InCommands which are currently allocated.
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
CrFwInFactoryPoolIndex_t CrFwInFactoryGetMaxNOfInCmd()
Return the maximum number of InCommands which may be allocated at any one time.
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetMaxNOfInRep()
Return the maximum number of InReports which may be allocated at any one time.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetNOfAllocatedInRep()
Return the number of InReports which are currently allocated.
static FwSmDesc_t inRep[CR_FW_INFACTORY_MAX_NOF_INREP]
The pre-allocated InReport instances.
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
void CrFwInFactoryReleaseInRep(FwSmDesc_t inRepInstance)
Release function for an InReport.
FwSmDesc_t CrFwInFactoryMakeInRep(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming report (InReport).
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
Definition of the InFactory component.
CrFwBool_t CrFwInFactoryTestCase2()
Test the InCommand creation service in non-nominal situations where the creation fails.
CrFwBool_t CrFwInFactoryTestCase6()
Test the InReport part of the Reset and Shutdown functions of the InFactory component.
CrFwBool_t CrFwInFactoryTestCase3()
Test the InCommand part of the Reset and Shutdown functions of the InFactory component.
CrFwBool_t CrFwInFactoryTestCase5()
Test the InReport creation service in non-nominal situations where the creation fails.
CrFwBool_t CrFwInFactoryTestCase7()
Test the InReport part of the Release function of the InFactory component.
CrFwBool_t CrFwInFactoryTestCase1()
Test the creation and configuration of the InFactory singleton component.
CrFwBool_t CrFwInFactoryTestCase4()
Test the InCommand part of the Release function of the InFactory component.
Declaration of the test cases for the InFactory Component (see CrFwInFactory.h).
User-modifiable parameters for the InFactory component (see CrFwInFactory.h).
#define CR_FW_INFACTORY_MAX_NOF_INCMD
The maximum number of components representing an incoming command which may be allocated at any one t...
#define CR_FW_INFACTORY_MAX_NOF_INREP
The maximum number of InReports which may be allocated at any one time.
Definition of the InRegistry Component.
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h).
Interface for creating and accessing a report or command packet.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
Interface for reporting an error detected by a framework component.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr....
Interface through which framework components access the current time.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
@ crIllInRepKind
A framework function was called with an illegal type/sub-type/discriminant triplet for an InReport.
@ crInCmdAllocationFail
Allocation request for a packet for an InCommand has failed (see CrFwInFactoryMakeInCmd).
@ crNoAppErr
No application errors have been detected.
@ crInRepAllocationFail
Allocation request for an InReport has failed (see CrFwInFactoryMakeInRep).
@ crIllInCmdKind
A framework function was called with an illegal type/sub-type/discriminant triplet for an InCommand.
@ crInRepRelErr
An InReport release request has encountered an error (see CrFwInFactoryReleaseInRep).
@ crInCmdRelErr
An InCommand release request has encountered an error (see CrFwInFactoryReleaseInCmd).
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Definition of the utility functions for the CORDET Framework.