25 #include "FwSmConstants.h"
26 #include "FwSmConfig.h"
28 #include "FwPrConfig.h"
30 #include "FwPrConstants.h"
50 FwSmDesc_t inManager1, inManagerIll;
87 if (inManagerIll != NULL)
107 FwSmDesc_t inRep1, inCmd1;
146 if (loadOutcome != 1)
154 if (loadOutcome != 1)
185 if (loadOutcome != 0)
230 FwSmDesc_t sampleInRep;
231 FwSmCounterU3_t execCnt;
275 execCnt = FwSmGetExecCnt(sampleInRep);
282 if (FwSmGetExecCnt(sampleInRep) != execCnt+1)
307 FwSmDesc_t sampleInCmd;
308 FwSmCounterU3_t execCnt;
358 execCnt = FwSmGetExecCnt(sampleInCmd);
365 if (FwSmGetExecCnt(sampleInCmd) != execCnt+2)
382 if (FwSmGetExecCnt(sampleInCmd) != execCnt+3)
409 FwSmDesc_t sampleInCmd;
410 FwSmCounterU3_t execCnt;
460 execCnt = FwSmGetExecCnt(sampleInCmd);
467 if (FwSmGetExecCnt(sampleInCmd) != execCnt+1)
494 FwSmDesc_t sampleInCmd1, sampleInCmd2, inRep1, inRep2, inRep3, inRep4;
664 FwSmDesc_t sampleInCmd1, sampleInCmd2, inRep1, inRep2;
763 FwSmDesc_t sampleInCmd1, sampleInCmd2, inRep1, inRep2;
849 FwSmStart(inManager3);
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
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.
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute 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.
#define CR_FW_INMANAGER_TYPE
Type identifier for the InManager component.
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").
CrFwBool_t CrFwInCmdIsInProgress(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state PROGRESS.
CrFwBool_t CrFwInCmdIsInAborted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ABORTED.
CrFwBool_t CrFwInCmdIsInTerminated(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state TERMINATED.
Definition of the InCommand Component of the framework.
void CrFwInCmdSample1SetReadyFlag(CrFwBool_t flag)
Set the value of the Ready Flag (see CrFwInCmdSample1ReadyCheck).
void CrFwInCmdSample1SetProgressActionCompletionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Completion Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetProgressActionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetStartActionOutcome(CrFwOutcome_t outcome)
Set the value of the Start Action Outcome Counter (see CrFwInCmdSample1StartAction).
void CrFwInCmdSample1SetTerminationActionOutcome(CrFwOutcome_t outcome)
Set the value of the Termination Action Outcome Counter (see CrFwInCmdSample1TerminationAction).
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
Sample InCommand used in the Test Suite.
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 CrFwInFactoryGetNOfAllocatedInRep()
Return the number of InReports which are currently allocated.
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
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 CrFwInManagerLoad(FwSmDesc_t smDesc, FwSmDesc_t inCmp)
Load a new InReport or InCommand into the InManager.
CrFwCounterU2_t CrFwInManagerGetNOfLoadedInCmp(FwSmDesc_t smDesc)
Return the number of InReport or InCommands successfully loaded since the InManager was last reset.
CrFwCounterU1_t CrFwInManagerGetNOfPendingInCmp(FwSmDesc_t smDesc)
Return the number of InReport or InCommands currently in the PCRL of an InManager.
FwSmDesc_t CrFwInManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InManager State Machine instance.
CrFwCounterU1_t CrFwInManagerGetPCRLSize(FwSmDesc_t smDesc)
Return the size of the PCRL of an InManager.
CrFwBool_t CrFwInManagerTestCase7()
Check the reset function of an InManager.
CrFwBool_t CrFwInManagerTestCase8()
Check the shutdown function of an InManager.
CrFwBool_t CrFwInManagerTestCase3()
Check the execution function of an InManager with one single InReport loaded.
CrFwBool_t CrFwInManagerTestCase5()
Check the execution function of an InManager with one InCommand loaded.
CrFwBool_t CrFwInManagerTestCase1()
Check the configuration of a newly created InManager.
CrFwBool_t CrFwInManagerTestCase6()
Check the execution function of an InManager with several InReports and InCommands loaded.
CrFwBool_t CrFwInManagerTestCase4()
Check the execution function of an InManager with one InCommand loaded.
CrFwBool_t CrFwInManagerTestCase2()
Check the load function of an InManager.
Declaration of the test cases for the InManager Component (see CrFwInManager.h).
User-modifiable parameters for the InManager components (see CrFwInManager.h).
#define CR_FW_NOF_INMANAGER
The number of InManager components in the application.
FwSmDesc_t CrFwInRegistryMake()
Factory function for the singleton instance of the InRegistry.
static FwSmDesc_t inRegistry
The InRegistry singleton.
CrFwInRegistryCmdRepState_t CrFwInRegistryGetState(CrFwInstanceId_t cmdRepId)
Query the InRegistry for the state of an incoming command or report.
Definition of the InRegistry Component.
@ crInRegistryAborted
Incoming command has been aborted.
@ crInRegistryTerminated
Incoming command or report has completed execution.
@ crInRegistryPending
Incoming command or report is pending (waiting to be sent)
User-modifiable parameters for the InRegistry component (see CrFwInRegistry.h).
Definition of the InReport Component of the framework.
void CrFwInRepSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInRepSample1ValidityCheck).
Sample InReport used in the Test Suite.
User-modifiable parameters for the OutFactory component (see CrFwOutFactory.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 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 CrFwPcktSetAckLevel(CrFwPckt_t pckt, CrFwBool_t accept, CrFwBool_t start, CrFwBool_t progress, CrFwBool_t term)
Set the acknowledge level for the command encapsulated in a packet.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written.
CrFwTypeId_t CrFwRepErrStubGetTypeId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
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.
@ crInManagerPcrlFull
The Pending Command/Report List (PCRL) of an InManager is full (see CrFwInManager....
@ crInManagerIllId
A framework function has been called with an illegal InManager identifier.
@ crNoAppErr
No application errors have been detected.
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.