24 #include "FwSmConstants.h" 25 #include "FwSmConfig.h" 27 #include "FwPrConfig.h" 29 #include "FwPrConstants.h" 100 if (FwSmCheck(inCmd1) != 1)
102 if (FwSmCheck(inCmd2) != 1)
424 if (FwSmCheck(inCmd) != smSuccess)
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
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.
Type for the Framework Component Data (FCD).
Interface through which framework components access the current time.
CrFwBool_t CrFwInCmdTestCase1()
Check the configuration of a newly created InCommand.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
CrFwBool_t CrFwInCmdTestCase12()
Check the parameters of the "successful" outcome reports of an InCommand.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition of the Framework Component Data (FCD) Type.
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
void CrFwInCmdSample1SetProgressActionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Outcome (see CrFwInCmdSample1ProgressAction).
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
The CORDET Framework defines an interface for reporting the outcome of an InCommand (see CrFwRepInCmd...
CrFwPckt_t CrFwPcktGetParStart(CrFwPckt_t pckt)
Return the start address of the packet's parameter area.
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
CrFwBool_t CrFwInCmdIsInAborted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ABORTED.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
User-modifiable parameters for the InFactory component (see CrFwInFactory.h).
CrFwBool_t CrFwInCmdIsInProgress(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state PROGRESS.
CrFwBool_t CrFwInCmdTestCase7()
Check the transition from state PROGRESS to state ABORTED for an InCommand which has failed one progr...
CrFwPckt_t pckt
Packet holding the InCommand.
CrFwInstanceId_t CrFwRepInCmdOutcomeStubGetInstanceId(CrFwCounterU2_t repPos)
Return the instance identifier of the InCommand Outcome Report at position repPos.
void CrFwRepInCmdOutcomeStubReset()
Reset the InCommand Outcome Reporting interface.
CrFwBool_t CrFwInCmdTestCase5()
Check the behaviour of the InCommand in state PROGRESS.
CrFwBool_t CrFwInCmdTestCase9()
Check the generation of the "start successful" outcome report of an InCommand.
CrFwBool_t CrFwInCmdTestCase4()
Check the failure of the Validity Check of an InCommand.
CrFwOutcome_t CrFwRepInCmdOutcomeStubGetFailCode(CrFwCounterU2_t repPos)
Return the failure code of the InCommand Outcome Report at position repPos.
Interface for creating and accessing a report or command packet.
CrFwBool_t CrFwInCmdTestCase8()
Check the indirect transition from state PROGRESS to state TERMINATED for an InCommand after one prog...
CrFwCounterU1_t CrFwInCmdSample1GetStartActionCounter()
Get the value of the Start Action Counter (see CrFwInCmdSample1StartAction).
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
void CrFwInCmdSample1SetTerminationActionOutcome(CrFwOutcome_t outcome)
Set the value of the Termination Action Outcome Counter (see CrFwInCmdSample1TerminationAction).
Definition of the OutRegistry Component.
CrFwCrc_t CrFwPcktComputeCrc(CrFwPckt_t pckt)
Compute the CRC in the command or report encapsulated in a packet.
CrFwCounterU1_t CrFwInCmdSample1GetTerminationActionCounter()
Get the value of the Termination Action Counter (see CrFwInCmdSample1TerminationAction).
CrFwProgressStepId_t CrFwInCmdGetNOfProgressFailure(FwSmDesc_t smDesc)
Return the number of progress step failures.
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
CrFwServType_t CrFwRepInCmdOutcomeStubGetServType(CrFwCounterU2_t repPos)
Return the service type of the InCommand Outcome Report at position repPos.
CrFwServType_t CrFwInCmdGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the InCommand.
CrFwBool_t CrFwInCmdIsInAccepted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ACCEPTED.
CrFwCounterU1_t CrFwInCmdSample1GetProgressActionCounter()
Get the value of the Progress Action Counter (see CrFwInCmdSample1ProgressAction).
Interface for reporting an error detected by a framework component.
CrFwRepInCmdOutcome_t CrFwRepInCmdOutcomeStubGetOutcome(CrFwCounterU2_t repPos)
Return the outcome of the InCommand Outcome Report at position repPos.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
CrFwPcktLength_t CrFwInCmdGetParLength(FwSmDesc_t smDesc)
Return the length in bytes of the parameter area of the InCommand.
void CrFwInCmdSample1SetStartActionOutcome(CrFwOutcome_t outcome)
Set the value of the Start Action Outcome Counter (see CrFwInCmdSample1StartAction).
CrFwCounterU2_t CrFwRepInCmdOutcomeStubGetPos()
Return the position in the InCommand Outcome Report array at which the next outcome report will be wr...
void * cmpSpecificData
Derived data which are specific to each type of framework component.
Definition of the InFactory component.
CrFwBool_t CrFwInCmdIsAcceptAck(FwSmDesc_t smDesc)
Return the acknowledge level for command acceptance for the command encapsulated in the InCommand...
CrFwSeqCnt_t CrFwInCmdGetSeqCnt(FwSmDesc_t smDesc)
Return the sequence counter of the InCommand.
#define CR_FW_INCOMMAND_TYPE
Type identifier for the InCommand component.
Definition of the utility functions for the CORDET Framework.
static CrFwCmpData_t inCmdData[CR_FW_INFACTORY_MAX_NOF_INCMD]
The base data for the pre-allocated InCommand instances.
CrFwBool_t CrFwInCmdIsStartAck(FwSmDesc_t smDesc)
Return the acknowledge level for command start for the command encapsulated in the InCommand...
unsigned short CrFwProgressStepId_t
Type for the Progress Step Identifier of an InCommand.
CrFwBool_t CrFwInCmdIsInTerminated(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state TERMINATED.
CrFwBool_t CrFwInCmdTestCase11()
Check the generation of the "termination successful" outcome report of an InCommand.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwOutcome_t CrFwGetSmOutcome(FwSmDesc_t smDesc)
Convenience function to get the outcome of the last check or action of a state machine.
CrFwBool_t CrFwInCmdIsProgressAck(FwSmDesc_t smDesc)
Return the acknowledge level for command progress for the command encapsulated in the InCommand...
CrFwDiscriminant_t CrFwRepInCmdOutcomeStubGetDiscriminant(CrFwCounterU2_t repPos)
Return the discriminant of the InCommand Outcome Report at position repPos.
CrFwCounterU1_t CrFwInCmdSample1GetAbortActionCounter()
Get the value of the Abort Action Counter (see CrFwInCmdSample1AbortAction).
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
void CrFwInCmdTerminate(FwSmDesc_t smDesc)
Send command Terminate to the argument InCommand.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
Definition of Base Component.
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
CrFwDiscriminant_t CrFwInCmdGetDiscriminant(FwSmDesc_t smDesc)
Return the discriminant of the InCommand.
unsigned short CrFwCrc_t
Type used for the CRC field in a packet.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
CrFwBool_t CrFwInCmdTestCase2()
Check the transition from ACCEPTED to PROGRESS for an InCommand.
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
CrFwBool_t CrFwInCmdTestCase6()
Check the transition from state PROGRESS to state TERMINATED for an InCommand.
void CrFwPcktSetCrc(CrFwPckt_t pckt, CrFwCrc_t crc)
Set the CRC in the command or report encapsulated in a packet.
CrFwProgressStepId_t CrFwInCmdGetProgressStepId(FwSmDesc_t smDesc)
Return the progress step identifier of the InCommand.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h). ...
CrFwPcktLength_t CrFwPcktGetParLength(CrFwPckt_t pckt)
Return the length in bytes of the packet's parameter area.
void CrFwInCmdSample1SetReadyFlag(CrFwBool_t flag)
Set the value of the Ready Flag (see CrFwInCmdSample1ReadyCheck).
CrFwPckt_t CrFwInCmdGetPckt(FwSmDesc_t smDesc)
Return the pointer to the packet which holds the InCommand.
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
Type for the data describing an InCommand.
CrFwGroup_t CrFwInCmdGetGroup(FwSmDesc_t smDesc)
Return the group of the InCommand.
CrFwServSubType_t CrFwRepInCmdOutcomeStubGetServSubType(CrFwCounterU2_t repPos)
Return the service sub-type of the InCommand Outcome Report at position repPos.
CrFwBool_t CrFwInCmdTestCase10()
Check the generation of the "progress successful" outcome report of an InCommand. ...
CrFwDestSrc_t CrFwInCmdGetSrc(FwSmDesc_t smDesc)
Return the source of the InCommand.
CrFwBool_t CrFwInCmdIsTermAck(FwSmDesc_t smDesc)
Return the acknowledge level for command termination for the command encapsulated in the InCommand...
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
CrFwServType_t CrFwInCmdGetServType(FwSmDesc_t smDesc)
Return the type of the InCommand.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
No application errors have been detected.
CrFwServType_t CrFwInCmdSample1GetType()
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
Declaration of the test cases for the InCommand Component (see CrFwInCmd.h).
CrFwBool_t CrFwInCmdIsProgressActionCompleted(FwSmDesc_t smDesc)
Return the Completion Outcome of the progress action.
CrFwBool_t CrFwInCmdTestCase3()
Check the transition from ACCEPTED to ABORTED for an InCommand.
Definition of the InCommand Component of the framework.
CrFwPckt_t CrFwInCmdGetParStart(FwSmDesc_t smDesc)
Return the start address of the parameter area of the InCommand.
void CrFwInCmdSample1SetProgressActionCompletionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Completion Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetProgressStepFlag(CrFwBool_t flag)
Sets the progress step flag used by the progress action of the sample InCommand (if the flag is set...