22 #include "FwSmConstants.h" 23 #include "FwSmConfig.h" 25 #include "FwPrConfig.h" 27 #include "FwPrConstants.h" 29 #include "CrFwInStreamUserPar.h" 30 #include "CrFwOutRegistryUserPar.h" 31 #include "CrFwOutFactoryUserPar.h" 33 #include "CrFwCmpData.h" 63 unsigned short ACK_WRONG_CHKSM = 1002, pcktID;
71 if (outFactory == NULL)
73 if (FwSmCheckRec(outFactory) != smSuccess)
77 if (inFactory == NULL)
79 if (FwSmCheckRec(inFactory) != smSuccess)
83 if (outManager == NULL)
85 if (FwSmCheckRec(outManager) != smSuccess)
89 if (inManager == NULL)
91 if (FwSmCheckRec(inManager) != smSuccess)
Type for the Framework Component Data (FCD).
Interface through which framework components access the current time.
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
#define CR_FW_OUTCMP_TYPE
Type identifier for the OutComponent components.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
#define CRPS_REQVERIF_ACC_SUCC
Subtype identifier of the Request Verification Acceptance Successful out-going report packet...
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
#define CRPS_REQVERIF_PROG_FAIL
Subtype identifier of the Request Verification Progress Failed out-going report packet.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
#define CRPS_REQVERIF_START_SUCC
Subtype identifier of the Request Verification Start Successful out-going report packet.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
#define CR_FW_OUTFACTORY_MAX_NOF_OUTCMP
The maximum number of OutComponents which may be allocated at any one time.
#define CRPS_REQVERIF_ACC_FAIL
Subtype identifier of the Request Verification Acceptance Failed out-going report packet...
Definition of the OutFactory component.
An OutComponent allocation request has failed (see CrFwOutFactoryMakeOutCmp).
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
Header file to define all service and packet identifiers.
static CrFwCounterU4_t getDpnOfTermFailed()
Gets the value of the datapool item nOfTermFailed.
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
static CrFwCmpData_t outManagerData[CR_FW_NOF_OUTMANAGER]
The data structures for the OutManager State Machines and their Procedures.
FwSmDesc_t CrFwOutManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutManager State Machine instance.
Interface for creating and accessing a report or command packet.
static CrFwTypeId_t getDppcktIdPrgrFailed()
Gets the value of the datapool item pcktIdPrgrFailed.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
CrFwServType_t CrFwOutCmpGetServType(FwSmDesc_t smDesc)
Return the type of the OutComponent.
static CrPsDestSrc_t getDpinvDestRerouting()
Gets the value of the datapool item invDestRerouting.
Definition of the OutRegistry Component.
void CrFwPcktSetCmdRepType(CrFwPckt_t pckt, CrFwCmdRepType_t type)
Set the type of a packet (either a command packet or a report packet).
static CrPsFailCode_t getDpfailCodeTermFailed()
Gets the value of the datapool item failCodeTermFailed.
static CrFwTypeId_t getDppcktIdAccFailed()
Gets the value of the datapool item pcktIdAccFailed.
#define CRPS_REQVERIF_TERM_SUCC
Subtype identifier of the Request Verification Termination Successful out-going report packet...
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
static CrPsStepId_t getDpstepPrgrFailed()
Gets the value of the datapool item stepPrgrFailed.
#define CRPS_REQVERIF_PROG_SUCC
Subtype identifier of the Request Verification Progress Successful out-going report packet...
CrFwServType_t CrFwInCmdGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the InCommand.
CrFwCounterU2_t CrFwOutManagerGetNOfLoadedOutCmp(FwSmDesc_t smDesc)
Return the number of OutComponents successfully loaded in the POCL of an OutManager since the OutMana...
void SendReqVerifAccSuccRep(FwSmDesc_t smDesc, uint16_t reqVerifAccSuccType)
Generate a Request Verification Acceptance/Start/Termination Successful out-going report...
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
CrFwBool_t CrFwInCmdIsInAccepted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ACCEPTED.
Interface for reporting an error detected by a framework component.
void SendReqVerifPcktReroutFailRep(FwSmDesc_t smDesc, CrPsFailCode_t FailureCode)
Generate a Request Verification Package Rerouting Failed out-going report.
static CrFwCounterU4_t getDpnOfStartFailed()
Gets the value of the datapool item nOfStartFailed.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
Interface for accessing data pool items.
CrFwServType_t CrFwOutCmpGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the OutComponent.
CrFwBool_t CrPsServVeriTestCase1()
Test the Service 1 Request Verification.
#define CRPS_REQVERIF_TERM_FAIL
Subtype identifier of the Request Verification Termination Failed out-going report packet...
FwSmDesc_t CrFwInManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InManager State Machine instance.
static Eleven_Bit_t getTmHeaderAPID(void *p)
Get "APID" from "TmHeader" packet.
void * cmpSpecificData
Derived data which are specific to each type of framework component.
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.
Definition of the InFactory component.
static CrFwCounterU4_t getDpnOfAccFailed()
Gets the value of the datapool item nOfAccFailed.
static FwSmDesc_t inRep[CR_FW_INFACTORY_MAX_NOF_INREP]
The pre-allocated InReport instances.
#define CR_FW_INCOMMAND_TYPE
Type identifier for the InCommand component.
#define CRPS_REQVERIF_START_FAIL
Subtype identifier of the Request Verification Start Failed out-going report packet.
Definition of the utility functions for the CORDET Framework.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
Packet header definitions.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
FwSmDesc_t * pocl
Pending OutComponent List (POCL) for the OutManager.
static CrFwTypeId_t getDppcktIdReroutingFailed()
Gets the value of the datapool item pcktIdReroutingFailed.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
CrFwOutFactoryPoolIndex_t CrFwOutFactoryGetNOfAllocatedOutCmp()
Return the number of OutComponents which are currently allocated.
static CrFwCounterU4_t getDpnOfReroutingFailed()
Gets the value of the datapool item nOfReroutingFailed.
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
Definition of Base Component.
void SendReqVerifPrgrSuccRep(FwSmDesc_t smDesc, CrPsStepId_t stepIdentifier)
Generate a Request Verification Progress Successful out-going report.
void SendReqVerifPrgrFailRep(FwSmDesc_t smDesc, CrPsStepId_t stepIdentifier, CrPsFailCode_t FailureCode)
Generate a Request Verification Progress Failed out-going report.
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
static CrPsFailCode_t getDpfailCodePrgrFailed()
Gets the value of the datapool item failCodePrgrFailed.
static CrFwTypeId_t getDppcktIdStartFailed()
Gets the value of the datapool item pcktIdStartFailed.
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
static CrPsFailCode_t getDpfailCodeAccFailed()
Gets the value of the datapool item failCodeAccFailed.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
FwSmDesc_t CrFwInFactoryMakeInRep(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming report (InReport).
void SendReqVerifAccFailRep(FwSmDesc_t smDesc, CrPsFailCode_t FailureCode)
Generate a Request Verification Acceptance Failed out-going report.
Interface through which applications can initialize and execute framework PUS extension components...
int CrPsInitServReqVerif()
Initialization of CORDET Framework PUS Extension components.
CrFwCounterU1_t CrFwOutManagerGetNOfPendingOutCmp(FwSmDesc_t smDesc)
Return the number of OutComponents currently in the POCL of an OutManager.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetNOfAllocatedInCmd()
Return the number of InCommands which are currently allocated.
No application errors have been detected.
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetNOfAllocatedInRep()
Return the number of InReports which are currently allocated.
CrFwServType_t CrFwInCmdGetServType(FwSmDesc_t smDesc)
Return the type of the InCommand.
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
static CrPsFailCode_t getDpfailCodeStartFailed()
Gets the value of the datapool item failCodeStartFailed.
static CrFwCounterU4_t getDpnOfPrgrFailed()
Gets the value of the datapool item nOfPrgrFailed.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
void SendReqVerifCmdFailRep(FwSmDesc_t smDesc, uint16_t reqVerifCmdFailType, CrPsFailCode_t FailureCode)
Generate a Request Verification Start/Termination Failed out-going report.
void CrPsExecServReqVerif()
Execution of CORDET Framework PUS Extension components.
Definition of the InCommand Component of the framework.
Type for the data describing an OutManager.
static CrFwTypeId_t getDppcktIdTermFailed()
Gets the value of the datapool item pcktIdTermFailed.